Skip to main content
The streaming helpers are the low-level alternative to using Thread and Message. They let you emit messages, cards, artifacts, and reactions directly when you already have access to the ADK event emitter. Most agents should use Thread and Message instead. Reach for these functions when you are outside an invocation method that provides a Thread, or when you need fine-grained control over routing.

Import

All four functions require an EventEmitter — the callable that pushes ADK events into the current invocation stream. Retrieve it with get_adk_emitter():
get_adk_emitter() returns None when called outside an active invocation context. Always guard before using it.

emit_message

Emit a text message during agent execution.

emit_card

Emit a card message during agent execution.
See Card for all creation modes.

emit_artifact

Emit a pre-built A2A artifact during agent execution. The function saves the artifact via ctx.artifact_service and then emits an ADK event with EventActions(artifact_delta=...).
emit_artifact does not support multi-part artifacts. If the artifact contains more than one part, the call is a no-op and a warning is logged. Build single-part artifacts when using this function.

emit_reaction

Emit a reaction action event. Instructs the distribution to add or remove a reaction on an existing provider message.
For message-level reactions prefer message.react(...) — it reads context_id and message_id from the inbound event automatically.