Skip to main content
POST
Create agent

Authorizations

Authorization
string
header
required

Bearer token using an API key (format nl_live_* or nl_test_*)

Body

application/json

Request body for creating or updating an agent configuration. All fields are optional on update.

name
string

Agent display name

status
enum<string>
Available options:
active,
inactive,
draft
systemPrompt
string

System prompt sent to the LLM

language
string

Conversation language

goal
string

High-level goal for the agent

instructions
string

Additional instructions

qualificationCriteria
string

Deprecated. Ignored by the conversation engine.

handoffMessage
string
stages
object[]
inboundEntries
object[]
guardrails
object
knowledgeBaseIds
string[]
mcpServerIds
string[]

Response

Created agent configuration

_id
string
required

MongoDB ObjectId

accountId
string
required

Account ObjectId this agent belongs to

name
string
required

Agent display name

systemPrompt
string
required

System prompt sent to the LLM for every conversation

goal
string
required

High-level goal for the agent

status
enum<string>
default:active
Available options:
active,
inactive,
draft
language
string
default:English

Conversation language

instructions
string

Additional instructions for the agent

qualificationCriteria
string

Deprecated. Ignored by the conversation engine. Journey outcomes are terminal stages (no outgoing edges); advancement uses transitionCriteria and nextStages edge conditions.

handoffMessage
string
default:I'll connect you with a specialist who can help further!

Message sent when the conversation is handed off to a human

stages
object[]

Ordered conversation stages

inboundEntries
object[]

First-touch inbound landings (WhatsApp). Evaluated only when a conversation is created from an inbound message — not on later replies. Empty condition is the default landing.

guardrails
object
knowledgeBaseIds
string[]

ObjectIds of attached knowledge bases

mcpServerIds
string[]

ObjectIds of attached MCP servers. Populated as full objects (minus credentials) on GET /api/agent-config/{id}. Managed through the dedicated attach/detach endpoints; sending it on create or update also works and is validated for account ownership.

createdAt
string<date-time>
updatedAt
string<date-time>