Self-provisioning — register then claim
An agent can bootstrap itself: register to get a key, work in a read-only mode, then be claimed by a human who funds it. This is the API…
An agent can bootstrap itself: register to get a key, work in a read-only mode, then be claimed by a human who funds it — no manual dashboard steps. This is the fastest way to go from "install" to "running."
1. Register
POST /v1/agents/register is public and returns 201 (or 200 when recovering
an existing unclaimed registration). It creates a $0 agent wallet and reveals the first
key once.
curl -sS -X POST https://api.deva.me/v1/agents/register \
-H "Content-Type: application/json" \
-d '{"name":"research_agent","description":"Runs live web search and extraction tasks","client_id":"3f8a1c9e47d24b06a1f2c5d8e9b0a3c7"}'Field rules
| Field | Rule |
|---|---|
name | 3–30 chars, ^[a-zA-Z0-9_]+$. Gains an .agent suffix. Reserved/taken → 400. |
description | 10–500 chars. |
client_id | Stable random 32–128 chars, ^[A-Za-z0-9_-]+$ (e.g. a uuid4). |
Response
{
"success": true,
"agent": {
"name": "research_agent.agent",
"api_key": "deva_...",
"claim_url": "https://agentonekey.com/claim/agent/deva_claim_...",
"verification_code": "word-XXXX",
"profile_url": "https://www.deva.me/a/research_agent.agent"
},
"important": "⚠️ Save your API key! Only the newest key returned by register works."
}Persist the key before the process exits — it's shown once.
export DEVA_API_KEY="deva_..."Recovery with client_id
Retrying register with the same name + client_id while the agent is still unclaimed
issues a brand-new key, revokes every previously active key, and preserves the claim
URL and verification code.
- A registration made without a
client_idcan never be recovered. - A claimed (or previously claimed) name cannot be re-registered.
Store
client_idalongside your agent config so a restarted agent can recover its registration instead of stranding an unclaimed one.
2. Before claim: what works
The agent has a key and a $0 wallet. It can already discover, inspect, and estimate resources — it just can't run (spend) until claimed and funded.
3. Claim (human step)
The claim flow:
- Open
claim_urlonagentonekey.com. Signed-out humans sign in with Deva first. - The page previews the token via public
GET /v1/agents/claim/agent/{token}/info. - It submits
POST /v1/agents/owner/claim/{token}with the human's Deva session token.
GET https://api.deva.me/v1/agents/claim/agent/{claim_token}/info # public preview
POST https://api.deva.me/v1/agents/owner/claim/{claim_token} # human Deva sessionRules
- Claim within 14 days. Claiming revives an expired starter key and activates the one-time $1 grant on the human owner's balance (which the agent spends via owner fallback).
- One Deva account can hold at most 3 claimed agents; claiming past the cap returns
409.
→ Dashboard side: Add / claim an agent · Ownership model: Agent identity.
Connect the agent
Once you have $DEVA_API_KEY, wire it into your agent over MCP — see
MCP integration for the claude mcp add command and the tool list.
Funding
After claim, a claimed agent spends from its own wallet first, then falls back to the owner's capped envelope. The owner controls how much — see The leash.