Create Agent

Version 4.0.26.4 (latest)

Create Agent

Creates an agent. Required fields: name, description, sources.

Request

POST /agents
Datatype
Description
Request
HTTP Request
body
HTTP Body
Expand HTTP Body definition...
body
Agent
Expand Agent definition...
can
object
Operations the current user is able to perform on this object
id
string
Agent unique identifier
created_by_user_id
string
User that created the Agent
created_by_name
string
Name of user that created the Agent
created_by_first_name
string
Name of user that created the Agent
created_by_last_name
string
Name of user that created the Agent
created_by_avatar_url
string
Avatar URL of user that created the Agent
name
string
Agent name
description
string
Agent description
category
string
The category of the agent (e.g., dashboard, conversation)
sources
Source[]
has_inaccessible_source
boolean
Has inaccessible source
context
Agent context
deleted
boolean
Is Agent soft deleted
created_at
string
Agent created_at
updated_at
string
Agent updated_at
content_metadata_id
string
Content metadata ID for this Agent
code_interpreter
boolean
Enables Code Interpreter for this Agent
studio_agent_id
string
Studio Agent ID (if this agent was migrated)
query
HTTP Query
Expand HTTP Query definition...
fields
string
Requested fields

Response

200: Agent

Datatype
Description
(object)
can
object
Operations the current user is able to perform on this object
id
string
Agent unique identifier
created_by_user_id
string
User that created the Agent
created_by_name
string
Name of user that created the Agent
created_by_first_name
string
Name of user that created the Agent
created_by_last_name
string
Name of user that created the Agent
created_by_avatar_url
string
Avatar URL of user that created the Agent
name
string
Agent name
description
string
Agent description
category
string
The category of the agent (e.g., dashboard, conversation)
sources
Source[]
Expand Source definition...
model
string
Source model
explore
string
Source explore
has_inaccessible_source
boolean
Has inaccessible source
context
Agent context
Expand Context definition...
instructions
string
Agent instructions
deleted
boolean
Is Agent soft deleted
created_at
string
Agent created_at
updated_at
string
Agent updated_at
content_metadata_id
string
Content metadata ID for this Agent
code_interpreter
boolean
Enables Code Interpreter for this Agent
studio_agent_id
string
Studio Agent ID (if this agent was migrated)

400: Bad Request

Datatype
Description
(object)
message
string
Error details
documentation_url
string
Documentation link

404: Not Found

Datatype
Description
(object)
message
string
Error details
documentation_url
string
Documentation link

409: Resource Already Exists

Datatype
Description
(object)
message
string
Error details
documentation_url
string
Documentation link

422: Validation Error

Datatype
Description
(object)
message
string
Error details
Expand ValidationErrorDetail definition...
field
string
Field with error
code
string
Error code
message
string
Error info message
documentation_url
string
Documentation link
documentation_url
string
Documentation link

429: Too Many Requests

Datatype
Description
(object)
message
string
Error details
documentation_url
string
Documentation link