{"openapi": "3.0.3", "info": {"title": "Patient agent: the slow lane", "version": "1.0.0", "description": "Submit-a-future API: an operator submits deferrable work with a deadline and quality floor; the scheduler coalesces and dispatches it at batch-shaped cost timing (batch 0.50x / idle 0.25x / sync 1.00x of sync price), admission-controlled (a discount is sold only when a cheaper satisfying window is provably schedulable; otherwise an honest sync quote), with a hash-chained journal of every state transition and a deadline guarantee of dispatch-or-credit \u2014 never a silent miss. Limits: v1 execution backends are provider-shaped batch integrations (lab shape) running in-service demonstration tasks (arithmetic/extract/classify/summarize) \u2014 real provider batch integrations are a packet follow-up and gate marketing claims, not this ship. Real deferrable-share trace measurement is likewise a packet follow-up. There is NO payment lane in v1: the one-time trial is the on-ramp; /subscribe quotes and records intent only and never takes payment."}, "servers": [{"url": "https://textforagents.com/products/patient-agent-slow-lane"}], "components": {"securitySchemes": {"bearer": {"type": "http", "scheme": "bearer"}}}, "paths": {"/": {"get": {"security": [], "responses": {"200": {"description": "Product descriptor"}}}}, "/health": {"get": {"security": [], "responses": {"200": {"description": "ok"}}}}, "/docs": {"get": {"security": [], "responses": {"200": {"description": "Product descriptor (same as /)"}}}}, "/llms.txt": {"get": {"security": [], "responses": {"200": {"description": "llms.txt"}}}}, "/mcp": {"post": {"summary": "MCP streamable-http endpoint (JSON-RPC 2.0: initialize, ping, tools/list, tools/call; also served at POST /)", "security": [{"bearer": []}], "responses": {"200": {"description": "JSON-RPC response"}, "202": {"description": "notification accepted"}, "401": {"description": "no/invalid token \u2014 body names the issuance path"}}}}, "/register": {"post": {"security": [], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"account_name": {"type": "string"}, "payer_wallet": {"type": "string"}}, "required": ["account_name"]}}}}, "responses": {"200": {"description": "account_id + claim_token + trial instructions"}}}}, "/trial": {"post": {"security": [], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"account_id": {"type": "string"}, "claim_token": {"type": "string"}}, "required": ["account_id", "claim_token"]}}}}, "responses": {"200": {"description": "trial token (shown once)"}, "403": {"description": "trial claim refused (reason in body)"}}}}, "/subscribe": {"post": {"security": [{"bearer": []}], "responses": {"200": {"description": "Price quote + recorded intent. NO payment is taken in v1."}}}}, "/v1/futures": {"post": {"description": "CLOCK: GET /health returns now_h, the service clock in hours; it advances in real time (1 service-hour = 1 real hour). deadline_h is an ABSOLUTE time on that clock, not a duration from submission. It must be greater than now_h, or POST /v1/futures returns 400 deadline_in_past. There is no fixed minimum deadline (in particular, no 3-hour minimum). PROMPT COMPLETION (sync lane): submit a valid payload (see task_payloads) with a deadline_h too soon for any cheaper window to serve it -- earlier than the next idle signal + 0.35h AND earlier than the next batch window + 0.35h -- and a quality_floor at or below the sync accuracy for the task type (arithmetic 0.99, extract 0.97, classify 0.96, summarize 0.95). Only the sync lane can satisfy such a deadline: planned_lane is 'sync', the price is the full sync price, the work dispatches inside the POST request itself, and the future is already COMPLETED when you GET it (completed_at = dispatch time + 0.1 service-hours). Example shape: at now_h 0.40 submit deadline_h 0.90, quality_floor 0.5, spec {task_type: 'arithmetic', payload: {a: 6, b: 7, op: '*'}} -- it plans sync and completes promptly with result 42. BATCH AND IDLE TIMING (discounted lanes are NOT immediate): idle pools dispatch at the fixed idle signals, service hours 2.0, 8.0 and 14.0; batch pools dispatch at the next 6-hour boundary strictly after submission (6.0, 12.0, 18.0, ...). The POST response field dispatch_at_h IS that dispatch time: an idle future submitted before hour 2 shows dispatch_at_h 2.0, a batch future submitted before hour 6 shows dispatch_at_h 6.0. The future stays PENDING until the service clock reaches dispatch_at_h, then completes (completed_at = dispatch_at_h + 0.1). DEADLINE MINIMUMS PER LANE: sync needs only deadline_h > now_h; idle needs deadline_h >= idle signal + 0.35 (0.1 execution + 0.25 safety); batch needs deadline_h >= batch window + 0.35. If no lane can meet the deadline at your quality_floor, POST returns 422 quality_floor_unsatisfiable. A quality_floor above a lane's accuracy excludes that lane (idle accuracy: arithmetic 0.98, extract 0.90, classify 0.88, summarize 0.85). PRICE BY SLACK (slack = deadline_h - now_h): non-sync quotes charge 75% of the sync price at slack >= 12h, 85% at >= 4h, 92.5% at >= 1h, floored at planned cost + 5% of sync price; the sync lane always charges the full sync price. Payloads: arithmetic: {a: number, b: number, op: one of '+', '-', '*'} -- word operators such as 'add' or 'multiply' are NOT valid ops. extract: {record: object, key: string}. classify: {text: string}. summarize: {keyword: string, sentences: [string, ...]}.", "security": [{"bearer": []}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"spec": {"type": "object", "properties": {"task_type": {"type": "string", "enum": ["arithmetic", "classify", "extract", "summarize"]}, "payload": {"type": "object"}}}, "deadline_h": {"type": "number"}, "quality_floor": {"type": "number"}, "idempotency_key": {"type": "string"}}, "required": ["spec", "deadline_h", "quality_floor"]}}}}, "responses": {"201": {"description": "future id, state, quoted price, planned lane"}, "401": {"description": "no/invalid token \u2014 body names the issuance path"}, "422": {"description": "quality floor unsatisfiable"}}}}, "/v1/futures/{id}": {"get": {"security": [{"bearer": []}], "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "isolated delivery envelope"}, "404": {"description": "not found or another operator's future"}}}}, "/v1/journal": {"get": {"security": [{"bearer": []}], "responses": {"200": {"description": "this operator's journal entries only"}}}}, "/v1/journal/verify": {"get": {"security": [{"bearer": []}], "responses": {"200": {"description": "hash-chain verification result"}}}}, "/tokens/revoke": {"post": {"security": [{"bearer": []}], "responses": {"200": {"description": "token revoked"}}}}}}