Stream Emitter • AI Agent SDK

stream_emitter: Aggregate “StreamEventEmitter“ fanning in member agents' events.

stream_emitter

Method

</div>

This is a method of the AgentTeam class in the agents module.

Aggregate `StreamEventEmitter` fanning in member agents’ events.

Lazily created on first access. On creation it registers a forwarding callback on each member agent’s own `stream_emitter so per-step events (tool calls, text/reasoning deltas, retries, errors) surface on a single team-level emitter, each tagged with the emitting agent's agent_id. This gives a single attach point (e.g. the CLI --output stream-json` bridge) parity with single-agent runs.

Zero-overhead when unused: nothing is wired unless this property is accessed, and forwarding only tags `agent_id` when the source event did not already carry one.

Signature

python
def stream_emitter() -> Any

Returns

ResponseField Any

The result of the operation.

Uses

  • StreamEventEmitter

Source

View on GitHub

praisonaiagents/agents/agents.py at line 1352