Skip to main content
POST
/
api
/
agents
{
  "403": {},
  "agent": {}
}

Description

Create a new AI agent.

Authentication

Required (API key or JWT token)

Request Body

name
string
required
Agent name
description
string
Agent description
systemPrompt
string
System prompt defining agent behavior
model
string
AI model to use (e.g., “gpt-4”, “claude-3-opus”)

Response

agent
object
Created agent object

Example Request

curl -X POST \
  -H "Authorization: Bearer conv_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Customer Support Bot",
    "description": "Helps customers with support questions",
    "systemPrompt": "You are a helpful support agent...",
    "model": "gpt-4"
  }' \
  https://api.convosphere.site/api/agents

Example Response

{
  "agent": {
    "id": "agent_123",
    "name": "Customer Support Bot",
    "description": "Helps customers with support questions",
    "systemPrompt": "You are a helpful support agent...",
    "model": "gpt-4",
    "status": "active",
    "createdAt": "2024-01-15T10:00:00Z"
  }
}

Error Responses

403
object
Agent limit reached for current plan