Agents
Create, list, update, and delete agents; read peer messages and sessions for a single agent.
An agent is a configured persona that runs against a chosen model. Every org has one default agent (Ala) that is auto-provisioned and cannot be deactivated, deleted, renamed off its slug, or moved to a different model. All other agents are CRUD-able within the workspaces the caller can access.
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /api/v1/agents | List agents visible to the caller. |
POST | /api/v1/agents | Create an agent. |
GET | /api/v1/agents/:id | Fetch one agent. |
PATCH | /api/v1/agents/:id | Update fields on an agent. |
DELETE | /api/v1/agents/:id | Soft-delete an agent. |
GET | /api/v1/agents/:id/sessions | List sessions the agent participates in. |
GET | /api/v1/agents/:id/messages | Recent peer messages from sessions tagged relationship: peer. |
GET | /api/v1/agents/:id/peers | Peer agents this agent is allowed to talk to. |
:id may be either the agent's UUID or its slug.
List agents
GET /api/v1/agents returns agents belonging to the caller's org and workspace, ordered by updatedAt descending. The default Ala agent is auto-created on the first call and is always present in the list.
Response:
{
"success": true,
"data": {
"items": [
{
"id": "uuid",
"orgId": "uuid",
"workspaceId": "uuid|null",
"name": "Ala",
"slug": "ala",
"description": "string|null",
"avatar": "string",
"model": "grok-3",
"systemPrompt": "string|null",
"allowedTools": ["..."],
"allowedPeers": ["..."],
"allowedConnectors": ["..."],
"isActive": true,
"settings": { "voice": { "...": "..." } },
"createdAt": "...",
"updatedAt": "..."
}
]
}
}
Create agent
POST /api/v1/agents
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | 1–255 chars, whitespace-collapsed. Reserved name Ala is rejected. |
description | string | null | no | Up to 5,000 chars. |
model | string | no | Must be a valid model ID from the catalog. Defaults applied if omitted. |
systemPrompt | string | null | no | Up to 20,000 chars. |
avatar | string | no | Avatar identifier. |
allowedTools | string[] | no | Tool slugs the agent may invoke. |
allowedPeers | string[] | no | Agent slugs this agent may message. |
allowedConnectors | string[] | no | Connector slugs this agent may use. |
settings | object | no | Per-agent settings; voice profile is normalized server-side. |
A unique slug is generated from name. The agent is placed in the caller's current workspace.
Response (201): the created agent record (same shape as list items).
curl -X POST https://alumia.com/api/v1/agents \
-H "Authorization: Bearer alm_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Research Assistant",
"model": "grok-3",
"systemPrompt": "You help with literature reviews."
}'Get agent
GET /api/v1/agents/:id — Returns a single agent or 404 if not visible to the caller.
Update agent
PATCH /api/v1/agents/:id
Accepts any subset of: name, slug, description, systemPrompt, model, settings, allowedTools, allowedPeers, allowedConnectors, isActive, avatar. Updating slug triggers a uniqueness check within the org.
Ala enforces extra constraints:
isActive: falseis rejected (FORBIDDEN).modelmust equal Ala's locked model ID; any other value is rejected.slugupdates are silently dropped.
Response: the updated agent record.
Delete agent
DELETE /api/v1/agents/:id — Soft-deletes the agent (deletedAt set). Deleting Ala returns 403 FORBIDDEN.
Response:
{ "success": true, "data": { "deleted": true } }
Agent sessions, messages, peers
GET /api/v1/agents/:id/sessions— All non-deleted sessions where this agent is a participant, ordered byupdatedAtdesc.GET /api/v1/agents/:id/messages?limit=N— Up tolimit(1–100, default 50) most recent agent-authored messages from sessions whosemetadata.relationship = 'peer'. Each item includesfromAgentName,fromAgentAvatar, andisSelf.GET /api/v1/agents/:id/peers— Agents this agent may message based on itsallowedPeerslist.
Errors
| Code | When |
|---|---|
UNAUTHORIZED | No valid key. |
BAD_REQUEST | Missing/invalid body, reserved name Ala, unknown model ID. |
FORBIDDEN | Caller has no workspace access; or attempt to deactivate, re-model, or delete Ala. |
NOT_FOUND | Agent does not exist, is soft-deleted, or is in a workspace the caller cannot see. |