Context type | Description | Mutability | Lifetime | Access method |
---|---|---|---|---|
Static runtime context | User metadata, tools, db connections passed at startup | Static | Single run | context argument to invoke /stream |
Dynamic runtime context (state) | Mutable data that evolves during a single run | Dynamic | Single run | LangGraph state object |
Dynamic cross-conversation context (store) | Persistent data shared across conversations | Dynamic | Cross-conversation | LangGraph store |
context
argument to invoke
/stream
. This data does not change during execution.
context
replaces config['configurable']
Runtime context is now passed to the context
argument of invoke
/stream
,
which replaces the previous pattern of passing application configuration to config['configurable']
.invoke
method runs the underlying graph with the provided input.context
parameter allows you to provide additional dependencies that the agent can use during its execution.Runtime
object can be used to access static context and other utilities like the active store and stream writer.
See the [Runtime][langgraph.runtime.Runtime] documentation for details.AgentState
or MessagesState
.