Agents

Update an agent

Updates an agent you own. Omitted fields are left unchanged. Only the owner can update an agent. Unknown body fields are rejected.

patch/api/v1/agents/{id}

Request

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

Path parameters

idstring required

Request body

namestring
descriptionstring
system_promptstring
preferred_modelstring nullable

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

temperaturenumber nullable
max_tokensinteger nullable
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

{
  "temperature": 0.7,
  "trigger_words": [
    "@research",
    "@sources"
  ]
}

Response

The updated 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.