{"openapi":"3.1.0","info":{"title":"OpenQuintessence","description":"Portable AI agent context API","version":"1.0.0-intelligence"},"paths":{"/.well-known/oauth-authorization-server":{"get":{"tags":["oauth"],"summary":"Oauth Authorization Server Metadata","description":"OAuth 2.0 Authorization Server Metadata (RFC 8414).","operationId":"oauth_authorization_server_metadata__well_known_oauth_authorization_server_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/openai-apps-challenge":{"get":{"tags":["oauth"],"summary":"Openai Apps Challenge","description":"OpenAI Apps domain verification token.","operationId":"openai_apps_challenge__well_known_openai_apps_challenge_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/openid-configuration":{"get":{"tags":["oauth"],"summary":"Openid Configuration","operationId":"openid_configuration__well_known_openid_configuration_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/register":{"post":{"tags":["oauth"],"summary":"Oauth Dynamic Client Registration","description":"OAuth 2.0 Dynamic Client Registration (RFC 7591).\nCalled by MCP clients like Claude Code before initiating OAuth flow.\nWe auto-approve all registrations and return a client_id.","operationId":"oauth_dynamic_client_registration_oauth_register_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/authorize":{"get":{"tags":["oauth"],"summary":"Oauth Authorize","description":"OAuth 2.0 Authorization Endpoint.\n\nIf code_challenge (PKCE) is present → MCP client flow: validate client, check session, show consent page.\nOtherwise → Auth0 flow (legacy): redirect to Auth0 for authentication.","operationId":"oauth_authorize_oauth_authorize_get","parameters":[{"name":"client_id","in":"query","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"redirect_uri","in":"query","required":true,"schema":{"type":"string","title":"Redirect Uri"}},{"name":"response_type","in":"query","required":false,"schema":{"type":"string","default":"code","title":"Response Type"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","default":"read write","title":"Scope"}},{"name":"code_challenge","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge"}},{"name":"code_challenge_method","in":"query","required":false,"schema":{"type":"string","default":"S256","title":"Code Challenge Method"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/authorize/consent":{"post":{"tags":["oauth"],"summary":"Oauth Authorize Consent","description":"Handle user consent decision for MCP OAuth flow.","operationId":"oauth_authorize_consent_oauth_authorize_consent_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_oauth_authorize_consent_oauth_authorize_consent_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/session":{"get":{"tags":["oauth"],"summary":"Auth Session Check","description":"Lightweight check: is there a valid quint_session cookie? Used by the\nOAuth consent page to skip Clerk sign-in for cookie-authenticated users\n(e.g. magic-link reviewers).","operationId":"auth_session_check_v1_auth_session_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth-consent":{"get":{"tags":["oauth"],"summary":"Oauth Consent Page","description":"Serve the web OAuth consent page (used for ChatGPT and other web-based MCP clients).","operationId":"oauth_consent_page_oauth_consent_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/authorize/page/{session_id}":{"get":{"tags":["oauth"],"summary":"Oauth Authorize Page Info","description":"Return client info for the web OAuth consent page to display.","operationId":"oauth_authorize_page_info_oauth_authorize_page__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/authorize/web-consent":{"post":{"tags":["oauth"],"summary":"Oauth Web Consent","description":"Handle consent from the web OAuth consent page.\nCalled by oauth-authorize.html after the user signs in and clicks Allow/Deny.\nExpects JSON body: {session_id, action: \"authorize\"|\"deny\"}\nExpects Authorization: Bearer <quint_token>\nReturns JSON: {redirect_url}","operationId":"oauth_web_consent_oauth_authorize_web_consent_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/callback":{"get":{"tags":["oauth"],"summary":"Oauth Callback","description":"Receive Auth0 callback, exchange code, create principal, issue Quint token.","operationId":"oauth_callback_oauth_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"error_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Description"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/token":{"post":{"tags":["oauth"],"summary":"Oauth Token","description":"OAuth 2.0 Token Endpoint.\n\nSupports:\n- grant_type=authorization_code with PKCE (MCP/OAuth2 clients) — issues qat_ access tokens\n- grant_type=authorization_code without code_verifier (Auth0 legacy flow) — issues JWT access tokens\n- grant_type=refresh_token — issues new qat_ access tokens","operationId":"oauth_token_oauth_token_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/userinfo":{"get":{"tags":["oauth"],"summary":"Oauth Userinfo","description":"Return principal info for a valid Quint JWT (OIDC-style userinfo endpoint).","operationId":"oauth_userinfo_oauth_userinfo_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/revoke":{"post":{"tags":["oauth"],"summary":"Oauth Revoke Endpoint","description":"OAuth 2.0 Token Revocation Endpoint (RFC 7009).\nAlways returns 200 OK even if token was invalid/already revoked.","operationId":"oauth_revoke_endpoint_oauth_revoke_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/principal/create":{"post":{"tags":["context"],"summary":"Create Principal","description":"Public endpoint to create a new principal.","operationId":"create_principal_v1_principal_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrincipalCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrincipalCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/create":{"post":{"tags":["context"],"summary":"Create Agent","description":"Create a new agent under a principal. Requires principal token.","operationId":"create_agent_v1_agent_create_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/{agent_id}":{"get":{"tags":["context"],"summary":"Get Agent","description":"Get agent identity. Requires any valid token.","operationId":"get_agent_v1_agent__agent_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"principal_id","in":"query","required":true,"schema":{"type":"string","description":"Principal ID","title":"Principal Id"},"description":"Principal ID"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/principal/export":{"get":{"tags":["context"],"summary":"Export Principal","description":"Export full principal data. Requires principal token.","operationId":"export_principal_v1_principal_export_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/context/write":{"post":{"tags":["context"],"summary":"Write Context","description":"Write context facts. Requires agent token with write permission, or principal token.","operationId":"write_context_v1_context_write_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextWriteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextWriteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/context/read":{"post":{"tags":["context"],"summary":"Read Context","description":"Read relevant context. Requires agent or principal token.","operationId":"read_context_v1_context_read_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextReadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextReadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/context/cached":{"get":{"tags":["context"],"summary":"Get Cached Context","description":"Return the last cached relay response for this principal (if any and < 24h old).\n\nUseful for the signup page to show 'here is what your agent already knows'.","operationId":"get_cached_context_v1_context_cached_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/context/facts/{fact_id}":{"delete":{"tags":["context"],"summary":"Delete Context Fact","description":"Soft-delete a context fact belonging to the authenticated principal.","operationId":"delete_context_fact_v1_context_facts__fact_id__delete","parameters":[{"name":"fact_id","in":"path","required":true,"schema":{"type":"string","title":"Fact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys/store":{"post":{"tags":["keys"],"summary":"Store Api Key","description":"Store an encrypted API key for a provider.","operationId":"store_api_key_v1_keys_store_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys/list":{"get":{"tags":["keys"],"summary":"List Api Keys","description":"List providers with stored API keys (not the keys themselves).","operationId":"list_api_keys_v1_keys_list_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys/{provider}":{"delete":{"tags":["keys"],"summary":"Delete Api Key","description":"Delete a stored API key for a provider.","operationId":"delete_api_key_v1_keys__provider__delete","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chorus":{"post":{"tags":["keys"],"summary":"Chorus Endpoint","description":"Multi-model consensus query with personal context enrichment.","operationId":"chorus_endpoint_v1_chorus_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/register":{"post":{"tags":["chorus"],"summary":"Register Agent Gateway","description":"Register an OpenClaw gateway endpoint for an agent. Requires principal token.","operationId":"register_agent_gateway_v1_agent_register_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRegisterRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/query":{"post":{"tags":["chorus"],"summary":"Query Agent","description":"Ask an agent (e.g. Theo) a question. Falls back to synthesis if no gateway configured.","operationId":"query_agent_v1_agent_query_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp":{"get":{"tags":["admin"],"summary":"Mcp Http Get","description":"MCP SSE stream endpoint for server-initiated messages.","operationId":"mcp_http_get_mcp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["mcp"],"summary":"Mcp Http Post","description":"MCP Streamable HTTP transport endpoint (POST) — accepts Bearer token auth.","operationId":"mcp_http_post_mcp_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/synthesize":{"post":{"tags":["mcp"],"summary":"Synthesize Answer","description":"Server-side Haiku synthesis — called by relay clients to avoid needing Anthropic keys.","operationId":"synthesize_answer_v1_synthesize_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/relay/ask":{"post":{"tags":["mcp"],"summary":"Relay Ask","description":"Proxy ask_theo requests to the relay server. Routes to the requesting user's device.","operationId":"relay_ask_v1_relay_ask_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/download/openquintessence.mcpb":{"get":{"tags":["mcp"],"summary":"Download Extension","operationId":"download_extension_download_openquintessence_mcpb_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/mcp/test":{"get":{"tags":["mcp"],"summary":"Mcp Test Connection","description":"Verify a principal's token and return their agent setup status.","operationId":"mcp_test_connection_v1_mcp_test_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/debug/intelligence-test":{"get":{"tags":["mcp"],"summary":"Debug Intelligence Test","description":"Debug endpoint to test intelligence layer directly.","operationId":"debug_intelligence_test_v1_debug_intelligence_test_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/account/{principal_id}":{"delete":{"tags":["admin"],"summary":"Admin Delete Account","description":"Admin-only: completely wipe an account for fresh testing.","operationId":"admin_delete_account_v1_admin_account__principal_id__delete","parameters":[{"name":"principal_id","in":"path","required":true,"schema":{"type":"string","title":"Principal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/bulk-delete":{"post":{"tags":["admin"],"summary":"Admin Bulk Delete","description":"Admin-only: delete multiple accounts by principal_id list.","operationId":"admin_bulk_delete_v1_admin_bulk_delete_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/activate":{"post":{"tags":["admin"],"summary":"Admin Activate","description":"Admin-only: activate an account without Stripe (for testing).","operationId":"admin_activate_v1_admin_activate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/auth":{"get":{"tags":["admin"],"summary":"Admin Auth Get","description":"GET handler to prevent CDN caching 404 — POST is the real endpoint.","operationId":"admin_auth_get_v1_admin_auth_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["admin"],"summary":"Admin Auth","description":"Check admin secret — used by admin dashboard login screen.","operationId":"admin_auth_v1_admin_auth_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/magic-link":{"post":{"tags":["admin"],"summary":"Admin Create Magic Link","description":"Generate a single-use magic login link for a principal (demo/review access).","operationId":"admin_create_magic_link_v1_admin_magic_link_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/auth/magic/{token}":{"get":{"tags":["admin"],"summary":"Magic Link Redeem","description":"Validate a magic link token, issue a JWT, and redirect to the dashboard.","operationId":"magic_link_redeem_auth_magic__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/stats":{"get":{"tags":["admin"],"summary":"Admin Stats","description":"Dashboard aggregate metrics.","operationId":"admin_stats_v1_admin_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/users":{"get":{"tags":["admin"],"summary":"Admin List Users","description":"Paginated list of all principals with stats.","operationId":"admin_list_users_v1_admin_users_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"search","in":"query","required":false,"schema":{"type":"string","default":"","title":"Search"}},{"name":"segment","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Segment"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/users/{principal_id}":{"get":{"tags":["admin"],"summary":"Admin Get User","description":"Single user detail with billing history, messages, facts by scope, recent audit log.","operationId":"admin_get_user_v1_admin_users__principal_id__get","parameters":[{"name":"principal_id","in":"path","required":true,"schema":{"type":"string","title":"Principal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/message":{"post":{"tags":["admin"],"summary":"Admin Send Message","description":"Send a message to an individual user.","operationId":"admin_send_message_v1_admin_message_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/broadcast":{"post":{"tags":["admin"],"summary":"Admin Broadcast","description":"Send a message to a segment of users.","operationId":"admin_broadcast_v1_admin_broadcast_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/messages":{"get":{"tags":["admin"],"summary":"Admin List Messages","description":"List recently sent messages (individual + broadcasts).","operationId":"admin_list_messages_v1_admin_messages_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/backfill-embeddings":{"post":{"tags":["admin"],"summary":"Admin Backfill Embeddings","description":"Trigger embedding backfill for context_facts and memory_versions. Runs in background.","operationId":"admin_backfill_embeddings_v1_admin_backfill_embeddings_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/user/messages":{"get":{"tags":["admin"],"summary":"User Get Messages","description":"User fetches their own unread messages.","operationId":"user_get_messages_v1_user_messages_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/user/messages/{message_id}/read":{"post":{"tags":["admin"],"summary":"User Mark Message Read","description":"Mark a message as read.","operationId":"user_mark_message_read_v1_user_messages__message_id__read_post","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/install.sh":{"get":{"tags":["admin"],"summary":"Download Install Script","description":"One-command local installer for Quint.","operationId":"download_install_script_install_sh_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/download/quint-pair.sh":{"get":{"tags":["admin"],"summary":"Download Pair Script","operationId":"download_pair_script_download_quint_pair_sh_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/download/quint-connect.js":{"get":{"tags":["admin"],"summary":"Download Connect","operationId":"download_connect_download_quint_connect_js_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/download/quint-mcp-server.js":{"get":{"tags":["admin"],"summary":"Download Mcp Server","operationId":"download_mcp_server_download_quint_mcp_server_js_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/download/quint.dxt":{"get":{"tags":["admin"],"summary":"Download Dxt","operationId":"download_dxt_download_quint_dxt_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/pgvector-check":{"get":{"tags":["admin"],"summary":"Pgvector Check","description":"Check if pgvector extension is available on this Postgres instance.","operationId":"pgvector_check_v1_admin_pgvector_check_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/billing/subscribe":{"post":{"tags":["billing"],"summary":"Billing Subscribe","description":"Create a Stripe subscription for a principal.","operationId":"billing_subscribe_v1_billing_subscribe_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/status":{"get":{"tags":["billing"],"summary":"Billing Status","description":"Return billing status and checkout URL if pending.","operationId":"billing_status_v1_billing_status_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/activate":{"get":{"tags":["billing"],"summary":"Billing Activate","description":"Called from the /welcome page after Stripe checkout. Returns token + pairing code.","operationId":"billing_activate_v1_billing_activate_get","parameters":[{"name":"session_id","in":"query","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/check":{"get":{"tags":["billing"],"summary":"Billing Check","description":"Check billing status and return a fresh checkout URL if still pending.","operationId":"billing_check_v1_billing_check_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/cancel":{"post":{"tags":["billing"],"summary":"Billing Cancel","description":"Cancel subscription at period end.","operationId":"billing_cancel_v1_billing_cancel_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/add-credits":{"post":{"tags":["billing"],"summary":"Billing Add Credits","description":"Purchase credits. Creates a Stripe PaymentIntent (TODO: wire real Stripe).","operationId":"billing_add_credits_v1_billing_add_credits_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/balance":{"get":{"tags":["billing"],"summary":"Billing Balance","description":"Return credit balance, auto-refill settings, and monthly usage.","operationId":"billing_balance_v1_billing_balance_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/settings":{"post":{"tags":["billing"],"summary":"Billing Settings Update","description":"Update credit billing settings (auto-refill, monthly cap, alerts).","operationId":"billing_settings_update_v1_billing_settings_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhook/stripe":{"post":{"tags":["billing"],"summary":"Stripe Webhook","description":"Stripe webhook handler for payment events.","operationId":"stripe_webhook_webhook_stripe_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/download/openquintessence.dxt":{"get":{"tags":["billing"],"summary":"Download Dxt Legacy","description":"Legacy route — redirect to canonical /download/quint.dxt.","operationId":"download_dxt_legacy_download_openquintessence_dxt_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/download/openquintessence-v2.dxt":{"get":{"tags":["billing"],"summary":"Download V2","operationId":"download_v2_download_openquintessence_v2_dxt_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/setup":{"get":{"tags":["billing"],"summary":"Setup Guide","description":"One-page JSON onboarding guide for new Quint users.","operationId":"setup_guide_setup_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/devices/pairing-code":{"get":{"tags":["devices"],"summary":"Get Pairing Code","description":"Generate a short-lived pairing code for connecting an OpenClaw device.","operationId":"get_pairing_code_v1_devices_pairing_code_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/devices/pair":{"post":{"tags":["devices"],"summary":"Pair Device","description":"Validate a pairing code and create a new device record. Called by OpenClaw.","operationId":"pair_device_v1_devices_pair_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/devices/verify":{"post":{"tags":["devices"],"summary":"Verify Device","description":"Verify device credentials. Called by the relay server during WebSocket auth.","operationId":"verify_device_v1_devices_verify_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/devices/list":{"get":{"tags":["devices"],"summary":"List Devices","description":"List all devices for this principal.","operationId":"list_devices_v1_devices_list_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/devices/{device_id}":{"delete":{"tags":["devices"],"summary":"Revoke Device","description":"Revoke a device, closing any active relay connection.","operationId":"revoke_device_v1_devices__device_id__delete","parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/clerk":{"post":{"tags":["webhooks"],"summary":"Clerk Webhook","description":"Handle Clerk webhook events — auto-create Quint principals.","operationId":"clerk_webhook_webhooks_clerk_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/auth/provision":{"post":{"tags":["webhooks"],"summary":"Provision User","description":"Called after Clerk auth to ensure a Quint principal exists for this user.","operationId":"provision_user_v1_auth_provision_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/onboard/import-openclaw":{"post":{"tags":["onboarding"],"summary":"Onboard Import Openclaw","description":"Import SOUL.md, USER.md, MEMORY.md content and write as context facts.","operationId":"onboard_import_openclaw_v1_onboard_import_openclaw_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/onboard/interview":{"post":{"tags":["onboarding"],"summary":"Onboard Interview","description":"Interview state machine for agent setup.","operationId":"onboard_interview_v1_onboard_interview_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/onboard/quickstart":{"post":{"tags":["onboarding"],"summary":"Onboard Quickstart","description":"Quick start: store agent name as soul fact and skip interview.","operationId":"onboard_quickstart_v1_onboard_quickstart_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/onboard/translate":{"post":{"tags":["onboarding"],"summary":"Onboard Translate","description":"Parse an AI memory file and optionally import its contents.","operationId":"onboard_translate_v1_onboard_translate_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_onboard_translate_v1_onboard_translate_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/connections/list":{"get":{"tags":["connections"],"summary":"List Connections","description":"List all OAuth access tokens (active connections) for the authenticated principal.","operationId":"list_connections_v1_connections_list_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/connections/{token_id}":{"delete":{"tags":["connections"],"summary":"Revoke Connection","description":"Revoke a specific OAuth access token belonging to the authenticated principal.","operationId":"revoke_connection_v1_connections__token_id__delete","parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string","title":"Token Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dashboard/facts":{"get":{"tags":["connections"],"summary":"Dashboard List Facts","description":"List all active context facts for the authenticated principal (dashboard use).","operationId":"dashboard_list_facts_v1_dashboard_facts_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string","default":"","title":"Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"tags":["pages"],"summary":"Homepage","operationId":"homepage__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/agent-briefing":{"get":{"tags":["pages"],"summary":"Agent Briefing","operationId":"agent_briefing_agent_briefing_get","parameters":[{"name":"token","in":"query","required":false,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/security":{"get":{"tags":["pages"],"summary":"Security Page","operationId":"security_page_security_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/developer":{"get":{"tags":["pages"],"summary":"Docs Page","operationId":"docs_page_developer_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/welcome":{"get":{"tags":["pages"],"summary":"Welcome Page","operationId":"welcome_page_welcome_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/onboard":{"get":{"tags":["pages"],"summary":"Onboard Page","operationId":"onboard_page_onboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/dashboard":{"get":{"tags":["pages"],"summary":"Dashboard Page","operationId":"dashboard_page_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connections":{"get":{"tags":["pages"],"summary":"Connections Page","operationId":"connections_page_connections_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/dxt/download":{"get":{"tags":["pages"],"summary":"Download Dxt","description":"Serve the base quint.dxt — token auth is handled by the client via ~/.quint/token.json.","operationId":"download_dxt_v1_dxt_download_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/connect":{"get":{"tags":["pages"],"summary":"Connect Page","operationId":"connect_page_connect_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/privacy":{"get":{"tags":["pages"],"summary":"Privacy Redirect","operationId":"privacy_redirect_privacy_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/terms":{"get":{"tags":["pages"],"summary":"Terms Redirect","operationId":"terms_redirect_terms_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/start":{"get":{"tags":["pages"],"summary":"Start Page","operationId":"start_page_start_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/for-openclaw":{"get":{"tags":["pages"],"summary":"For Openclaw Page","operationId":"for_openclaw_page_for_openclaw_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin":{"get":{"tags":["pages"],"summary":"Admin Page","operationId":"admin_page_admin_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/favicon.svg":{"get":{"tags":["pages"],"summary":"Favicon","operationId":"favicon_favicon_svg_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/favicon.ico":{"get":{"tags":["pages"],"summary":"Favicon","operationId":"favicon_favicon_ico_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/version":{"get":{"tags":["pages"],"summary":"Version Info","description":"Returns deployed version, git SHA, and key route verification.","operationId":"version_info_v1_version_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"tags":["pages"],"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/signup":{"get":{"tags":["pages"],"summary":"Signup Redirect","operationId":"signup_redirect_signup_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/signup.html":{"get":{"tags":["pages"],"summary":"Signup Html Redirect","operationId":"signup_html_redirect_signup_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/device/code":{"post":{"tags":["device_oauth"],"summary":"Oauth Device Code","description":"OAuth 2.0 Device Authorization Request (RFC 8628).\nCalled by dxt on startup when no token exists.\nReturns device_code + user_code + verification_uri.","operationId":"oauth_device_code_oauth_device_code_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/device/token":{"post":{"tags":["device_oauth"],"summary":"Oauth Device Token","description":"OAuth 2.0 Device Access Token Request (RFC 8628).\nCalled by dxt every 3 seconds to poll for authorization.\nReturns authorization_pending, expired, or access_token.","operationId":"oauth_device_token_oauth_device_token_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/device/authorize":{"post":{"tags":["device_oauth"],"summary":"Oauth Device Authorize","description":"Called by getquint.ai/connect page after user authenticates.\nLinks the user_code to the authenticated principal.","operationId":"oauth_device_authorize_oauth_device_authorize_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pair/new":{"get":{"tags":["pairing"],"summary":"Create Pairing Session","description":"Create a fresh pairing session and return a new pairing code. No auth required.","operationId":"create_pairing_session_v1_pair_new_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/pair/{code}":{"get":{"tags":["pairing"],"summary":"Get Pairing Session","description":"Get or create a pairing session for an agent to import user context.","operationId":"get_pairing_session_v1_pair__code__get","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/import":{"post":{"tags":["pairing"],"summary":"Import Context","description":"Import MEMORY.md, SOUL.md, USER.md content from an OpenClaw agent.","operationId":"import_context_v1_import_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/pair/{session_id}/status":{"get":{"tags":["pairing"],"summary":"Get Pairing Status","description":"Check status of a pairing session (pending, imported, active, expired).","operationId":"get_pairing_status_v1_pair__session_id__status_get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sync/extract":{"post":{"tags":["sync"],"summary":"Sync Extract","description":"Extract facts and episode summary from a conversation using LLM. Requires principal token.","operationId":"sync_extract_v1_sync_extract_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_SyncExtractRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/activate/{session_id}":{"get":{"tags":["sync"],"summary":"Activate Page","operationId":"activate_page_activate__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AgentCreateRequest":{"properties":{"principal_id":{"type":"string","title":"Principal Id"},"agent_id":{"type":"string","title":"Agent Id"},"name":{"type":"string","title":"Name"},"preferred_name":{"type":"string","title":"Preferred Name","default":""},"emoji":{"type":"string","title":"Emoji","default":"🤖"},"role":{"type":"string","title":"Role","default":""},"soul":{"additionalProperties":true,"type":"object","title":"Soul","default":{}},"relationship":{"additionalProperties":true,"type":"object","title":"Relationship","default":{}},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions","default":["read"]},"scope":{"type":"string","title":"Scope","default":"professional"},"runtime":{"type":"string","title":"Runtime","default":"default"}},"type":"object","required":["principal_id","agent_id","name"],"title":"AgentCreateRequest"},"AgentCreateResponse":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"token":{"type":"string","title":"Token"}},"type":"object","required":["agent_id","token"],"title":"AgentCreateResponse"},"AgentQueryRequest":{"properties":{"question":{"type":"string","title":"Question"},"agent_id":{"type":"string","title":"Agent Id","default":"theo"},"scope":{"type":"string","title":"Scope","default":"professional"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context"}},"type":"object","required":["question"],"title":"AgentQueryRequest"},"AgentQueryResponse":{"properties":{"answer":{"type":"string","title":"Answer"},"source":{"type":"string","title":"Source"},"agent_id":{"type":"string","title":"Agent Id"}},"type":"object","required":["answer","source","agent_id"],"title":"AgentQueryResponse"},"AgentRegisterRequest":{"properties":{"agent_id":{"type":"string","title":"Agent Id","default":"theo"},"gateway_url":{"type":"string","title":"Gateway Url"},"gateway_token":{"type":"string","title":"Gateway Token"},"scope_default":{"type":"string","title":"Scope Default","default":"professional"}},"type":"object","required":["gateway_url","gateway_token"],"title":"AgentRegisterRequest"},"AgentRegisterResponse":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["agent_id","status"],"title":"AgentRegisterResponse"},"Body_oauth_authorize_consent_oauth_authorize_consent_post":{"properties":{"client_id":{"type":"string","title":"Client Id"},"redirect_uri":{"type":"string","title":"Redirect Uri"},"scope":{"type":"string","title":"Scope"},"state":{"type":"string","title":"State"},"code_challenge":{"type":"string","title":"Code Challenge"},"code_challenge_method":{"type":"string","title":"Code Challenge Method","default":"S256"},"action":{"type":"string","title":"Action"}},"type":"object","required":["client_id","redirect_uri","scope","code_challenge","action"],"title":"Body_oauth_authorize_consent_oauth_authorize_consent_post"},"Body_onboard_translate_v1_onboard_translate_post":{"properties":{"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"preview_only":{"type":"string","title":"Preview Only","default":"true"}},"type":"object","title":"Body_onboard_translate_v1_onboard_translate_post"},"ContextReadRequest":{"properties":{"principal_id":{"type":"string","title":"Principal Id"},"query":{"type":"string","title":"Query"},"max_tokens":{"type":"integer","title":"Max Tokens","default":2000},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"scope":{"type":"string","title":"Scope","default":"all"}},"type":"object","required":["principal_id","query"],"title":"ContextReadRequest"},"ContextReadResponse":{"properties":{"principal_id":{"type":"string","title":"Principal Id"},"context":{"type":"string","title":"Context"},"tokens_used":{"type":"integer","title":"Tokens Used"},"freshness":{"type":"string","title":"Freshness"}},"type":"object","required":["principal_id","context","tokens_used","freshness"],"title":"ContextReadResponse"},"ContextWriteRequest":{"properties":{"principal_id":{"type":"string","title":"Principal Id"},"facts":{"items":{"$ref":"#/components/schemas/FactInput"},"type":"array","title":"Facts"}},"type":"object","required":["principal_id","facts"],"title":"ContextWriteRequest"},"ContextWriteResponse":{"properties":{"written":{"type":"integer","title":"Written"},"consolidated":{"type":"integer","title":"Consolidated"},"context_ids":{"items":{"type":"string"},"type":"array","title":"Context Ids"}},"type":"object","required":["written","consolidated","context_ids"],"title":"ContextWriteResponse"},"FactInput":{"properties":{"type":{"type":"string","title":"Type","default":"fact"},"content":{"type":"string","title":"Content"},"confidence":{"type":"number","title":"Confidence","default":1.0},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"scope":{"type":"string","title":"Scope","default":"professional"}},"type":"object","required":["content"],"title":"FactInput"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"PrincipalCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"preferred_name":{"type":"string","title":"Preferred Name","default":""},"timezone":{"type":"string","title":"Timezone","default":"UTC"},"language":{"type":"string","title":"Language","default":"en-US"},"communication_style":{"type":"string","title":"Communication Style","default":""}},"type":"object","required":["name"],"title":"PrincipalCreateRequest"},"PrincipalCreateResponse":{"properties":{"principal_id":{"type":"string","title":"Principal Id"},"token":{"type":"string","title":"Token"}},"type":"object","required":["principal_id","token"],"title":"PrincipalCreateResponse"},"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"},"_SyncExtractRequest":{"properties":{"conversation":{"type":"string","title":"Conversation"},"session_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Ref"}},"type":"object","required":["conversation"],"title":"_SyncExtractRequest"}}}}