Create a new agent.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
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
401Unauthorized
422Unprocessable Entity
500Internal Server Error