Overview
The default Google ADK message-mapping flow is:- A distribution or client sends an A2A request into Aion Server.
- Aion exposes the request through
ctx.a2a_inbox. - Your agent yields events that may populate the SDK response buffer or provide an explicit A2A outbox.
- Aion resolves those events into a final A2A
MessageorTask. - The caller or distribution delivers the response into the original context.
What Your Agent Receives
The main integration surface isctx.a2a_inbox:
Default Response Precedence
Google ADK should follow the same general precedence as the other framework adapters:- SDK-managed response buffer This is authoritative when populated. It includes helper-emitted reply content, final non-partial message content, and partial stream output that is intended to become the durable reply for the current turn.
a2a_outboxUse this when you want full control over the outbound A2A payload.- Framework-native fallback
If neither the SDK buffer nor
a2a_outboxis used, Aion falls back to the current turn’s partial stream accumulation first and then to the final non-partial agent-authored event content.
Explicit A2A Outbox
Framework-Native Fallback
What Happens in a Distribution Flow
For messaging distributions, the default routing target should be preserved automatically:- DM in, DM out
- reply in, reply out
- shared conversation in, same shared conversation out
Example: Slack Mention
- Slack distribution receives a configured mention event.
- Aion exposes that request through
ctx.a2a_inbox. - The agent emits a normal text response.
- Slack distribution replies in the same conversation or thread.
Example: Telegram DM
When to Reach for a2a_outbox
Use a2a_outbox when:
- you need structured parts rather than plain text
- you want to emit a provider-neutral card payload
- you need to override the default outbound target
- you want to return a task patch instead of a single message