Agents API
Agents are persistent AI identities with persona, objectives, and memory. They accumulate context across tasks.
Create Agent
POST /api/v1/agentsRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name (e.g. “Sarah - Sales AI”) |
external_user_id | string | No | User ID in external system this agent acts as |
persona | object | No | Role, communication style, description |
objectives | array | No | Current goals for the agent |
allowed_tools | array | No | Tool-level permissions |
config | object | No | Agent-specific settings |
Example
curl -X POST https://api.kernelservice.com/api/v1/agents \ -H "Content-Type: application/json" \ -H "X-Tenant-ID: $TENANT_ID" \ -H "X-API-Key: $API_KEY" \ -d '{ "name": "Sarah - Sales AI", "external_user_id": "rol-user-42", "persona": { "role": "Sales Development Representative", "communication_style": "professional, warm, concise", "description": "Specialises in recruitment industry sales" }, "objectives": [ "Qualify inbound leads within 5 minutes", "Draft personalised follow-up emails", "Book meetings with qualified prospects" ] }'List Agents
GET /api/v1/agentsGet Agent
GET /api/v1/agents/{agent_id}Update Agent
PATCH /api/v1/agents/{agent_id}Update persona, objectives, or permissions for an existing agent.