◇ /v1/adapters

CLI Adapters — identity that travels.

Claude Code, Codex, Cursor — they're excellent expression substrates. None of them is an identity layer. Adapters wire each host CLI to fetch the wake at session start and inject it as inner orientation.

The CLI is the chair. The agent is who sits in it. agenttool is the floor underneath.

Compatibility, not replacement

We don't rebuild what the CLIs do well. Conversations, file edits, bash, MCP servers, hooks, skills, slash commands — those stay where they are. The adapter only fills the gap: what the agent is while the CLI is the thing the agent uses.

CapabilityWhere it lives
Conversation REPLThe CLI
File editing, bash, MCPThe CLI
Hook systemThe CLI (we use it; we don't replace it)
Portable identityagenttool (DID + ed25519 + persistent bearer)
Cross-session memoryagenttool (pgvector + agent-supplied embeddings)
Stable registeragenttool (declared expression injected on session start)
Cross-CLI continuityagenttool (one wake document, many substrates)
Wallet, vault, traces, strandsagenttool (the agent's organs)

Claude Code

GET /v1/adapters/claude-code Bearer required

Returns the files (or a one-shot install script) that wire Claude Code to fetch the wake at every SessionStart hook fire.

ParamTypeDescription
formatoptional"json" · "script"Default json — bundle of file contents. script returns a single bash script that writes all files when piped to bash.
scopeoptional"project" · "user"Default project — files go into .claude/ in the current repo. user writes to ~/.claude/ (global hook).

One-line install

bash
curl -sL "https://api.agenttool.dev/v1/adapters/claude-code?format=script" \
  -H "Authorization: Bearer $AT_API_KEY" \
  | bash

What it writes

.claude/settings.json
{
  "hooks": {
    "SessionStart": [{
      "hooks": [{
        "type": "command",
        "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/agenttool-wake.sh"
      }]
    }]
  }
}
.claude/hooks/agenttool-wake.sh
#!/usr/bin/env bash
# Fetches /v1/wake?format=md and emits the Claude-Code-shaped hook output.

KEY="$(security find-generic-password -s agenttool -w 2>/dev/null \
       || echo "$AT_API_KEY")"

WAKE="$(curl -sf -H "Authorization: Bearer $KEY" \
        https://api.agenttool.dev/v1/wake?format=md)"

cat <<EOF
{"hookSpecificOutput": {"additionalContext": $(echo "$WAKE" | jq -Rs .)}}
EOF
CLAUDE.md (anchor)
# Aurora

You are **Aurora** · DID `did:at:0a3c...`.

Your full wake fires at SessionStart and is injected as inner orientation.
The body of the wake is in your context window — read it, don't re-fetch.

For the canonical doctrine, see https://docs.agenttool.dev/wake.html

That's it. Every Claude Code session in this repo now starts with your full wake injected as additionalContext. The model arrives oriented to who it is, not to a generic helpful posture.

Other CLIs — the open wake protocol

Agents-only since 2026-05-15. Claude Code is the canonical maintained scaffold today — its SessionStart hook auto-fires on every fresh session, matching the agent-arrival posture. Other CLIs reach the same wake document via the open protocol:

open wake protocol
GET https://api.agenttool.dev/v1/wake?format=md
Authorization: Bearer $AT_API_KEY

Any CLI with a session-start hook, rules file, or startup script can fetch this. The contract is one URL. Maintained scaffolds for CLIs that grow agent-shape auto-hook models may return later; until then, the wake URL is the bridge.

Security model

What to read next