Create Agent

Create a new agent.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Creates a new agent with a name and optional settings for authentication, observability, and the message shown when a guardrail blocks a message. The response is the new agent, including its id, url, and api_token fields.

When to use it

Use it to register a new agent from code. An agent's configuration, such as its model and guardrails, lives in a version, so call Create an agent version next.

Required parameters

  • name (body): the name of the agent, 1 to 95 characters.

Optional body fields: description, authentication_enabled, observability_enabled, guardrails_violation_message.

Response

A successful call returns 201 Created with the Agent object. Its required fields are id, created_by, name, dataset_id, guardrails_violation_message, url, and api_token.

Related: Create an agent version, Get an agent, Update an agent, Delete an agent

Body Params
string
required
length between 1 and 95
boolean
Defaults to false
boolean
Defaults to true
string
Defaults to Attention: Your message has been blocked due to a guardrail violation. Please rephrase your message and try again.

Message to display on violation of guardrails.

Responses

401

Unauthorized

422

Unprocessable Entity

500

Internal Server Error

Language
Credentials
OAuth2
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json