Agents

Create an agent

Creates an agent owned by the caller. The number of agents a user may own depends on their plan. Unknown body fields are rejected.

post/api/v1/agents

Request

  • Base URL: https://your-deployment.example.com
  • URL: https://your-deployment.example.com/api/v1/agents
  • Auth: one of:
    • HTTP bearer
    • API key in header x-api-key

Request body

namestring required
descriptionstring
system_promptstring
preferred_modelstring

A chat model id. An unknown model is rejected with a 422.

temperaturenumber
max_tokensinteger
allowed_toolsstring[]

Tools the agent may call. An empty list (or null) means the default tool policy applies.

denied_toolsstring[]

Tools the agent may never call. An empty list (or null) means the default tool policy applies.

trigger_wordsstring[]

Mentions (for example @research) that invoke the agent in chat.

Example request

{
  "name": "Research assistant",
  "description": "Summarizes sources and cites them.",
  "system_prompt": "You are a careful research assistant. Always cite your sources.",
  "temperature": 0.3,
  "trigger_words": [
    "@research"
  ]
}

Response

The created agent.

idstring required
namestring required
descriptionstring required
system_promptstring nullable required

The agent's system prompt. null unless the caller owns the agent.

preferred_modelstring nullable required

Model id the agent answers with; null uses the default.

temperaturenumber nullable required
max_tokensinteger nullable required
allowed_toolsstring[] nullable required

Tools the agent may call. An empty list (or null) means the default tool policy applies.

denied_toolsstring[] nullable required

Tools the agent may never call. An empty list (or null) means the default tool policy applies.

trigger_wordsstring[] required

Mentions (for example @research) that invoke the agent in chat.

is_ownerboolean required

Whether the caller owns the agent, rather than having it shared with them.

created_atstring nullable required

ISO 8601 timestamp.

updated_atstring nullable required

ISO 8601 timestamp.

Changes

No recorded changes to this operation across all 1 revision of this API.