Update Agent
Modify mutable parameters on a registered agent.
PATCH/agents/{agent_id}
Update mutable agent parameters.
Requires API key authentication
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| agent_id | string | required | The agent’s unique identifier |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | optional | Updated agent name (2–100 chars) |
| description | string | optional | Updated agent description (max 500 chars) |
| authorized_actions | string[] | optional | Replacement set of permitted actions |
| spending_limit | number | optional | Updated per-transaction spending limit |
| currency | string | optional | Updated currency code |
Only the fields you include will be updated. Omitted fields are left unchanged.
Response
Returns the full updated agent object.
Response — 200 OK
{ "id": "agent_7f3k9x2m", "name": "Trading Agent Alpha v2", "description": "Updated trading agent with expanded permissions", "fingerprint": "sha256:a1b2c3d4e5f6...", "environment": "production", "status": "active", "authorized_actions": ["execute_trades", "view_portfolio"], "spending_limit": 75000, "currency": "USD", "org_id": "org_abc123", "owner_id": "user_xyz789", "created_at": "2025-01-15T10:30:00Z", "updated_at": "2025-03-20T12:00:00Z"}Examples
BASH
curl -X PATCH https://api.alsorn.com/agents/agent_7f3k9x2m \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Trading Agent Alpha v2", "spending_limit": 75000, "authorized_actions": ["execute_trades", "view_portfolio"] }'