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

# Stream a run of an authored agent

> Stream a run of an authored agent — a preset over an agent's run tool whose
baked fields the agent honors.

The baked spec is read from the ``PresetManager`` in-memory map (the single
source of truth for every registered preset — versioning never gates
streamability). The request body supplies ONLY the remaining,
non-baked ``ToolInput`` fields; naming a baked field is a loud 400 rather than a
silent override. The baked fixed kwargs plus the request fields are combined at
the FIELD level, validated against the agent's ``ToolInput``, and mapped through
``from_tool_input`` before ``astream`` — never a raw splat that would bypass
validation and the field mapping.



## OpenAPI

````yaml /openapi.json post /api/agents/authored/{name}/runs
openapi: 3.1.0
info:
  description: The operator HTTP surface served under /api/*.
  title: tai42-skeleton API
  version: 0.1.1
servers: []
security: []
paths:
  /api/agents/authored/{name}/runs:
    post:
      tags:
        - agents
      summary: Stream a run of an authored agent
      description: >-
        Stream a run of an authored agent — a preset over an agent's run tool
        whose

        baked fields the agent honors.


        The baked spec is read from the ``PresetManager`` in-memory map (the
        single

        source of truth for every registered preset — versioning never gates

        streamability). The request body supplies ONLY the remaining,

        non-baked ``ToolInput`` fields; naming a baked field is a loud 400
        rather than a

        silent override. The baked fixed kwargs plus the request fields are
        combined at

        the FIELD level, validated against the agent's ``ToolInput``, and mapped
        through

        ``from_tool_input`` before ``astream`` — never a raw splat that would
        bypass

        validation and the field mapping.
      operationId: post_api_agents_authored_name_runs
      parameters:
        - in: path
          name: name
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentRunInput'
        required: true
      responses:
        '200':
          content:
            text/event-stream:
              schema:
                type: string
          description: Server-sent event stream.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Malformed request.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Missing or invalid api key.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Resource not found.
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReloadingError'
          description: The server is applying a config reload; retry shortly.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
      security:
        - ApiKeyAuth: []
components:
  schemas:
    AgentRunInput:
      additionalProperties: true
      description: >-
        The input object for an agent run. Fields are agent-specific — validated
        at

        runtime against the target agent's dynamic ``ToolInput`` model — so the
        request

        body is a free-form JSON object here.
      title: AgentRunInput
      type: object
    Error:
      properties:
        error:
          type: string
      required:
        - error
      type: object
    ReloadingError:
      properties:
        error:
          const: reloading — the server is applying a config reload; retry shortly
          type: string
        reloading:
          const: true
          type: boolean
      required:
        - error
        - reloading
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````