---
title: "Create Agent"
method: POST
path: "/v1/agents/"
tags: ["v1", "protected", "agents"]
---

# Create Agent

`POST /v1/agents/`

Create a new agent.

## Request body

- AgentCreate — Payload for creating an agent. ``model_id`` accepts either a model-instance UUID configured in the workspace, or a recognized provider identifier (e.g. ``gpt-4o``, ``claude-3-5-sonnet``, ``openrouter/qwen/qwen-2.5-72b-instruct``).
  - `a2ui_enabled` boolean, nullable — Expose this agent over the A2UI protocol.
  - `agent_type` 'stateless' | 'stateful' — 'stateless' (each request independent) or 'stateful' (maintains conversation context across runs).
  - `description` string — Short summary of what the agent does.
  - `events_config` EventsConfig — Per-agent event subscriptions.
    - `events` EventConfig[], nullable
      - `config` object, nullable — Event-specific configuration.
      - `enabled` boolean — Whether this subscription is active.
      - `event_type` string, required — Event type the agent listens to.
  - `instruction` string — System prompt / behavioural instructions for the agent.
  - `model_id` string, required — Model instance UUID or provider model identifier (e.g. 'gpt-4o', 'claude-3-5-sonnet').
  - `name` string, required — Human-readable agent name (unique per workspace).
  - `planning` boolean, nullable — Enable explicit planning step before execution.
  - `skill_ids` string[], nullable — UUIDs of skills to attach to the agent.
  - `tools` ToolConfigYAML[], nullable — Tools attached to the agent (code/mcp/agent/openapi).
    - `name` string, required
    - `settings` ToolSettingsYAML — Tool settings configuration in YAML format.
      - `a2a_url` string, nullable
      - `allowed_tools` unknown[], nullable
        - unknown
      - `description_override` string, nullable
      - `disabled_methods` string[], nullable
      - `openapi_connection_id` string, nullable
      - `requires_user_confirmation` boolean, nullable
    - `type` 'code' | 'mcp' | 'agent' | 'openapi', required

## Response `200`

Successful Response

- AgentResponse
  - `a2ui_enabled` boolean, nullable
  - `agent_type` string
  - `description` string, nullable
  - `events_config` object, nullable
  - `id` string, uuid, required
  - `instruction` string, nullable
  - `model_id` string, nullable
  - `name` string, required
  - `planning` boolean, nullable
  - `skills` object[], nullable
  - `status` string, required
  - `tools` ToolConfigYAML[], nullable
    - `name` string, required
    - `settings` ToolSettingsYAML — Tool settings configuration in YAML format.
      - `a2a_url` string, nullable
      - `allowed_tools` unknown[], nullable
        - unknown
      - `description_override` string, nullable
      - `disabled_methods` string[], nullable
      - `openapi_connection_id` string, nullable
      - `requires_user_confirmation` boolean, nullable
    - `type` 'code' | 'mcp' | 'agent' | 'openapi', required

## Other responses

- `422` — Validation Error

## Changes

- **2026-04-29** `e1a530c0a2d5` — 4 breaking, 4 warning, 12 info
  - request property `agent_type` was restricted to a list of enum values
  - the `name` request property's minLength was increased from `0` to `1`
  - the `tools/anyOf[subschema #1]/items/settings/anyOf[subschema #1: ToolSettingsYAML]/allowed_tools/anyOf[subschema #1]/items/` request property type changed from `string` to no type
  - the `tools/anyOf[subschema #1]/items/settings/anyOf[subschema #1: ToolSettingsYAML]/allowed_tools/anyOf[subschema #1]/items/` response's property type changed from `string` to no type for status `200`
  - …16 more
- **2026-03-30** `e9c153221160` — 11 breaking, 4 warning, 11 info
  - added the new required request property `tools/anyOf[subschema #1]/items/name`
  - added the new required request property `tools/anyOf[subschema #1]/items/type`
  - the request property `agent_type` became required
  - the request property `description` became required
  - …22 more

[Change history](https://skmtc.dev/agentarea/apis/agentarea-api/changes/v1/agents/post.md)

---

[API](https://skmtc.dev/agentarea/apis/agentarea-api.md) · [All operations](https://skmtc.dev/agentarea/apis/agentarea-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/agentarea/agentarea-api/revisions/e1a530c0a2d5/schema)
