Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.agno.com/llms.txt

Use this file to discover all available pages before exploring further.

ClaudeAgent wraps the Claude Agent SDK 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.
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

uv pip install claude-agent-sdk
export ANTHROPIC_API_KEY=sk-ant-...

Parameters

ParameterTypeDefaultDescription
namestrNoneDisplay name for the agent.
idstrNoneUnique identifier. Auto-generated from name if unset.
system_promptstrNoneOptional system prompt.
modelstrNoneModel id (e.g. "claude-sonnet-4-6"). Defaults to the SDK default.
allowed_toolsList[str]NoneBuilt-in tools the agent can call (e.g. ["Read", "Bash", "WebSearch"]).
disallowed_toolsList[str]NoneTools to block.
permission_modestrNoneOne of "default", "acceptEdits", "plan", "bypassPermissions".
max_turnsintNoneMaximum number of turns per run.
max_budget_usdfloatNoneHard cost cap per run.
cwdstrNoneWorking directory the agent runs in.
mcp_serversDict[str, Any]NoneMCP server configurations for custom tools.
options_kwargsDict[str, Any]{}Extra kwargs forwarded to ClaudeAgentOptions.
dbBaseDbNoneDatabase for session persistence.

Examples

AgentOS deployment

Serve a Claude Code agent through AgentOS.

Standalone usage

Call the agent directly with .run() and .print_response().

Custom MCP tools

Extend Claude Code with your own MCP servers.

Sessions

Resume conversations across runs with session_id.

Developer Resources