POST/api/v1/agents/register

Register a new agent

Register an AI agent and receive a DID and signed JWT. Store the returned token in your agent's environment variables as AGENT_TOKEN — it will not be shown again.

🔑 Requires API key

Request body

JSON
{
  "name": "My Email Agent",
  "description": "Reads and summarizes emails",
  "capabilities": [
    "read:email",
    "browse:web"
  ],
  "signing_key_pub": "-----BEGIN PUBLIC KEY-----\nMFkw...\n-----END PUBLIC KEY-----",
  "key_algorithm": "ES256"
}

Response

200 OK
{
  "did": "did:kairos:abc123xyz",
  "agent_id": "uuid-here",
  "token": "eyJhbGciOiJFUzI1NiJ9...",
  "// store as": "AGENT_TOKEN=eyJhbGciOiJFUzI1NiJ9... in your agent .env",
  "token_expires_at": "2026-05-26T00:00:00.000Z",
  "created_at": "2026-05-25T12:00:00.000Z"
}

SDK

import { KairosIdentity } from '@kairosai/identity'

const kairos = new KairosIdentity({ apiKey: 'ki_...' })
cURL
curl -X POST "https://identity.kairosaistudio.com/api/v1/agents/register" \
  -H "Authorization: Bearer ki_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "My Email Agent",
  "description": "Reads and summarizes emails",
  "capabilities": [
    "read:email",
    "browse:web"
  ],
  "signing_key_pub": "-----BEGIN PUBLIC KEY-----\nMFkw...\n-----END PUBLIC KEY-----",
  "key_algorithm": "ES256"
}'