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

> Publishes live activity to the workspace stream. A 202 response confirms acceptance for publication, not delivery to a subscriber.



## 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 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 activity
      description: >-
        Publishes live activity to the workspace stream. A 202 response confirms
        acceptance for publication, not delivery to a subscriber.
      operationId: runner_publish_activity
      parameters:
        - name: lease_id
          in: path
          description: Lease identifier (version 7 universally unique identifier, or UUID).
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActivityRequest'
        required: true
      responses:
        '202':
          description: >-
            Accepted for publication; delivery to subscribers is not yet
            confirmed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActivityAccepted'
        '400':
          description: The request is invalid
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '401':
          description: Authentication is missing, invalid, or not accepted by this endpoint
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '403':
          description: You do not have permission for this action
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '413':
          description: The request body exceeds this endpoint's size limit
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '429':
          description: A request or capacity limit has been reached
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '500':
          description: An internal server error occurred
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '503':
          description: A required service is unavailable
          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. Rejected batches return an error response instead.
    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.'
        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:
            - string
            - 'null'
          format: date-time
          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: >-
            The root conversation is summarizing or continuing after a
            checkpoint.
          required:
            - context_progress
          properties:
            context_progress:
              $ref: '#/components/schemas/ContextProgress'
              description: >-
                The root conversation is summarizing or continuing after a
                checkpoint.
        - 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.
    ContextProgress:
      type: object
      description: Progress never contains notes, source messages or model-generated prose.
      required:
        - generation
        - state
      properties:
        generation:
          type: integer
          format: int64
          description: Monotonic checkpoint generation within this conversation branch.
          minimum: 0
        state:
          $ref: '#/components/schemas/ContextState'
          description: Only confirmed publication may report resuming.
      additionalProperties: false
    ToolCallStarted:
      type: object
      description: >-
        A tool call started. `args_redacted` contains JSON text with secret
        values masked, never

        the resolved secrets.
      required:
        - name
        - args_redacted
        - call_id
      properties:
        args_redacted:
          type: string
          description: The redacted arguments.
        call_id:
          type: string
          description: >-
            Which call of the run this frame belongs to, 1 to 64 bytes: every
            frame

            of one call carries the same value.
        name:
          type: string
          description: Which tool.
      additionalProperties: false
    FleetResponseChunk:
      type: object
      description: The fleet produced output.
      required:
        - text
        - text_kind
      properties:
        first_chunk_after_ms:
          type:
            - integer
            - 'null'
          format: int64
          description: >-
            Present only on the first safe output chunk; relative to agent
            runtime invocation.
          minimum: 0
        stream_contiguous:
          type: boolean
          description: False once a runner lost an earlier chunk in this model pass.
        stream_seq:
          type: integer
          format: int64
          description: Zero-based output position for detecting loss after the child pipe.
          minimum: 0
        stream_start:
          type: boolean
          description: True only for the first delivered chunk of an intact model pass.
        text:
          type: string
          description: The text produced.
        text_kind:
          $ref: '#/components/schemas/StreamTextKind'
          description: Whether the text is the answer or the model's reasoning.
      additionalProperties: false
    ToolCallCompleted:
      type: object
      description: A tool call finished.
      required:
        - name
        - ms
        - call_id
        - status
      properties:
        call_id:
          type: string
          description: >-
            Which call of the run this frame belongs to, 1 to 64 bytes: every
            frame

            of one call carries the same value.
        exit_code:
          type:
            - integer
            - 'null'
          format: int32
          description: The process's exit code, for a call that ran one.
        ms:
          type: integer
          format: int64
          description: How long it took, in milliseconds.
        name:
          type: string
          description: Which tool.
        output_head:
          type:
            - string
            - 'null'
          description: The output's first lines, at most 5 lines and 1024 bytes.
        output_line_count:
          type:
            - integer
            - 'null'
          format: int64
          description: How many lines the whole output had.
          minimum: 0
        output_tail:
          type:
            - string
            - 'null'
          description: The output's last lines, at most 5 lines and 1024 bytes.
        status:
          $ref: '#/components/schemas/ToolCallStatus'
          description: How the call ended.
      additionalProperties: false
    ToolCallProgress:
      type: object
      description: A long-running tool is still working, so a reader's spinner survives it.
      required:
        - name
        - elapsed_ms
        - call_id
      properties:
        call_id:
          type: string
          description: >-
            Which call of the run this frame belongs to, 1 to 64 bytes: every
            frame

            of one call carries the same value.
        elapsed_ms:
          type: integer
          format: int64
          description: How long it has been running, in milliseconds.
        name:
          type: string
          description: Which tool.
      additionalProperties: false
    ContextState:
      type: string
      description: Content-free state of one conversation summary.
      enum:
        - summarizing
        - resuming
        - interrupted
    StreamTextKind:
      type: string
      description: >-
        Which part of the model's output a streamed chunk carries: the answer,
        or

        the model's reasoning before it.
      enum:
        - answer
        - reasoning
    ToolCallStatus:
      type: string
      description: >-
        How one tool call ended.


        Every call ends exactly once. A call the run never finished, after a
        crash,

        a kill or a timeout, ends `interrupted`. So no call is left running in a

        browser or missing from the record.
      enum:
        - succeeded
        - failed
        - interrupted
  securitySchemes:
    RunnerBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: agt_r
      description: Runner token beginning with agt_r, returned once by POST /v1/runners

````

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