### Install the Claude Agent SDK packages
```bash
uv add claude-agent-sdk ag-ui-claude-sdk ag-ui-protocol anthropic fastapi uvicorn python-dotenv
```
### Bridge Claude Agent SDK to AG-UI
Use `ClaudeAgentAdapter` from `ag_ui_claude_sdk`. The adapter receives the
AG-UI run input, emits AG-UI events back to CopilotKit, and can expose
backend tools through an in-process Claude SDK MCP server.