openapi: 3.1.0 info: title: Fleet-RLM Lite API version: 0.8.0 paths: /health: get: tags: - health summary: Health operationId: health_health_get responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Health' /sessions: get: tags: - sessions summary: List Sessions description: List stored Sessions with their update times and Turn counts. operationId: list_sessions_sessions_get responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Sessions' /models: get: tags: - sessions summary: List Models description: 'List the chat models in a discovery scope. An invalid scope or missing Gateway credentials returns 422.' operationId: list_models_models_get parameters: - name: scope in: query required: false schema: type: string default: system.ai title: Scope responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Models' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /sessions/{session_id}/config: get: tags: - sessions summary: Session Config description: Describe a Session's mode, models, context, configuration, and limits. operationId: session_config_sessions__session_id__config_get parameters: - name: session_id in: path required: true schema: type: string title: Session Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SessionConfig' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /sessions/{session_id}/model: put: tags: - sessions summary: Select Model description: 'Bind a model to a role, persist it, and swap in a new engine. Returns 409 while a Turn holds the Session lock.' operationId: select_model_sessions__session_id__model_put parameters: - name: session_id in: path required: true schema: type: string title: Session Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ModelRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ModelSelection' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /sessions/{session_id}/mode: get: tags: - sessions summary: Get Mode description: Return a Session's current execution mode. operationId: get_mode_sessions__session_id__mode_get parameters: - name: session_id in: path required: true schema: type: string title: Session Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Mode' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: tags: - sessions summary: Set Mode description: 'Persist a new execution mode and apply it to the Session runtime. The current context is saved with the mode.' operationId: set_mode_sessions__session_id__mode_put parameters: - name: session_id in: path required: true schema: type: string title: Session Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ModeRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Mode' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /sessions/{session_id}/history: get: tags: - sessions summary: Get History description: Return a Session's stored Turns. operationId: get_history_sessions__session_id__history_get parameters: - name: session_id in: path required: true schema: type: string title: Session Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/History' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /sessions/{session_id}/turns/{turn_id}: get: tags: - sessions summary: Turn Status description: Return one Turn's recorded status, or 404 when the Turn is unknown. operationId: turn_status_sessions__session_id__turns__turn_id__get parameters: - name: turn_id in: path required: true schema: type: string title: Turn Id - name: session_id in: path required: true schema: type: string title: Session Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TurnStatus' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /sessions/{session_id}/context: put: tags: - sessions summary: Select Context description: 'Select a workspace file as the Session''s context and persist it. The response reports the file''s size and SHA-256 digest.' operationId: select_context_sessions__session_id__context_put parameters: - name: session_id in: path required: true schema: type: string title: Session Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ContextRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ContextSelected' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - sessions summary: Clear Context description: Clear the Session's selected context and persist the change. operationId: clear_context_sessions__session_id__context_delete parameters: - name: session_id in: path required: true schema: type: string title: Session Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Status' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /sessions/{session_id}/workspace/tree: get: tags: - workspace summary: List Files description: List a Session's workspace files and the artifacts among them. operationId: list_files_sessions__session_id__workspace_tree_get parameters: - name: session_id in: path required: true schema: type: string title: Session Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Files' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /sessions/{session_id}/files: get: tags: - workspace summary: List Files description: List a Session's workspace files and the artifacts among them. operationId: list_files_sessions__session_id__files_get parameters: - name: session_id in: path required: true schema: type: string title: Session Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Files' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /sessions/{session_id}/workspace/stat/{rel_path}: get: tags: - workspace summary: Workspace Stat description: Return the size and SHA-256 digest of one workspace file. operationId: workspace_stat_sessions__session_id__workspace_stat__rel_path__get parameters: - name: rel_path in: path required: true schema: type: string title: Rel Path - name: session_id in: path required: true schema: type: string title: Session Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/FileStat' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /sessions/{session_id}/workspace/files/{rel_path}: get: tags: - workspace summary: Read Workspace File description: 'Return one workspace file as a download, capped at 25 MB. An unavailable or invalid path returns 404.' operationId: read_workspace_file_sessions__session_id__workspace_files__rel_path__get parameters: - name: rel_path in: path required: true schema: type: string title: Rel Path - name: session_id in: path required: true schema: type: string title: Session Id responses: '200': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: tags: - workspace summary: Write Workspace File description: 'Write one workspace file from text or base64 content, capped at 25 MB. Supplying both or neither of the content fields returns 422.' operationId: write_workspace_file_sessions__session_id__workspace_files__rel_path__put parameters: - name: rel_path in: path required: true schema: type: string title: Rel Path - name: session_id in: path required: true schema: type: string title: Session Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/WorkspaceWriteRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/FileWritten' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - workspace summary: Delete Workspace File description: 'Delete one workspace file. Failures return 404.' operationId: delete_workspace_file_sessions__session_id__workspace_files__rel_path__delete parameters: - name: rel_path in: path required: true schema: type: string title: Rel Path - name: session_id in: path required: true schema: type: string title: Session Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Deleted' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /sessions/{session_id}/attach: post: tags: - workspace summary: Attach File description: 'Store an uploaded attachment under files/ in the workspace. Uploads stream to disk and return 413 above the size limit.' operationId: attach_file_sessions__session_id__attach_post parameters: - name: session_id in: path required: true schema: type: string title: Session Id requestBody: required: true content: multipart/form-data: schema: $ref: '#/components/schemas/Body_attach_file_sessions__session_id__attach_post' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Attached' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /sessions/{session_id}/memory: get: tags: - memory summary: List Memory description: List a Session's memory entries that match an optional query. operationId: list_memory_sessions__session_id__memory_get parameters: - name: session_id in: path required: true schema: type: string title: Session Id - name: q in: query required: false schema: type: string default: '' title: Q responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Memories' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /sessions/{session_id}/memory/{memory_id}: put: tags: - memory summary: Put Memory description: Save one memory entry under the given ID. operationId: put_memory_sessions__session_id__memory__memory_id__put parameters: - name: memory_id in: path required: true schema: type: string title: Memory Id - name: session_id in: path required: true schema: type: string title: Session Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MemoryRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/MemorySaved' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - memory summary: Remove Memory description: Delete one memory entry by ID. operationId: remove_memory_sessions__session_id__memory__memory_id__delete parameters: - name: memory_id in: path required: true schema: type: string title: Memory Id - name: session_id in: path required: true schema: type: string title: Session Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Deleted' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /skills: get: tags: - skills summary: Get Skills Catalog description: Sync local Skills to the Session's volume and return the catalog XML. operationId: get_skills_catalog_skills_get parameters: - name: session_id in: query required: false schema: type: string default: default title: Session Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Catalog' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /skills/pull: post: tags: - skills summary: Pull Skills To Local description: Export the Session's volume Skills to local storage. operationId: pull_skills_to_local_skills_pull_post parameters: - name: session_id in: query required: false schema: type: string default: default title: Session Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Exported' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /skills/push: post: tags: - skills summary: Push Skills description: Push local Skills to the Session's volume and return the count. operationId: push_skills_skills_push_post parameters: - name: session_id in: query required: false schema: type: string default: default title: Session Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Pushed' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /sessions/{session_id}/turn: post: tags: - turns summary: Stream Turn description: 'Run one Turn and stream its activity as Server-Sent Events. The Turn runs on a worker thread; a client disconnect cancels it and waits for sandbox work to drain.' operationId: stream_turn_sessions__session_id__turn_post parameters: - name: session_id in: path required: true schema: type: string title: Session Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/TurnRequest' responses: '200': description: Server-Sent Events for Turn status, activity, completion, or failure. content: text/event-stream: itemSchema: type: object properties: data: type: string event: type: string id: type: string retry: type: integer minimum: 0 schema: type: string '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: Attached: properties: mounted_path: type: string title: Mounted Path rel_path: type: string title: Rel Path type: object required: - mounted_path - rel_path title: Attached description: Location of an uploaded attachment in the workspace and the sandbox. Body_attach_file_sessions__session_id__attach_post: properties: file: type: string contentMediaType: application/octet-stream title: File type: object required: - file title: Body_attach_file_sessions__session_id__attach_post Catalog: properties: catalog_xml: type: string title: Catalog Xml type: object required: - catalog_xml title: Catalog description: Session Skill catalog rendered as XML. ContextRequest: properties: path: type: string maxLength: 1024 minLength: 1 title: Path description: type: string maxLength: 2000 title: Description default: '' additionalProperties: false type: object required: - path title: ContextRequest description: Workspace file to select as the Session's context. ContextSelected: properties: path: type: string title: Path size_bytes: type: integer title: Size Bytes sha256: type: string title: Sha256 type: object required: - path - size_bytes - sha256 title: ContextSelected description: Workspace file recorded as the Session's context, with its size and digest. Deleted: properties: deleted: type: string title: Deleted type: object required: - deleted title: Deleted description: Acknowledgement of a deleted memory entry or workspace file. Exported: properties: exported: items: type: string type: array title: Exported type: object required: - exported title: Exported description: Skills exported from the Session's volume to local storage. FileStat: properties: path: type: string title: Path size_bytes: type: integer title: Size Bytes sha256: type: string title: Sha256 type: object required: - path - size_bytes - sha256 title: FileStat description: Size and SHA-256 digest of one workspace file. FileWritten: properties: path: type: string title: Path size_bytes: type: integer title: Size Bytes sha256: type: string title: Sha256 mounted_path: type: string title: Mounted Path type: object required: - path - size_bytes - sha256 - mounted_path title: FileWritten description: Result of a workspace write, including the sandbox mounted path. Files: properties: session_id: type: string title: Session Id files: items: type: string type: array title: Files artifacts: items: type: string type: array title: Artifacts type: object required: - session_id - files - artifacts title: Files description: Workspace file paths for one Session, with the artifacts among them. HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError Health: properties: status: type: string title: Status version: type: string title: Version type: object required: - status - version title: Health description: Service status and version. History: properties: session_id: type: string title: Session Id turns: items: additionalProperties: true type: object type: array title: Turns type: object required: - session_id - turns title: History description: Stored Turn records for one Session. Limits: properties: lm_calls: type: integer title: Lm Calls depth: type: integer title: Depth children: type: integer title: Children active_children: type: integer title: Active Children timeout_seconds: type: integer title: Timeout Seconds type: object required: - lm_calls - depth - children - active_children - timeout_seconds title: Limits description: Execution limits the sandbox manager enforces for one Session. Memories: properties: memories: items: additionalProperties: true type: object type: array title: Memories type: object required: - memories title: Memories description: Memory entries matching a Session memory query. MemoryRequest: properties: content: type: string maxLength: 10000 minLength: 1 title: Content kind: type: string pattern: ^(observation|preference|hypothesis|procedure)$ title: Kind default: observation sources: additionalProperties: type: string type: object maxProperties: 100 title: Sources reviewed: type: boolean title: Reviewed default: false additionalProperties: false type: object required: - content title: MemoryRequest description: Memory entry to save, with its kind, sources, and review state. MemorySaved: properties: memory_id: type: string title: Memory Id type: object required: - memory_id title: MemorySaved description: Acknowledgement of a saved memory entry. Mode: properties: mode: type: string title: Mode type: object required: - mode title: Mode description: Execution mode of one Session. ModeRequest: properties: mode: type: string pattern: ^(rlm|flex|hybrid)$ title: Mode additionalProperties: false type: object required: - mode title: ModeRequest description: Request to switch a Session's execution mode to rlm, flex, or hybrid. ModelRequest: properties: role: type: string pattern: ^(root|sub)$ title: Role default: root model: type: string maxLength: 300 minLength: 1 pattern: ^openai/[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_.-]+$ title: Model additionalProperties: false type: object required: - model title: ModelRequest description: Model to bind to the root or sub role of a Session's engine. ModelSelection: properties: role: type: string title: Role model: type: string title: Model type: object required: - role - model title: ModelSelection description: Model bound to one role after a successful selection. Models: properties: scope: type: string title: Scope models: items: type: string type: array title: Models type: object required: - scope - models title: Models description: Chat models available in one discovery scope. Pushed: properties: pushed: type: integer title: Pushed type: object required: - pushed title: Pushed description: Count of local Skills pushed to the Session's volume. SessionConfig: properties: mode: type: string title: Mode models: additionalProperties: type: string type: object title: Models context: anyOf: - additionalProperties: true type: object - type: 'null' title: Context configuration: additionalProperties: true type: object title: Configuration limits: $ref: '#/components/schemas/Limits' type: object required: - mode - models - context - configuration - limits title: SessionConfig description: Effective mode, models, context, configuration, and limits of one Session. SessionSummary: properties: session_id: type: string title: Session Id updated_at: type: string format: date-time title: Updated At turn_count: type: integer title: Turn Count type: object required: - session_id - updated_at - turn_count title: SessionSummary description: One stored Session with its last update time and Turn count. Sessions: properties: sessions: items: $ref: '#/components/schemas/SessionSummary' type: array title: Sessions type: object required: - sessions title: Sessions description: Listing of every stored Session. Status: properties: status: type: string title: Status type: object required: - status title: Status description: Plain status acknowledgement, such as a cleared context. TurnRequest: properties: task: type: string maxLength: 100000 minLength: 1 title: Task idempotency_key: anyOf: - type: string maxLength: 128 - type: 'null' title: Idempotency Key record_replay: type: boolean title: Record Replay description: Persist a bounded immutable snapshot of this Turn's inputs for explicitly reviewed GEPA data. default: false additionalProperties: false type: object required: - task title: TurnRequest description: User prompt sent to one Session's Fleet engine. TurnStatus: properties: turn_id: type: string title: Turn Id status: type: string title: Status result: additionalProperties: true type: object title: Result updated_at: type: string title: Updated At type: object required: - turn_id - status - result - updated_at title: TurnStatus description: Recorded status and result of one Turn. ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError WorkspaceWriteRequest: properties: content: anyOf: - type: string maxLength: 25000000 - type: 'null' title: Content content_base64: anyOf: - type: string maxLength: 34000000 - type: 'null' title: Content Base64 additionalProperties: false type: object title: WorkspaceWriteRequest description: File content for a workspace write, as text or base64; supply exactly one.