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

# Reserve a physical task decision

> Uses the lease's reviewed decision profile, native source and accepted questions. Confirmed credit and fresh platform Secrets are required before one credential response. Identical retries return saved state without another credential.



## OpenAPI

````yaml https://raw.githubusercontent.com/agentsfleet/agentsfleet/main/public/openapi.json post /v1/runners/me/leases/{lease_id}/tasks/decisions
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}/tasks/decisions:
    post:
      tags:
        - Runners
      summary: Reserve a physical task decision
      description: >-
        Uses the lease's reviewed decision profile, native source and accepted
        questions. Confirmed credit and fresh platform Secrets are required
        before one credential response. Identical retries return saved state
        without another credential.
      operationId: runner_reserve_task_decision
      parameters:
        - name: lease_id
          in: path
          description: Original lease UUIDv7.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DecisionReservationInput'
        required: true
      responses:
        '200':
          description: Saved call without another credential
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DecisionReservationResult'
        '201':
          description: One physical send authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DecisionReservationResult'
        '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'
        '404':
          description: The resource was not found or is not accessible to you
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '409':
          description: The request conflicts with the resource's current state
          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:
    DecisionReservationInput:
      type: object
      description: >-
        Reserve one physical attempt; native code supplies the accepted
        questions.
      required:
        - operation_id
        - fencing_token
        - source_admission_id
        - assessment
        - evidence
      properties:
        assessment:
          $ref: '#/components/schemas/DecisionAssessment'
          description: >-
            Logical role; native state derives its identity and accepted
            questions.
        evidence:
          description: >-
            Caller evidence stays data alongside native source and task
            identities.
        fencing_token:
          type: integer
          format: int64
          description: Existing fleet-slot fence issued with the lease.
          minimum: 0
        operation_id:
          type: string
          description: >-
            Retry identity of this reservation request, not a second physical
            send.
        retry_of:
          type:
            - string
            - 'null'
          description: >-
            First physical call when requesting its one permitted throttling
            retry.
        source_admission_id:
          type: string
          description: Admitted source whose meaning the call is assessing.
        task:
          oneOf:
            - $ref: '#/components/schemas/DecisionTaskVersion'
              description: >-
                The current task and generation, including while routing another
                input.

                Only a goal call debits this task; intent retains source
                attribution.
            - type: 'null'
      additionalProperties: false
    DecisionReservationResult:
      oneOf:
        - type: object
          description: A newly committed native issuance permits this one physical send.
          required:
            - call_id
            - dispatch
            - status
          properties:
            call_id:
              type: string
              description: Native physical call, independent of the caller's operation id.
            dispatch:
              $ref: '#/components/schemas/DecisionDispatch'
              description: >-
                Contains credentials and is never included in model-visible
                output.
            status:
              type: string
              enum:
                - dispatch
        - type: object
          description: >-
            The saved attempt is recoverable, but its credential is not
            replayed.
          required:
            - call_id
            - state
            - status
          properties:
            call_id:
              type: string
              description: Native physical call being reconciled.
            recorded:
              oneOf:
                - $ref: '#/components/schemas/DecisionRecorded'
                  description: >-
                    Saved data, without credentials, for a confirmed prior
                    physical call.
                - type: 'null'
            state:
              $ref: '#/components/schemas/DecisionCallState'
              description: Authoritative accounting state.
            status:
              type: string
              enum:
                - existing
      description: Reservation replay never issues a second credential for the same call.
    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.
    DecisionAssessment:
      oneOf:
        - type: object
          description: Interpret the complete admitted message against current work.
          required:
            - kind
          properties:
            kind:
              type: string
              enum:
                - message
        - type: object
          description: Check one action in a complete, pinned bounded interpretation.
          required:
            - ordinal
            - interpretation_digest
            - source_start
            - source_end
            - kind
          properties:
            interpretation_digest:
              type: string
              description: >-
                Digest of the complete proposed interpretation, not model
                wording.
            kind:
              type: string
              enum:
                - item
            ordinal:
              type: integer
              format: int32
              description: Zero-based action within the four-item native interpretation.
              minimum: 0
            source_end:
              type: integer
              format: int32
              description: Exclusive byte boundary, checked against the native source text.
            source_start:
              type: integer
              format: int32
              description: Inclusive byte boundary in the original complete human message.
        - type: object
          description: Assess one completed action group against its task's accepted goal.
          required:
            - action_group_id
            - kind
          properties:
            action_group_id:
              type: string
              description: >-
                Trusted supervisor identity retained through this logical
                assessment.
            kind:
              type: string
              enum:
                - goal
      description: The native meaning being assessed, independently of its physical calls.
    DecisionTaskVersion:
      type: object
      description: Task identity and generation supplied from the native lease context.
      required:
        - task_id
        - generation
      properties:
        generation:
          type: integer
          format: int64
          description: >-
            Expected current task generation, without resetting cumulative
            usage.
          minimum: 0
        task_id:
          type: string
          description: >-
            The current lease's objective; not another task selected by model
            text.
      additionalProperties: false
    DecisionDispatch:
      type: object
      description: >-
        One-use material for the trusted supervisor, outside model and sandbox
        state.

        The shared redaction owner supplies credential-safe Debug formatting.
      required:
        - assessment_id
        - attempt
        - assignment
        - request
        - api_key
        - expires_at
      properties:
        api_key:
          type: string
          description: >-
            Fresh platform-admin secret; immediately move into the existing
            guard.
        assessment_id:
          type: string
          description: Stable logical assessment shared by its at most two physical calls.
        assignment:
          $ref: '#/components/schemas/DecisionAssignment'
          description: Reviewed selection already frozen on the original lease.
        attempt:
          type: integer
          format: int32
          description: Zero for the original call, one for its approved throttling retry.
          minimum: 0
        expires_at:
          type: string
          format: date-time
          description: >-
            Native issuance deadline; the client also bounds its physical
            timeout.
        request:
          $ref: '#/components/schemas/DecisionRequest'
          description: Native call identity, evidence and accepted questions for this send.
      additionalProperties: false
    DecisionRecorded:
      type: object
      description: >-
        Recover a confirmed decision after an acknowledgement or worker was
        lost.
      required:
        - request
        - result
        - disposition
      properties:
        disposition:
          $ref: '#/components/schemas/DecisionRecordDisposition'
          description: Saved results confer no authority when their context is stale.
        request:
          $ref: '#/components/schemas/DecisionRequest'
          description: >-
            Exact original evidence and accepted questions, not a fresh
            rendering.
        result:
          $ref: '#/components/schemas/DecisionResult'
          description: Original provider result, independently revalidated by native code.
      additionalProperties: false
    DecisionCallState:
      type: string
      description: >-
        Native physical-call lifecycle; unresolved calls retain their
        reservation.
      enum:
        - reserved
        - issued
        - known
        - unknown
        - not_sent
    DecisionAssignment:
      type: object
      description: |-
        One reviewed catalogue revision, retained unchanged for this lease.
        Provider keys are resolved separately for each reserved physical call.
      required:
        - revision_id
        - profile
        - intent
        - goal
      properties:
        goal:
          $ref: '#/components/schemas/GoalDecisionPolicy'
          description: Goal acceptance thresholds reviewed with the profile.
        intent:
          $ref: '#/components/schemas/IntentDecisionPolicy'
          description: Routing acceptance thresholds reviewed with the profile.
        profile:
          $ref: '#/components/schemas/DecisionProfile'
          description: Protocol, endpoint, model and capabilities from that same revision.
        revision_id:
          type: string
          description: >-
            Native immutable revision identity used to resolve rates and
            authority.
      additionalProperties: false
    DecisionRequest:
      type: object
      description: One physical request, reserved natively before any transport sends it.
      required:
        - call_id
        - purpose
        - state
        - questions
      properties:
        call_id:
          type: string
          description: Native physical call identity for accounting and reconciliation.
        purpose:
          $ref: '#/components/schemas/DecisionPurpose'
          description: Runtime-owned intent or goal purpose.
        questions:
          type: array
          items:
            $ref: '#/components/schemas/NamedQuestion'
          description: Complete reviewed question set; partial delivery is forbidden.
        state:
          description: >-
            Complete evidence. Oversize input is refused, never silently
            shortened.
      additionalProperties: false
    DecisionRecordDisposition:
      type: string
      description: >-
        Semantic usability is separate from a recorded charge and native
        authority.
      enum:
        - current
        - stale
        - unusable
    DecisionResult:
      type: object
      description: Usage is retained even when the semantic result is refused or stale.
      required:
        - result
      properties:
        reported_model:
          type:
            - string
            - 'null'
          description: >-
            Provider-reported name, without claiming an observable serving
            revision.
        result:
          $ref: '#/components/schemas/DecisionOutcome'
          description: Native interpretation of this physical response.
        usage:
          oneOf:
            - $ref: '#/components/schemas/DecisionUsage'
              description: Measured usage, or an unknown reservation when unavailable.
            - type: 'null'
      additionalProperties: false
    GoalDecisionPolicy:
      type: object
      description: Reviewed goal-template revision and acceptance thresholds.
      required:
        - questions_revision
        - statement_min_bps
        - continue_action
        - wait
        - done
      properties:
        continue_action:
          $ref: '#/components/schemas/DecisionThreshold'
          description: Continue acceptance, subject to native remaining limits.
        done:
          $ref: '#/components/schemas/DecisionThreshold'
          description: >-
            Completion acceptance, subject to independently checked native
            evidence.
        questions_revision:
          type: string
          description: >-
            Exact native question revision implemented by this runner
            generation.
          pattern: ^dt-goal-v1$
        statement_min_bps:
          type: integer
          format: int32
          description: Every required completion statement must meet this Noul threshold.
          maximum: 10000
          minimum: 0
        wait:
          $ref: '#/components/schemas/DecisionThreshold'
          description: Wait acceptance, subject to a concrete native dependency.
      additionalProperties: false
    IntentDecisionPolicy:
      type: object
      description: Reviewed routing-template revision and acceptance thresholds.
      required:
        - questions_revision
        - intent
        - association
        - single_request_max_bps
        - multiple_request_min_bps
      properties:
        association:
          $ref: '#/components/schemas/DecisionThreshold'
          description: Association acceptance before input can change work.
        intent:
          $ref: '#/components/schemas/DecisionThreshold'
          description: Winning route acceptance.
        multiple_request_min_bps:
          type: integer
          format: int32
          description: At or above this Noul value, bounded decomposition is required.
          maximum: 10000
          minimum: 0
        questions_revision:
          type: string
          description: >-
            Exact native question revision implemented by this runner
            generation.
          pattern: ^dt-routing-v1$
        single_request_max_bps:
          type: integer
          format: int32
          description: At or below this Noul value, one request can be handled.
          maximum: 10000
          minimum: 0
      additionalProperties: false
    DecisionProfile:
      type: object
      description: >-
        Non-secret catalogue metadata frozen for a lease's selected decision
        model.
      required:
        - model_id
        - revision
        - api
        - endpoint
        - model
        - accepted_models
        - capabilities
        - input_max_bytes
      properties:
        accepted_models:
          type: array
          items:
            type: string
          description: >-
            Reviewed reported model names; activation owns alias/version
            evidence.
        api:
          $ref: '#/components/schemas/DecisionApi'
          description: Native API selected by its catalogue entry.
        capabilities:
          $ref: '#/components/schemas/DecisionCapabilities'
          description: Capabilities verified for this exact profile revision.
        endpoint:
          type: string
          description: Exact reviewed HTTPS endpoint, including the native API path.
        input_max_bytes:
          type: integer
          format: int32
          description: >-
            Conservative serialized evidence/question byte ceiling established
            for

            this profile, preventing providers from silently truncating its
            input.
          minimum: 0
        model:
          type: string
          description: >-
            Requested model; an alias is not evidence of a resolved serving
            version.
          maxLength: 256
          minLength: 1
        model_id:
          type: string
          description: Catalogue model identity; this is not another model registry.
        revision:
          type: string
          description: Reviewed profile revision used for acceptance and accounting.
      additionalProperties: false
    DecisionPurpose:
      type: string
      description: Why the native runtime reserved a physical decision call.
      enum:
        - intent
        - goal
    NamedQuestion:
      type: object
      description: Names are stable question identities, not model-generated output keys.
      required:
        - name
        - question
      properties:
        name:
          type: string
          description: Native question identity echoed by every adapter.
        question:
          $ref: '#/components/schemas/DecisionQuestion'
          description: Reviewed question representation.
      additionalProperties: false
    DecisionOutcome:
      oneOf:
        - type: object
          description: >-
            Complete typed evidence, still subject to native thresholds and
            authority.
          required:
            - answers
            - outcome
          properties:
            answers:
              type: object
              description: Exact reviewed question-key coverage.
              additionalProperties:
                $ref: '#/components/schemas/DecisionAnswer'
              propertyNames:
                type: string
            outcome:
              type: string
              enum:
                - answered
        - type: object
          description: The provider declined at least one required question.
          required:
            - outcome
          properties:
            outcome:
              type: string
              enum:
                - refused
        - type: object
          description: The response cannot authorize a semantic transition.
          required:
            - reason
            - outcome
          properties:
            outcome:
              type: string
              enum:
                - invalid
            reason:
              $ref: '#/components/schemas/DecisionInvalid'
              description: Bounded native diagnostic, without provider text.
      description: A readable physical result, separately from whether it may advance work.
    DecisionUsage:
      type: object
      description: >-
        Measured provider token categories, without multiplying per-question
        totals.
      required:
        - input_tokens
        - output_tokens
        - cached_input_tokens
        - cache_write_tokens
      properties:
        cache_write_tokens:
          type: integer
          format: int32
          description: Cache writes, already included in `input_tokens`.
          minimum: 0
        cached_input_tokens:
          type: integer
          format: int32
          description: Input tokens served from cache, already included in `input_tokens`.
          minimum: 0
        input_tokens:
          type: integer
          format: int32
          description: Complete input total, including cache reads and writes.
          minimum: 0
        output_tokens:
          type: integer
          format: int32
          description: Completion tokens, including any provider-reported reasoning.
          minimum: 0
      additionalProperties: false
    DecisionThreshold:
      type: object
      description: Probability and native confidence requirements, in integer basis points.
      required:
        - probability_bps
        - confidence_bps
      properties:
        confidence_bps:
          type: integer
          format: int32
          description: Required provider-native confidence; absence cannot meet this bound.
          maximum: 10000
          minimum: 0
        probability_bps:
          type: integer
          format: int32
          description: The selected option's required probability; 10,000 means one.
          maximum: 10000
          minimum: 0
      additionalProperties: false
    DecisionApi:
      type: string
      description: Native decision protocols; none is a structured-chat substitute.
      enum:
        - typesafe
        - openai
        - perplexity
        - cloudflare
    DecisionCapabilities:
      type: object
      description: >-
        Capabilities reviewed with a catalogue profile; unsupported work is
        refused.
      required:
        - noul
        - choice
        - score
      properties:
        choice:
          type: boolean
          description: Selected option and full distribution.
        noul:
          type: boolean
          description: True/false probability.
        score:
          type: boolean
          description: Ordered rubric and full distribution.
      additionalProperties: false
    DecisionQuestion:
      oneOf:
        - type: object
          description: True/false assessment with explicit criteria.
          required:
            - instructions
            - criteria
            - type
          properties:
            criteria:
              $ref: '#/components/schemas/NoulCriteria'
              description: Reviewed criteria for both answers.
            instructions:
              type: string
              description: The question to evaluate.
            type:
              type: string
              enum:
                - noul
        - type: object
          description: Choice among a complete fixed option set.
          required:
            - instructions
            - options
            - type
          properties:
            instructions:
              type: string
              description: The question to evaluate.
            options:
              type: array
              items:
                $ref: '#/components/schemas/ChoiceOption'
              description: >-
                Sixteen eligible tasks plus new-work and unclear fit without
                truncation.
            type:
              type: string
              enum:
                - choice
        - type: object
          description: Probability-weighted rating over an ordered rubric.
          required:
            - instructions
            - levels
            - type
          properties:
            instructions:
              type: string
              description: The question to evaluate.
            levels:
              type: array
              items:
                type: string
              description: Rubric from lowest to highest, with zero-based numeric levels.
            type:
              type: string
              enum:
                - score
      description: The typed question forms used for intent and goal evaluation.
    DecisionAnswer:
      oneOf:
        - type: object
          description: Probability of yes; thresholds remain native policy.
          required:
            - noul
            - type
          properties:
            noul:
              type: number
              format: double
              description: Probability from zero to one.
            type:
              type: string
              enum:
                - noul
        - type: object
          description: Categorical choice with its complete probability distribution.
          required:
            - choice
            - probabilities
            - type
          properties:
            choice:
              type: string
              description: Selected option identity.
            confidence:
              type:
                - number
                - 'null'
              format: double
              description: Provider-native confidence, absent when unavailable.
            probabilities:
              type: object
              description: Probability of every allowed option.
              additionalProperties:
                type: number
                format: double
              propertyNames:
                type: string
            type:
              type: string
              enum:
                - choice
        - type: object
          description: Probability-weighted ordered rubric.
          required:
            - score
            - probabilities
            - type
          properties:
            confidence:
              type:
                - number
                - 'null'
              format: double
              description: Provider-native confidence, absent when unavailable.
            probabilities:
              type: object
              description: Distribution over zero-based levels.
              additionalProperties:
                type: number
                format: double
              propertyNames:
                type: string
            score:
              type: number
              format: double
              description: Expected zero-based level.
            type:
              type: string
              enum:
                - score
      description: Native probability answers after exact question/type/option validation.
    DecisionInvalid:
      type: string
      description: Why a readable provider response cannot drive a native transition.
      enum:
        - model
        - usage
        - answers
    NoulCriteria:
      type: object
      description: Accepted meanings of a true and false assessment.
      required:
        - 'true'
        - 'false'
      properties:
        'false':
          type: string
          description: Evidence supporting no.
        'true':
          type: string
          description: Evidence supporting yes.
      additionalProperties: false
    ChoiceOption:
      type: object
      description: One mutually exclusive choice with its reviewed meaning.
      required:
        - value
        - description
      properties:
        description:
          type: string
          description: Reviewed semantic meaning, never an authority grant.
        value:
          type: string
          description: >-
            Stable option identity, including native task identities when
            associating.
      additionalProperties: false
  securitySchemes:
    RunnerBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: agt_r
      description: >-
        Runner token beginning with agt_r, returned once by POST
        /v1/admin/runners

````

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