POST
/
api
/
agents

Request

curl -X POST https://api.boty.chat/api/agents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Support Bot",
    "description": "Customer support agent",
    "systemPrompt": "You are a helpful support agent...",
    "workspaceId": "workspace_123"
  }'

Body Parameters

name
string
required
Agent name
description
string
Agent description
systemPrompt
string
required
System prompt for the agent
workspaceId
string
required
Workspace ID
model
string
default:"gpt-4"
LLM model to use
temperature
number
default:"0.7"
Response temperature (0-1)

Response

{
  "success": true,
  "data": {
    "_id": "agent_456",
    "name": "Support Bot",
    "description": "Customer support agent",
    "systemPrompt": "You are a helpful support agent...",
    "status": "active",
    "createdAt": "2024-01-15T10:00:00Z"
  }
}