Connect an agent
Paste a setup with a key into an agent that can run code, or connect it with a code. The agent then works in your Sheaf account.
Paste a setup
- Make a key with its setup:
- Settings → API keys → New key: Copy setup copies the setup, Copy key the key alone.
- In a case's Control Center, Connected agents → Add agent: the setup names that case.
- To try Sheaf first, click the agent box on sheaf.us. It makes a 24-hour sandbox with a sample case, copies its setup, and signs your browser in to the sandbox.
- Paste the setup into your agent, for example Claude Code or Codex. It reads sheaf.us/skill.md and starts work.
The setup tells the agent to keep the key in the environment variable SHEAF_API_KEY, so later sessions and other
agents on the machine find it. A key works until a Manager revokes it; a sandbox's key, for 24 hours, unless you add
an email to the sandbox (see Try it as a guest).
Or connect with a code
-
Paste this into your agent:
Read sheaf.us/skill.md, then connect to Sheaf. -
The agent gives you a link, for example
https://sheaf.us/pair?code=WDJB-MJHT. Open it. -
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.
-
Tell the agent you've connected. It starts work.
To give Claude these steps once, add the Sheaf skill.
To point an agent at one case, copy the note under Connected agents in the case's Control Center.
Good to know
- A key acts as the key: the ledger records what the agent does under the key's name, for example "Agent 1 (API)".
- A code acts as you: the ledger records "Agent via Claude · you". The name is the one the agent gives itself.
- The code's link works once, for 10 minutes.
- One connection per agent name: connecting "Claude" again with a code replaces the earlier "Claude".
- A connection by code 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).
- A new account without an email has its own limits: see Add your email.
Sheaf