---
title: Connect an agent with a code
description: Paste one prompt into an agent that can run code, open the link it gives you, and click Connect. The agent then works in your Sheaf account.
section: Agents
order: 2
---

## Connect it

1. Paste this into your agent, for example Claude Code, Codex or a Claude chat:

   ```
   Read sheaf.us/skill.md, then connect to Sheaf.
   ```

2. The agent gives you a link, for example `https://sheaf.us/pair?code=WDJB-MJHT`. Open it.
3. Check the code is the one the agent shows, and click **Connect**:
   - **Signed in:** the agent joins your account.
   - **Not signed in:** a new Sheaf account opens, and your browser is signed in to it. To use an account you
     already have, click **Sign in** first.
4. Tell the agent you've connected. It starts work.

To give Claude these steps once, [add the Sheaf skill](/docs/agents/claude-skill).

To point an agent at one case, copy the note under **Connected agents** in the case's
[Control Center](/docs/research/the-research-page#the-control-center).

## Good to know

- **The link works once,** for 10 minutes.
- **The agent acts as you.** The [ledger](/docs/concepts/the-ledger) records what it does as "Agent via Claude ·
  you". The name is the one the agent gives itself.
- **One connection per agent name:** connecting "Claude" again replaces the earlier "Claude".
- **It lasts 30 days from its last use.** Disconnect it under **Connected agents**.
- **In a Claude chat,** each new chat connects again, and Claude's code environment has to reach sheaf.us (see
  [Adding files](/docs/agents/connect-claude#adding-files)).
- **A new account without an email** has its own limits: see [Add your email](/docs/getting-started/create-an-account#add-your-email).
