> ## 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](https://docs.getunbound.ai/integrations/claude-code-integration.md), 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)
* **Python 3 and curl** on the machine that runs your agent

## Get your API key

1. Open [Configure](https://gateway.getunbound.ai/configure) in Unbound.
2. Under **Run the Install Command**, click **Copy API Key**.

## Setup

Run this on the machine that runs your agent:

```bash theme={null}
python3 <(curl -fsSL https://getunbound.ai/setup/claude-code/hooks/install) --api-key <your-api-key>
```

After setup, start a new agent session. On Windows, see [Direct Install](https://docs.getunbound.ai/integrations/direct-install.md).

> [!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"`, choose **My Org (MDM)** on Configure, click **Copy MDM Key**, and run:
>
> ```bash theme={null}
> sudo python3 -c "$(curl -fsSL https://getunbound.ai/setup/claude-code/hooks/mdm-install)" --api-key <mdm-api-key>
> ```

To remove the Unbound configuration:

```bash theme={null}
python3 <(curl -fsSL https://getunbound.ai/setup/claude-code/hooks/install) --clear
```

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

```bash theme={null}
sudo python3 -c "$(curl -fsSL https://getunbound.ai/setup/claude-code/hooks/mdm-install)" --clear
```

## Verification

Run your agent. Its terminal commands and MCP tool calls show up under [Analytics → Agentic Use](https://docs.getunbound.ai/dashboard/analytics/agentic-use).

> [card] [Direct Install](https://docs.getunbound.ai/integrations/direct-install.md)
>
> Install hooks without the CLI

> [card] [Tool Policies](https://docs.getunbound.ai/policies/tool-policies.md)
>
> Configure security guardrails for AI tools


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