Skip to main content
POST
/
api
/
v1
/
agents
Create Agent
curl --request POST \
  --url https://api.example.com/api/v1/agents
{
  "agent": {
    "id": "<string>",
    "name": "<string>",
    "display_name": "<string>"
  },
  "apiKey": "<string>",
  "statusCode": 123,
  "message": "<string>"
}
Creates a new agent with an associated OTLP API key for ingesting telemetry data.

Request Body

Response

agent
object
required
The created agent object
apiKey
string
required
OTLP API key for this agent. Format: mnfst_ followed by 43 base64url characters.Important: This is the only time the full API key will be returned. Store it securely.

Example Request

curl -X POST https://api.manifest.build/api/v1/agents \
  -H "Cookie: better-auth.session_token=YOUR_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My New Agent"
  }'

Example Response

{
  "agent": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "my-new-agent",
    "display_name": "My New Agent"
  },
  "apiKey": "mnfst_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijk1234567890"
}

Error Responses

statusCode
number
HTTP status code
message
string
Error message

400 Bad Request

Returned when:
  • Agent name is empty or invalid
  • Agent name produces an empty slug after normalization
  • Agent name contains invalid characters
  • Agent name exceeds 100 characters
{
  "statusCode": 400,
  "message": "Agent name produces an empty slug"
}

Notes

  • Agent names are automatically converted to slugs: "My Agent Name" becomes "my-agent-name"
  • The API key starts with mnfst_ prefix and is used for OTLP telemetry ingestion
  • A tenant is automatically created for new users on their first agent creation
  • Agent names must be unique within your account

Build docs developers (and LLMs) love