AionInvocationContext extends Google ADK’s InvocationContext with aion_runtime_context:
the inbound A2A state for the current invocation — inbox, typed event, and distribution payload —
without requiring direct access to server internals.
Import
Typing the Context
ADK passes the invocation context to_run_async_impl as the base InvocationContext. Type it
as AionInvocationContext to get IDE support for the Aion-specific field:
Aion Fields
| Field | Type | Description |
|---|---|---|
aion_runtime_context | AionRuntimeContext | None | Inbound A2A state for the current invocation. None when the agent runs outside of Aion |
aion_runtime_context is the entry point for the inbox, typed event, and distribution payload.
See AionRuntimeContext for the full field reference.
ADK Base Fields
AionInvocationContext inherits all standard ADK InvocationContext fields. The ones most
relevant when writing Aion agents:
| Field | Type | Description |
|---|---|---|
artifact_service | BaseArtifactService | None | Artifact storage for the current invocation. Used internally by emit_artifact and Thread.post() |
session | Session | ADK session for the current invocation |
app_name | str | Agent application name |
user_id | str | User identifier for the current session |