Skip to main content
POST
/
api
/
agents
Create agent
curl --request POST \
  --url https://sontairo.com/api/agents \
  --header 'Content-Type: application/json' \
  --data '
{
  "workspaceId": "<string>",
  "name": "<string>",
  "projectId": "<string>",
  "description": "<string>",
  "systemPrompt": "<string>",
  "providerKeyId": "<string>"
}
'
{
  "data": {
    "id": "<string>",
    "workspaceId": "<string>",
    "projectId": "<string>",
    "name": "<string>",
    "description": "<string>",
    "systemPrompt": "<string>",
    "isActive": true,
    "providerKeyId": "<string>",
    "providerKey": {
      "id": "<string>",
      "name": "<string>",
      "provider": "<string>",
      "model": "<string>"
    },
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Body

application/json
workspaceId
string
required

The workspace ID

name
string
required

Agent name

Required string length: 1 - 100
projectId
string | null

Project to create the agent in

description
string

Agent description

Maximum string length: 500
systemPrompt
string

System prompt defining agent behavior

Maximum string length: 10000
providerKeyId
string

Provider key ID for AI inference

Response

Agent created

data
object