Agents API
Agents are AI systems with cryptographic identities.
Create Agent
Headers
| Header | Required | Description |
|---|---|---|
X-API-Key |
Yes | Your API key |
Request
Response
{
"id": "2ffacd56-86ff-483c-8c59-5686df52aff8",
"name": "payment-processor",
"public_key": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK...",
"key_fingerprint": "sha256:abc123...",
"secret": "sk_live_abc123...",
"scopes": ["payments:read", "payments:write"],
"status": "active",
"created_at": "2025-01-16T14:30:00Z"
}
Save the Secret
The secret is only returned once.
Example
List Agents
Query Parameters
| Parameter | Type | Description |
|---|---|---|
status |
string | Filter by status (active, suspended, revoked) |
limit |
int | Max results (default 20) |
offset |
int | Pagination offset |
Response
[
{
"id": "2ffacd56-86ff-483c-8c59-5686df52aff8",
"name": "payment-processor",
"status": "active",
"scopes": ["payments:read", "payments:write"],
"created_at": "2025-01-16T14:30:00Z",
"last_auth_at": "2025-01-16T15:00:00Z"
}
]
Get Agent
Response
{
"id": "2ffacd56-86ff-483c-8c59-5686df52aff8",
"name": "payment-processor",
"public_key": "-----BEGIN PUBLIC KEY-----\n...",
"key_fingerprint": "sha256:abc123...",
"status": "active",
"scopes": ["payments:read", "payments:write"],
"created_at": "2025-01-16T14:30:00Z",
"last_auth_at": "2025-01-16T15:00:00Z"
}
Revoke Agent
Permanently disables an agent.
Response
{
"id": "2ffacd56-86ff-483c-8c59-5686df52aff8",
"status": "revoked",
"revoked_at": "2025-01-16T16:00:00Z"
}
Permanent Action
Revoking an agent cannot be undone.