---
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`` is the UUID of a model instance configured in the workspace — the runtime has no other interpretation of it. Omit it (or pass ``null``) to create an agent with no model bound yet; such an agent cannot be run until a model is assigned.
  - `a2ui_enabled` boolean, nullable — Expose this agent over the A2UI protocol.
  - `agent_type` 'stateless' | 'stateful' — DEPRECATED — stored and echoed back, but the runtime never reads it, so every agent behaves as 'stateless' regardless of this value. Conversation history does not currently survive across runs. Do not branch on this field.
  - `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, nullable — UUID of a model instance in this workspace (see GET /v1/model-instances). Null means no model is bound yet and the agent cannot be run.
  - `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` union[], nullable — Tools attached to the agent (code/mcp/agent/openapi).
    - union
      - CodeToolConfig
        - `name` string, required
        - `settings` CodeToolSettings — Settings for a built-in code toolset.
          - `disabled_methods` string[], nullable
          - `requires_user_confirmation` boolean, nullable
        - `type` 'code'
      - McpToolConfigInput
        - `name` string, required
        - `settings` McpToolSettings — Settings for an MCP server tool (a subset of the server's tools).
          - `allowed_tools` McpToolPermission[], nullable
            - `requires_user_confirmation` boolean, nullable
            - `tool_name` string, required
          - `requires_user_confirmation` boolean, nullable
        - `type` 'mcp'
      - AgentToolConfig
        - `name` string, required
        - `settings` AgentToolSettings — Settings for an agent-to-agent (delegation) tool. ``a2a_url`` selects the *remote* transport binding; absent → same-platform direct delegation. Lives here only — A2A is a per-edge binding, not a property every tool type carries.
          - `a2a_url` string, nullable
          - `description_override` string, nullable
          - `requires_user_confirmation` boolean, nullable
        - `type` 'agent'
      - OpenApiToolConfig
        - `name` string, required
        - `settings` OpenApiToolSettings — Settings for an OpenAPI connection tool. ``load_mode`` picks schema disclosure: "explicit" inlines every operation's schema into each LLM call (legacy); "searchable" defers them behind a ``load_tools`` meta-tool. Honored only for openapi tools — which is exactly why it lives here and nowhere else.
          - `allowed_tools` string[], nullable
          - `load_mode` 'explicit' | 'searchable', nullable
          - `openapi_connection_id` string, nullable
          - `requires_user_confirmation` boolean, nullable
        - `type` 'openapi'

## 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
  - `is_catalog` boolean
  - `model_id` string, nullable
  - `name` string, required
  - `planning` boolean, nullable
  - `registry_item_id` string, nullable
  - `skills` object[], nullable
  - `slug` string, required
  - `status` string, required
  - `tools` union[], nullable
    - union
      - CodeToolConfig
        - `name` string, required
        - `settings` CodeToolSettings — Settings for a built-in code toolset.
          - `disabled_methods` string[], nullable
          - `requires_user_confirmation` boolean, nullable
        - `type` 'code'
      - McpToolConfigOutput
        - `name` string, required
        - `settings` McpToolSettings — Settings for an MCP server tool (a subset of the server's tools).
          - `allowed_tools` McpToolPermission[], nullable
            - `requires_user_confirmation` boolean, nullable
            - `tool_name` string, required
          - `requires_user_confirmation` boolean, nullable
        - `type` 'mcp'
      - AgentToolConfig
        - `name` string, required
        - `settings` AgentToolSettings — Settings for an agent-to-agent (delegation) tool. ``a2a_url`` selects the *remote* transport binding; absent → same-platform direct delegation. Lives here only — A2A is a per-edge binding, not a property every tool type carries.
          - `a2a_url` string, nullable
          - `description_override` string, nullable
          - `requires_user_confirmation` boolean, nullable
        - `type` 'agent'
      - OpenApiToolConfig
        - `name` string, required
        - `settings` OpenApiToolSettings — Settings for an OpenAPI connection tool. ``load_mode`` picks schema disclosure: "explicit" inlines every operation's schema into each LLM call (legacy); "searchable" defers them behind a ``load_tools`` meta-tool. Honored only for openapi tools — which is exactly why it lives here and nowhere else.
          - `allowed_tools` string[], nullable
          - `load_mode` 'explicit' | 'searchable', nullable
          - `openapi_connection_id` string, nullable
          - `requires_user_confirmation` boolean, nullable
        - `type` 'openapi'
  - `update_available` boolean

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/agentarea/apis/agentarea-api.md) · [All operations](https://skmtc.net/agentarea/apis/agentarea-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/agentarea/agentarea-api/versions/e3650e48373b/schema)
