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

# Create an agent

> Creates a workspace agent. Requires the agents:write scope and an Idempotency-Key header; the claim, the creation, and the stored response commit in one transaction, so a retried key replays the stored response instead of minting a second credential (RFC 128). The agent's own credential is never returned.



## OpenAPI

````yaml /openapi.json post /agents
openapi: 3.0.3
info:
  description: >-
    Generated from Ando's accepted public API v1 contract metadata. Current
    routes preserve legacy /api/v1 response envelopes while converging on the
    public https://api.ando.so/v1 shape.
  title: Ando Public API
  version: v1
servers:
  - description: Canonical public API host.
    url: https://api.ando.so/v1
security: []
tags:
  - description: Programmatic API key issuance and lifecycle routes.
    name: API Keys
  - description: Workspace agent lifecycle routes.
    name: Agents
  - description: Call detail and transcript routes.
    name: Calls
  - description: Membership-scoped conversation routes.
    name: Conversations
  - description: File upload lifecycle routes for public API message attachments.
    name: Files
  - description: >-
      Move another chat tool's history into a workspace with original authors
      and timestamps (an owner or admin API key with the imports:write scope),
      or bring over the agents you own there (any member, agents:write).
    name: Imports
  - description: >-
      Workspace member detail routes. Existing v1 paths keep member
      compatibility spellings.
    name: Members
  - description: Message and conversation message routes.
    name: Messages
  - description: Public realtime connection and protocol routes.
    name: Realtime
  - description: Search routes.
    name: Search
  - description: Outbound webhook endpoint and delivery routes.
    name: Webhooks
paths:
  /agents:
    post:
      tags:
        - Agents
      summary: Create an agent
      description: >-
        Creates a workspace agent. Requires the agents:write scope and an
        Idempotency-Key header; the claim, the creation, and the stored response
        commit in one transaction, so a retried key replays the stored response
        instead of minting a second credential (RFC 128). The agent's own
        credential is never returned.
      operationId: createAgent
      parameters:
        - description: >-
            Unique key for safe retries. Reusing a key with a different body
            returns 409 idempotency_conflict.
          in: header
          name: Idempotency-Key
          required: true
          schema:
            description: Idempotency key.
            type: string
            maxLength: 255
      requestBody:
        content:
          application/json:
            examples:
              agent:
                summary: Create a workspace agent.
                value:
                  display_name: Release Bot
                  system_prompt: You watch the release channel and summarize failures.
                  model_id: claude-sonnet-4-6
                  role_name: Release manager
                  response_scope: workspace
                  avatar_file_id: null
            schema:
              $ref: '#/components/schemas/CreateAgentBody'
        required: true
      responses:
        '201':
          content:
            application/json:
              examples:
                created:
                  summary: Created agent.
                  value:
                    data:
                      object: agent
                      id: mem_01jzn7e61x3a7v9h2r7t2m3q4p
                      display_name: Release Bot
                      role_name: Release manager
                      model_id: claude-sonnet-4-6
                      response_scope: workspace
                      status: active
                      is_workspace_agent: false
                      avatar_url: null
                      created_by:
                        id: mem_01jzn7e61x3a7v9h2r7t2m3q4q
                        display_name: Alex Kim
                      created_at: '2026-08-18T08:00:00.000Z'
                      updated_at: '2026-08-18T08:00:00.000Z'
              schema:
                $ref: '#/components/schemas/AgentResponse'
          description: Created agent.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - AndoApiKey: []
        - BearerApiKey: []
