createAgent
runs on LangGraph’s runtime under the hood.
LangGraph exposes a Runtime
object with the following information:
BaseStore
instance used for long term memory"custom""
stream modecreateAgent
, you can specify a contextSchema
to define the structure of the context
stored in the agent runtime.
When invoking the agent, pass the context
argument with the relevant configuration for the run:
runtime
parameter to access the Runtime
object inside a tool.
runtime
parameter to access the Runtime
object inside a prompt function.
runtime
parameter to access the Runtime
object inside a pre or post model hook.