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

# Register a new agent in the catalog.



## OpenAPI

````yaml /api-reference/openapi.json post /api/agents
openapi: 3.1.0
info:
  title: Nasiko API
  description: >-
    HTTP API for the Nasiko OpenRuntime: agents, coding harnesses, TokenOps,
    routing, MCP, and secrets. Spec is generated from annotated routes; some
    surfaces are documented on the hand-written pages alongside this file.
  license:
    name: ''
  version: 0.1.0
servers: []
security: []
tags:
  - name: secrets
    description: Encrypted per-user agent secrets
  - name: catalog
    description: >-
      Agent catalog: registration, discovery, versions, per-agent secrets, and
      source import
  - name: agents
    description: >-
      Agent lifecycle: deployments, LLM routing config, update/rollback,
      upload-and-deploy
  - name: orchestrator
    description: >-
      A2A dispatch: routing-engine/ReAct orchestrator and direct agent chat,
      plus routing stats
  - name: users
    description: >-
      User management: CRUD, roles, credentials, accessible agents
      (superuser-only)
  - name: usage
    description: Per-user token usage and cost reporting
  - name: observability
    description: Sessions, traces, spans, agent logs, and FinOps reporting
  - name: llm-router
    description: LLM routing presets, provider/model catalog, and tier→model registry
  - name: mcp
    description: >-
      MCP gateway: agent-facing JSON-RPC tool calls, connector
      registration/upload/sharing, credentials & OAuth, and per-agent tool
      permissions
paths:
  /api/agents:
    post:
      tags:
        - catalog
      summary: Register a new agent in the catalog.
      operationId: create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAgent'
        required: true
      responses:
        '201':
          description: Agent registered
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
        '409':
          description: An agent with this name already exists
components:
  schemas:
    CreateAgent:
      type: object
      required:
        - name
      properties:
        capabilities: {}
        description:
          type:
            - string
            - 'null'
        display_name:
          type:
            - string
            - 'null'
        documentation_url:
          type:
            - string
            - 'null'
        icon_url:
          type:
            - string
            - 'null'
        image:
          type:
            - string
            - 'null'
        metadata: {}
        name:
          type: string
        skills:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Skill'
        tags:
          type:
            - array
            - 'null'
          items:
            type: string
        url:
          type:
            - string
            - 'null'
        version:
          type:
            - string
            - 'null'
    Agent:
      type: object
      required:
        - id
        - name
        - owner_id
        - version
        - protocol_version
        - preferred_transport
        - capabilities
        - security_schemes
        - default_input_modes
        - default_output_modes
        - skills
        - tags
        - metadata
        - status
        - minimal_code_enabled
        - created_at
        - updated_at
      properties:
        capabilities: {}
        compress_enabled:
          type: boolean
          description: >-
            Per-agent opt-in for structural payload compression on this agent's
            LLM calls

            (`nasiko-compress`, applied in the LLM router). Off unless
            explicitly enabled.
        created_at:
          type: string
          format: date-time
        default_input_modes:
          type: array
          items:
            type: string
        default_output_modes:
          type: array
          items:
            type: string
        description:
          type:
            - string
            - 'null'
        display_name:
          type:
            - string
            - 'null'
        documentation_url:
          type:
            - string
            - 'null'
        icon_url:
          type:
            - string
            - 'null'
        id:
          type: string
          format: uuid
        image:
          type:
            - string
            - 'null'
        metadata: {}
        minimal_code_enabled:
          type: boolean
          description: >-
            Drives the control plane's own minimal-code ladder injection at A2A

            dispatch time (a2a_dispatch.rs), not a secret — unlike the old

            CODING_AGENT_MINIMAL_CODE env var this replaces, this column has a

            real read-back route, which is what lets the Settings-tab switch
            show

            its actual current state instead of a per-browser guess.
        name:
          type: string
        owner_id:
          type: string
          format: uuid
        preferred_transport:
          type: string
        protocol_version:
          type: string
        security_schemes: {}
        skills:
          type: array
          items:
            $ref: '#/components/schemas/Skill'
        status:
          type: string
        tags:
          type: array
          items:
            type: string
        transport_path:
          type:
            - string
            - 'null'
          description: |-
            Path of the agent's advertised JSON-RPC transport (e.g. "/jsonrpc"),
            extracted from its AgentCard `supportedInterfaces` at deploy time.
            Clients chat via `{base}/api/agents/{id}{transport_path}`.
        updated_at:
          type: string
          format: date-time
        url:
          type:
            - string
            - 'null'
        version:
          type: string
    Skill:
      type: object
      required:
        - id
        - name
        - description
      properties:
        description:
          type: string
        examples:
          type: array
          items: {}
        id:
          type: string
        name:
          type: string
        tags:
          type: array
          items:
            type: string

````