Creating Agents
An Agent is a persistent AI identity in Kernel Service. Unlike a one-shot API call, an agent has:
- A persona (role, communication style)
- Objectives (what it’s trying to achieve)
- Memory (context from previous tasks)
- Permissions (which tools it can use)
Creating an Agent
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": "Alex - Account Manager AI", "external_user_id": "user-42", "persona": { "role": "Account Manager", "communication_style": "professional, relationship-focused", "description": "Manages client relationships and identifies growth opportunities" }, "objectives": [ "Maintain regular contact with top 20 accounts", "Identify upsell opportunities", "Ensure client satisfaction above 90%" ], "allowed_tools": [ "crm.accounts.get", "crm.contacts.get", "email.draft", "calendar.book" ] }'Persona Design Tips
The persona directly influences how the LLM behaves:
- role — defines the agent’s identity (“SDR”, “Account Manager”, “Support Agent”)
- communication_style — tone and approach (“professional and warm”, “concise and data-driven”)
- description — detailed context about the agent’s specialisation
Submitting Tasks to an Agent
Once created, submit tasks with the agent_id:
curl -X POST https://api.kernelservice.com/api/v1/tasks \ -d '{"agent_id": "AGENT_ID", "objective": "Check in with our top 5 accounts"}'The agent’s persona, objectives, and memory are automatically injected into the LLM context.