> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runcascade.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude Agent SDK

> Auto-instrument the Claude Agent SDK with Cascade

Cascade provides auto-instrumentation for the Claude Agent SDK. A single function call translates the framework's native events into Cascade spans with no changes to your existing agent code.

## Setup

```python theme={null}
from cascade import init_tracing
from cascade.integrations import instrument_claude_agents

init_tracing(project="my_claude_agent")
instrument_claude_agents()

# Existing Claude Agent SDK code - no changes needed
from claude_agent_sdk import query

result = await query("Plan a trip to Tokyo")
```

<Note>
  Requires the `claude-agent-sdk` package:

  ```bash theme={null}
  pip install claude-agent-sdk
  ```
</Note>

## What gets traced automatically

The integration automatically captures:

* **`query()` function calls**: top-level and client-based
* **Tool executions**: MCP server tools
* **Input prompts and output text**: full conversation data
