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

# Publish live-tail activity frames

> Frames for the workspace event stream. Answers 202 rather than 200: the frame is accepted for publication, and a subscriber reading it is a separate event from this call returning. 



## OpenAPI

````yaml https://raw.githubusercontent.com/agentsfleet/agentsfleet/main/public/openapi.json post /v1/runners/me/leases/{lease_id}/activity
openapi: 3.1.0
info:
  title: agentsfleet Control Plane API
  description: API for managing workspaces, fleets, triggers, and runs.
  contact:
    name: agentsfleet
    url: https://agentsfleet.net
  license:
    name: MIT
    identifier: MIT
  version: 1.0.0
servers:
  - url: https://api.agentsfleet.net
    description: Production
security: []
paths:
  /v1/runners/me/leases/{lease_id}/activity:
    post:
      tags:
        - Runners
      summary: Publish live-tail activity frames
      description: >-
        Frames for the workspace event stream. Answers 202 rather than 200: the
        frame is accepted for publication, and a subscriber reading it is a
        separate event from this call returning. 
      operationId: runner_publish_activity
      parameters:
        - name: lease_id
          in: path
          description: '`UUIDv7` of the lease.'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActivityRequest'
        required: true
      responses:
        '202':
          description: >-
            Accepted for publication; a subscriber reading it is a separate
            event
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActivityAccepted'
        '401':
          description: No credential, or one this route does not accept
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '403':
          description: The credential is good and lacks the capability this route requires
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '413':
          description: The payload is over this route's ceiling
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '429':
          description: The instance is at its ceiling
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '500':
          description: The daemon failed to answer
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '503':
          description: A dependency this route needs is unreachable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
      security:
        - RunnerBearerAuth: []
components:
  schemas:
    ActivityRequest:
      type: object
      description: >-
        `POST /v1/runners/me/leases/{lease_id}/activity` request, a batch of
        frames.


        One frame per request today; the array shape lets a later change
        coalesce

        without a wire change. The reply is `202` carrying [`ActivityAccepted`].
      required:
        - frames
      properties:
        frames:
          type: array
          items:
            $ref: '#/components/schemas/ActivityFrame'
          description: The frames being forwarded.
      additionalProperties: false
    ActivityAccepted:
      type: object
      description: >-
        The acknowledgement a batch of frames is answered with.


        `202`, because the frames were received and not yet read by anybody. The

        publish is best-effort and a subscriber seeing a frame is a separate
        event

        from this call returning.
      required:
        - ok
      properties:
        ok:
          type: boolean
          description: >-
            Always `true`: a batch this daemon could not accept is refused with
            a

            problem document, never acknowledged with `false`.
      additionalProperties: false
    ProblemBody:
      type: object
      description: The body every refusal carries, under `application/problem+json`.
      required:
        - docs_uri
        - title
        - detail
        - error_code
        - request_id
      properties:
        action_id:
          type:
            - string
            - 'null'
          description: 'On that 409 only: the action the gate held.'
        current_state:
          type:
            - string
            - 'null'
          description: 'On a 409 only: the state that forbade the transition.'
        detail:
          type: string
          description: One sentence on what was refused and why.
        docs_uri:
          type: string
          description: Where the error code is documented.
        error_code:
          type: string
          description: The registry code, stable across releases.
        etag:
          type:
            - string
            - 'null'
          description: >-
            On a 412 only: the resource's current entity tag, to refetch and
            retry.
        gate_id:
          type:
            - string
            - 'null'
          description: 'On an answered approval gate''s 409 only: the gate that was answered.'
        missing_secrets:
          type:
            - array
            - 'null'
          items:
            type: string
          description: 'On a 424 only: the credentials this workspace has yet to store.'
        outcome:
          type:
            - string
            - 'null'
          description: 'On that 409 only: the answer that stands.'
        request_id:
          type: string
          description: The request this refusal answers, for support.
        resolved_at:
          type:
            - integer
            - 'null'
          format: int64
          description: 'On that 409 only: when the standing answer was given.'
        resolved_by:
          type:
            - string
            - 'null'
          description: 'On that 409 only: who gave it.'
        title:
          type: string
          description: A short name for the refusal, safe to show a person.
        user_message:
          type:
            - string
            - 'null'
          description: A curated sentence for end users, where the code has one.
    ActivityFrame:
      oneOf:
        - type: object
          description: A tool call began.
          required:
            - tool_call_started
          properties:
            tool_call_started:
              $ref: '#/components/schemas/ToolCallStarted'
              description: A tool call began.
        - type: object
          description: The fleet produced output.
          required:
            - fleet_response_chunk
          properties:
            fleet_response_chunk:
              $ref: '#/components/schemas/FleetResponseChunk'
              description: The fleet produced output.
        - type: object
          description: A tool call finished.
          required:
            - tool_call_completed
          properties:
            tool_call_completed:
              $ref: '#/components/schemas/ToolCallCompleted'
              description: A tool call finished.
        - type: object
          description: A long-running tool is still working.
          required:
            - tool_call_progress
          properties:
            tool_call_progress:
              $ref: '#/components/schemas/ToolCallProgress'
              description: A long-running tool is still working.
      description: One progress frame.
    ToolCallStarted:
      type: object
      description: |-
        A tool call began.

        `args_redacted` is opaque, pre-stringified JSON built runner-side AFTER
        substitution — never the resolved bytes.
      required:
        - name
        - args_redacted
      properties:
        args_redacted:
          type: string
          description: The redacted arguments.
        name:
          type: string
          description: Which tool.
      additionalProperties: false
    FleetResponseChunk:
      type: object
      description: The fleet produced output.
      required:
        - text
      properties:
        text:
          type: string
          description: The text produced.
      additionalProperties: false
    ToolCallCompleted:
      type: object
      description: A tool call finished.
      required:
        - name
        - ms
      properties:
        ms:
          type: integer
          format: int64
          description: How long it took, in milliseconds.
        name:
          type: string
          description: Which tool.
      additionalProperties: false
    ToolCallProgress:
      type: object
      description: A long-running tool is still working, so a reader's spinner survives it.
      required:
        - name
        - elapsed_ms
      properties:
        elapsed_ms:
          type: integer
          format: int64
          description: How long it has been running, in milliseconds.
        name:
          type: string
          description: Which tool.
      additionalProperties: false
  securitySchemes:
    RunnerBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: agt_r
      description: The opaque agt_r token minted when the runner enrols (POST /v1/runners)

````