Skip to main content
The Agents API allows you to create, configure, and manage named AI agents backed by skill files. Each agent has a custom system prompt, model settings, and optional skills.

List Agents

curl -X GET "http://localhost:8000/api/agents" \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "agents": [
    {
      "id": "researcher",
      "name": "Researcher",
      "description": "Deep research and analysis specialist",
      "emoji": "🔍",
      "icon": "",
      "avatar": "",
      "category": "research",
      "model": "claude-sonnet-4",
      "thinking": "extended",
      "skills": ["web-search", "rag"],
      "system_prompt": "You are a meticulous researcher...",
      "enabled": true,
      "knowledge_path": "/workspace/skills/researcher/knowledge"
    }
  ]
}

Endpoint

GET /api/agents
List all named agents with optional filtering.

Query Parameters

q
string
Search query (matches id, name, or description)
active_only
boolean
default:false
Only return enabled agents
inactive_only
boolean
default:false
Only return disabled agents

Response

agents
object[]
Array of agent definitions
agents[].id
string
Unique agent identifier (slug)
agents[].name
string
Display name
agents[].description
string
Agent description
agents[].emoji
string
Agent emoji (default: 🤖)
agents[].model
string
Preferred model (e.g., claude-sonnet-4)
agents[].thinking
string
Thinking mode (e.g., extended, fast)
agents[].skills
string[]
Enabled skill IDs (e.g., ["web-search", "rag"])
agents[].system_prompt
string
Custom system prompt
agents[].enabled
boolean
Whether the agent is active
agents[].knowledge_path
string
Path to agent’s knowledge directory

Create Agent

curl -X POST "http://localhost:8000/api/agents" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Researcher",
    "description": "Deep research and analysis specialist",
    "emoji": "🔍",
    "category": "research",
    "model": "claude-sonnet-4",
    "thinking": "extended",
    "skills": ["web-search", "rag"],
    "system_prompt": "You are a meticulous researcher who excels at finding and analyzing information. Always cite sources and provide comprehensive analysis."
  }'
{
  "agent": {
    "id": "researcher",
    "name": "Researcher",
    "description": "Deep research and analysis specialist",
    "emoji": "🔍",
    "icon": "",
    "avatar": "",
    "category": "research",
    "model": "claude-sonnet-4",
    "thinking": "extended",
    "skills": ["web-search", "rag"],
    "system_prompt": "You are a meticulous researcher...",
    "enabled": true,
    "knowledge_path": "/workspace/skills/researcher/knowledge"
  }
}

Endpoint

POST /api/agents
Create a new named agent.

Request Body

name
string
required
Agent name (will be slugified to create ID)
description
string
default:""
Agent description
emoji
string
default:"🤖"
Agent emoji
icon
string
default:""
Icon identifier (alternative to emoji)
avatar
string
default:""
Avatar URL or identifier
category
string
default:""
Agent category (e.g., “research”, “coding”)
model
string
default:""
Preferred model (e.g., claude-sonnet-4)
thinking
string
default:""
Thinking mode (e.g., extended, fast)
skills
string[]
Array of skill IDs to enable (e.g., ["web-search", "rag"])
system_prompt
string
default:""
Custom system prompt defining agent behavior

Response

agent
object
Created agent object (same structure as list response)

Get Agent

curl -X GET "http://localhost:8000/api/agents/researcher" \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "agent": {
    "id": "researcher",
    "name": "Researcher",
    "description": "Deep research and analysis specialist",
    "emoji": "🔍",
    "model": "claude-sonnet-4",
    "thinking": "extended",
    "skills": ["web-search", "rag"],
    "system_prompt": "You are a meticulous researcher...",
    "enabled": true,
    "knowledge_path": "/workspace/skills/researcher/knowledge"
  }
}

Endpoint

GET /api/agents/{agent_id}
Get a single agent by ID.

Path Parameters

agent_id
string
required
Agent ID (slug)

Update Agent

curl -X PATCH "http://localhost:8000/api/agents/researcher" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Enhanced research specialist with web search",
    "skills": ["web-search", "rag", "arxiv"]
  }'
{
  "agent": {
    "id": "researcher",
    "name": "Researcher",
    "description": "Enhanced research specialist with web search",
    "emoji": "🔍",
    "model": "claude-sonnet-4",
    "thinking": "extended",
    "skills": ["web-search", "rag", "arxiv"],
    "system_prompt": "You are a meticulous researcher...",
    "enabled": true,
    "knowledge_path": "/workspace/skills/researcher/knowledge"
  }
}

Endpoint

PATCH /api/agents/{agent_id}
Update an existing agent. All fields are optional.

Path Parameters

agent_id
string
required
Agent ID to update

Request Body (all fields optional)

name
string
New agent name
description
string
New description
emoji
string
New emoji
icon
string
New icon
avatar
string
New avatar
category
string
New category
model
string
New model preference
thinking
string
New thinking mode
skills
string[]
New skills array (replaces existing)
system_prompt
string
New system prompt

Toggle Agent Status

curl -X PUT "http://localhost:8000/api/agents/researcher/enabled" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"enabled": true}'
{
  "agent": {
    "id": "researcher",
    "name": "Researcher",
    "description": "Deep research and analysis specialist",
    "enabled": true,
    "...": "..."
  }
}

Endpoint

PUT /api/agents/{agent_id}/enabled
Enable or disable an agent (marketplace-style toggle).

Path Parameters

agent_id
string
required
Agent ID to toggle

Request Body

enabled
boolean
required
Whether to enable (true) or disable (false) the agent

Delete Agent

curl -X DELETE "http://localhost:8000/api/agents/researcher" \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "ok": true,
  "deleted": "researcher"
}

Endpoint

DELETE /api/agents/{agent_id}
Permanently delete an agent and its skill folder.

Path Parameters

agent_id
string
required
Agent ID to delete

Scaffold Agent Knowledge

curl -X POST "http://localhost:8000/api/agents/researcher/knowledge/scaffold" \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "ok": true,
  "agent_id": "researcher",
  "knowledge_path": "/workspace/skills/researcher/knowledge"
}

Endpoint

POST /api/agents/{agent_id}/knowledge/scaffold
Ensure local knowledge folders exist for the agent.

Path Parameters

agent_id
string
required
Agent ID

Agent Mentions

Agents can be invoked in messages using the @Agent Name: message syntax:
@Researcher: Find recent papers on transformer architectures
The API automatically:
  1. Parses the @Agent Name: prefix
  2. Resolves the agent by name or ID
  3. Applies the agent’s system prompt and settings
  4. Executes the message with agent context
Only enabled agents can be invoked via mentions.

Skill Integration

Agents can use bundled skills by specifying them in the skills array:
{
  "skills": ["web-search", "rag", "arxiv", "calculator"]
}
Skills are normalized to lowercase with hyphens and stored in JSON format in the agent’s SKILL.md frontmatter.

Build docs developers (and LLMs) love