Agents

Create agent

Create a new agent, empty or from a template.

POSThttps://app.elunos.ai/api/v1/spaces/{space}/agents

Creates an agent as a draft. It takes no conversations until you publish it.

Path parameters

spacestringPflicht

Slug of the space, e.g. `praxis-mueller`. Returned by `GET /spaces`.

Body

template_idstring

Template from [List agent templates](/docs/api-reference/list-agent-templates). Brings behavior and flow; your other fields override the template's.

namestringPflicht

Display name, 1 to 80 characters.

descriptionstring | null

Internal description.

languagestring

Conversation language, e.g. `de`. Defaults to the space default.

voice_iduuid | null

Voice from [List voices](/docs/api-reference/list-voices). `null` uses the default voice.

modelstring | null

`id` of a model from `llm_options` in [Get space](/docs/api-reference/get-space). `null` uses the default.

first_messageobject

The greeting: `text` and `interruptible` (whether the caller may interrupt it).

behaviorobject

Behavior made of blocks, see [Behavior](/docs/api-reference/behavior).

tool_idsuuid[]

Tools the agent can call in every step.

knowledge_idsuuid[]

Documents the agent knows in every step.

knowledge_folder_idsuuid[]

Knowledge base folders. The agent knows every document in them, including ones added later.

Example

curl -X POST https://app.elunos.ai/api/v1/spaces/praxis-mueller/agents \
  -H "Authorization: Bearer np_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Empfang",
    "language": "de",
    "first_message": {
      "text": "Praxis Dr. Müller, guten Tag. Wie kann ich helfen?",
      "interruptible": true
    },
    "behavior": {
      "values": {
        "role": {
          "text": "Du bist der Empfang der Zahnarztpraxis Dr. Müller."
        },
        "company": {
          "name": "Zahnarztpraxis Dr. Müller",
          "hours": "Mo bis Fr, 8 bis 17 Uhr"
        },
        "tone": {
          "closeness": "formal",
          "style": "brief"
        }
      }
    }
  }'

Response

201 with the new agent. warnings points out gaps that do not prevent creation.

{
  "data": {
    "id": "0199a3c2-7d4e-7b21-9f3a-2c5e8d1b4a70",
    "status": "draft",
    "sync_status": "draft",
    "…": "…"
  },
  "warnings": [
    {
      "path": "behavior",
      "code": "no_escalation",
      "message": "No escalation block and no transfer node."
    }
  ]
}

Without template_id the agent gets a simple flow: greeting, one conversation step, end. For anything more, a template is the faster start.