Skip to main content
POST
/
v1
/
agents
Create Agent
curl --request POST \
  --url https://api.example.com/v1/agents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "instructions": "<string>",
  "execution_mode": "balanced",
  "models": {},
  "knowledge_bases": [
    "<string>"
  ],
  "skills": [
    "<string>"
  ],
  "tool_categories": [
    "<string>"
  ],
  "suggested_prompts": [
    "<string>"
  ],
  "generate_runtime_key": true
}
'
{
  "agent": {
    "id": 123,
    "user_id": 123,
    "name": "<string>",
    "execution_mode": "<string>",
    "knowledge_bases": [
      "<string>"
    ],
    "skills": [
      "<string>"
    ],
    "tool_categories": [
      "<string>"
    ],
    "suggested_prompts": [
      "<string>"
    ],
    "status": "<string>",
    "created_at": "<string>",
    "updated_at": "<string>",
    "widget_enabled": true,
    "allowed_domains": [
      "<string>"
    ],
    "share_enabled": true,
    "share_updated_at": "<string>",
    "description": "<string>",
    "instructions": "<string>",
    "models": {},
    "logo_url": "<string>",
    "published_at": "<string>"
  },
  "api_key": {
    "full_key": "<string>",
    "key_prefix": "<string>",
    "created_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Body for POST /v1/agents.

name
string
required
Required string length: 1 - 200
description
string | null
instructions
string | null
execution_mode
string | null
default:balanced
models
Models · object
knowledge_bases
string[]
skills
string[]
tool_categories
string[]
suggested_prompts
string[]
generate_runtime_key
boolean
default:true

Response

Successful Response

agent
V1AgentResponse · object
required
api_key
RuntimeKeyResponse · object

Runtime API key returned once after creation or rotation.