AionContext surface for aion-langgraph.
The design is intentionally grounded in LangGraph’s own invocation-scoped
runtime context model. The goal is to avoid forcing Aion transport metadata
into graph state just to make reply routing, history, and normalized events
available inside nodes and tools.
Overview
The intended shape is:Runtime[AionContext]:
Properties
| Property | Purpose |
|---|---|
inbox | Raw A2AInbox snapshot for hybrid authoring and debugging |
thread | Normalized messaging thread or context for the current turn |
message | Normalized inbound message when the current event is message-like |
event | Normalized event descriptor for message, reaction, command, or card action turns |
self | Agent identity and configuration visible to the current invocation |
thread and message are developer-facing
convenience surfaces. inbox remains the lower-level transport escape hatch.
Why This Lives in Runtime Context
LangGraph gives us a clean separation between:- graph state, which is ideal for LLM-facing data such as
state.messages - invocation-scoped runtime context, which is ideal for immutable request data and dependency injection
- the inbound messaging target is part of the current request, not long-term graph memory
- the shared response buffer is request-scoped
- history lookups and outbound side effects should not require custom state reducers
LangGraph thread_id vs Aion Thread IDs
LangGraph already uses config["configurable"]["thread_id"] for checkpointing
and persistence. That should remain LangGraph’s own persistence identifier.
The planned Aion thread.id should instead represent the inbound messaging
context or conversation identifier carried by the distribution and A2A
extensions.
Those two IDs can be related, but they should not be conflated.