openapi: 3.1.0 info: title: fleet-rlm version: 0.6.2 paths: /api/sessions/{session_id}/turns: post: tags: - turns summary: Create Turn description: Open the Turn fully, then construct its public SSE response. operationId: create_turn parameters: - name: session_id in: path required: true schema: type: string format: uuid title: Session Id - name: Idempotency-Key in: header required: true schema: type: string minLength: 1 maxLength: 128 title: Idempotency-Key - name: Authorization in: header required: false schema: anyOf: - type: string - type: 'null' title: Authorization - name: X-Fleet-User-Id in: header required: false schema: anyOf: - type: string format: uuid - type: 'null' title: X-Fleet-User-Id - name: X-Fleet-Workspace-Id in: header required: false schema: anyOf: - type: string format: uuid - type: 'null' title: X-Fleet-Workspace-Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateTurnRequest' responses: '200': description: AI SDK UI v1 UIMessage SSE stream content: application/json: schema: {} text/event-stream: schema: type: string x-event-data-schema: $ref: '#/components/schemas/FleetUIMessageChunk' '404': description: Session not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '409': description: Turn conflict content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '422': description: Invalid request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '503': description: Turn unavailable content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '504': description: Turn preparation timed out content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' get: tags: - sessions summary: List Session Turns operationId: list_session_turns parameters: - name: session_id in: path required: true schema: type: string format: uuid title: Session Id - name: limit in: query required: false schema: type: integer maximum: 200 minimum: 1 default: 50 title: Limit - name: after_sequence in: query required: false schema: anyOf: - type: integer minimum: 0 - type: 'null' title: After Sequence - name: Authorization in: header required: false schema: anyOf: - type: string - type: 'null' title: Authorization - name: X-Fleet-User-Id in: header required: false schema: anyOf: - type: string format: uuid - type: 'null' title: X-Fleet-User-Id - name: X-Fleet-Workspace-Id in: header required: false schema: anyOf: - type: string format: uuid - type: 'null' title: X-Fleet-Workspace-Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SessionTurnPageResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /api/sessions: post: tags: - sessions summary: Create Session operationId: create_session parameters: - name: Authorization in: header required: false schema: anyOf: - type: string - type: 'null' title: Authorization - name: X-Fleet-User-Id in: header required: false schema: anyOf: - type: string format: uuid - type: 'null' title: X-Fleet-User-Id - name: X-Fleet-Workspace-Id in: header required: false schema: anyOf: - type: string format: uuid - type: 'null' title: X-Fleet-Workspace-Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SessionCreateRequest' responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SessionDetailResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' get: tags: - sessions summary: List Sessions operationId: list_sessions parameters: - name: status in: query required: false schema: anyOf: - enum: - active - archived type: string - type: 'null' title: Status - name: search in: query required: false schema: anyOf: - type: string - type: 'null' description: Title contains title: Search description: Title contains - name: limit in: query required: false schema: type: integer maximum: 100 minimum: 1 default: 20 title: Limit - name: offset in: query required: false schema: type: integer minimum: 0 default: 0 title: Offset - name: Authorization in: header required: false schema: anyOf: - type: string - type: 'null' title: Authorization - name: X-Fleet-User-Id in: header required: false schema: anyOf: - type: string format: uuid - type: 'null' title: X-Fleet-User-Id - name: X-Fleet-Workspace-Id in: header required: false schema: anyOf: - type: string format: uuid - type: 'null' title: X-Fleet-Workspace-Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SessionListResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /api/sessions/{session_id}: get: tags: - sessions summary: Get Session operationId: get_session parameters: - name: session_id in: path required: true schema: type: string format: uuid title: Session Id - name: Authorization in: header required: false schema: anyOf: - type: string - type: 'null' title: Authorization - name: X-Fleet-User-Id in: header required: false schema: anyOf: - type: string format: uuid - type: 'null' title: X-Fleet-User-Id - name: X-Fleet-Workspace-Id in: header required: false schema: anyOf: - type: string format: uuid - type: 'null' title: X-Fleet-Workspace-Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SessionDetailResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' patch: tags: - sessions summary: Patch Session operationId: update_session parameters: - name: session_id in: path required: true schema: type: string format: uuid title: Session Id - name: Authorization in: header required: false schema: anyOf: - type: string - type: 'null' title: Authorization - name: X-Fleet-User-Id in: header required: false schema: anyOf: - type: string format: uuid - type: 'null' title: X-Fleet-User-Id - name: X-Fleet-Workspace-Id in: header required: false schema: anyOf: - type: string format: uuid - type: 'null' title: X-Fleet-Workspace-Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SessionPatchRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SessionDetailResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /api/attachments: post: tags: - attachments summary: Upload Attachment operationId: create_attachment parameters: - name: Authorization in: header required: false schema: anyOf: - type: string - type: 'null' title: Authorization - name: X-Fleet-User-Id in: header required: false schema: anyOf: - type: string format: uuid - type: 'null' title: X-Fleet-User-Id - name: X-Fleet-Workspace-Id in: header required: false schema: anyOf: - type: string format: uuid - type: 'null' title: X-Fleet-Workspace-Id requestBody: required: true content: multipart/form-data: schema: $ref: '#/components/schemas/Body_create_attachment' responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AttachmentResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /api/attachments/{attachment_id}: get: tags: - attachments summary: Get Attachment operationId: get_attachment parameters: - name: attachment_id in: path required: true schema: type: string format: uuid title: Attachment Id - name: Authorization in: header required: false schema: anyOf: - type: string - type: 'null' title: Authorization - name: X-Fleet-User-Id in: header required: false schema: anyOf: - type: string format: uuid - type: 'null' title: X-Fleet-User-Id - name: X-Fleet-Workspace-Id in: header required: false schema: anyOf: - type: string format: uuid - type: 'null' title: X-Fleet-Workspace-Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AttachmentResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /api/artifacts/{artifact_id}: get: tags: - artifacts summary: Get Artifact operationId: get_artifact parameters: - name: artifact_id in: path required: true schema: type: string format: uuid title: Artifact Id - name: Authorization in: header required: false schema: anyOf: - type: string - type: 'null' title: Authorization - name: X-Fleet-User-Id in: header required: false schema: anyOf: - type: string format: uuid - type: 'null' title: X-Fleet-User-Id - name: X-Fleet-Workspace-Id in: header required: false schema: anyOf: - type: string format: uuid - type: 'null' title: X-Fleet-Workspace-Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ArtifactResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /api/artifacts/{artifact_id}/content: get: tags: - artifacts summary: Download Artifact operationId: download_artifact parameters: - name: artifact_id in: path required: true schema: type: string format: uuid title: Artifact Id - name: Authorization in: header required: false schema: anyOf: - type: string - type: 'null' title: Authorization - name: X-Fleet-User-Id in: header required: false schema: anyOf: - type: string format: uuid - type: 'null' title: X-Fleet-User-Id - name: X-Fleet-Workspace-Id in: header required: false schema: anyOf: - type: string format: uuid - type: 'null' title: X-Fleet-Workspace-Id responses: '200': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /api/skills: get: tags: - skills summary: List Skills description: List SkillCards authorized for the caller (metadata only). operationId: list_skills parameters: - name: q in: query required: false schema: anyOf: - type: string - type: 'null' description: Optional ranking query title: Q description: Optional ranking query - name: Authorization in: header required: false schema: anyOf: - type: string - type: 'null' title: Authorization - name: X-Fleet-User-Id in: header required: false schema: anyOf: - type: string format: uuid - type: 'null' title: X-Fleet-User-Id - name: X-Fleet-Workspace-Id in: header required: false schema: anyOf: - type: string format: uuid - type: 'null' title: X-Fleet-Workspace-Id responses: '200': description: Successful Response content: application/json: schema: type: array items: $ref: '#/components/schemas/SkillCardResponse' title: Response List Skills '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /api/skills/{skill_id}: get: tags: - skills summary: Get Skill operationId: get_skill parameters: - name: skill_id in: path required: true schema: type: string format: uuid title: Skill Id - name: Authorization in: header required: false schema: anyOf: - type: string - type: 'null' title: Authorization - name: X-Fleet-User-Id in: header required: false schema: anyOf: - type: string format: uuid - type: 'null' title: X-Fleet-User-Id - name: X-Fleet-Workspace-Id in: header required: false schema: anyOf: - type: string format: uuid - type: 'null' title: X-Fleet-Workspace-Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SkillCardResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /api/runs/{run_id}/cancellation: put: tags: - runs summary: Request Run Cancellation operationId: request_run_cancellation parameters: - name: run_id in: path required: true schema: type: string format: uuid title: Run Id - name: Authorization in: header required: false schema: anyOf: - type: string - type: 'null' title: Authorization - name: X-Fleet-User-Id in: header required: false schema: anyOf: - type: string format: uuid - type: 'null' title: X-Fleet-User-Id - name: X-Fleet-Workspace-Id in: header required: false schema: anyOf: - type: string format: uuid - type: 'null' title: X-Fleet-Workspace-Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CancellationResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' components: schemas: ArtifactResponse: properties: id: type: string format: uuid title: Id session_id: type: string format: uuid title: Session Id run_id: type: string format: uuid title: Run Id kind: type: string enum: - text - markdown - json title: Kind title: anyOf: - type: string - type: 'null' title: Title media_type: type: string title: Media Type byte_size: type: integer title: Byte Size checksum_sha256: type: string title: Checksum Sha256 type: object required: - id - session_id - run_id - kind - media_type - byte_size - checksum_sha256 title: ArtifactResponse description: Public artifact metadata — no host or Volume paths. AttachmentResponse: properties: id: type: string format: uuid title: Id filename: type: string title: Filename content_type: anyOf: - type: string - type: 'null' title: Content Type byte_size: type: integer title: Byte Size checksum_sha256: type: string title: Checksum Sha256 type: object required: - id - filename - byte_size - checksum_sha256 title: AttachmentResponse description: Public attachment metadata — no host or Volume paths. Body_create_attachment: properties: attachment: type: string contentMediaType: application/octet-stream title: Attachment type: object required: - attachment title: Body_create_attachment CancellationResponse: properties: run_id: type: string format: uuid title: Run Id state: type: string enum: - requested - already_requested - already_terminal title: State type: object required: - run_id - state title: CancellationResponse CreateTurnRequest: properties: text: type: string maxLength: 100000 minLength: 1 title: Text attachment_ids: items: type: string format: uuid type: array title: Attachment Ids additionalProperties: false type: object required: - text title: CreateTurnRequest description: Canonical body for POST /api/sessions/{session_id}/turns. JsonValue: {} SessionCreateRequest: properties: title: anyOf: - type: string maxLength: 255 - type: 'null' title: Title additionalProperties: false type: object title: SessionCreateRequest SessionDetailResponse: properties: id: type: string format: uuid title: Id title: type: string title: Title status: type: string enum: - active - archived title: Status checkpoint_version: type: integer title: Checkpoint Version created_at: anyOf: - type: string - type: 'null' title: Created At updated_at: anyOf: - type: string - type: 'null' title: Updated At type: object required: - id - title - status - checkpoint_version title: SessionDetailResponse SessionListResponse: properties: items: items: $ref: '#/components/schemas/SessionSummaryResponse' type: array title: Items total: type: integer title: Total offset: type: integer title: Offset limit: type: integer title: Limit has_more: type: boolean title: Has More type: object required: - items - total - offset - limit - has_more title: SessionListResponse SessionPatchRequest: properties: title: anyOf: - type: string maxLength: 255 - type: 'null' title: Title status: anyOf: - type: string enum: - active - archived - type: 'null' title: Status additionalProperties: false type: object title: SessionPatchRequest SessionSummaryResponse: properties: id: type: string format: uuid title: Id title: type: string title: Title status: type: string enum: - active - archived title: Status checkpoint_version: type: integer title: Checkpoint Version created_at: anyOf: - type: string - type: 'null' title: Created At updated_at: anyOf: - type: string - type: 'null' title: Updated At type: object required: - id - title - status - checkpoint_version title: SessionSummaryResponse SessionTurnPageResponse: properties: items: items: $ref: '#/components/schemas/UIMessageResponse' type: array title: Items next_after_sequence: anyOf: - type: integer - type: 'null' title: Next After Sequence type: object required: - items title: SessionTurnPageResponse SkillCardResponse: properties: id: type: string format: uuid title: Id name: type: string title: Name description: type: string title: Description scope: type: string enum: - system - workspace title: Scope version: type: string title: Version trust: type: string enum: - system - workspace - untrusted title: Trust affordances: items: type: string type: array title: Affordances resources_available: type: boolean title: Resources Available type: object required: - id - name - description - scope - version - trust - affordances - resources_available title: SkillCardResponse description: Bounded Skill discovery metadata — no instructions body. UIMessagePart: properties: type: type: string enum: - text - reasoning - dynamic-tool - step-start - data-status - data-step - data-rlm-code - data-rlm-output - data-skill - data-attachment - data-warning - data-artifact - data-usage - data-structured-result title: Type text: anyOf: - type: string - type: 'null' title: Text state: anyOf: - type: string - type: 'null' title: State id: anyOf: - type: string - type: 'null' title: Id toolName: anyOf: - type: string - type: 'null' title: Toolname toolCallId: anyOf: - type: string - type: 'null' title: Toolcallid input: $ref: '#/components/schemas/JsonValue' output: $ref: '#/components/schemas/JsonValue' errorText: anyOf: - type: string - type: 'null' title: Errortext providerExecuted: anyOf: - type: boolean - type: 'null' title: Providerexecuted data: $ref: '#/components/schemas/JsonValue' additionalProperties: false type: object required: - type title: UIMessagePart description: Closed reload part vocabulary; variant-specific values remain bounded JSON. UIMessageResponse: properties: id: type: string title: Id role: type: string enum: - user - assistant title: Role parts: items: $ref: '#/components/schemas/UIMessagePart' type: array title: Parts metadata: anyOf: - additionalProperties: $ref: '#/components/schemas/JsonValue' type: object - type: 'null' title: Metadata type: object required: - id - role - parts title: UIMessageResponse ErrorResponse: properties: code: title: Code type: string message: title: Message type: string required: - code - message title: ErrorResponse type: object FleetUIMessageChunk: title: FleetUIMessageChunk oneOf: - type: object properties: type: type: string const: start messageId: type: string format: uuid messageMetadata: type: object additionalProperties: true required: - type - messageId - messageMetadata additionalProperties: false - type: object properties: type: type: string const: start-step required: - type additionalProperties: false - type: object properties: type: type: string const: finish-step required: - type additionalProperties: false - type: object properties: type: type: string const: reasoning-start id: type: string required: - type - id additionalProperties: false - type: object properties: type: type: string const: reasoning-delta id: type: string delta: type: string required: - type - id - delta additionalProperties: false - type: object properties: type: type: string const: reasoning-end id: type: string required: - type - id additionalProperties: false - type: object properties: type: type: string const: data-status id: type: string data: {} transient: type: boolean required: - type - data additionalProperties: false - type: object properties: type: type: string const: data-skill id: type: string data: {} transient: type: boolean required: - type - data additionalProperties: false - type: object properties: type: type: string const: data-rlm-code id: type: string data: {} transient: type: boolean required: - type - data additionalProperties: false - type: object properties: type: type: string const: data-rlm-output id: type: string data: {} transient: type: boolean required: - type - data additionalProperties: false - type: object properties: type: type: string const: tool-input-available toolCallId: type: string toolName: type: string input: {} dynamic: type: boolean providerExecuted: type: boolean required: - type - toolCallId - toolName - input additionalProperties: false - type: object properties: type: type: string const: tool-output-available toolCallId: type: string output: {} dynamic: type: boolean providerExecuted: type: boolean required: - type - toolCallId - output additionalProperties: false - type: object properties: type: type: string const: tool-output-error toolCallId: type: string errorText: type: string dynamic: type: boolean providerExecuted: type: boolean required: - type - toolCallId - errorText additionalProperties: false - type: object properties: type: type: string const: data-attachment id: type: string data: {} transient: type: boolean required: - type - data additionalProperties: false - type: object properties: type: type: string const: data-warning id: type: string data: {} transient: type: boolean required: - type - data additionalProperties: false - type: object properties: type: type: string const: data-artifact id: type: string data: {} transient: type: boolean required: - type - data additionalProperties: false - type: object properties: type: type: string const: data-usage id: type: string data: {} transient: type: boolean required: - type - data additionalProperties: false - type: object properties: type: type: string const: data-structured-result id: type: string data: {} transient: type: boolean required: - type - data additionalProperties: false - type: object properties: type: type: string const: text-start id: type: string required: - type - id additionalProperties: false - type: object properties: type: type: string const: text-delta id: type: string delta: type: string required: - type - id - delta additionalProperties: false - type: object properties: type: type: string const: text-end id: type: string required: - type - id additionalProperties: false - type: object properties: type: type: string const: finish finishReason: type: string enum: - stop - error messageMetadata: type: object additionalProperties: true required: - type - finishReason additionalProperties: false - type: object properties: type: type: string const: abort reason: type: string required: - type - reason additionalProperties: false - type: object properties: type: type: string const: error errorText: type: string required: - type - errorText additionalProperties: false