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

# Claude Agent SDK

> Learn how to install and configure Unbound for agents built with the Claude Agent SDK

## What is the Claude Agent SDK?

The [Claude Agent SDK](https://code.claude.com/docs/en/agent-sdk/overview) lets you build your own agents in Python or TypeScript. It runs Claude Code underneath, so an agent can read files, run commands, and edit code. It was previously called the Claude Code SDK.

These agents usually run headless, on a server or a VM. Unbound uses the same hooks as [Claude Code](/integrations/claude-code-integration), so your tool policies apply to every tool call the agent makes.

## Prerequisites

Before integration, ensure you have:

* **Claude Agent SDK**: [Install the Claude Agent SDK](https://code.claude.com/docs/en/agent-sdk/quickstart)
* **Unbound CLI**: [Install the CLI](/cli/overview#installation)

## Get your API key

1. Open [Configure](https://gateway.getunbound.ai/configure) in Unbound.
2. Under **API access**, copy the **API key**. If the card is not shown, your key is the value after `--api-key` in the install command.

## Setup with Unbound CLI

```bash theme={null}
unbound login --api-key <your-api-key>
unbound setup claude-code --subscription
```

After setup, start a new agent session.

<Note>
  Setup adds the hooks to `~/.claude/settings.json`, which the SDK reads only when `settingSources` includes `"user"`. That is the default. If your agent leaves out `"user"`, run setup with `sudo` and an admin API key instead:

  ```bash theme={null}
  sudo unbound setup --api-key <admin-api-key> claude-code-subscription
  ```
</Note>

To remove the Unbound configuration:

```bash theme={null}
unbound setup claude-code --clear
```

If you installed with `sudo`, remove it with `sudo`:

```bash theme={null}
sudo unbound setup claude-code --clear
```

## Verification

1. Run `unbound doctor`. Claude Code should be reported healthy.
2. Run your agent. Its terminal commands and MCP tool calls show up under [Analytics → Agentic Use](/dashboard/analytics/agentic-use).

<CardGroup cols={2}>
  <Card title="Unbound CLI" icon="terminal" href="/cli/overview">
    Install the CLI to set up and manage tools
  </Card>

  <Card title="Tool Policies" icon="shield" href="/policies/tool-policies">
    Configure security guardrails for AI tools
  </Card>
</CardGroup>


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