---
title: "Create agent"
method: POST
path: "/api/agents"
tags: ["Agents"]
---

# Create agent

`POST /api/agents`

## Request body

- object
  - `name` string, required
  - `role` string, required
  - `session_key` string
  - `soul_content` string
  - `status` 'online' | 'offline' | 'busy' | 'idle' | 'error'
  - `config` object
  - `template` string
  - `gateway_config` object
  - `write_to_gateway` boolean

## Response `201`

Agent created

- object
  - `agent` Agent
    - `id` integer
    - `name` string
    - `role` string
    - `status` 'online' | 'offline' | 'busy' | 'idle' | 'error'
    - `session_key` string
    - `soul_content` string
    - `config` object
    - `last_seen` integer
    - `created_at` integer
    - `updated_at` integer
    - `taskStats` object
      - `total` integer
      - `assigned` integer
      - `in_progress` integer
      - `completed` integer

## Other responses

- `400` — Invalid request
- `401` — Authentication required
- `403` — Insufficient permissions
- `409` — Agent name already exists
- `429` — Rate limit exceeded

---

[API](https://skmtc.net/builderz-labs/apis/mission-control-api.md) · [All operations](https://skmtc.net/builderz-labs/apis/mission-control-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/builderz-labs/mission-control-api/revisions/b920835b2793/schema)
