> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sidenet.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create agent

> Creates an agent. Its v0 draft is created automatically (do not create it yourself). Returns the agent + the draft.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/agents
openapi: 3.1.0
info:
  title: Sidenet API
  version: 1.0.0
  description: >-
    Sidenet HTTP endpoints exposed by the Sidenet Studio. All routes require an
    api key that can be generated through the studio in studio.sidenet.ai.
servers:
  - url: https://api.sidenet.ai
security:
  - bearerAuth: []
paths:
  /v1/agents:
    post:
      tags:
        - Agents
      summary: Create agent
      description: >-
        Creates an agent. Its v0 draft is created automatically (do not create
        it yourself). Returns the agent + the draft.
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  example: Support agent
                description:
                  type: string
                  example: Answers billing and account questions
      responses:
        '201':
          description: The new agent and the empty v0 draft created with it
          content:
            application/json:
              schema:
                type: object
                properties:
                  agent:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      org_id:
                        type: string
                        format: uuid
                      name:
                        type: string
                      description:
                        type: string
                        nullable: true
                      active_version_id:
                        type: string
                        format: uuid
                        nullable: true
                        description: Null until a published version is activated.
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                  draft:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      agent_id:
                        type: string
                        format: uuid
                      version_number:
                        type: integer
                        description: >-
                          0 is the mutable draft; every published version is 1
                          or above.
                      rev:
                        type: integer
                        description: >-
                          Server-owned change counter, bumped on every save of
                          the draft. Read-only — useful to tell whether a draft
                          moved since you last read it.
                      instructions:
                        type: array
                        description: >-
                          The system prompt, as ordered blocks. Entries are
                          `{type:"text"}`, `{type:"prompt_block"}` or
                          `{type:"prompt_block_ref"}`. On a published version
                          each ref also carries the `versionId` it was frozen to
                          at publish time; on the draft that pin is absent.
                        items:
                          type: object
                      model_slug:
                        type: string
                        nullable: true
                        description: >-
                          The concrete model this version runs. Ignored when
                          `policy_slug` is set.
                      policy_slug:
                        type: string
                        nullable: true
                        description: >-
                          Routing policy to run instead of a fixed model.
                          Overrides `model_slug`.
                      model_options:
                        type: object
                        nullable: true
                        description: >-
                          Model-level options passed to the router (reasoning
                          effort, native options).
                      model_settings:
                        type: object
                        nullable: true
                        description: 'Generation settings: temperature, maxTokens, etc.'
                      max_steps:
                        type: integer
                        nullable: true
                      agentTools:
                        type: array
                        description: Tool references this version can call.
                        items:
                          type: object
                      workflows:
                        type: array
                        description: Attached workflows.
                        items:
                          type: object
                      agents:
                        type: array
                        description: >-
                          Subagents this version can delegate to, as `[{ agentId
                          }]`.
                        items:
                          type: object
                      scorers:
                        type: array
                        items:
                          type: object
                      memory:
                        type: object
                        nullable: true
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                    description: >-
                      The auto-created draft, at `version_number` 0 and
                      unconfigured.
              example:
                agent:
                  id: 6f1c0f4e-2b7a-4a51-9a2f-0c9d1b3e5a10
                  org_id: 2b9d7c31-8e4f-4a2b-9d61-77c0a3f5e812
                  name: Support agent
                  description: Answers billing and account questions
                  active_version_id: null
                  created_at: '2026-07-02T09:14:22.418Z'
                  updated_at: '2026-07-02T09:14:22.418Z'
                draft:
                  id: 4c8e1b02-77d3-4f6a-9e15-3b0a6d2c8f49
                  agent_id: 6f1c0f4e-2b7a-4a51-9a2f-0c9d1b3e5a10
                  version_number: 0
                  rev: 0
                  instructions: []
                  model_slug: null
                  policy_slug: null
                  model_options: null
                  model_settings: null
                  max_steps: null
                  agentTools: []
                  workflows: []
                  agents: []
                  scorers: []
                  memory: null
                  created_at: '2026-07-02T09:14:22.418Z'
                  updated_at: '2026-07-02T09:14:22.418Z'
        '400':
          description: Invalid body or missing headers
        '500':
          description: Create failed
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Organization API key, generated in studio.sidenet.ai. Backend only —
        never in a browser.

````