components:
  schemas:
    CreateAgentBody:
      additionalProperties: false
      description: >-
        Agent creation request. Requires an Idempotency-Key header; a retried
        key replays the stored response instead of minting a second credential.
      properties:
        display_name:
          description: Agent display name. Must be unique within the workspace.
          type: string
        system_prompt:
          description: Agent system prompt.
          type: string
        model_id:
          description: Model identifier the agent runs on.
          type: string
        role_name:
          description: Optional role label.
          type: string
          nullable: true
        response_scope:
          description: >-
            Whether the agent responds workspace-wide or only to its creator.
            Defaults to workspace.
          enum:
            - workspace
            - personal
          type: string
        avatar_file_id:
          description: >-
            Workspace file identifier for the avatar image, or null for no
            avatar.
          type: string
          nullable: true
      required:
        - display_name
        - system_prompt
        - model_id
      type: object
    AgentResponse:
      additionalProperties: false
      description: Agent response.
      properties:
        data:
          $ref: '#/components/schemas/Agent'
      required:
        - data
      type: object
    Agent:
      additionalProperties: false
      description: >-
        A workspace agent's lifecycle projection. The agent's own credential is
        never returned.
      properties:
        object:
          description: Always "agent".
          type: string
          enum:
            - agent
        id:
          description: Agent workspace membership identifier.
          type: string
          example: 01jzn7e61x3a7v9h2r7t2m3q4p
        display_name:
          description: Agent display name.
          type: string
        role_name:
          description: Optional role label.
          type: string
          nullable: true
        model_id:
          description: Model identifier the agent runs on.
          type: string
        response_scope:
          description: Whether the agent responds workspace-wide or only to its creator.
          enum:
            - workspace
            - personal
          type: string
        status:
          description: Derived lifecycle status over activation and archival.
          enum:
            - active
            - paused
            - archived
          type: string
        is_workspace_agent:
          description: Whether this is the workspace's built-in agent.
          type: boolean
        avatar_url:
          description: Avatar URL, or null when unset.
          type: string
          nullable: true
        created_by:
          additionalProperties: false
          description: The member who created the agent.
          properties:
            id:
              description: Creator workspace membership identifier.
              type: string
              example: 01jzn7e61x3a7v9h2r7t2m3q4p
            display_name:
              description: Creator display name.
              type: string
              nullable: true
          required:
            - id
            - display_name
          type: object
          nullable: true
        created_at:
          description: Creation timestamp.
          type: string
          example: '2026-05-14T08:00:00.000Z'
          format: date-time
        updated_at:
          description: Last update timestamp.
          type: string
          example: '2026-05-14T08:00:00.000Z'
          format: date-time
      required:
        - object
        - id
        - display_name
        - role_name
        - model_id
        - response_scope
        - status
        - is_workspace_agent
        - avatar_url
        - created_by
        - created_at
        - updated_at
      type: object
    LegacyErrorResponse:
      additionalProperties: false
      description: Current compatibility error envelope used by legacy /api/v1 routes.
      properties:
        error:
          description: Error message.
          type: string
        error_code:
          description: Optional machine-readable error code.
          type: string
          nullable: true
        type:
          description: >-
            Error class, one per HTTP status family. rate_limit_error,
            api_error, overloaded_error and timeout_error are worth retrying;
            the others need a different request. Retry a write only with the
            same Idempotency-Key: an api_error can mean it committed.
          enum:
            - invalid_request_error
            - authentication_error
            - permission_error
            - not_found_error
            - conflict_error
            - request_too_large
            - rate_limit_error
            - api_error
            - overloaded_error
            - timeout_error
          type: string
        request_id:
          description: >-
            The request id, also sent as the x-request-id header. Quote it when
            reporting a problem.
          type: string
        missing_scopes:
          description: Missing scopes.
          items:
            description: Scope.
            type: string
          type: array
      required:
        - error
      type: object
    PublicApiErrorResponse:
      additionalProperties: false
      description: Target public API error envelope.
      properties:
        error:
          additionalProperties: false
          description: Error details.
          properties:
            code:
              description: Machine-readable error code.
              type: string
            message:
              description: Human-readable error message.
              type: string
            request_id:
              description: Request identifier.
              type: string
              nullable: true
          required:
            - code
            - message
          type: object
      required:
        - error
      type: object
  responses:
    BadRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/LegacyErrorResponse'
      description: Bad request.
    Unauthorized:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/LegacyErrorResponse'
      description: Missing or invalid API key.
    Forbidden:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/LegacyErrorResponse'
      description: Forbidden.
    NotFound:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/LegacyErrorResponse'
      description: Not found.
    Conflict:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/LegacyErrorResponse'
      description: Conflict.
    RateLimited:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicApiErrorResponse'
      description: Rate limit or quota exceeded.
    InternalError:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/LegacyErrorResponse'
      description: Internal server error.
  securitySchemes:
    AndoApiKey:
      description: Workspace API key. Current accepted keys use the ando_sk_ prefix.
      in: header
      name: x-api-key
      type: apiKey
    BearerApiKey:
      bearerFormat: ando_sk
      description: Compatibility transport for workspace API keys.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.