Skip to content

Search docs

Find pages, headings, and concepts. Press ⌘K or Ctrl+K to toggle.

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

MethodPathDescription
GET/api/v1/agentsList agents visible to the caller.
POST/api/v1/agentsCreate an agent.
GET/api/v1/agents/:idFetch one agent.
PATCH/api/v1/agents/:idUpdate fields on an agent.
DELETE/api/v1/agents/:idSoft-delete an agent.
GET/api/v1/agents/:id/sessionsList sessions the agent participates in.
GET/api/v1/agents/:id/messagesRecent peer messages from sessions tagged relationship: peer.
GET/api/v1/agents/:id/peersPeer 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

FieldTypeRequiredDescription
namestringyes1–255 chars, whitespace-collapsed. Reserved name Ala is rejected.
descriptionstring | nullnoUp to 5,000 chars.
modelstringnoMust be a valid model ID from the catalog. Defaults applied if omitted.
systemPromptstring | nullnoUp to 20,000 chars.
avatarstringnoAvatar identifier.
allowedToolsstring[]noTool slugs the agent may invoke.
allowedPeersstring[]noAgent slugs this agent may message.
allowedConnectorsstring[]noConnector slugs this agent may use.
settingsobjectnoPer-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).

bash
Sign in to fill in your org and key
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: false is rejected (FORBIDDEN).
  • model must equal Ala's locked model ID; any other value is rejected.
  • slug updates 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 by updatedAt desc.
  • GET /api/v1/agents/:id/messages?limit=N — Up to limit (1–100, default 50) most recent agent-authored messages from sessions whose metadata.relationship = 'peer'. Each item includes fromAgentName, fromAgentAvatar, and isSelf.
  • GET /api/v1/agents/:id/peers — Agents this agent may message based on its allowedPeers list.

Errors

CodeWhen
UNAUTHORIZEDNo valid key.
BAD_REQUESTMissing/invalid body, reserved name Ala, unknown model ID.
FORBIDDENCaller has no workspace access; or attempt to deactivate, re-model, or delete Ala.
NOT_FOUNDAgent does not exist, is soft-deleted, or is in a workspace the caller cannot see.