> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude Agent SDK

> Run Claude Code as an AgentOS agent using ClaudeAgent.

`ClaudeAgent` wraps the [Claude Agent SDK](https://github.com/anthropics/claude-agent-sdk-python) so Claude Code can be served through AgentOS.
Tool execution is handled by the SDK. You configure which built-in tools are allowed and which permission mode to use.

```python theme={null}
from agno.agents.claude import ClaudeAgent
from agno.db.sqlite import SqliteDb
from agno.os import AgentOS

agent = ClaudeAgent(
    name="Claude Code Agent",
    model="claude-sonnet-4-6",
    allowed_tools=["Read", "Edit", "Bash"],
    permission_mode="acceptEdits",
    max_turns=10,
)

agent_os = AgentOS(
    agents=[agent],
    tracing=True,
    db=SqliteDb(db_file="tmp/agentos.db"),
)
app = agent_os.get_app()

if __name__ == "__main__":
    agent_os.serve(app="claude_agent:app", reload=True)
```

## Install

```bash theme={null}
uv pip install "agno[os]" claude-agent-sdk
export ANTHROPIC_API_KEY=sk-ant-...
```

## Parameters

| Parameter | Type | Default | Description |
| - | - | - | - |
| `name` | `str` | `None` | Display name for the agent. |
| `id` | `str` | `None` | Unique identifier. Auto-generated from `name` if unset. |
| `system_prompt` | `str` | `None` | Optional system prompt. |
| `model` | `str` | `None` | Model id (e.g. `"claude-sonnet-4-6"`). Defaults to the SDK default. |
| `allowed_tools` | `List[str]` | `None` | Built-in tools the agent can call (e.g. `["Read", "Bash", "WebSearch"]`). |
| `disallowed_tools` | `List[str]` | `None` | Tools to block. |
| `permission_mode` | `str` | `None` | One of `"default"`, `"acceptEdits"`, `"plan"`, `"bypassPermissions"`. |
| `max_turns` | `int` | `None` | Maximum number of turns per run. |
| `max_budget_usd` | `float` | `None` | Hard cost cap per run. |
| `cwd` | `str` | `None` | Working directory the agent runs in. |
| `mcp_servers` | `Dict[str, Any]` | `None` | MCP server configurations for custom tools. |
| `options_kwargs` | `Dict[str, Any]` | `{}` | Extra kwargs forwarded to `ClaudeAgentOptions`. |
| `db` | `BaseDb` | `None` | Database for session persistence. |

## Examples

> **[AgentOS deployment](https://github.com/agno-agi/agno/blob/main/cookbook/frameworks/00_quickstart/claude_agent.py)**
>
> Serve a Claude Code agent through AgentOS.

> **[Standalone usage](https://github.com/agno-agi/agno/blob/main/cookbook/frameworks/claude-agent-sdk/claude_basic.py)**
>
> Call the agent directly with `.run()` and `.print_response()`.

> **[Custom MCP tools](https://github.com/agno-agi/agno/blob/main/cookbook/frameworks/claude-agent-sdk/claude_mcp_tools.py)**
>
> Extend Claude Code with your own MCP servers.

> **[Sessions](https://github.com/agno-agi/agno/blob/main/cookbook/frameworks/claude-agent-sdk/claude_session.py)**
>
> Resume conversations across runs with `session_id`.

## Developer Resources

* [Cookbook examples](https://github.com/agno-agi/agno/tree/main/cookbook/frameworks/claude-agent-sdk)
* [Claude Agent SDK on GitHub](https://github.com/anthropics/claude-agent-sdk-python)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.