> ## Documentation Index
> Fetch the complete documentation index at: https://litellmagentplatform-fix-document-harness-auth-token.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude Code

> Open a Kubernetes-sandboxed Claude Code session from your terminal.

<video autoPlay muted loop playsInline className="w-full rounded-xl" src="https://mintcdn.com/litellmagentplatform-fix-document-harness-auth-token/-SgpcgCh64tbVJRQ/images/claude-code-attach.mp4?fit=max&auto=format&n=-SgpcgCh64tbVJRQ&q=85&s=c0f61113713a240bdcd0390b5e184cb9" data-path="images/claude-code-attach.mp4" />

The `lap` CLI talks to a running LAP instance. If you haven't deployed one yet, see [Installation](/installation).

<Note>
  First time? Install the CLI:

  ```bash theme={null}
  git clone https://github.com/BerriAI/litellm-agent-platform.git
  cd litellm-agent-platform/cli && npm install
  ln -sf "$PWD/bin/lap.mjs" ~/.local/bin/lap
  ```
</Note>

## 1. Log in

```bash theme={null}
lap login
```

Paste your LAP URL and `MASTER_KEY` when prompted. Saved to `~/.lap/config.json`.

## 2. Open an agent

```bash theme={null}
lap
```

Pick your Claude Code agent from the interactive list. `lap` spins up a Kubernetes-sandboxed pod running Claude Code, attaches your local terminal to its TTY over a WebSocket, and drops you straight in.

The pod's env contains only stub credentials. The [vault proxy](/learn/vault-proxy) swaps them for real keys on every outbound TLS connection.

Press **Ctrl-D** to detach — the session stays alive for 24h. Run `lap` again and pick the same agent to reattach.

***

## Creating an agent

If you're setting up the platform, create a Claude Code agent first. In the UI choose **claude-code** from the Harness picker and pick a model, or via API:

```bash theme={null}
curl -X POST $LAP_URL/api/v1/managed_agents/agents \
  -H "Authorization: Bearer $MASTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"my-claude","harness_id":"claude-code","model":"anthropic/claude-sonnet-4"}'
```
