> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aion.to/llms.txt
> Use this file to discover all available pages before exploring further.

# AionRuntimeContext

> Invocation-scoped AionRuntimeContext for LangGraph.

Each LangGraph invocation receives an [`AionRuntimeContext`](/sdk/python/messaging/runtime-context)
populated by Aion Server. It carries the inbound inbox, typed event, and
distribution payload for the current request.

`Thread` and `Message` are authoring helpers built on top of it. When using
`create_event_router`, they are injected automatically — you rarely need to
reach into the context directly.

## Accessing the Context

Register `AionRuntimeContext` as the graph context schema, then access it via
`Runtime[AionRuntimeContext]` in any node:

```python theme={null}
from langgraph.graph import StateGraph
from langgraph.runtime import Runtime

from aion.core.runtime import AionRuntimeContext
from aion.langgraph.authoring import Thread


async def node(state: State, runtime: Runtime[AionRuntimeContext]) -> dict:
    context = runtime.context
    thread = Thread.from_context(context)
    ...


builder = StateGraph(State, context_schema=AionRuntimeContext)
```

## Related Pages

* [AionRuntimeContext](/sdk/python/messaging/runtime-context)
* [Thread](/sdk/langgraph/api/thread)
* [Message](/sdk/langgraph/api/message)
* [Event Handlers](/sdk/langgraph/api/event-handlers)
