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

# Submit private authoring activity



## OpenAPI

````yaml https://raw.githubusercontent.com/agentsfleet/agentsfleet/main/public/openapi.json post /v1/runners/me/authoring-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/authoring-leases/{lease_id}/activity:
    post:
      tags:
        - Runners
      summary: Submit private authoring activity
      operationId: runner_publish_authoring_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/AuthoringActivityRequest'
        required: true
      responses:
        '202':
          description: Durable proposal receipt or progress acknowledgement
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthoringActivityAccepted'
        '400':
          description: Invalid activity
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '401':
          description: Unauthorized
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '404':
          description: Lease unavailable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '409':
          description: Lost lease or conflicting activity
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '412':
          description: Candidate base changed
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '413':
          description: Envelope too large
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '429':
          description: Too many requests
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '500':
          description: Internal failure
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '503':
          description: Dependency unavailable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
      security:
        - RunnerBearerAuth: []
components:
  schemas:
    AuthoringActivityRequest:
      type: object
      description: One contiguous, replay-safe activity submission.
      required:
        - fence
        - deletion_generation
        - sequence
        - activity_sequence
        - event
      properties:
        activity_sequence:
          type: string
          description: Contiguous activity number, beginning at one.
        deletion_generation:
          type: string
          description: Generation whose private text the lease may update.
        event:
          $ref: '#/components/schemas/ActivityEvent_Value_Value_Value'
          description: Only progress and the fixed proposal tool are accepted.
        fence:
          type: string
          description: Current attempt fence.
        sequence:
          type: string
          description: Accepted user-message sequence.
      additionalProperties: false
    AuthoringActivityAccepted:
      type: object
      description: A durable activity receipt; progress has no candidate member.
      required:
        - accepted
        - replayed
      properties:
        accepted:
          type: boolean
          description: The activity was durably accepted.
        candidate:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CandidateVersion'
              description: Originally committed version, independent of the current head.
        replayed:
          type: boolean
          description: This is the originally accepted normalized submission.
    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:
            - 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.
    ActivityEvent_Value_Value_Value:
      oneOf:
        - type: object
          description: A cosmetic hint; it grants no capability.
          required:
            - text
            - kind
          properties:
            kind:
              type: string
              enum:
                - progress
            text:
              type: string
              description: Bounded, NUL-free text.
        - type: object
          description: A candidate change requiring an atomic shared-validator decision.
          required:
            - proposal
            - kind
          properties:
            kind:
              type: string
              enum:
                - proposal
            proposal:
              $ref: '#/components/schemas/Proposal_Value_Value_Value'
              description: Initialization or a version-bound edit.
      description: The only two activity kinds an authoring lease may submit.
    CandidateVersion:
      type: object
      description: >-
        Immutable version returned by an accepted proposal and its exact
        retries.
      required:
        - id
        - revision
      properties:
        id:
          type: string
          description: Fresh identity for this accepted content revision.
        revision:
          type: string
          description: Draft-local decimal revision.
    Proposal_Value_Value_Value:
      oneOf:
        - type: object
          description: >-
            A first candidate, parsed by the same Definition validator as the
            drawer.
          required:
            - definition
            - kind
          properties:
            definition:
              $ref: '#/components/schemas/FleetDefinition'
              description: >-
                A complete native setup; generic keeps the wire crate
                datastore-free.
            kind:
              type: string
              enum:
                - initialize
        - type: object
          description: >-
            A small edit against the exact currently committed candidate
            version.
          required:
            - base_candidate_id
            - base_candidate_revision
            - config_ops
            - instruction_edits
            - kind
          properties:
            base_candidate_id:
              type: string
              description: Immutable candidate identity.
            base_candidate_revision:
              type: string
              description: Draft-local decimal revision.
            config_ops:
              type: array
              items:
                $ref: '#/components/schemas/DefinitionConfigOp'
              description: >-
                Supported configuration operations, validated by the native
                editor.
            instruction_edits:
              type: array
              items:
                $ref: '#/components/schemas/DefinitionInstructionEdit'
              description: Nonoverlapping UTF-8 ranges, validated by the native editor.
            kind:
              type: string
              enum:
                - edit
      description: One model-suggested change, still untrusted until the daemon commits it.
    FleetDefinition:
      type: object
      description: >-
        A complete native fleet setup: its description, instructions and
        configuration.
      required:
        - schema_version
        - description
        - instructions_md
        - config
      properties:
        config:
          $ref: '#/components/schemas/DefinitionConfig'
          description: The fleet's configuration.
        description:
          type: string
          description: >-
            Says what the fleet does, shown wherever it is listed. At most
            32,768

            characters.
          maxLength: 32768
          minLength: 1
        instructions_md:
          type: string
          description: The fleet's instructions, in Markdown, at most 32,768 characters.
          maxLength: 32768
        schema_version:
          type: integer
          format: int32
          description: The Definition format version. Only `1` is accepted.
          maximum: 1
          minimum: 1
      additionalProperties: false
    DefinitionConfigOp:
      oneOf:
        - type: object
          description: Insert a member or array element below config.
          required:
            - path
            - value
            - op
          properties:
            op:
              type: string
              enum:
                - add
            path:
              type: string
              description: JSON Pointer into mutable setup fields.
              maxLength: 512
              minLength: 1
            value:
              description: >-
                The new value. The whole edited setup is validated before it is
                kept.
          additionalProperties: false
        - type: object
          description: >-
            Replace an existing member or array element below config, or the
            description.
          required:
            - path
            - value
            - op
          properties:
            op:
              type: string
              enum:
                - replace
            path:
              type: string
              description: JSON Pointer into mutable setup fields.
              maxLength: 512
              minLength: 1
            value:
              description: The new value.
          additionalProperties: false
        - type: object
          description: Remove an existing optional member or array element below config.
          required:
            - path
            - op
          properties:
            op:
              type: string
              enum:
                - remove
            path:
              type: string
              description: JSON Pointer into mutable setup fields.
              maxLength: 512
              minLength: 1
          additionalProperties: false
      description: 'One JSON Patch operation on the setup: `add`, `replace` or `remove`.'
    DefinitionInstructionEdit:
      type: object
      description: A UTF-8 byte range against the exact base instructions.
      required:
        - start_byte
        - end_byte
        - text
      properties:
        end_byte:
          type: integer
          description: Exclusive end in the unmodified base.
          maximum: 131072
          minimum: 0
        start_byte:
          type: integer
          description: Inclusive start in the unmodified base.
          maximum: 131072
          minimum: 0
        text:
          type: string
          description: Replacement text.
          maxLength: 32768
      additionalProperties: false
    DefinitionConfig:
      type: object
      description: >-
        The `config` member of a Definition: the fleet's name and its runtime
        settings.
      required:
        - name
        - x-agentsfleet
      properties:
        name:
          type: string
          description: The fleet's name.
          maxLength: 64
          minLength: 1
        x-agentsfleet:
          $ref: '#/components/schemas/DefinitionRuntime'
          description: >-
            Every runtime setting: triggers, tools, credentials, network, budget
            and gates.
      additionalProperties: false
    DefinitionRuntime:
      type: object
      description: The `x-agentsfleet` block, which holds every runtime setting.
      required:
        - tools
        - budget
      properties:
        budget:
          $ref: '#/components/schemas/DefinitionBudget'
          description: The most this fleet may spend.
        context:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/DefinitionContext'
              description: Context-size settings for each run.
        credentials:
          type:
            - array
            - 'null'
          items:
            type: string
            maxLength: 128
            minLength: 1
          description: The workspace secrets this fleet may read, by name.
          maxItems: 64
        gates:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/DefinitionGates'
              description: >-
                Which tool actions need a person's approval, and which repeated
                actions stop a run.
        model:
          type:
            - string
            - 'null'
          description: The model this fleet runs on, passed to the runner unchanged.
          maxLength: 255
        network:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/DefinitionNetwork'
              description: The hosts this fleet may reach.
        repositories:
          type:
            - array
            - 'null'
          items:
            type: string
            maxLength: 255
            minLength: 1
          description: >-
            The repositories this fleet's GitHub credentials may reach, as
            `owner/name`.

            Set together with `repository_access`.
          maxItems: 64
          minItems: 1
        repository_access:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/DefinitionRepositoryAccess'
              description: >-
                How far those credentials reach. Set together with
                `repositories`.
        repository_base:
          type:
            - string
            - 'null'
          description: >-
            The branch every pull request opens against. Required with `write`,
            refused with `read`.
          maxLength: 255
          minLength: 1
        tools:
          type: array
          items:
            type: string
            maxLength: 128
            minLength: 1
          description: >-
            The tools this fleet may call. An empty list means the fleet only
            answers.
          maxItems: 128
        triggers:
          type: array
          items:
            $ref: '#/components/schemas/DefinitionTrigger'
          description: >-
            What may start a run of this fleet besides a message sent to it.
            Omit

            it, or leave it empty, for a fleet that is only ever talked to.
          maxItems: 8
      additionalProperties: false
    DefinitionBudget:
      type: object
      description: Spending limits, each a decimal string of whole nanos.
      required:
        - daily_nanos
      properties:
        daily_nanos:
          type: string
          description: 'The daily limit: a decimal string of whole nanos, greater than zero.'
          maxLength: 19
          minLength: 1
          pattern: ^[0-9]+$
        monthly_nanos:
          type: string
          description: >-
            The monthly limit, in the same form. Omit it to set no monthly
            limit.
          maxLength: 19
          minLength: 1
          pattern: ^[0-9]+$
      additionalProperties: false
    DefinitionContext:
      type: object
      description: Context-size settings for each run.
      properties:
        context_cap_tokens:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/DefinitionContextSetting'
              description: The most tokens a run's assembled context may hold.
        memory_checkpoint_every:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/DefinitionContextSetting'
              description: How often a run saves its memory.
        stage_chunk_threshold:
          type:
            - number
            - 'null'
          format: double
          description: >-
            The fraction of the context, from 0 to 1, at which a stage splits
            into chunks.

            Zero means the runner chooses.
          maximum: 1
          minimum: 0
        tool_window:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/DefinitionContextSetting'
              description: How much of the context tool output may fill.
      additionalProperties: false
    DefinitionGates:
      type: object
      description: Approval and anomaly rules for a fleet's tool actions.
      properties:
        anomaly_rules:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/DefinitionAnomalyRule'
          description: The repeated-action patterns that stop a run.
        rules:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/DefinitionGateRule'
          description: The tool actions that need a person's approval.
        timeout_ms:
          type:
            - integer
            - 'null'
          format: int64
          description: |-
            How long, in milliseconds, an approval may wait before it lapses.
            An out-of-range value is clamped to the nearest allowed one.
      additionalProperties: false
    DefinitionNetwork:
      type: object
      description: Where a fleet may reach on the network.
      properties:
        allow:
          type:
            - array
            - 'null'
          items:
            type: string
            maxLength: 255
            minLength: 1
          description: >-
            The hosts the fleet may reach. An empty list blocks every outbound
            request.
          maxItems: 64
        read_only:
          type:
            - boolean
            - 'null'
          description: Whether outbound requests are limited to reads.
        read_post_paths:
          type:
            - array
            - 'null'
          items:
            type: string
            maxLength: 255
            minLength: 1
          description: >-
            The request paths that may still send `POST` when `read_only` is
            true.
          maxItems: 64
      additionalProperties: false
    DefinitionRepositoryAccess:
      type: string
      description: How far a fleet's repository credentials reach.
      enum:
        - read
        - write
    DefinitionTrigger:
      oneOf:
        - type: object
          description: Starts on a signed delivery from an external provider.
          required:
            - source
            - type
          properties:
            credential_name:
              type:
                - string
                - 'null'
              description: >-
                A secret name to use instead of the provider's default, so two
                fleets

                on one provider can hold different secrets.
              maxLength: 128
              minLength: 1
            events:
              type:
                - array
                - 'null'
              items:
                type: string
                maxLength: 64
                minLength: 1
              description: The event names that start a run. Omit it to accept every event.
              maxItems: 16
              minItems: 1
            repositories:
              type:
                - array
                - 'null'
              items:
                type: string
                maxLength: 255
                minLength: 1
              description: >-
                The repositories whose deliveries may start a run, as
                `owner/name`.
              maxItems: 64
              minItems: 1
            signature:
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/DefinitionWebhookSignature'
                  description: How the delivery proves it came from the provider.
            source:
              type: string
              description: >-
                The provider that sends the delivery, as a lowercase slug: it is
                the

                last segment of the URL the fleet's deliveries are sent to.
              maxLength: 255
              minLength: 1
            type:
              type: string
              enum:
                - webhook
        - type: object
          description: Starts on a schedule.
          required:
            - schedule
            - type
          properties:
            message:
              type:
                - string
                - 'null'
              description: The message each scheduled run receives.
              maxLength: 255
            schedule:
              type: string
              description: The schedule, as a cron expression.
              maxLength: 255
              minLength: 1
            timezone:
              type:
                - string
                - 'null'
              description: The time zone the schedule is read in.
              maxLength: 255
              minLength: 1
            type:
              type: string
              enum:
                - cron
        - type: object
          description: Starts when someone mentions the bot in one chat channel.
          required:
            - source
            - channels
            - type
          properties:
            channels:
              type: array
              items:
                type: string
                maxLength: 32
                minLength: 9
              description: The channel identifier, as a list with exactly one entry.
              maxItems: 1
              minItems: 1
            source:
              type: string
              description: The chat provider.
              maxLength: 255
              minLength: 1
            type:
              type: string
              enum:
                - mention
      description: One way a fleet can start a run. `type` selects the kind.
    DefinitionContextSetting:
      oneOf:
        - type: integer
          format: int32
          description: An explicit value.
          minimum: 0
        - $ref: '#/components/schemas/DefinitionContextAuto'
          description: The word `auto`.
      description: A number, or `auto` to let the runner choose.
    DefinitionAnomalyRule:
      type: object
      description: One repeated-action pattern that stops a run.
      required:
        - pattern
        - threshold_count
        - threshold_window_s
      properties:
        pattern:
          $ref: '#/components/schemas/DefinitionAnomalyPattern'
          description: The pattern to watch for.
        threshold_count:
          type: integer
          format: int32
          description: How many repeats stop the run.
          maximum: 10000
          minimum: 1
        threshold_window_s:
          type: integer
          format: int32
          description: The window, in seconds, the repeats are counted in.
          maximum: 86400
          minimum: 1
      additionalProperties: false
    DefinitionGateRule:
      type: object
      description: One rule for when a tool action needs a person.
      required:
        - tool
        - action
      properties:
        action:
          type: string
          description: The action on that tool.
          maxLength: 128
          minLength: 1
        behavior:
          $ref: '#/components/schemas/DefinitionGateBehavior'
          description: What happens when the rule applies.
        blast_radius:
          type: string
          description: How far an approval reaches, as shown to the person.
          maxLength: 255
        condition:
          type:
            - string
            - 'null'
          description: A condition that narrows when the rule applies.
          maxLength: 255
        gate_kind:
          type: string
          description: The kind of decision the person is asked to make.
          maxLength: 255
        tool:
          type: string
          description: The tool the rule watches.
          maxLength: 128
          minLength: 1
      additionalProperties: false
    DefinitionWebhookSignature:
      type: object
      description: |-
        A Svix-signed webhook: the secret its deliveries are verified with, at
        `/v1/webhooks/svix/{fleet_id}`.
      required:
        - secret_ref
      properties:
        secret_ref:
          type: string
          description: The secret name that holds the Svix signing secret.
          maxLength: 128
          minLength: 1
      additionalProperties: false
    DefinitionContextAuto:
      type: string
      description: The only word a context setting accepts.
      enum:
        - auto
    DefinitionAnomalyPattern:
      type: string
      description: A repeated-action pattern.
      enum:
        - same_action
    DefinitionGateBehavior:
      type: string
      description: What happens when an approval rule applies.
      enum:
        - approve
        - auto_kill
  securitySchemes:
    RunnerBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: agt_r
      description: The opaque agt_r token minted when the runner enrols (POST /v1/runners)

````

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