Skip to main content
PUT
Create or replace agent

Authorizations

Authorization
string
header
required

Most Braintrust endpoints are authenticated by providing your API key as a header Authorization: Bearer [api_key] to your HTTP request. You can create an API key in the Braintrust organization settings page.

Body

application/json

Any desired information about the new agent object

An agent is a project-scoped durable object that identifies an AI agent or service emitting spans

project_id
string<uuid>
required

Unique identifier for the project that the agent belongs under

name
string
required

Name of the agent. Within a project, agent names are unique

description
string | null

Textual description of the agent

metadata
object | null

User-controlled metadata about the agent

Response

Returns the new agent object

An agent is a project-scoped durable object that identifies an AI agent or service emitting spans

id
string<uuid>
required

Unique identifier for the agent

project_id
string<uuid>
required

Unique identifier for the project that the agent belongs under

user_id
string<uuid>
required
name
string
required

Name of the agent. Within a project, agent names are unique

slug
string
required

Stable, URL-safe identifier for the agent, unique within its project.

kind
string
required

Agent classification: 'custom' for customer-defined agents, 'loop' for built-in Loop agents.

created
string<date-time> | null

Date of agent creation

description
string | null

Textual description of the agent

metadata
object | null

User-controlled metadata about the agent