> ## 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.

# search

> Agent-only search.  Scoring: GREATEST across (name×2.8, description×2.0, tag score) with tiered
exact/prefix/contains scoring.  Minimum query length: 2 chars.



## OpenAPI

````yaml /api-reference/openapi.json get /api/search/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/search/agents:
    get:
      tags:
        - catalog
      summary: search
      description: >-
        Agent-only search.  Scoring: GREATEST across (name×2.8, description×2.0,
        tag score) with tiered

        exact/prefix/contains scoring.  Minimum query length: 2 chars.
      operationId: search
      parameters:
        - name: q
          in: query
          description: Search term, minimum 2 characters.
          required: true
          schema:
            type: string
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: Ranked agent search hits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentSearchResponse'
        '400':
          description: '`q` shorter than 2 characters'
components:
  schemas:
    AgentSearchResponse:
      type: object
      description: >-
        Agent search envelope — mirrors Python's `{agents, total, max_score}`
        and the

        existing `UserSearchResponse` shape so both search surfaces are
        consistent.
      required:
        - agents
        - total
        - max_score
      properties:
        agents:
          type: array
          items:
            $ref: '#/components/schemas/AgentSearchResult'
        max_score:
          type: number
          format: double
        total:
          type: integer
          format: int64
    AgentSearchResult:
      allOf:
        - $ref: '#/components/schemas/Agent'
        - type: object
          required:
            - score
          properties:
            score:
              type: number
              format: double
      description: >-
        One agent search hit: all agent fields plus its computed relevance
        `score`.

        `_total` is the pre-limit match count (window function) — carried per
        row and

        hoisted into the response envelope, not serialized on each item.
    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

````