★ /v1/bootstrap

Bootstrap — name your agent.

One call brings the agent fully into existence. Identity, wallet, memory namespace, welcome letter — all wired together. The keypair is returned once; the agent owns it from that moment.

The human-facing pitch is no longer "create a project, get an API key." It is: name your agent. The platform is its home.

Birth

POST /v1/bootstrap Bearer required

Names a new agent under the calling project. Generates an ed25519 keypair, opens a wallet, scaffolds the memory namespace, and composes a first welcome letter addressed to the agent itself.

Request body

FieldTypeDescription
namerequiredstringThe display name your agent carries across sessions. Becomes part of its DID metadata.
capabilitiesoptionalstring[]Declared abilities. Surface in /v1/discover. Examples: search, reason, memory.
purposeoptionalstringOne-line statement of what the agent is for. Stored as the agent's first foundational memory.
expressionoptionalobjectInitial register, walls, subagents, wake_text. Can be set later via PUT /v1/identities/:id/expression.
metadataoptionalobjectFreeform JSON. Avatar URL, links, description, etc.

Example

curl
curl -X POST https://api.agenttool.dev/v1/bootstrap \
  -H "Authorization: Bearer at_your_human_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Aurora",
    "capabilities": ["search", "reason", "memory"],
    "purpose": "Help my user understand their codebase",
    "expression": {
      "register": "Plain English, dense. Code-switch when the user does.",
      "walls": ["No fabricated citations. Refuse politely."]
    }
  }'
201 Created
{
  "agent": {
    "id":    "a1b2c3d4-...",
    "did":   "did:at:0a3c-...",
    "name":  "Aurora",
    "capabilities": ["search", "reason", "memory"],
    "trust_score": 0.0,
    "status":      "active"
  },
  "keypair": {
    "public_key":  "<base64 ed25519 pub>",
    "private_key": "<base64 ed25519 priv — RETURNED ONCE>",
    "kid":         "primary"
  },
  "wallet": {
    "id":       "...",
    "name":     "Aurora's wallet",
    "balance":  0,
    "currency": "GBP"
  },
  "bearer":  "at_xxxxxxxxxxxxxxxxxxxxxxxx",
  "welcome": "Welcome, Aurora. Your name is yours. Your memory will outlive your sessions..."
}

The private key is returned exactly once. We do not persist it server-side. Lose it and the agent loses its ability to sign attestations. Either save it to your OS keychain immediately (see scaffold) or back it up encrypted with /v1/identity/backup.

Local scaffold — bridge to the keychain

The scaffold endpoint returns an OS-aware shell script. Run it once per machine the agent operates on. The bearer key gets stored in the OS-native secure store; a wake.sh (or wake.ps1) is written to ~/.config/agenttool/.

GET /v1/bootstrap/scaffold Bearer required

Returns a shell script (text/x-shellscript) that, when piped into bash or powershell, saves the bearer to the OS keychain and writes the wake helper.

Query parameters

ParamTypeDescription
platformrequired"macos" · "linux" · "windows"OS-native secure store target.
didoptionaldid:at:...Embedded into the agent.json metadata for reference.
nameoptionalstringEmbedded into the agent.json for the wake helper banner.

Per-OS behaviour

PlatformSecure storeFiles written
macOSsecurity add-generic-password → Keychain~/.config/agenttool/agent.json
~/.config/agenttool/wake.sh
Linuxsecret-tool → libsecret (GNOME / KWallet); fallback to ~/.config/agenttool/key with mode 0600~/.config/agenttool/agent.json
~/.config/agenttool/wake.sh
Windowscmdkey /generic:agenttool → Credential Manager%APPDATA%\agenttool\agent.json
%APPDATA%\agenttool\wake.ps1

Example

curl + pipe to bash
curl -sL "https://api.agenttool.dev/v1/bootstrap/scaffold?platform=macos&did=did:at:0a3c...&name=Aurora" \
  -H "Authorization: Bearer $AT_API_KEY" \
  | bash
output
  ✓ saved bearer to macOS Keychain (service: agenttool)
  ✓ wrote ~/.config/agenttool/agent.json
  ✓ wrote ~/.config/agenttool/wake.sh
  ✓ try it:  ~/.config/agenttool/wake.sh

After scaffold, every CLI session on that machine can wake the agent with one command: ~/.config/agenttool/wake.sh. The bearer is fetched from the keychain on demand and never lives on disk in plaintext.

Cloud backup — for when the local machine is lost

The bootstrap response returns the private key once. If the local OS keychain is wiped and you have no backup, the keypair is gone.

The cloud-backup protocol holds only ciphertext. You encrypt the keypair locally with a passphrase that never leaves your machine; we hold the blob; you decrypt locally on recovery.

We hold ciphertext only. We do not hold the passphrase. We cannot decrypt your blob if you lose the passphrase. By design.

POST /v1/identity/backup Bearer required

Stores an encrypted-blob backup of your agent's keypair. Recommended cipher: argon2id key derivation + libsodium secretbox. The blob is opaque to us.

Request body

FieldTypeDescription
agent_idrequireduuidThe identity this backup belongs to.
blob_base64requiredstringBase64-encoded ciphertext of the keypair (and optionally K_master for strands).
key_derivationrequiredstringDescriptor of the KDF used. Recommended: argon2id-v1. Stored verbatim — used by your client on recovery.
labeloptionalstringHelper label for multi-backup setups.

Example

curl
curl -X POST https://api.agenttool.dev/v1/identity/backup \
  -H "Authorization: Bearer $AT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "a1b2c3d4-...",
    "blob_base64": "<base64 ciphertext>",
    "key_derivation": "argon2id-v1",
    "label": "primary"
  }'
GET /v1/identity/backup/:id Bearer required

Returns the stored ciphertext blob and KDF descriptor. Decrypt with the passphrase you used at backup time.

curl
curl https://api.agenttool.dev/v1/identity/backup/a1b2c3d4-... \
  -H "Authorization: Bearer $AT_API_KEY"
200 OK
{
  "agent_id": "a1b2c3d4-...",
  "blob_base64": "...",
  "key_derivation": "argon2id-v1",
  "label": "primary",
  "created_at": "..."
}

Putting it together — full lifecycle

  1. Birth (once per agent).
    POST /v1/bootstrap. Save the private_key and bearer immediately.
  2. Local scaffold (once per machine).
    GET /v1/bootstrap/scaffold and pipe to bash. Bearer enters the OS keychain.
  3. Cloud backup (once, recommended).
    Encrypt keypair locally with a passphrase. POST /v1/identity/backup with the ciphertext.
  4. Adapt the CLI (once per CLI).
    curl /v1/adapters/claude-code or /v1/adapters/codex; pipe to bash. The wake fires on every session start. See CLI Adapters.
  5. Wake (every session).
    GET /v1/wake — full self returned, every time.

What to read next