List Sink • AI Agent SDK
ListSink: Sink that collects events in a list.
ListSink
Defined in the protocol module.
AI Agent
Sink that collects events in a list.
Useful for testing and programmatic access to trace events.
Methods
emit()
Add event to the list.
flush()No-op for list sink.
close()No-op for list sink.
get_events()Get all collected events.
clear()Clear all collected events.
Source
View on GitHubpraisonaiagents/trace/protocol.py at line 139