---
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

## Changes

- **2026-03-02** `39aff788d955` — 2 breaking, 17 info
  - the response's body type/format changed from ``/`` to `object`/`` for status `409`
  - the `agent` response's property type/format changed from ``/`` to `object`/`` for status `201`
  - added the media type `application/json` for the response with the status `400`
  - added the media type `application/json` for the response with the status `401`
  - …15 more

[Change history](https://skmtc.dev/builderz-labs/apis/mission-control-api/changes/api/agents/post.md)

---

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