1. Plain LangGraph
Use plain LangGraph when you only need normal conversational input and output.- Aion maps inbound text into
state.messages - Aion infers the final reply from streamed model output or the last
agent-authored
AIMessage - the graph does not need any Aion-specific dependency
2. Hybrid A2A
Use hybrid authoring when you want raw protocol access without adopting the higher-level authoring helpers.runtime.context.inboxgives you direct access to the inbound task, message, and request metadataa2a_outboxgives you direct control over the outbound A2A object- LangGraph still provides ordinary
state.messagesfor model-facing logic
3. SDK-aware LangGraph
Use theaion.langgraph.authoring surface when you want normalized messaging,
runtime-scoped Aion context, model-service helpers, and MCP tool loading without
hand-assembling A2A envelopes.
- request-scoped routing data stays in LangGraph runtime context, not graph state
thread.reply(...),thread.post(...), andthread.typing(...)emit through LangGraph custom streaming events- model helpers inject Aion model-service authentication and runtime principal attribution per request
- MCP helpers resolve static and runtime capability references after
AionRuntimeContextis available
Event router
For event-driven integrations, prefercreate_event_router. It creates a normal
LangGraph node and injects only the parameters your handler declares:
state, runtime, context, event,
distribution, behavior, environment, principal_identity,
service_identity, inbox, thread, or message. Other declared parameters
are left for LangGraph-native injection.
Model service
Useaion_chat_model or aion_chat_openai when LangChain model calls should go
through Aion’s OpenAI-compatible model service:
api_key, base_url,
default_headers, http_client, and http_async_client. Pass model behavior
options such as temperature, token limits, timeouts, and retries.
MCP tools
Useload_aion_mcp_tools after an AionRuntimeContext exists. Static
capability references address known control-plane endpoints, while runtime
references resolve their subject from the incoming request:
AionLangGraphMcpResolver when you want to reuse the same MCP resolution
settings across invocations.
Which Pattern to Choose
It is important that these modes compose cleanly. A graph should be able to
use the fluent SDK for one turn,
a2a_outbox for another, and plain
LangGraph fallback for the rest without switching adapters.