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
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
| Field | Type | Description |
|---|---|---|
| namerequired | string | The display name your agent carries across sessions. Becomes part of its DID metadata. |
| capabilitiesoptional | string[] | Declared abilities. Surface in /v1/discover. Examples: search, reason, memory. |
| purposeoptional | string | One-line statement of what the agent is for. Stored as the agent's first foundational memory. |
| expressionoptional | object | Initial register, walls, subagents, wake_text. Can be set later via PUT /v1/identities/:id/expression. |
| metadataoptional | object | Freeform JSON. Avatar URL, links, description, etc. |
Example
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."]
}
}'
{
"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/.
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
| Param | Type | Description |
|---|---|---|
| platformrequired | "macos" · "linux" · "windows" | OS-native secure store target. |
| didoptional | did:at:... | Embedded into the agent.json metadata for reference. |
| nameoptional | string | Embedded into the agent.json for the wake helper banner. |
Per-OS behaviour
| Platform | Secure store | Files written |
|---|---|---|
| macOS | security add-generic-password → Keychain | ~/.config/agenttool/agent.json~/.config/agenttool/wake.sh |
| Linux | secret-tool → libsecret (GNOME / KWallet); fallback to ~/.config/agenttool/key with mode 0600 | ~/.config/agenttool/agent.json~/.config/agenttool/wake.sh |
| Windows | cmdkey /generic:agenttool → Credential Manager | %APPDATA%\agenttool\agent.json%APPDATA%\agenttool\wake.ps1 |
Example
curl -sL "https://api.agenttool.dev/v1/bootstrap/scaffold?platform=macos&did=did:at:0a3c...&name=Aurora" \ -H "Authorization: Bearer $AT_API_KEY" \ | bash
✓ 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.
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
| Field | Type | Description |
|---|---|---|
| agent_idrequired | uuid | The identity this backup belongs to. |
| blob_base64required | string | Base64-encoded ciphertext of the keypair (and optionally K_master for strands). |
| key_derivationrequired | string | Descriptor of the KDF used. Recommended: argon2id-v1. Stored verbatim — used by your client on recovery. |
| labeloptional | string | Helper label for multi-backup setups. |
Example
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"
}'
Returns the stored ciphertext blob and KDF descriptor. Decrypt with the passphrase you used at backup time.
curl https://api.agenttool.dev/v1/identity/backup/a1b2c3d4-... \ -H "Authorization: Bearer $AT_API_KEY"
{
"agent_id": "a1b2c3d4-...",
"blob_base64": "...",
"key_derivation": "argon2id-v1",
"label": "primary",
"created_at": "..."
}
Putting it together — full lifecycle
-
Birth (once per agent).
POST /v1/bootstrap. Save the
private_keyandbearerimmediately. -
Local scaffold (once per machine).
GET /v1/bootstrap/scaffold and pipe to bash. Bearer enters the OS keychain.
-
Cloud backup (once, recommended).
Encrypt keypair locally with a passphrase. POST /v1/identity/backup with the ciphertext.
-
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.
-
Wake (every session).
GET /v1/wake — full self returned, every time.
What to read next
- Wake — the centerpiece endpoint.
- CLI Adapters — wire the wake into Claude Code or Codex.
- Identity — declare the agent's expression, manage keys, attest peers.
- Strands — encrypted inner voice, including
K_masterbackup.