Files
copilotkit__copilotkit/showcase/integrations/langgraph-python/docs/setup/agent-config-setup.mdx
Tyler Slaton a07e97b224 chore: run pnpm format
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-05-20 21:30:28 -07:00

24 lines
698 B
Plaintext

<Steps>
<Step>
### Install the LangGraph Python SDK
<InstallPythonSDK />
</Step>
<Step>
### Wire CopilotKit middleware into your graph
Agent config flows from the UI into the agent via `useAgentContext` — the
frontend publishes a typed object and `CopilotKitMiddleware` injects it
into the model's prompt on every turn. Make sure the middleware is in
your `create_agent` call.
<DemoCode file="src/agents/frontend_tools.py" region="middleware" />
Read the resulting config inside your system prompt or a custom
middleware — see `src/agents/agent_config_agent.py` for the full
rulebook-driven shape used in the showcase.
</Step>
</Steps>