Skip to main content

Agents API

Creatoria Agent API Documentation

#Agents API

Manage your AI Agents: create, view, update, and delete.

Base Path: /v1/agents

#List Agents

GET /v1/agents

#Query Parameters

ParameterTypeRequiredDescription
pagenumberNoPage number, default 1
limitnumberNoItems per page, default 20, max 100
projectIdstringNoFilter by project ID
statusstringNoFilter by status

#Response

json{
  "data": [
    {
      "id": "agent_abc123",
      "name": "Customer Service Assistant",
      "description": "Intelligent customer service bot",
      "model": "zhipu/glm-4",
      "systemPrompt": "You are a friendly customer service assistant.",
      "settings": {},
      "organizationId": "org_xxx",
      "projectId": "proj_xxx",
      "createdAt": "2026-01-15T08:00:00Z",
      "updatedAt": "2026-01-15T08:00:00Z"
    }
  ],
  "meta": {
    "total": 1,
    "page": 1,
    "limit": 20,
    "totalPages": 1,
    "hasNext": false,
    "hasPrev": false
  }
}

#Get Agent Details

GET /v1/agents/:agentId

#Path Parameters

ParameterTypeDescription
agentIdstringAgent ID

#Response

Returns a single Agent object.

#Create Agent

POST /v1/agents

Required Permission: agents:create (admin or user role)

Note: Creating an Agent requires a Project context. Ensure the API Key is bound to a Project or specify one via the X-Project-Id request header.

#Request Body

json{
  "name": "My Assistant",
  "description": "A general-purpose AI assistant",
  "systemPrompt": "You are a professional AI assistant skilled at answering user questions.",
  "model": "zhipu/glm-4",
  "settings": {
    "temperature": 0.7,
    "maxTokens": 2048,
    "toolsEnabled": true,
    "allowedToolCategories": ["web-search", "fetch-url"],
    "knowledgeBaseIds": ["kb_abc123"],
    "contextWindowSize": 20
  }
}
FieldTypeRequiredDescription
namestringYesAgent name
descriptionstringNoDescription
systemPromptstringNoSystem prompt
modelstringYesModel identifier (format: provider/model)
settingsobjectNoAgent configuration

#Settings Field Description

FieldTypeDescription
temperaturenumberGeneration temperature, 0-2
maxTokensnumberMaximum output tokens
toolsEnabledbooleanWhether to enable tool calling
allowedToolCategoriesstring[]Allowed tool categories
knowledgeBaseIdsstring[]Associated knowledge base ID list
contextWindowSizenumberContext window size (number of messages), default 20
customToolIdsstring[]Custom tool ID list

#Response

HTTP 201 Created

Returns the created Agent object.

#Update Agent

PATCH /v1/agents/:agentId

Required Permission: agents:update (admin or user role)

#Request Body

All fields are optional -- only include the fields you want to update:

json{
  "name": "Updated Name",
  "settings": {
    "toolsEnabled": true,
    "allowedToolCategories": ["web-search"]
  }
}

#Response

Returns the updated Agent object.

#Delete Agent

DELETE /v1/agents/:agentId

Required Permission: agents:delete (admin or user role)

#Response

json{
  "id": "agent_abc123",
  "deleted": true
}