{"openapi":"3.1.0","info":{"title":"SmartMemory Service","description":"Unified service for SmartMemory functionality via REST API and MCP protocol","version":"1.5.31"},"paths":{"/health":{"get":{"tags":["Health"],"summary":"Health Check","description":"Health check endpoint","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/ready":{"get":{"tags":["Health"],"summary":"Ready Check","description":"Report dependency readiness without exposing endpoint or exception details.","operationId":"ready_check_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/auth/onboarding/start":{"post":{"tags":["Authentication","Authentication"],"summary":"Onboarding Start","description":"Start hosted signup orchestration and return next step.\n\nPublic: a new email signs up anonymously. The middleware still resolves a signed-in caller here\n(``optional_auth_paths``), and an email that already has an account is acted on only for that\naccount's signed-in billing admin (SVC-ONBOARDING-EXISTING-USER-1).","operationId":"onboarding_start_auth_onboarding_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingStartRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"SessionCookie":[]},{}]}},"/auth/onboarding/complete":{"post":{"tags":["Authentication","Authentication"],"summary":"Onboarding Complete","description":"Complete/poll onboarding status after checkout return.","operationId":"onboarding_complete_auth_onboarding_complete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCompleteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/auth/onboarding/retry":{"post":{"tags":["Authentication","Authentication"],"summary":"Onboarding Retry","description":"Retry recoverable onboarding failures.","operationId":"onboarding_retry_auth_onboarding_retry_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingRetryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/auth/app-config":{"get":{"tags":["Authentication","Authentication"],"summary":"Get App Config","description":"Return the provider-neutral, non-secret browser authentication config.","operationId":"get_app_config_auth_app_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/auth/clerk/session":{"post":{"tags":["Authentication","Authentication"],"summary":"Clerk Session Exchange","description":"Exchange a valid Clerk session token for SmartMemory auth cookies/session.","operationId":"clerk_session_exchange_auth_clerk_session_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}},"security":[]}},"/auth/oidc/session":{"post":{"tags":["Authentication","Authentication"],"summary":"Oidc Session Exchange","description":"Exchange a verified OIDC ID token for the normal browser session.","operationId":"oidc_session_exchange_auth_oidc_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OidcSessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/auth/clerk/oauth-exchange":{"post":{"tags":["Authentication","Authentication"],"summary":"Clerk Oauth Exchange","description":"Exchange a verified Clerk OAuth token for an access-only SM token.","operationId":"clerk_oauth_exchange_auth_clerk_oauth_exchange_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthExchangeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthExchangeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/auth/refresh":{"post":{"tags":["Authentication","Authentication"],"summary":"Refresh Token","description":"Refresh access token using refresh token.\n\nSupports two token sources:\n- Cookie: ``sm_refresh_token`` (browser flows)\n- Request body: ``refresh_token`` field (programmatic SDK clients)\n\nReturns new access and refresh tokens.","operationId":"refresh_token_auth_refresh_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RefreshTokenRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/auth/logout":{"post":{"tags":["Authentication","Authentication"],"summary":"Logout","description":"Logout user by revoking the current session's tokens.\n\nDenylists the active access token's jti (immediate, single-token revocation)\nand revokes refresh tokens, then clears SmartMemory session cookies.","operationId":"logout_auth_logout_post","responses":{"204":{"description":"Successful Response"}}}},"/auth/me":{"get":{"tags":["Authentication","Authentication"],"summary":"Get Current User Info","description":"Get current authenticated user info.\n\nRequires valid access token. Does not require tenant_id, since auth endpoints\nidentify the user before workspace context is established.","operationId":"get_current_user_info_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthMeResponse"}}}}}}},"/auth/logout-all":{"post":{"tags":["Authentication","Authentication"],"summary":"Logout All Devices","description":"Logout from all devices by revoking all refresh tokens.\n\nRequires valid access token.","operationId":"logout_all_devices_auth_logout_all_post","responses":{"204":{"description":"Successful Response"}}}},"/auth/llm-keys":{"get":{"tags":["Authentication","Authentication"],"summary":"Get Llm Keys","description":"Get user's LLM provider API keys (masked for security).","operationId":"get_llm_keys_auth_llm_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"patch":{"tags":["Authentication","Authentication"],"summary":"Update Llm Keys","description":"Update user's LLM provider API keys (partial merge).\nKeys are encrypted at rest (Fernet) before storage. Omitted keys are preserved.","operationId":"update_llm_keys_auth_llm_keys_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_update_llm_keys_auth_llm_keys_patch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations":{"get":{"tags":["Integrations"],"summary":"List Integrations","description":"List all integrations in the marketplace catalog.","operationId":"list_integrations_integrations_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status","title":"Status"},"description":"Filter by status"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name or description","title":"Search"},"description":"Search by name or description"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Integration"},"title":"Response List Integrations Integrations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/integrations/categories":{"get":{"tags":["Integrations"],"summary":"Get Categories","description":"Get all categories with integration counts.","operationId":"get_categories_integrations_categories_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CategoryCount"},"type":"array","title":"Response Get Categories Integrations Categories Get"}}}}}}},"/integrations/popular":{"get":{"tags":["Integrations"],"summary":"Get Popular Integrations","description":"Get popular integrations.","operationId":"get_popular_integrations_integrations_popular_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":6,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Integration"},"title":"Response Get Popular Integrations Integrations Popular Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/{integration_id}":{"get":{"tags":["Integrations"],"summary":"Get Integration","description":"Get a specific integration by ID.","operationId":"get_integration_integrations__integration_id__get","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","title":"Integration Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/{integration_id}/vote":{"post":{"tags":["Integrations"],"summary":"Vote For Integration","description":"Vote for a requested integration.","operationId":"vote_for_integration_integrations__integration_id__vote_post","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","title":"Integration Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/request":{"post":{"tags":["Integrations"],"summary":"Request Integration","description":"Request a new integration.","operationId":"request_integration_integrations_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/{integration_id}/authorize":{"get":{"tags":["Adapters"],"summary":"Authorize Connector","description":"Start (or restart) the OAuth grant for a connection. ``?return_to=`` (allowlisted), ``?mode=json|redirect``.","operationId":"authorize_connector_memory_adapters__integration_id__authorize_get","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","title":"Integration Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/oauth/callback":{"get":{"tags":["Adapters"],"summary":"Oauth Callback","description":"The provider's redirect target. Public: the sealed state and the binding cookie carry the authority.","operationId":"oauth_callback_memory_adapters_oauth_callback_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/memory/adapters/oauth/clients/{provider}":{"get":{"tags":["Adapters"],"summary":"Get Workspace Oauth Client","operationId":"get_workspace_oauth_client_memory_adapters_oauth_clients__provider__get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Adapters"],"summary":"Put Workspace Oauth Client","operationId":"put_workspace_oauth_client_memory_adapters_oauth_clients__provider__put","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Adapters"],"summary":"Delete Workspace Oauth Client","operationId":"delete_workspace_oauth_client_memory_adapters_oauth_clients__provider__delete","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/credential_providers/onepassword":{"get":{"tags":["Adapters"],"summary":"Get Onepassword Binding","operationId":"get_onepassword_binding_memory_adapters_credential_providers_onepassword_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"tags":["Adapters"],"summary":"Put Onepassword Binding","operationId":"put_onepassword_binding_memory_adapters_credential_providers_onepassword_put","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"delete":{"tags":["Adapters"],"summary":"Delete Onepassword Binding","operationId":"delete_onepassword_binding_memory_adapters_credential_providers_onepassword_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/adapters/{integration_id}/credential/check":{"post":{"tags":["Adapters"],"summary":"Check Onepassword Credential","description":"Resolve the connection's reference once, uncached. Owner or admin; the value is dropped before answering.","operationId":"check_onepassword_credential_memory_adapters__integration_id__credential_check_post","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","title":"Integration Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/google_sheets/append":{"post":{"tags":["Adapters"],"summary":"Append Rows","description":"Append ``rows`` after the last row of ``tab``. Body ``{spreadsheet_id, tab, rows}``. Writes with ``RAW``.","operationId":"append_rows_memory_adapters_google_sheets_append_post","requestBody":{"content":{"application/json":{"schema":{"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/google_sheets/read":{"get":{"tags":["Adapters"],"summary":"Read Range","description":"The values of an A1 range as rows of text.","operationId":"read_range_memory_adapters_google_sheets_read_get","parameters":[{"name":"spreadsheet_id","in":"query","required":true,"schema":{"type":"string","maxLength":256,"title":"Spreadsheet Id"}},{"name":"range","in":"query","required":true,"schema":{"type":"string","maxLength":512,"title":"Range"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/google_gmail/status":{"get":{"tags":["Adapters"],"summary":"Gmail Status","description":"The connect gate and the connection state. No Google call.","operationId":"gmail_status_memory_adapters_google_gmail_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/adapters/google_gmail/list":{"get":{"tags":["Adapters"],"summary":"Gmail List","description":"One page of the thread listing: a snapshot when no ``watermark`` is given, history since it otherwise.","operationId":"gmail_list_memory_adapters_google_gmail_list_get","parameters":[{"name":"watermark","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Watermark"}},{"name":"page_state","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Page State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/google_calendar/status":{"get":{"tags":["Adapters"],"summary":"Calendar Status","description":"The connection's status and the calendars this workspace may read (config, default the primary calendar).","operationId":"calendar_status_memory_adapters_google_calendar_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/adapters/google_calendar/list":{"post":{"tags":["Adapters"],"summary":"Calendar List","description":"One page of events. Body ``{calendar_id?, state?}``, where ``state`` is ``{watermark, page_state}`` from the last page.","operationId":"calendar_list_memory_adapters_google_calendar_list_post","requestBody":{"content":{"application/json":{"schema":{"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/rss/status":{"get":{"tags":["Adapters"],"summary":"Rss Status","description":"The connection's status and the feeds this workspace reads (config.feeds).","operationId":"rss_status_memory_adapters_rss_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/adapters/rss/list":{"post":{"tags":["Adapters"],"summary":"Rss List","description":"One feed's items. Body ``{feed_url?, state?}``; ``state`` is ``{watermark, page_state}`` from the last page.","operationId":"rss_list_memory_adapters_rss_list_post","requestBody":{"content":{"application/json":{"schema":{"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/raindrop/status":{"get":{"tags":["Adapters"],"summary":"Raindrop Status","description":"The connection's status.","operationId":"raindrop_status_memory_adapters_raindrop_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/adapters/raindrop/list":{"post":{"tags":["Adapters"],"summary":"Raindrop List","description":"One page of bookmarks. Body ``{state?}``; ``state`` is ``{watermark, page_state}`` from the last page.","operationId":"raindrop_list_memory_adapters_raindrop_list_post","requestBody":{"content":{"application/json":{"schema":{"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/jira/status":{"get":{"tags":["Adapters"],"summary":"Jira Status","description":"The connection's status and the projects this workspace may read (config, required).","operationId":"jira_status_memory_adapters_jira_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/adapters/jira/list":{"post":{"tags":["Adapters"],"summary":"Jira List","description":"One page of issues. Body ``{project?, state?}``; ``state`` is ``{watermark, page_state}`` from the last page.","operationId":"jira_list_memory_adapters_jira_list_post","requestBody":{"content":{"application/json":{"schema":{"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/confluence/status":{"get":{"tags":["Adapters"],"summary":"Confluence Status","description":"The connection's status and the spaces this workspace may read (config, required).","operationId":"confluence_status_memory_adapters_confluence_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/adapters/confluence/list":{"post":{"tags":["Adapters"],"summary":"Confluence List","description":"One page of pages. Body ``{space?, state?}``; ``state`` is ``{watermark, page_state}`` from the last page.","operationId":"confluence_list_memory_adapters_confluence_list_post","requestBody":{"content":{"application/json":{"schema":{"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/outlook/status":{"get":{"tags":["Adapters"],"summary":"Outlook Status","description":"The connection's status and the mail folders this workspace may read (config, default the inbox).","operationId":"outlook_status_memory_adapters_outlook_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/adapters/outlook/list":{"post":{"tags":["Adapters"],"summary":"Outlook List","description":"One page of messages. Body ``{resource?, state?}``; ``state`` is ``{watermark, page_state}`` from the last page.","operationId":"outlook_list_memory_adapters_outlook_list_post","requestBody":{"content":{"application/json":{"schema":{"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/outlook_calendar/status":{"get":{"tags":["Adapters"],"summary":"Outlook Calendar Status","description":"The connection's status and the calendars this workspace may read (config, default the primary calendar).","operationId":"outlook_calendar_status_memory_adapters_outlook_calendar_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/adapters/outlook_calendar/list":{"post":{"tags":["Adapters"],"summary":"Outlook Calendar List","description":"One page of events. Body ``{resource?, state?}``; ``state`` is ``{watermark, page_state}`` from the last page.","operationId":"outlook_calendar_list_memory_adapters_outlook_calendar_list_post","requestBody":{"content":{"application/json":{"schema":{"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/onedrive/status":{"get":{"tags":["Adapters"],"summary":"Onedrive Status","description":"The connection's status and its one resource, the signed-in user's drive root.","operationId":"onedrive_status_memory_adapters_onedrive_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/adapters/onedrive/list":{"post":{"tags":["Adapters"],"summary":"Onedrive List","description":"One page of text-like files. Body ``{resource?, state?}``; ``state`` is ``{watermark, page_state}``.","operationId":"onedrive_list_memory_adapters_onedrive_list_post","requestBody":{"content":{"application/json":{"schema":{"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/gitlab/status":{"get":{"tags":["Adapters"],"summary":"Gitlab Status","description":"The connection's status.","operationId":"gitlab_status_memory_adapters_gitlab_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/adapters/gitlab/list":{"post":{"tags":["Adapters"],"summary":"Gitlab List","description":"One page. Body ``{resource, state?}``; ``resource`` is ``<project>:<kind>``, ``state`` is ``{watermark, page_state}``.","operationId":"gitlab_list_memory_adapters_gitlab_list_post","requestBody":{"content":{"application/json":{"schema":{"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/sentry/status":{"get":{"tags":["Adapters"],"summary":"Sentry Status","description":"The connection's status.","operationId":"sentry_status_memory_adapters_sentry_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/adapters/sentry/list":{"post":{"tags":["Adapters"],"summary":"Sentry List","description":"One page. Body ``{resource, state?}``; ``resource`` is a project slug, ``state`` is ``{watermark, page_state}``.","operationId":"sentry_list_memory_adapters_sentry_list_post","requestBody":{"content":{"application/json":{"schema":{"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/sql_source/status":{"get":{"tags":["Adapters"],"summary":"Sql Status","description":"The connection's status and the statement names a list may read.","operationId":"sql_status_memory_adapters_sql_source_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/adapters/sql_source/validate":{"post":{"tags":["Adapters"],"summary":"Sql Validate","description":"Validate the connection as it is now (role read-only, every statement answers its columns) and mark it usable.","operationId":"sql_validate_memory_adapters_sql_source_validate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/adapters/sql_source/list":{"post":{"tags":["Adapters"],"summary":"Sql List","description":"One page of rows. Body ``{resource, state?}``; ``state`` is ``{watermark, page_state}`` from the last page.","operationId":"sql_list_memory_adapters_sql_source_list_post","requestBody":{"content":{"application/json":{"schema":{"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/graph_source/status":{"get":{"tags":["Adapters"],"summary":"Graph Status","description":"The connection's status and the query names a list may read.","operationId":"graph_status_memory_adapters_graph_source_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/adapters/graph_source/validate":{"post":{"tags":["Adapters"],"summary":"Graph Validate","description":"Validate the connection as it is now (user read-only, every query answers its columns) and mark it usable.","operationId":"graph_validate_memory_adapters_graph_source_validate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/adapters/graph_source/list":{"post":{"tags":["Adapters"],"summary":"Graph List","description":"One page of records. Body ``{resource, state?}``; ``state`` is ``{watermark, page_state}`` from the last page.","operationId":"graph_list_memory_adapters_graph_source_list_post","requestBody":{"content":{"application/json":{"schema":{"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/google_drive/status":{"get":{"tags":["Adapters"],"summary":"Drive Status","description":"The connect gate, the connection state and how many folders are configured (never their ids). No Google call.","operationId":"drive_status_memory_adapters_google_drive_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/adapters/google_drive/list":{"post":{"tags":["Adapters"],"summary":"Drive List","description":"One page of a configured folder. Body ``{folder_id?, state?}``; ``state`` is ``{watermark, page_state}`` as sealed\nby the last page (both ``null`` or absent: a snapshot from the start).","operationId":"drive_list_memory_adapters_google_drive_list_post","requestBody":{"content":{"application/json":{"schema":{"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/readwise/status":{"get":{"tags":["Adapters"],"summary":"Readwise Status","description":"The connection's status.","operationId":"readwise_status_memory_adapters_readwise_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/adapters/readwise/list":{"post":{"tags":["Adapters"],"summary":"Readwise List","description":"One page of books with their highlights. Body ``{state?}``; ``state`` is ``{watermark, page_state}`` from the last page (``null`` for a snapshot).","operationId":"readwise_list_memory_adapters_readwise_list_post","requestBody":{"content":{"application/json":{"schema":{"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/github/status":{"get":{"tags":["Adapters"],"summary":"Github Status","description":"The connection's status and its repository allowlist.","operationId":"github_status_memory_adapters_github_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/adapters/github/list":{"post":{"tags":["Adapters"],"summary":"Github List","description":"One page for one repository. Body ``{repo?, state?}``; ``state`` is ``{watermark, page_state}`` from the last page.","operationId":"github_list_memory_adapters_github_list_post","requestBody":{"content":{"application/json":{"schema":{"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/notion/status":{"get":{"tags":["Adapters"],"summary":"Notion Status","description":"The connection's status and the resources it lists.","operationId":"notion_status_memory_adapters_notion_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/adapters/notion/list":{"post":{"tags":["Adapters"],"summary":"Notion List","description":"One page of objects. Body ``{resource?, state?}``; ``state`` is ``{watermark, page_state}`` from the last page.","operationId":"notion_list_memory_adapters_notion_list_post","requestBody":{"content":{"application/json":{"schema":{"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/dropbox/status":{"get":{"tags":["Adapters"],"summary":"Dropbox Status","description":"The connection's status and the folders this workspace may read (config, default the whole Dropbox).","operationId":"dropbox_status_memory_adapters_dropbox_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/adapters/dropbox/list":{"post":{"tags":["Adapters"],"summary":"Dropbox List","description":"One page of text files. Body ``{folder?, state?}``; ``state`` is ``{watermark, page_state}`` as sealed by the last page.","operationId":"dropbox_list_memory_adapters_dropbox_list_post","requestBody":{"content":{"application/json":{"schema":{"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/linear/status":{"get":{"tags":["Adapters"],"summary":"Linear Status","description":"The connection's status and the Linear resources this workspace may read (config, default all three).","operationId":"linear_status_memory_adapters_linear_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/adapters/linear/list":{"post":{"tags":["Adapters"],"summary":"Linear List","description":"One page of issues, projects or comments. Body ``{resource?, state?}``, where ``state`` is ``{watermark, page_state}`` from the last page.","operationId":"linear_list_memory_adapters_linear_list_post","requestBody":{"content":{"application/json":{"schema":{"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/hackernews/status":{"get":{"tags":["Adapters"],"summary":"Hackernews Status","description":"The connection's status and the story lists and users this workspace reads (config).","operationId":"hackernews_status_memory_adapters_hackernews_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/adapters/hackernews/list":{"post":{"tags":["Adapters"],"summary":"Hackernews List","description":"One story list or user. Body ``{resource?, state?}``; ``state`` is ``{watermark, page_state}`` from the last page.","operationId":"hackernews_list_memory_adapters_hackernews_list_post","requestBody":{"content":{"application/json":{"schema":{"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/bluesky/status":{"get":{"tags":["Adapters"],"summary":"Bluesky Status","description":"The connection's status and the handles this workspace reads (config.handles).","operationId":"bluesky_status_memory_adapters_bluesky_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/adapters/bluesky/list":{"post":{"tags":["Adapters"],"summary":"Bluesky List","description":"One handle's posts. Body ``{resource?, state?}``; ``state`` is ``{watermark, page_state}`` from the last page.","operationId":"bluesky_list_memory_adapters_bluesky_list_post","requestBody":{"content":{"application/json":{"schema":{"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/mastodon/status":{"get":{"tags":["Adapters"],"summary":"Mastodon Status","description":"The connection's status and the accounts and tags this workspace reads (config).","operationId":"mastodon_status_memory_adapters_mastodon_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/adapters/mastodon/list":{"post":{"tags":["Adapters"],"summary":"Mastodon List","description":"One account's or tag's statuses. Body ``{resource?, state?}``; ``state`` is ``{watermark, page_state}``.","operationId":"mastodon_list_memory_adapters_mastodon_list_post","requestBody":{"content":{"application/json":{"schema":{"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters":{"get":{"tags":["Adapters"],"summary":"List Connected Adapters","description":"List all connected adapters for the current workspace.","operationId":"list_connected_adapters_memory_adapters_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/adapters/{adapter_id}":{"get":{"tags":["Adapters"],"summary":"Get Connected Adapter","description":"Get a specific connected adapter (allowlisted fields only).","operationId":"get_connected_adapter_memory_adapters__adapter_id__get","parameters":[{"name":"adapter_id","in":"path","required":true,"schema":{"type":"string","title":"Adapter Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Adapters"],"summary":"Disconnect Adapter","description":"Disconnect (owner or admin): the fence update, 202 ``{status: disconnecting}``.\n\nThe record stays until the worker's recovery pass (L2) has drained a live run and finished revocation. GET\nshows ``Stopping`` until then. A repeat disconnect of a ``disconnecting`` record answers the same 202 and writes\nnothing. A v1 row (no connection_id, never synced) is deleted at once.","operationId":"disconnect_adapter_memory_adapters__adapter_id__delete","parameters":[{"name":"adapter_id","in":"path","required":true,"schema":{"type":"string","title":"Adapter Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/{integration_id}/install":{"post":{"tags":["Adapters"],"summary":"Install Adapter","description":"Connect an integration: body ``{credential: {kind: pasted, value} | {kind: onepassword, ref} | {kind: none},\nconfig?: {...}}``.\n\nThe body is validated by hand (not a pydantic body model) so a refused token never comes back in a 422.","operationId":"install_adapter_memory_adapters__integration_id__install_post","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","title":"Integration Id"}}],"requestBody":{"content":{"application/json":{"schema":{"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/{integration_id}/credential":{"put":{"tags":["Adapters"],"summary":"Replace Adapter Credential","description":"Replace the credential (owner or admin): body ``{kind: pasted, value}`` or ``{kind: onepassword, ref}``, then\nepoch+1 and back to ``connecting``.","operationId":"replace_adapter_credential_memory_adapters__integration_id__credential_put","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","title":"Integration Id"}}],"requestBody":{"content":{"application/json":{"schema":{"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/{adapter_id}/sync":{"post":{"tags":["Adapters"],"summary":"Sync Adapter","description":"Sync now (any member): claim a manual run, or return the run already pending or active.","operationId":"sync_adapter_memory_adapters__adapter_id__sync_post","parameters":[{"name":"adapter_id","in":"path","required":true,"schema":{"type":"string","title":"Adapter Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/{adapter_id}/pause":{"patch":{"tags":["Adapters"],"summary":"Pause Adapter","description":"Pause (owner or admin): ``active`` to ``paused``, and a queued run is cleared in the same update.","operationId":"pause_adapter_memory_adapters__adapter_id__pause_patch","parameters":[{"name":"adapter_id","in":"path","required":true,"schema":{"type":"string","title":"Adapter Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/{adapter_id}/resume":{"patch":{"tags":["Adapters"],"summary":"Resume Adapter","description":"Resume (owner or admin): only ``paused`` to ``active``, due now.","operationId":"resume_adapter_memory_adapters__adapter_id__resume_patch","parameters":[{"name":"adapter_id","in":"path","required":true,"schema":{"type":"string","title":"Adapter Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/{adapter_id}/config":{"patch":{"tags":["Adapters"],"summary":"Update Adapter Config","description":"Replace the whole config (owner or admin), validated against the connector's schema (422 otherwise).","operationId":"update_adapter_config_memory_adapters__adapter_id__config_patch","parameters":[{"name":"adapter_id","in":"path","required":true,"schema":{"type":"string","title":"Adapter Id"}}],"requestBody":{"content":{"application/json":{"schema":{"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/adapters/{adapter_id}/schedule":{"patch":{"tags":["Adapters"],"summary":"Update Adapter Schedule","description":"Set the sync interval (owner or admin). Only ``schedule.interval_seconds`` changes: no run is claimed and no status\nmoves. An active connection whose next run is later than now + interval is pulled forward, never pushed later.","operationId":"update_adapter_schedule_memory_adapters__adapter_id__schedule_patch","parameters":[{"name":"adapter_id","in":"path","required":true,"schema":{"type":"string","title":"Adapter Id"}}],"requestBody":{"content":{"application/json":{"schema":{"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/usage/dashboard":{"get":{"tags":["Usage & Quotas","Usage & Quotas"],"summary":"Get Usage Dashboard","description":"Get usage dashboard with current quotas and limits.\n\nReturns:\n- Current memory count\n- Memory limit\n- Queries used today\n- Daily query limit\n- Subscription tier\n- Percentage used","operationId":"get_usage_dashboard_usage_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/usage/limits":{"get":{"tags":["Usage & Quotas","Usage & Quotas"],"summary":"Get Limits","description":"Get quota limits for current subscription tier.","operationId":"get_limits_usage_limits_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/usage/current":{"get":{"tags":["Usage & Quotas","Usage & Quotas"],"summary":"Get Current Usage","description":"Get current usage statistics.","operationId":"get_current_usage_usage_current_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/usage/tiers":{"get":{"tags":["Usage & Quotas","Usage & Quotas"],"summary":"Get Available Tiers","description":"Get information about all available subscription tiers.","operationId":"get_available_tiers_usage_tiers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/subscription/checkout":{"post":{"tags":["Subscription","Subscription"],"summary":"Create Checkout Session","description":"Create a Stripe Checkout session for subscription upgrade.\n\nReturns a checkout URL that the user can visit to complete payment.","operationId":"create_checkout_session_subscription_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/subscription/upgrade":{"post":{"tags":["Subscription","Subscription"],"summary":"Upgrade Subscription","description":"Upgrade subscription tier with Stripe integration.\n\nTwo modes:\n1. Direct upgrade (use_checkout=False): Requires payment_method_id, creates subscription immediately\n2. Checkout mode (use_checkout=True): Returns checkout URL for user to complete payment\n\nFor free tier or testing, Stripe can be bypassed.","operationId":"upgrade_subscription_subscription_upgrade_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/subscription/current":{"get":{"tags":["Subscription","Subscription"],"summary":"Get Current Subscription","description":"Get current subscription details.","operationId":"get_current_subscription_subscription_current_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/subscription/portal":{"post":{"tags":["Subscription","Subscription"],"summary":"Create Billing Portal Session","description":"Create a Stripe Customer Portal session.\n\nReturns a URL where the customer can manage their subscription,\nupdate payment methods, and view invoices.","operationId":"create_billing_portal_session_subscription_portal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/subscription/cancel":{"post":{"tags":["Subscription","Subscription"],"summary":"Cancel Subscription","description":"Cancel subscription with Stripe integration.\n\nBy default, cancels at period end. Set immediately=True for immediate cancellation.","operationId":"cancel_subscription_subscription_cancel_post","parameters":[{"name":"immediately","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Immediately"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/subscription/billing-managers":{"get":{"tags":["Subscription","Subscription"],"summary":"List Billing Managers","description":"Ids of the members an org admin let manage billing. Any signed-in member of the tenant may read it.\n\nFiltered to current tenant members with the same filter `can_manage_billing` uses, so a stale id\nafter removal never shows. Admins appear only if explicitly granted: they manage billing by role, not by this list.\nAn org admin also gets `members`: every current member with email, name, admin flag and whether they are listed.\nEveryone else gets `user_ids` only, with no member emails.","operationId":"list_billing_managers_subscription_billing_managers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/subscription/billing-managers/{user_id}":{"put":{"tags":["Subscription","Subscription"],"summary":"Grant Billing Manager","description":"Let a member of the caller's organization manage billing. Org admins only. Grants no workspace access.","operationId":"grant_billing_manager_subscription_billing_managers__user_id__put","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Subscription","Subscription"],"summary":"Revoke Billing Manager","description":"Take billing management back from a member. Org admins only. Idempotent.","operationId":"revoke_billing_manager_subscription_billing_managers__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/upgrade-nudges/next":{"get":{"tags":["Upgrade Nudges","Upgrade Nudges"],"summary":"Next Nudge","description":"The banner to show the caller now, or ``{\"nudge\": null}``.","operationId":"next_nudge_upgrade_nudges_next_get","parameters":[{"name":"surface","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Surface"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/upgrade-nudges/{nudge_key}/shown":{"post":{"tags":["Upgrade Nudges","Upgrade Nudges"],"summary":"Nudge Shown","description":"The banner was rendered: sets first_shown_at when absent and last_shown_at to now.","operationId":"nudge_shown_upgrade_nudges__nudge_key__shown_post","parameters":[{"name":"nudge_key","in":"path","required":true,"schema":{"type":"string","title":"Nudge Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/upgrade-nudges/{nudge_key}/clicked":{"post":{"tags":["Upgrade Nudges","Upgrade Nudges"],"summary":"Nudge Clicked","description":"The Compare plans action was clicked: sets last_clicked_at to now.","operationId":"nudge_clicked_upgrade_nudges__nudge_key__clicked_post","parameters":[{"name":"nudge_key","in":"path","required":true,"schema":{"type":"string","title":"Nudge Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/upgrade-nudges/{nudge_key}/dismissed":{"post":{"tags":["Upgrade Nudges","Upgrade Nudges"],"summary":"Nudge Dismissed","description":"The Not now action was clicked: sets last_dismissed_at and adds one to dismiss_count in the same operation.","operationId":"nudge_dismissed_upgrade_nudges__nudge_key__dismissed_post","parameters":[{"name":"nudge_key","in":"path","required":true,"schema":{"type":"string","title":"Nudge Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/stripe":{"post":{"tags":["Webhooks","Webhooks"],"summary":"Stripe Webhook","description":"Handle Stripe webhook events.\n\nEvents handled:\n- customer.subscription.created: New subscription created\n- checkout.session.completed: Paid subscription checkout (activates its onboarding session)\n- customer.subscription.updated: Subscription updated (upgrade/downgrade)\n- customer.subscription.deleted: Subscription cancelled\n- invoice.payment_succeeded: Payment successful\n- invoice.payment_failed: Payment failed\n\nExactly-once per event id (BILL-3, ``stripe_event_store``): a replay of a\nhandled event is a 200 no-op, a delivery that finds another one in flight\ngets 409, a handler failure returns 500 and leaves the event reclaimable.","operationId":"stripe_webhook_webhooks_stripe_post","parameters":[{"name":"stripe-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/webhooks/clerk":{"post":{"tags":["Webhooks","Webhooks"],"summary":"Clerk Webhook","description":"Handle Clerk user and organization lifecycle webhook events.\n\nUser events (PLAT-IDP-SYNC-1):\n- user.created: Provision Mongo user with roles=[user] (no legacy-role inheritance)\n- user.updated: Sync email (a primary switch arrives here), name, clerk_synced_at, and disable on banned=True\n- user.deleted: Disable local user + revoke all tokens\n- email.created / email.updated: not handled (Clerk's email.created is an outbound message, not an address change)\n- session.created: Update clerk_synced_at (last-activity tracking)\n- session.revoked / session.ended / session.removed: Revoke the user's service refresh tokens\n\nOrganization events (CLERK-BILLING-1 Phase A1):\n- organization.created: Create Mongo tenant row linked to the Clerk org\n- organization.updated: Sync org name changes to the Mongo tenant row\n- organization.deleted: Deactivate the Mongo tenant row\n- organizationMembership.created: Record user joining an org\n- organizationMembership.updated: Update user role within an org\n- organizationMembership.deleted: Remove membership + revoke tokens\n\nRequires CLERK_WEBHOOK_SECRET environment variable (format: whsec_...).\nAll events are idempotent via Svix-Id deduplication.","operationId":"clerk_webhook_webhooks_clerk_post","parameters":[{"name":"svix-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Svix-Id"}},{"name":"svix-timestamp","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Svix-Timestamp"}},{"name":"svix-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Svix-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/memory/link":{"post":{"tags":["Links","Links"],"summary":"Link Memories","description":"Create a link between two memory items.\n\nRequires authentication and validates memory ownership with tenant isolation.","operationId":"link_memories_memory_link_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/edge":{"post":{"tags":["Links","Links"],"summary":"Add Edge","description":"Add a direct edge between two nodes in the graph.\n\nThis is a lower-level operation than link() - it creates a raw edge\nwith custom properties. Use link() for standard memory linking.\n\nRequires authentication and validates memory ownership with tenant isolation.","operationId":"add_edge_memory_edge_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_add_edge_memory_edge_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/{item_id}/links":{"get":{"tags":["Links","Links"],"summary":"Get Memory Links","description":"Get all links for a memory item.\n\nRequires authentication. SecureSmartMemory handles tenant isolation.","operationId":"get_memory_links_memory__item_id__links_get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"memory_type","in":"query","required":false,"schema":{"type":"string","default":"semantic","title":"Memory Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/{item_id}/neighbors":{"get":{"tags":["Links","Links"],"summary":"Get Memory Neighbors","description":"Get neighboring memory items in the graph.\n\nRequires authentication. SecureSmartMemory handles tenant isolation.","operationId":"get_memory_neighbors_memory__item_id__neighbors_get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/users":{"get":{"tags":["Superadmin","Superadmin"],"summary":"List All Users","description":"List all users across all tenants (ADMIN-USERS-ACTIVITY-1: user_class filter, activity fields, optional sort).","operationId":"list_all_users_superadmin_users_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"user_class","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(customer|demo|internal|agent)$"},{"type":"null"}],"title":"User Class"}},{"name":"cohort","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(signups_7d|signups_30d|never_logged_in|active_7d|churned)$"},{"type":"null"}],"title":"Cohort"}},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(last_login|login_count|created_at)$"},{"type":"null"}],"title":"Sort By"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","default":"desc","title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/users/activity":{"get":{"tags":["Superadmin","Superadmin"],"summary":"Get User Activity","description":"PLAT-ANALYTICS-2: User activity summary across all tenants, sorted by engagement.","operationId":"get_user_activity_superadmin_users_activity_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","pattern":"^(last_login|login_count|created_at)$","default":"last_login","title":"Sort By"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","default":"desc","title":"Order"}},{"name":"user_class","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(customer|demo|internal|agent)$"},{"type":"null"}],"title":"User Class"}},{"name":"cohort","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(signups_7d|signups_30d|never_logged_in|active_7d|churned)$"},{"type":"null"}],"title":"Cohort"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/users/summary":{"get":{"tags":["Superadmin","Superadmin"],"summary":"Users Summary","description":"Signup and activity counts for customers (one aggregation).\n\nOnly customers carry the cohort counts. Demo and internal accounts report their head count for the Admin section\nbadges, and agents appear nowhere.","operationId":"users_summary_superadmin_users_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/superadmin/users/{user_id}/class":{"patch":{"tags":["Superadmin","Superadmin"],"summary":"Move User Class","description":"ADMIN-USER-CLASS-DEMO-1: move a user to the customer, demo or internal bucket (persists `users.user_class`).","operationId":"move_user_class_superadmin_users__user_id__class_patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserClassMove"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/users/{user_id}":{"get":{"tags":["Superadmin","Superadmin"],"summary":"Get User","description":"Get detailed user information.","operationId":"get_user_superadmin_users__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Superadmin","Superadmin"],"summary":"Update User","description":"Update user properties (partial merge: roles, subscription, active status).","operationId":"update_user_superadmin_users__user_id__patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Updates"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Superadmin","Superadmin"],"summary":"Delete User","description":"Offboard a user: the user row and its API keys, its tenant when it was the last non-agent member, its Clerk account.\n\nOrder (ADMIN-OFFBOARD-CASCADE-1): tenant purge first, then the user row, then Clerk. A purge that raises stops the\ndelete before the user row is removed by this route and before Clerk is touched. Clerk runs last because a\nfailure there must not undo or block the local delete; it is reported as ``clerk_deleted: false``. A purge that\nraises (500) or returns ``store_failures`` (502) after it already removed the user row queues the pending Clerk\ndelete before answering, since a retry of this route is 404 by then (ADMIN-OFFBOARD-PURGE-FAIL-RESERVE-1 and -502-1,\n``_stop_after_failed_purge``).","operationId":"delete_user_superadmin_users__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/users/{user_id}/offboard-preview":{"get":{"tags":["Superadmin","Superadmin"],"summary":"Offboard Preview","description":"What ``DELETE /superadmin/users/{user_id}`` will remove. Read-only; the delete runs the same plan.","operationId":"offboard_preview_superadmin_users__user_id__offboard_preview_get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/pending-clerk-deletes":{"get":{"tags":["Superadmin","Superadmin"],"summary":"List Pending Clerk Deletes","description":"Admin-deleted users whose Clerk account is still alive: the ids a delete (single or bulk) could not finish.\n\n``pending`` rows are retried by the IdP drift sweep with backoff; ``exhausted`` rows need a manual delete in the\nClerk dashboard. Local user ids only: never the Clerk id, an email or a token.","operationId":"list_pending_clerk_deletes_superadmin_pending_clerk_deletes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/superadmin/pending-clerk-deletes/{user_id}/clear":{"post":{"tags":["Superadmin","Superadmin"],"summary":"Clear Pending Clerk Delete","description":"Clear one ``exhausted`` (or status-less) pending Clerk delete (ADMIN-OFFBOARD-CLERK-RETRY-FU-1), by local user id.\n\nThe row keeps refusing that person's sign-in until Clerk confirms the account is gone, so it is removed only after a\nlive lookup says so (Clerk's own 404, see ``clerk_user_exists``). Fail closed: the account still exists is 409, Clerk\ncould not answer is 503, and in both the row is left untouched. A row still ``pending`` is the sweep's, not the\noperator's: 409, Clerk is not asked, and so is a row that turned ``pending`` while Clerk was asked.","operationId":"clear_pending_clerk_delete_superadmin_pending_clerk_deletes__user_id__clear_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/offboard-conflicts":{"get":{"tags":["Superadmin","Superadmin"],"summary":"List Offboard Conflicts","description":"Clerk offboards whose tenant purge stored data refuses (COMMON-OFFBOARD-PERMANENT-CONFLICT-1).\n\nNo retry clears these: an id of the tenant is now another tenant's, or one id names two stored rows. Nothing was\ndeleted. Repair the ownership data, then ``POST .../{tenant_id}/repair``. Local ids only, never the Clerk id.","operationId":"list_offboard_conflicts_superadmin_offboard_conflicts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/superadmin/offboard-conflicts/{tenant_id}/repair":{"post":{"tags":["Superadmin","Superadmin"],"summary":"Repair Offboard Conflict","description":"Re-run a conflicting offboard purge after the operator repaired the ownership data.\n\n``release_ids``: kept ids of the purge another tenant provably owns now (a stored row stamped with a different,\nnon-empty tenant); they leave the purge's kept inventory first. Fail closed: an id not both kept and owned by another\ntenant now (an unstamped or unknown id is not) is 409 and nothing changes. The purge proves every id again: still\nrefused is 409 (the conflict stays), a transient store failure 503 (retry), done 200. A refusal that mixes permanent\nand transient failures parks as a conflict (any permanent label wins; the transient part clears on the re-run).","operationId":"repair_offboard_conflict_superadmin_offboard_conflicts__tenant_id__repair_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OffboardConflictRepair"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/users/{user_id}/impersonate":{"post":{"tags":["Superadmin","Superadmin"],"summary":"Impersonate User","description":"Generate an impersonation token for a user.","operationId":"impersonate_user_superadmin_users__user_id__impersonate_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/tenants":{"get":{"tags":["Superadmin","Superadmin"],"summary":"List All Tenants","description":"List all tenants.","operationId":"list_all_tenants_superadmin_tenants_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/tenants/{tenant_id}":{"get":{"tags":["Superadmin","Superadmin"],"summary":"Get Tenant","description":"Get detailed tenant information.","operationId":"get_tenant_superadmin_tenants__tenant_id__get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Superadmin","Superadmin"],"summary":"Update Tenant","description":"ADMIN-TENANT-EDIT-1: edit a tenant's name, subscription tier (with its quota limits) and active flag.\n\nOnly the path names the tenant. Every changed field is audited with its before and after value. No Stripe call:\nthe tier set here is a platform entitlement, not a billing change, so a tier change on a tenant with a Stripe\nsubscription is refused with 409 before anything is written (name and active stay editable).","operationId":"update_tenant_superadmin_tenants__tenant_id__patch","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Updates"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Superadmin","Superadmin"],"summary":"Delete Tenant","description":"Delete a tenant and all associated data across MongoDB, FalkorDB, and Redis.","operationId":"delete_tenant_superadmin_tenants__tenant_id__delete","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/tenants/{tenant_id}/stats":{"get":{"tags":["Superadmin","Superadmin"],"summary":"Get Tenant Stats","description":"Get usage statistics for a tenant.","operationId":"get_tenant_stats_superadmin_tenants__tenant_id__stats_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/stats":{"get":{"tags":["Superadmin","Superadmin"],"summary":"Get System Stats","description":"Get system-wide statistics.","operationId":"get_system_stats_superadmin_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/superadmin/health":{"get":{"tags":["Superadmin","Superadmin"],"summary":"Get System Health","description":"Get infrastructure health status with latency measurements.","operationId":"get_system_health_superadmin_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/superadmin/diagnostics/bundle":{"get":{"tags":["Superadmin","Superadmin"],"summary":"Diagnostics Bundle","description":"Stream the fixed, metadata-only Platform diagnostics archive to a superadmin.","operationId":"diagnostics_bundle_superadmin_diagnostics_bundle_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/superadmin/platform/licenses":{"get":{"tags":["Superadmin","Superadmin"],"summary":"List Platform Licenses","description":"List direct Platform licenses without returning verifier material.","operationId":"list_platform_licenses_superadmin_platform_licenses_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Superadmin","Superadmin"],"summary":"Mint Platform License","description":"Mint one direct Platform key and return its secret exactly once.","operationId":"mint_platform_license_superadmin_platform_licenses_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"}}}}}}},"/superadmin/platform/installs":{"get":{"tags":["Superadmin","Superadmin"],"summary":"Platform Installs Summary","description":"Summarize verified direct and unverified Marketplace platform installs.","operationId":"platform_installs_summary_superadmin_platform_installs_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/billing":{"get":{"tags":["Superadmin","Superadmin"],"summary":"Get Billing Overview","description":"Get billing overview with real subscription data.","operationId":"get_billing_overview_superadmin_billing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/superadmin/feature-flags":{"get":{"tags":["Superadmin","Superadmin"],"summary":"Get Feature Flags","description":"Get all feature flags from database. Read-only, never seeds (M9).","operationId":"get_feature_flags_superadmin_feature_flags_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/superadmin/feature-flags/{flag_name}":{"patch":{"tags":["Superadmin","Superadmin"],"summary":"Update Feature Flag","description":"Update a feature flag (partial merge).","operationId":"update_feature_flag_superadmin_feature_flags__flag_name__patch","parameters":[{"name":"flag_name","in":"path","required":true,"schema":{"type":"string","title":"Flag Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Updates"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/activity":{"get":{"tags":["Superadmin","Superadmin"],"summary":"Get Activity Logs","description":"Get platform activity logs with filtering and pagination.","operationId":"get_activity_logs_superadmin_activity_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/database/stats":{"get":{"tags":["Superadmin","Superadmin"],"summary":"Get Database Stats","description":"Get real database statistics from all storage backends.","operationId":"get_database_stats_superadmin_database_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/superadmin/database/maintenance":{"post":{"tags":["Superadmin","Superadmin"],"summary":"Run Database Maintenance","description":"Run database maintenance operations.","operationId":"run_database_maintenance_superadmin_database_maintenance_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Operation"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/tenants/{tenant_id}/orphaned-notes":{"get":{"tags":["Superadmin","Superadmin"],"summary":"Get Tenant Orphaned Notes","description":"Find orphaned notes (no connections) in a specific tenant's graph.","operationId":"get_tenant_orphaned_notes_superadmin_tenants__tenant_id__orphaned_notes_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/tenants/{tenant_id}/prune":{"post":{"tags":["Superadmin","Superadmin"],"summary":"Prune Tenant Memories","description":"Prune old or unused memories in a specific tenant's graph.","operationId":"prune_tenant_memories_superadmin_tenants__tenant_id__prune_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"strategy","in":"query","required":false,"schema":{"type":"string","description":"Pruning strategy: old, unused, orphaned","default":"old","title":"Strategy"},"description":"Pruning strategy: old, unused, orphaned"},{"name":"days","in":"query","required":false,"schema":{"type":"integer","description":"Age threshold in days","default":365,"title":"Days"},"description":"Age threshold in days"},{"name":"dry_run","in":"query","required":false,"schema":{"type":"boolean","description":"Preview without deleting","default":true,"title":"Dry Run"},"description":"Preview without deleting"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/tenants/{tenant_id}/old-notes":{"get":{"tags":["Superadmin","Superadmin"],"summary":"Get Tenant Old Notes","description":"Find notes older than N days in a specific tenant's graph.","operationId":"get_tenant_old_notes_superadmin_tenants__tenant_id__old_notes_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","description":"Age threshold in days","default":365,"title":"Days"},"description":"Age threshold in days"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/tenants/{tenant_id}/summary":{"get":{"tags":["Superadmin","Superadmin"],"summary":"Get Tenant Summary","description":"Generate a summary of a specific tenant's memory contents.","operationId":"get_tenant_summary_superadmin_tenants__tenant_id__summary_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"max_items","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum items to include in summary","default":10,"title":"Max Items"},"description":"Maximum items to include in summary"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/tenants/{tenant_id}/reflect":{"get":{"tags":["Superadmin","Superadmin"],"summary":"Get Tenant Reflection","description":"Reflect on memory patterns and insights for a specific tenant.","operationId":"get_tenant_reflection_superadmin_tenants__tenant_id__reflect_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"top_k","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Number of top items to reflect on","default":5,"title":"Top K"},"description":"Number of top items to reflect on"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/latency/endpoints":{"get":{"tags":["Superadmin","Superadmin"],"summary":"Latency Endpoints","description":"Per-endpoint volume, error rate and upper-bound latency percentiles.","operationId":"latency_endpoints_superadmin_latency_endpoints_get","parameters":[{"name":"window_seconds","in":"query","required":false,"schema":{"type":"integer","maximum":604800,"minimum":300,"default":3600,"title":"Window Seconds"}},{"name":"service","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service"}},{"name":"metric","in":"query","required":false,"schema":{"type":"string","default":"total","title":"Metric"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/latency/timeline":{"get":{"tags":["Superadmin","Superadmin"],"summary":"Latency Timeline","description":"One 5-minute bucket per row for a single endpoint.","operationId":"latency_timeline_superadmin_latency_timeline_get","parameters":[{"name":"route","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Route"}},{"name":"window_seconds","in":"query","required":false,"schema":{"type":"integer","maximum":604800,"minimum":300,"default":3600,"title":"Window Seconds"}},{"name":"method","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"}},{"name":"service","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service"}},{"name":"metric","in":"query","required":false,"schema":{"type":"string","default":"total","title":"Metric"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/lite/installs":{"get":{"tags":["Superadmin","Superadmin"],"summary":"Lite Installs Summary","description":"DIST-LITE-UPDATE-CHECK-1: distinct Lite installs seen in the last N days.\n\nReads the append-only ``lite_pings`` log written by the anonymous update-check\nroute. \"Installs\" always means DISTINCT ``install_id`` inside the window, so a\nprocess that restarts fifty times counts once, and ``pings`` is the only raw event\ncount. Licensees are resolved from the redistribution agreements at read time,\nand a key that matches no agreement shows ``licensee: null`` rather than being\ndropped. Someone shipping with a key we never issued is exactly the row worth\nseeing.","operationId":"lite_installs_summary_superadmin_lite_installs_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/logs":{"get":{"tags":["Admin Logs","Admin Logs"],"summary":"List Admin Logs","description":"List admin log records with optional filters and pagination.","operationId":"list_admin_logs_admin_logs_get","parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"level","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Level"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Until"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/logs/export":{"get":{"tags":["Admin Logs","Admin Logs"],"summary":"Export Admin Logs","description":"Stream log records as NDJSON. Filename includes the requested time range.","operationId":"export_admin_logs_admin_logs_export_get","parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"level","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Level"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Until"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/logs/stats":{"get":{"tags":["Admin Logs","Admin Logs"],"summary":"Get Admin Log Stats","description":"Return counts for the last hour: errors, warnings, total, auth_failures.","operationId":"get_admin_log_stats_admin_logs_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/metrics":{"post":{"tags":["OTLP Receiver"],"summary":"Receive Metrics","description":"Receive OTLP metrics from Claude Code.","operationId":"receive_metrics_v1_metrics_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/logs":{"post":{"tags":["OTLP Receiver"],"summary":"Receive Logs","description":"Receive OTLP logs (events) from Claude Code.","operationId":"receive_logs_v1_logs_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/admin/orphaned-notes":{"get":{"tags":["Admin","Admin"],"summary":"Get Orphaned Notes","description":"Find orphaned notes (notes with no connections).\n\nReturns notes that have no incoming or outgoing links,\nwhich may indicate isolated knowledge that needs attention.\n\nRequires admin privileges.","operationId":"get_orphaned_notes_memory_admin_orphaned_notes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/admin/prune":{"post":{"tags":["Admin","Admin"],"summary":"Prune Old Memories","description":"Prune old or unused memories.\n\nStrategies:\n- old: Remove memories older than N days\n- unused: Remove memories not accessed in N days\n- orphaned: Remove orphaned notes\n\nRequires admin privileges.","operationId":"prune_old_memories_memory_admin_prune_post","parameters":[{"name":"strategy","in":"query","required":false,"schema":{"type":"string","description":"Pruning strategy: old, unused, orphaned","default":"old","title":"Strategy"},"description":"Pruning strategy: old, unused, orphaned"},{"name":"days","in":"query","required":false,"schema":{"type":"integer","description":"Age threshold in days","default":365,"title":"Days"},"description":"Age threshold in days"},{"name":"dry_run","in":"query","required":false,"schema":{"type":"boolean","description":"Preview without deleting","default":true,"title":"Dry Run"},"description":"Preview without deleting"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/admin/old-notes":{"get":{"tags":["Admin","Admin"],"summary":"Find Old Notes","description":"Find notes older than N days.\n\nUseful for identifying stale content that may need\nreview or archival.\n\nRequires admin privileges.","operationId":"find_old_notes_memory_admin_old_notes_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","description":"Age threshold in days","default":365,"title":"Days"},"description":"Age threshold in days"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/admin/self-monitor":{"get":{"tags":["Admin","Admin"],"summary":"Self Monitor","description":"Get self-monitoring metrics.\n\nReturns system health metrics, performance stats,\nand operational insights.\n\nRequires admin privileges.","operationId":"self_monitor_memory_admin_self_monitor_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/admin/reflect":{"get":{"tags":["Admin","Admin"],"summary":"Reflect On Memories","description":"Reflect on memory patterns and insights.\n\nAnalyzes memory content to identify patterns, themes,\nand potential connections. Useful for understanding\nknowledge structure.\n\nReturns:\n    - Key themes and patterns\n    - Frequently accessed memories\n    - Suggested connections","operationId":"reflect_on_memories_memory_admin_reflect_get","parameters":[{"name":"top_k","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Number of top items to reflect on","default":5,"title":"Top K"},"description":"Number of top items to reflect on"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/admin/summarize":{"get":{"tags":["Admin","Admin"],"summary":"Summarize Memories","description":"Generate a summary of memory contents.\n\nCreates a high-level overview of stored memories,\nincluding key topics, recent additions, and\nknowledge distribution.\n\nReturns:\n    - Topic distribution\n    - Recent memory summary\n    - Memory type breakdown","operationId":"summarize_memories_memory_admin_summarize_get","parameters":[{"name":"max_items","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum items to include in summary","default":10,"title":"Max Items"},"description":"Maximum items to include in summary"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/admin/stats":{"get":{"tags":["Admin","Admin"],"summary":"Get System Stats","description":"Get comprehensive system statistics.\n\nReturns detailed stats about memory usage, storage,\nand system health.\n\nRequires admin privileges.","operationId":"get_system_stats_memory_admin_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/analytics/status":{"get":{"tags":["Memory Analytics","Memory Analytics"],"summary":"Analytics Status","description":"Return analytics feature status and environment capabilities.","operationId":"analytics_status_memory_analytics_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/analytics/origins":{"get":{"tags":["Memory Analytics","Memory Analytics"],"summary":"Get Origin Distribution","description":"Return distribution of memory origins, optionally filtered and grouped.\n\nRequires authentication and operates on user-scoped data.","operationId":"get_origin_distribution_memory_analytics_origins_get","parameters":[{"name":"prefix","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by origin prefix","title":"Prefix"},"description":"Filter by origin prefix"},{"name":"group_by","in":"query","required":false,"schema":{"type":"string","description":"Group by: origin, prefix, or tier","default":"origin","title":"Group By"},"description":"Group by: origin, prefix, or tier"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/analytics/drift":{"get":{"tags":["Memory Analytics","Memory Analytics"],"summary":"Detect Concept Drift","description":"Run concept drift detection over the specified time window (in days).\n\nRequires authentication and operates on user-scoped data.","operationId":"detect_concept_drift_memory_analytics_drift_get","parameters":[{"name":"time_window_days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Time Window Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/analytics/bias":{"post":{"tags":["Memory Analytics","Memory Analytics"],"summary":"Detect Bias","description":"Run bias detection. Optional toggles can enable sentiment/topic analysis.\n\nRequires authentication and operates on user-scoped data.","operationId":"detect_bias_memory_analytics_bias_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BiasRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/anchors/create":{"post":{"tags":["Anchors","Anchors"],"summary":"Create Anchor","description":"Create a new anchor.","operationId":"create_anchor_memory_anchors_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAnchorRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/anchors/list":{"get":{"tags":["Anchors","Anchors"],"summary":"List Anchors","description":"List active anchors for a session.","operationId":"list_anchors_memory_anchors_list_get","parameters":[{"name":"session_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Session Id"}},{"name":"anchor_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anchor Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/anchors/clear":{"delete":{"tags":["Anchors","Anchors"],"summary":"Clear Anchors","description":"Clear (deactivate) anchors for a session.","operationId":"clear_anchors_memory_anchors_clear_delete","parameters":[{"name":"session_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Session Id"}},{"name":"anchor_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anchor Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/anchors/graduate":{"post":{"tags":["Anchors","Anchors"],"summary":"Graduate Anchors","description":"Graduate active anchors to decision records.","operationId":"graduate_anchors_memory_anchors_graduate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/anchors/check-drift":{"post":{"tags":["Anchors","Anchors"],"summary":"Check Drift","description":"Check active anchors for drift against recent outputs.","operationId":"check_drift_memory_anchors_check_drift_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckDriftRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/api-keys":{"get":{"tags":["Api_keys","API Keys"],"summary":"List Api Keys","description":"List all API keys for the current user.\n\nReturns metadata about each key, but not the actual key values.","operationId":"list_api_keys_memory_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/APIKeyResponse"},"type":"array","title":"Response List Api Keys Memory Api Keys Get"}}}}}},"post":{"tags":["Api_keys","API Keys"],"summary":"Create Api Key","description":"Create a new API key for programmatic access.\n\nThe API key is only shown once and cannot be retrieved later.\nStore it securely.","operationId":"create_api_key_memory_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/api-keys/{key_id}":{"delete":{"tags":["Api_keys","API Keys"],"summary":"Revoke Api Key","description":"Revoke (delete) an API key.\n\nThis action cannot be undone. The key will immediately stop working.","operationId":"revoke_api_key_memory_api_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/archive/store":{"post":{"tags":["Archive","Archive"],"summary":"Store Archive","description":"Persist a conversation artifact and return its URI and content hash.","operationId":"store_archive_memory_archive_store_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveStoreRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/archive/{archive_uri}":{"get":{"tags":["Archive","Archive"],"summary":"Retrieve Archive","description":"Retrieve a previously stored archive artifact by URI.","operationId":"retrieve_archive_memory_archive__archive_uri__get","parameters":[{"name":"archive_uri","in":"path","required":true,"schema":{"type":"string","title":"Archive Uri"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ask":{"post":{"tags":["Ask","Ask"],"summary":"Ask","description":"Answer a question from stored memories and their one-hop graph relations.\n\n400 on a blank question or an out-of-range limit, a caller error that must surface\nrather than be silently normalized. 502 when the configured LLM errors or returns\nnothing: there is deliberately no fallback answer, because a fabricated one is\nindistinguishable from a grounded one at the point it is read.","operationId":"ask_memory_ask_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/audit/verify":{"get":{"tags":["Audit","Audit"],"summary":"Audit Verify","description":"Verify chain integrity for one item or the whole workspace (ENTERPRISE).","operationId":"audit_verify_memory_audit_verify_get","parameters":[{"name":"item_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Verify a single item's chain instead of the workspace","title":"Item Id"},"description":"Verify a single item's chain instead of the workspace"},{"name":"item_limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Workspace mode: manifest items verified per call","default":100,"title":"Item Limit"},"description":"Workspace mode: manifest items verified per call"},{"name":"item_offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Workspace mode: pagination offset into the manifest","default":0,"title":"Item Offset"},"description":"Workspace mode: pagination offset into the manifest"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/beta/nda/accept":{"post":{"tags":["BetaNDA","BetaNDA"],"summary":"Accept Nda","description":"Record click-wrap acceptance of the current NDA version.\n\nBody: ``{\"version\": \"<current>\"}``. A mismatched version is rejected with\n409 so a stale client cannot record acceptance of text the user never saw.\nThe consent always belongs to the signed-in caller. A body that also names a\n``user_id``, ``tenant_id`` or ``workspace_id`` other than the caller's own is\nrefused with 400 ``foreign_target`` and nothing is written.","operationId":"accept_nda_memory_beta_nda_accept_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"}}}}}}},"/memory/beta/nda/status":{"get":{"tags":["BetaNDA","BetaNDA"],"summary":"Nda Status","description":"Whether the current user has accepted the current NDA version.","operationId":"nda_status_memory_beta_nda_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/beta/nda/text":{"get":{"tags":["BetaNDA","BetaNDA"],"summary":"Nda Text","description":"The exact versioned NDA markdown to render in the gate.","operationId":"nda_text_memory_beta_nda_text_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/import/chat-export":{"post":{"tags":["Chat Import","Chat Import"],"summary":"Import Chat Export","description":"Import a ChatGPT or Claude conversation export into the caller's workspace.\n\nConversations are ingested through the standard conversation pipeline, so\nentities, relations and links are extracted exactly as they would be for a\nlive conversation. Items carry ``origin=import:chatgpt_export`` or\n``import:claude_export``: tier 1, so they are recallable, and dedupe-eligible,\nso re-uploading a later export updates the overlap instead of duplicating it.\n\nOne request imports at most ``max_conversations`` conversations, longest first. A larger export is\nimported in batches: upload the same file again with ``offset`` set to the previous response's\n``next_offset`` until it is null. Each conversation is stored once, so repeating or overlapping\nbatches never duplicate it.\n\nA Claude export is a manifest plus one zip per kind of data. Upload the manifest first for a checklist with the\ndownload links, then upload each zip in any order. Conversations, memories and projects are imported. Frames,\ndesign chats, Claude Code cloud data and account metadata are counted and named but not imported yet.\n\nReturns 400 for an unreadable export, 413 for an oversized upload, 422 for a negative offset.","operationId":"import_chat_export_memory_import_chat_export_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_chat_export_memory_import_chat_export_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/import/chat-export/formats":{"get":{"tags":["Chat Import","Chat Import"],"summary":"List Chat Export Formats","description":"List supported chat-export formats and how a user obtains each export.\n\nZip only the JSON files (conversations-*.json): the export folder as a whole is over the 200 MB upload cap.","operationId":"list_chat_export_formats_memory_import_chat_export_formats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatImportFormats"}}}}}}},"/memory/clustering/run":{"post":{"tags":["Clustering","Clustering"],"summary":"Trigger Clustering","description":"Run entity clustering/deduplication for the workspace.\n\nThis operation identifies and merges duplicate entities based on vector similarity.\nAll operations are workspace-scoped to ensure tenant isolation.\n\n**Parameters:**\n- `distance_threshold`: Similarity threshold (0.0-1.0, default 0.1)\n- `dry_run`: If true, preview clusters without merging\n\n**Returns:**\n- `merged_count`: Number of entities merged\n- `clusters_found`: Number of clusters identified\n- `total_entities`: Total entities processed\n- `execution_time`: Time taken in seconds\n- `clusters`: Cluster details (only if dry_run=True)","operationId":"trigger_clustering_memory_clustering_run_post","parameters":[{"name":"distance_threshold","in":"query","required":false,"schema":{"type":"number","default":0.1,"title":"Distance Threshold"}},{"name":"dry_run","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Dry Run"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/clustering/stats":{"get":{"tags":["Clustering","Clustering"],"summary":"Get Stats","description":"Get clustering statistics for the workspace.\n\nReturns information about entities, potential duplicates, and clustering history.\n\n**Returns:**\n- `total_entities`: Total entities in workspace\n- `potential_duplicates`: Estimated number of duplicates\n- `last_clustering_run`: Timestamp of last clustering run\n- `implemented`: Always `false` because statistics gathering is not implemented yet.\n  The counts above are placeholders, NOT real (empty) workspace data.","operationId":"get_stats_memory_clustering_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/code/index":{"post":{"tags":["Code","Code"],"summary":"Index Code","description":"Publish a client bundle only after validation and the existing repo cap.","operationId":"index_code_memory_code_index_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeIndexRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/code/search":{"get":{"tags":["Code","Code"],"summary":"Search Code","description":"Search code entities by name with optional type and repo filters.","operationId":"search_code_memory_code_search_get","parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Search string (partial name match, or natural language when semantic=true)","title":"Query"},"description":"Search string (partial name match, or natural language when semantic=true)"},{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter: module | class | function | route | test","title":"Entity Type"},"description":"Filter: module | class | function | route | test"},{"name":"repo","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by repository name","title":"Repo"},"description":"Filter by repository name"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max results","default":20,"title":"Limit"},"description":"Max results"},{"name":"semantic","in":"query","required":false,"schema":{"type":"boolean","description":"Use vector similarity search instead of name substring match","default":false,"title":"Semantic"},"description":"Use vector similarity search instead of name substring match"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/code/dependencies":{"get":{"tags":["Code","Code"],"summary":"Get Code Dependencies","description":"Trace code dependencies for an entity.\n\nReturns the root entity and its dependents (what uses it) and/or\ndependencies (what it uses), controlled by ``direction``.\n\nCODE-INDEXER-HARDEN-1 F24: when the name matches more than one entity the\nresponse is HTTP 409 with every candidate (``detail.status == \"ambiguous\"``).\nPass ``file_path`` or ``item_id`` to choose one.","operationId":"get_code_dependencies_memory_code_dependencies_get","parameters":[{"name":"entity_name","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Entity name, case-insensitive. Matches the stored name or qualified name exactly, or as a dotted suffix (so 'run' finds 'Svc.run'). More than one match returns 409 with the candidates.","title":"Entity Name"},"description":"Entity name, case-insensitive. Matches the stored name or qualified name exactly, or as a dotted suffix (so 'run' finds 'Svc.run'). More than one match returns 409 with the candidates."},{"name":"direction","in":"query","required":false,"schema":{"$ref":"#/components/schemas/DependencyDirection","description":"Traversal direction","default":"both"},"description":"Traversal direction"},{"name":"repo","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by repository name","title":"Repo"},"description":"Filter by repository name"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Max related entities per direction","default":50,"title":"Limit"},"description":"Max related entities per direction"},{"name":"file_path","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Checkout-relative file path, to choose one of several same-named entities","title":"File Path"},"description":"Checkout-relative file path, to choose one of several same-named entities"},{"name":"item_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact item_id of one candidate from a previous 409 response","title":"Item Id"},"description":"Exact item_id of one candidate from a previous 409 response"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/code/dead-code":{"get":{"tags":["Code","Code"],"summary":"Find Dead Code","description":"Find potentially dead functions, components and hooks in an indexed codebase.\n\nA function is considered \"dead\" when:\n- Nothing else calls, tests or references it by value (no incoming CALLS, TESTS or REFERENCES edges)\n- It is not a test function, route handler, or dunder method\n- It has no entry-point decorators (route, click, celery, etc.)\n\nCODE-INDEXER-HARDEN-1 U6 opt-in options (both default false, so existing callers get the same results):\n``include_exported`` also reports exported functions, and ``production_only`` counts only callers in non-test\nfiles. The response echoes the effective options under ``options``.\n\nReturns a list of potentially unused callable entities sorted by file path.","operationId":"find_dead_code_memory_code_dead_code_get","parameters":[{"name":"repo","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Repository name to scan","title":"Repo"},"description":"Repository name to scan"},{"name":"exclude_decorators","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated additional decorator names to exclude (e.g. 'celery,dramatiq')","title":"Exclude Decorators"},"description":"Comma-separated additional decorator names to exclude (e.g. 'celery,dramatiq')"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Max results","default":50,"title":"Limit"},"description":"Max results"},{"name":"include_exported","in":"query","required":false,"schema":{"type":"boolean","description":"Also report exported functions with no counted caller (entry points, unknown reachability, live class members and TS interface/enum stay excluded)","default":false,"title":"Include Exported"},"description":"Also report exported functions with no counted caller (entry points, unknown reachability, live class members and TS interface/enum stay excluded)"},{"name":"production_only","in":"query","required":false,"schema":{"type":"boolean","description":"Only callers in non-test files count: drop TESTS edges and edges from entities in test files (files that define a parser-classified test)","default":false,"title":"Production Only"},"description":"Only callers in non-test files count: drop TESTS edges and edges from entities in test files (files that define a parser-classified test)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/code/context":{"get":{"tags":["Code","Code"],"summary":"Get Code Context","description":"Fetch a code entity and its 1-hop graph context in a single response.\n\nReturns the entity itself plus categorised neighbour lists:\n\n- **calls**: entities this entity calls (outgoing CALLS edges)\n- **called_by**: entities that call this one (incoming CALLS edges)\n- **tests**: test entities that cover this entity (incoming TESTS edges)\n- **inherits**: classes this entity inherits from (outgoing INHERITS edges)\n- **defines**: entities defined inside this one (outgoing DEFINES edges)\n\nEmpty lists are returned for edge categories with no neighbours.\n\nCODE-INDEXER-HARDEN-1 F24: a name matching more than one entity is HTTP 409\nwith every candidate. F29: ``entity`` carries ``source_dirty``,\n``source_fingerprint`` and ``head_commit``. An index built from uncommitted\nchanges never reads as fresh against a different revision.","operationId":"get_code_context_memory_code_context_get","parameters":[{"name":"entity_name","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Entity name, case-insensitive. Matches the stored name or qualified name exactly, or as a dotted suffix (so 'run' finds 'Svc.run'). More than one match returns 409 with the candidates.","title":"Entity Name"},"description":"Entity name, case-insensitive. Matches the stored name or qualified name exactly, or as a dotted suffix (so 'run' finds 'Svc.run'). More than one match returns 409 with the candidates."},{"name":"repo","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by repository name","title":"Repo"},"description":"Filter by repository name"},{"name":"current_commit","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Current source revision (git SHA, or the '<sha>-dirty-<fingerprint>' form for uncommitted changes). Marks the entity stale if it differs from the indexed revision","title":"Current Commit"},"description":"Current source revision (git SHA, or the '<sha>-dirty-<fingerprint>' form for uncommitted changes). Marks the entity stale if it differs from the indexed revision"},{"name":"file_path","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Checkout-relative file path, to choose one of several same-named entities","title":"File Path"},"description":"Checkout-relative file path, to choose one of several same-named entities"},{"name":"item_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact item_id of one candidate from a previous 409 response","title":"Item Id"},"description":"Exact item_id of one candidate from a previous 409 response"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/context":{"post":{"tags":["Memory Context","Memory Context"],"summary":"Get Working Context","description":"Return a contract-shaped surfacing response for the current turn.\n\nErrors:\n    400 ``budget_too_small``: ``max_tokens`` too small to fit the\n        smallest mandatory item.","operationId":"get_working_context_memory_context_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/decisions/create":{"post":{"tags":["Decisions","Decisions"],"summary":"Create Decision","description":"Create a new decision with provenance tracking.","operationId":"create_decision_memory_decisions_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDecisionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/decisions":{"get":{"tags":["Decisions","Decisions"],"summary":"List Active Decisions","description":"Get all active decisions, optionally filtered.\n\nWith ``provenance_memory_id`` set, routes to the inverse-provenance query\n(CORE-DECISION-PROVENANCE-LOOKUP-1). All filtering is delegated to the core\nmethod so filter+limit composition is correct. Without it, behaviour is\nunchanged from the original list path.","operationId":"list_active_decisions_memory_decisions_get","parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by domain","title":"Domain"},"description":"Filter by domain"},{"name":"decision_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by decision type","title":"Decision Type"},"description":"Filter by decision type"},{"name":"min_confidence","in":"query","required":false,"schema":{"type":"number","maximum":1.0,"minimum":0.0,"description":"Minimum confidence","default":0.0,"title":"Min Confidence"},"description":"Minimum confidence"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Maximum results","default":50,"title":"Limit"},"description":"Maximum results"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Lifecycle state to return: active (default when omitted), superseded, retracted or pending. A superseded decision is kept in the graph, so this is how the UI reads history rather than only the current belief.","title":"Status"},"description":"Lifecycle state to return: active (default when omitted), superseded, retracted or pending. A superseded decision is kept in the graph, so this is how the UI reads history rather than only the current belief."},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by producing agent id (CORE-AGENT-ATTRIBUTION-1). NULL-valued rows are excluded when set.","title":"Agent Id"},"description":"Filter by producing agent id (CORE-AGENT-ATTRIBUTION-1). NULL-valued rows are excluded when set."},{"name":"provenance_memory_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Inverse-provenance filter (CORE-DECISION-PROVENANCE-LOOKUP-1). When set, returns only active decisions whose provenance subgraph (within max_depth hops) contains this memory id. Combined with the other filters: domain/decision_type/min_confidence are applied **in-query** so the response never silently truncates below `limit` when more matches exist. Unknown or out-of-scope memory ids return an empty list (never 404) to avoid existence leakage.","title":"Provenance Memory Id"},"description":"Inverse-provenance filter (CORE-DECISION-PROVENANCE-LOOKUP-1). When set, returns only active decisions whose provenance subgraph (within max_depth hops) contains this memory id. Combined with the other filters: domain/decision_type/min_confidence are applied **in-query** so the response never silently truncates below `limit` when more matches exist. Unknown or out-of-scope memory ids return an empty list (never 404) to avoid existence leakage."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/decisions/search":{"get":{"tags":["Decisions","Decisions"],"summary":"Search Decisions","description":"Search for active decisions related to a topic.","operationId":"search_decisions_memory_decisions_search_get","parameters":[{"name":"topic","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Search topic","title":"Topic"},"description":"Search topic"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/decisions/pending":{"get":{"tags":["Decisions","Decisions"],"summary":"List Pending Decisions","description":"Get all pending decisions (awaiting more data via residuation).","operationId":"list_pending_decisions_memory_decisions_pending_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Maximum results","default":50,"title":"Limit"},"description":"Maximum results"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/decisions/pending/create":{"post":{"tags":["Decisions","Decisions"],"summary":"Create Pending Decision","description":"Create a pending decision (Acceptance Case) with unresolved requirements.\n\nReturns the decision including server-generated requirement_ids. The caller\nuses those ids with /pending/{decision_id}/resolve.","operationId":"create_pending_decision_memory_decisions_pending_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePendingDecisionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/decisions/pending/{decision_id}/resolve":{"post":{"tags":["Decisions","Decisions"],"summary":"Resolve Pending Requirement","description":"Mark one requirement on a pending decision resolved by a memory item.","operationId":"resolve_pending_requirement_memory_decisions_pending__decision_id__resolve_post","parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","title":"Decision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveRequirementRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/decisions/pending/{decision_id}/activate":{"post":{"tags":["Decisions","Decisions"],"summary":"Activate Pending Decision","description":"Try to activate a pending decision. It is a no-op (activated=false) if requirements remain.","operationId":"activate_pending_decision_memory_decisions_pending__decision_id__activate_post","parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","title":"Decision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/decisions/{decision_id}":{"get":{"tags":["Decisions","Decisions"],"summary":"Get Decision","description":"Retrieve a decision by ID.","operationId":"get_decision_memory_decisions__decision_id__get","parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","title":"Decision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/decisions/{decision_id}/supersede":{"post":{"tags":["Decisions","Decisions"],"summary":"Supersede Decision","description":"Replace a decision with a new one, marking the old as superseded.","operationId":"supersede_decision_memory_decisions__decision_id__supersede_post","parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","title":"Decision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupersedeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/decisions/{decision_id}/retract":{"post":{"tags":["Decisions","Decisions"],"summary":"Retract Decision","description":"Retract a decision (mark as no longer valid).","operationId":"retract_decision_memory_decisions__decision_id__retract_post","parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","title":"Decision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetractRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/decisions/{decision_id}/reinforce":{"post":{"tags":["Decisions","Decisions"],"summary":"Reinforce Decision","description":"Record supporting evidence for a decision.","operationId":"reinforce_decision_memory_decisions__decision_id__reinforce_post","parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","title":"Decision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReinforceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/decisions/{decision_id}/contradict":{"post":{"tags":["Decisions","Decisions"],"summary":"Contradict Decision","description":"Record contradicting evidence against a decision.","operationId":"contradict_decision_memory_decisions__decision_id__contradict_post","parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","title":"Decision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContradictRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/decisions/{decision_id}/provenance":{"get":{"tags":["Decisions","Decisions"],"summary":"Get Decision Provenance","description":"Get full provenance chain for a decision.","operationId":"get_decision_provenance_memory_decisions__decision_id__provenance_get","parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","title":"Decision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/decisions/{decision_id}/causal-chain":{"get":{"tags":["Decisions","Decisions"],"summary":"Get Causal Chain","description":"Trace causal chain from a decision.","operationId":"get_causal_chain_memory_decisions__decision_id__causal_chain_get","parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","title":"Decision Id"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","description":"causes, effects, or both","default":"both","title":"Direction"},"description":"causes, effects, or both"},{"name":"max_depth","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"description":"Maximum traversal depth","default":3,"title":"Max Depth"},"description":"Maximum traversal depth"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/decisions/{decision_id}/conflicts":{"post":{"tags":["Decisions","Decisions"],"summary":"Find Conflicts","description":"Find existing decisions that may conflict with this one, ranked by contest severity.","operationId":"find_conflicts_memory_decisions__decision_id__conflicts_post","parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","title":"Decision Id"}},{"name":"min_contest","in":"query","required":false,"schema":{"type":"number","maximum":1.0,"minimum":0.0,"default":0.0,"title":"Min Contest"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/evolution/trigger":{"post":{"tags":["Evolve","Evolution"],"summary":"Trigger Memory Evolution","description":"Manually trigger memory evolution processes using the orchestrator.\n\nRequires authentication and operates on tenant-scoped data.","operationId":"trigger_memory_evolution_memory_evolution_trigger_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/evolution/dream":{"post":{"tags":["Evolve","Evolution"],"summary":"Run Dream Phase","description":"**Deprecated:** the \"dream\" phase promoted ``memory_type=\"working\"``\nitems retroactively.  CORE-MEMORY-DYNAMICS-1 M1b renamed ``working`` to\n``pending`` and moved routing to at-ingest via the ConsolidationRouter.\nThis endpoint is a no-op retained for caller compatibility.","operationId":"run_dream_phase_memory_evolution_dream_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"deprecated":true}},"/memory/evolution/status":{"get":{"tags":["Evolve","Evolution"],"summary":"Get Evolution Status","description":"Get status of memory evolution processes using simple derived metrics.\n\nRequires authentication and operates on user-scoped data.","operationId":"get_evolution_status_memory_evolution_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/evolution/synthesize/opinions":{"post":{"tags":["Evolve","Evolution"],"summary":"Synthesize Opinions","description":"Run opinion synthesis: detect patterns in episodic memories and form opinions.\n\nCreates 'opinion' type memories with confidence scores based on recurring patterns.","operationId":"synthesize_opinions_memory_evolution_synthesize_opinions_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/evolution/synthesize/observations":{"post":{"tags":["Evolve","Evolution"],"summary":"Synthesize Observations","description":"Run observation synthesis: create entity summaries from scattered facts.\n\nCreates 'observation' type memories that summarize what we know about entities.","operationId":"synthesize_observations_memory_evolution_synthesize_observations_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/evolution/reinforce/opinions":{"post":{"tags":["Evolve","Evolution"],"summary":"Reinforce Opinions","description":"Run opinion reinforcement: update confidence scores based on new evidence.\n\nReinforces or contradicts existing opinions based on recent episodic memories.\nArchives opinions that fall below confidence threshold.","operationId":"reinforce_opinions_memory_evolution_reinforce_opinions_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/{item_id}/explain":{"get":{"tags":["Explain","Explain"],"summary":"Explain Memory","description":"The complete audit answer for one memory in a single call.\n\nComposes identity/origin tier, the transaction-time version audit (with\nchain hashes), both supersession directions, lineage roots, decision\nprovenance, and live chain verification, in the explain-contract shape.\nAbsent and no-access are both 404 (masked per house auth style).","operationId":"explain_memory_memory__item_id__explain_get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/failures/log":{"post":{"tags":["Failure Journal","Failure Journal"],"summary":"Log Failure","description":"Log a failure as episodic memory with origin=failure:agent.","operationId":"log_failure_memory_failures_log_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogFailureRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/failures/check":{"post":{"tags":["Failure Journal","Failure Journal"],"summary":"Check Before Retry","description":"Search for matching past failures to avoid retry loops.","operationId":"check_before_retry_memory_failures_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckFailureRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/feedback":{"post":{"tags":["Feedback","Feedback"],"summary":"Submit Feedback","description":"Apply an explicit feedback signal to a set of recalled memory items.\n\nAdjusts ``retention_score`` immediately (does not wait for an evolver cycle).\nWhen outcome is ``helpful`` and multiple item IDs are provided, also strengthens\nthe ``CO_RETRIEVED`` edges between every pair, feeding into ``HebbianCoRetrievalEvolver``.","operationId":"submit_feedback_memory_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/governance/run-analysis":{"post":{"tags":["Governance","Governance"],"summary":"Run Analysis","description":"Run governance analysis.\n\nIf request.memory_items is provided, analyze those items directly. Otherwise,\ncallers should first gather items via /memory/search and pass them here.","operationId":"run_analysis_memory_governance_run_analysis_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunAnalysisRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/governance/violations":{"get":{"tags":["Governance","Governance"],"summary":"List Violations","description":"List violations available for review.","operationId":"list_violations_memory_governance_violations_get","parameters":[{"name":"severity","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(low|medium|high|critical)$"},{"type":"null"}],"title":"Severity"}},{"name":"auto_fixable_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Auto Fixable Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/governance/violations/{violation_id}":{"get":{"tags":["Governance","Governance"],"summary":"Get Violation","description":"Get a specific violation by ID.","operationId":"get_violation_memory_governance_violations__violation_id__get","parameters":[{"name":"violation_id","in":"path","required":true,"schema":{"type":"string","title":"Violation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/governance/apply-decision":{"post":{"tags":["Governance","Governance"],"summary":"Apply Decision","description":"Apply a governance decision for a violation.","operationId":"apply_decision_memory_governance_apply_decision_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyDecisionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/governance/auto-fix":{"post":{"tags":["Governance","Governance"],"summary":"Auto Fix","description":"Run auto-fix for high-confidence violations.","operationId":"auto_fix_memory_governance_auto_fix_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoFixRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/governance/summary":{"get":{"tags":["Governance","Governance"],"summary":"Summary","description":"Get a summary of governance state.","operationId":"summary_memory_governance_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/graph/path":{"get":{"tags":["Graph","Graph"],"summary":"Find Shortest Path","description":"Find the shortest path between two graph nodes.","operationId":"find_shortest_path_memory_graph_path_get","parameters":[{"name":"start_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Start Id"}},{"name":"end_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"End Id"}},{"name":"max_hops","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"default":5,"title":"Max Hops"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/graph/nodes/{node_id}":{"patch":{"tags":["Graph","Graph"],"summary":"Update Graph Node","description":"Update properties on a graph node (label, entity_type).\n\nWhen entity_type changes, also creates an ontology pattern so the\ncorrection feeds back into the self-learning EntityRuler.","operationId":"update_graph_node_memory_graph_nodes__node_id__patch","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodeUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Graph","Graph"],"summary":"Delete Graph Node","description":"Delete a scoped node, including companion stores for memory items.","operationId":"delete_graph_node_memory_graph_nodes__node_id__delete","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/graph/nodes/{node_id}/grounding":{"get":{"tags":["Graph","Graph"],"summary":"Get Node Grounding","description":"Get grounding (Wikipedia provenance) status for an entity node.","operationId":"get_node_grounding_memory_graph_nodes__node_id__grounding_get","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Graph","Graph"],"summary":"Remove Node Grounding","description":"Remove grounding (GROUNDED_IN edge) from a node.","operationId":"remove_node_grounding_memory_graph_nodes__node_id__grounding_delete","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/graph/bulk":{"post":{"tags":["Graph","Graph"],"summary":"Bulk Write","description":"Bulk upsert nodes and edges into the knowledge graph.\n\nOptionally deletes the caller's own nodes matching ``delete_prefix`` (scoped\nto the caller's workspace) before writing, enabling clean replace-all\nsemantics. In a shared workspace, nodes other members or no one authored\nare kept (SEC-CLEAR-ALL-SHARED-WS-1).","operationId":"bulk_write_memory_graph_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkWriteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkWriteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/graph/resolve-aliases":{"post":{"tags":["Graph_maintenance","Graph Maintenance"],"summary":"Resolve Aliases","description":"Consolidate fragmented entity aliases for the workspace (CORE-GRAPH-ALIAS-RESOLVE-2 B2).\n\nMerges each unambiguous single-token alias node (e.g. \"Hudson\") into its multi-token\ncanonical (\"Rock Hudson\") over the COMPLETE workspace graph, abstaining on collisions\n(\"Hudson\" with both \"Rock Hudson\" and \"Rochelle Hudson\" present). Run after a bulk\ningest, when the full ambiguity picture is present. Workspace-scoped (tenant isolation).\n\n**Parameters:**\n- `dry_run`: If true, report the resolve/abstain plan without mutating the graph.\n- `disambiguate`: Opt-in (CORE-GRAPH-ALIAS-DISAMBIG-1, default false). Additionally recover colliding\n  surfaces by structural typed-neighbor overlap, merging only on a confident, clear winner, else keep\n  abstaining (never mis-merge). Extractor-dependent, so it helps LLM-extracted graphs.\n\n**Returns:**\n- `resolved`: alias surfaces merged into a canonical (unambiguous + disambiguated)\n- `abstained`: single-token surfaces left untouched (>=2 canonical candidates)\n- `redirected_edges`: external edges moved onto canonicals\n- `ambiguous`: the abstained surfaces\n- `disambiguated`: collisions recovered by the opt-in disambiguation pass (0 unless `disambiguate=true`)\n- `dry_run`: echoes the request flag\n- plus scope context (`workspace_id`, `user_id`)","operationId":"resolve_aliases_memory_graph_resolve_aliases_post","parameters":[{"name":"dry_run","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Dry Run"}},{"name":"disambiguate","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Disambiguate"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/graph/dedup-entities":{"post":{"tags":["Graph_maintenance","Graph Maintenance"],"summary":"Dedup Entities","description":"Dedup cross-extractor fragmented entity nodes for the workspace (CORE-GRAPH-CANONICAL-DEDUP-1).\n\nCollapses same-name entity-node fragments (the same entity split across >1 node because two extractors\ndisagreed on its type -> divergent canonical_key -> the write-time dedup missed them) into one node,\nprecision-first. Unblocks ensemble alias disambiguation, since a fragmented canonical makes\n`resolve_aliases(disambiguate=true)` abstain. Workspace-scoped (tenant isolation). Opt-in, default-off.\nRecommended ensemble sequence: dedup-entities then resolve-aliases?disambiguate=true.\n\n**Parameters:**\n- `dry_run`: If true, report the dedup plan without mutating the graph.\n- `require_structural_confirmation`: If true (default), a same-name pair merges only on T0 (same Wikidata\n  QID), T1 (same canonical_key), or T2 (>= tau_min shared typed entity-neighbors). If false, exact\n  same-name clusters merge on name alone once T0/T1 fail (riskier disjoint-edge-tail recovery).\n\n**Returns:**\n- `merged_clusters`: same-name fragment (sub-)clusters collapsed into one node\n- `merged_nodes`: total fragment nodes merged away\n- `redirected_edges`: external edges moved onto survivors (0 when dry_run)\n- `abstained_clusters`: clusters left untouched (no confident identity tier, the disjoint-edge tail)\n- `dry_run`: echoes the request flag\n- plus scope context (`workspace_id`, `user_id`)","operationId":"dedup_entities_memory_graph_dedup_entities_post","parameters":[{"name":"dry_run","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Dry Run"}},{"name":"require_structural_confirmation","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Require Structural Confirmation"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/graph/edges":{"post":{"tags":["Graph","Graph"],"summary":"Bulk Read Edges","description":"Read all edges between a set of nodes in a single query.\n\nAccepts a list of node IDs (max 5000) and returns every directed\nedge where both endpoints are in the list, scoped to the caller's workspace.\nReplaces N per-node ``GET /{item_id}/links`` calls with one round-trip.","operationId":"bulk_read_edges_memory_graph_edges_post","parameters":[{"name":"include_properties","in":"query","required":false,"schema":{"type":"boolean","description":"Include edge properties","default":false,"title":"Include Properties"},"description":"Include edge properties"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkEdgesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkEdgesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/graph/full":{"get":{"tags":["Graph","Graph"],"summary":"Get Full Graph","description":"Return scoped nodes and their graph relationships for visualization.\n\nReturns both memory nodes and entity nodes (extracted by the pipeline),\nalong with all edges between them. Excludes internal infrastructure\nnodes (version_*) and edge types (HAS_VERSION).","operationId":"get_full_graph_memory_graph_full_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Requested max nodes (server-capped)","default":1000,"title":"Limit"},"description":"Requested max nodes (server-capped)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FullGraphResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/idp-drift":{"get":{"tags":["Idp_drift","IdP Drift"],"summary":"Idp Drift Status","description":"Return the latest IdP drift sweep report.\n\nSEC-HARDENING-1 M3: superadmin-gated. This endpoint exposes cross-tenant\nsweep counts (users checked, drift detected, tokens revoked across every\nClerk-linked user). The router's ``ScopePolicy.system`` bypasses tenant\ncontext, so without an explicit role gate any authenticated caller could\nread it. ``require_superadmin`` restricts it to platform operators.\n\nResponse shape:\n  {\n    \"sweep_enabled\": bool,\n    \"status\": \"no_sweep_run\" | \"ok\",\n    \"last_run_at\": datetime | null,\n    \"users_checked\": int,\n    \"drift_detected\": int,\n    \"tokens_revoked\": int\n  }","operationId":"idp_drift_status_memory_idp_drift_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/ingest":{"post":{"tags":["Ingestion","Ingestion"],"summary":"Ingest Content","description":"Default ingest: persist and enqueue background processing (non-local modes).\n\nRequires authentication and operates on user-scoped data.\nUses the full SmartMemory ingestion pipeline with proper tenant isolation.\n\nSet mode=async to submit via EventBusTransport for background processing.","operationId":"ingest_content_memory_ingest_post","parameters":[{"name":"mode","in":"query","required":false,"schema":{"type":"string","description":"Execution tolerance: 'sync' (run now), 'async' (queue it, or tell me you cannot, with a 503), 'async_preferred' (queue if possible, otherwise run now and say so in the response)","default":"sync","title":"Mode"},"description":"Execution tolerance: 'sync' (run now), 'async' (queue it, or tell me you cannot, with a 503), 'async_preferred' (queue if possible, otherwise run now and say so in the response)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ingest/full":{"post":{"tags":["Ingestion","Ingestion"],"summary":"Ingest Content Full","description":"Ingest content with full synchronous entity/relation extraction pipeline.\n\nRequires authentication and operates on user-scoped data.","operationId":"ingest_content_full_memory_ingest_full_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ingest/async/{run_id}":{"get":{"tags":["Ingestion","Ingestion"],"summary":"Get Async Ingest Status","description":"Poll the status of an async ingest run.\n\n``status`` distinguishes ``abandoned`` (the content was accepted and is not known\nto have been stored) from ``unknown_run_id`` (no such run). Before the run ledger\nthese were the same reply, so a caller could never learn that content was lost.\n\nGoes through the scoped facade, which refuses a run belonging to another\nworkspace. The previous implementation constructed the transport here and read\nthe status hash directly, so any authenticated caller could read any tenant's run.","operationId":"get_async_ingest_status_memory_ingest_async__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/{item_id}/enrich":{"post":{"tags":["Ingestion","Ingestion"],"summary":"Enrich Memory","description":"Enrich a memory item using registered enrichment routines.\n\nRequires authentication and validates item ownership.","operationId":"enrich_memory_memory__item_id__enrich_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/memory_service__api__request_models__EnrichmentRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/personalize":{"post":{"tags":["Ingestion","Ingestion"],"summary":"Personalize Memory","description":"Reject personalization until CORE-PERSONALIZATION-CONTRACT-1 is implemented.\n\nRequires authentication and operates on user-scoped data.","operationId":"personalize_memory_memory_personalize_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalizationRequest"}}},"required":true},"responses":{"501":{"description":"CORE-PERSONALIZATION-CONTRACT-1: personalization is not implemented.","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/{item_id}/ground":{"post":{"tags":["Ingestion","Ingestion"],"summary":"Ground Memory","description":"Reject grounding until CORE-GROUND-ROUTE-CONTRACT-1 is implemented.\n\nRequires authentication and validates item ownership.","operationId":"ground_memory_memory__item_id__ground_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/memory_service__api__request_models__GroundingRequest"}}}},"responses":{"501":{"description":"CORE-GROUND-ROUTE-CONTRACT-1: grounding is not implemented.","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ingest/conversation":{"post":{"tags":["Ingestion","Ingestion"],"summary":"Ingest Conversation","description":"Ingest a conversation as session chunks, using the full pipeline by default (RLM-1g).","operationId":"ingest_conversation_memory_ingest_conversation_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationIngestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/health":{"get":{"tags":["Insights","Insights"],"summary":"Get Memory Health","description":"Get user-scoped memory health summary.\n\nReturns overall health metrics including item counts by type,\na health score, and any issues detected (orphaned or stale items).\n\nThis is a user-facing endpoint - data is scoped to the authenticated\nuser's tenant.","operationId":"get_memory_health_memory_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/reflect":{"get":{"tags":["Insights","Insights"],"summary":"Reflect On Memories","description":"Reflect on memory patterns and key concepts.\n\nAnalyzes memory content to identify key concepts, top entities,\nand dominant topics. Results are cached for 5 minutes to reduce\ncompute load.\n\nReturns:\n- key_concepts: Frequently occurring terms with counts\n- top_entities: Named entities extracted from memories\n- dominant_topics: Main topic categories\n- cached: Whether this result came from cache\n- cache_expires_in: Seconds until cache expires","operationId":"reflect_on_memories_memory_reflect_get","parameters":[{"name":"top_k","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Number of top items to analyze","default":10,"title":"Top K"},"description":"Number of top items to analyze"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/maintenance/status":{"get":{"tags":["Insights","Insights"],"summary":"Get Maintenance Status","description":"Get maintenance status for user's memories (read-only).\n\nReturns counts and previews of items that may need attention:\n- Orphaned memories (no connections)\n- Stale memories (older than threshold)\n- Low confidence items (below threshold)\n\nThis is a read-only endpoint - no data is modified.\nUse the admin prune endpoint to take action on these items.","operationId":"get_maintenance_status_memory_maintenance_status_get","parameters":[{"name":"stale_threshold_days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"Days before item is considered stale","default":90,"title":"Stale Threshold Days"},"description":"Days before item is considered stale"},{"name":"low_confidence_threshold","in":"query","required":false,"schema":{"type":"number","maximum":1.0,"minimum":0.0,"description":"Confidence threshold for flagging","default":0.5,"title":"Low Confidence Threshold"},"description":"Confidence threshold for flagging"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/plugins":{"get":{"tags":["Insights","Insights"],"summary":"List Available Plugins","description":"List available extractors and enrichers.\n\nReturns a user-friendly overview of processing plugins available\nfor memory ingestion and enrichment. This helps users understand\nwhat processing options they can configure.","operationId":"list_available_plugins_memory_plugins_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/launch/event":{"post":{"tags":["LaunchMetrics","LaunchMetrics"],"summary":"Ingest Launch Event","description":"Record a launch funnel event from a trusted CLI/wrapper caller.\n\nBody: ``{event_type: str, props: dict}``. ``user_id`` / ``workspace_id``\nare taken from the auth scope, so the body cannot override them.","operationId":"ingest_launch_event_memory_launch_event_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"}}}}}}},"/memory/admin/metrics/launch":{"get":{"tags":["LaunchMetrics","LaunchMetrics"],"summary":"Get Launch Metrics","description":"Return the 5 launch metrics. Admin-only.","operationId":"get_launch_metrics_memory_admin_metrics_launch_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/licensing/redistribution/text":{"get":{"tags":["Licensing","Licensing"],"summary":"Redistribution Text","description":"The exact versioned agreement markdown the self-serve form renders.","operationId":"redistribution_text_memory_licensing_redistribution_text_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/memory/licensing/redistribution/accept":{"post":{"tags":["Licensing","Licensing"],"summary":"Accept Redistribution","description":"Record an acceptance, render the filled PDF, and email it.\n\nOrder is deliberate: render the PDF, INSERT the acceptance row (born at the\ntransient ``email_status=\"pending\"``), then send, then one narrow update that\nstamps ``email_status`` / ``email_error`` and nothing else. The acceptance is\ndurable before anything leaves the building, so a Mongo failure after a\nsuccessful send can never leave a customer holding a PDF and a download link\nfor a record that does not exist. A failed insert returns 503 and sends\nnothing. A mail failure cannot lose the acceptance either:\n``send_agreement_emails`` never raises, it returns a status.\n\nContract enum on the returned and persisted ``email_status``:\n``sent`` | ``skipped_no_provider`` | ``failed``. ``pending`` is an internal\npre-send value that is never returned to a client and never survives a\nsuccessful request. A row left at ``pending`` means the delivery outcome\ncould not be stamped and is reconcilable from the log.","operationId":"accept_redistribution_memory_licensing_redistribution_accept_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/memory/licensing/redistribution/pdf":{"get":{"tags":["Licensing","Licensing"],"summary":"Redistribution Pdf","description":"Re-render and return the filled agreement PDF for a download token.\n\nPDF bytes are never stored: the document is a pure function of the persisted\nrecord and the versioned legal text, so it is regenerated on demand from the\nversion the accepter actually saw.","operationId":"redistribution_pdf_memory_licensing_redistribution_pdf_get","parameters":[{"name":"token","in":"query","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"}}}}},"security":[]}},"/memory/lite/update-check":{"post":{"tags":["Licensing","Licensing"],"summary":"Lite Update Check","description":"Answer \"is a newer Lite published?\" and record the install that asked.\n\nThe answer is computed BEFORE the ping is written and is never conditional on\nit. If Mongo is unavailable the row is lost, a WARNING says so by name, and\nthe caller still gets its version answer -- telemetry must never be able to\nstop a user's runtime from learning about a release.","operationId":"lite_update_check_memory_lite_update_check_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/memory/locks/{key}":{"post":{"tags":["Locks","Locks"],"summary":"Acquire Lease","description":"Acquire immediately, returning 409 rather than blocking on contention.","operationId":"acquire_lease_memory_locks__key__post","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Locks","Locks"],"summary":"Release Lease","description":"Release a live lease under compare-and-delete ownership.","operationId":"release_lease_memory_locks__key__delete","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$","title":"Key"}},{"name":"X-Lease-Token","in":"header","required":true,"schema":{"type":"string","title":"X-Lease-Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/locks/{key}/renew":{"post":{"tags":["Locks","Locks"],"summary":"Renew Lease","description":"Extend a live lease under compare-and-set ownership.","operationId":"renew_lease_memory_locks__key__renew_post","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$","title":"Key"}},{"name":"X-Lease-Token","in":"header","required":true,"schema":{"type":"string","title":"X-Lease-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/inference/run":{"post":{"tags":["Ontology","Ontology"],"summary":"Run Inference","description":"Run ontology inference over provided raw text chunks.\n\nRequires authentication and operates on user-scoped data.\nReturns a JSON-serializable payload with changeset (OntologyIR as dict),\nmetrics, and status.","operationId":"run_inference_memory_ontology_inference_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/registries":{"get":{"tags":["Ontology","Ontology"],"summary":"List Registries","description":"List all ontology registries.\n\nRequires authentication.","operationId":"list_registries_memory_ontology_registries_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Ontology","Ontology"],"summary":"Create Registry","description":"Create a new ontology registry.\n\nRequires authentication and operates on user-scoped data.","operationId":"create_registry_memory_ontology_registries_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistryCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/registry/{registry_id}/snapshot":{"get":{"tags":["Ontology","Ontology"],"summary":"Get Registry Snapshot","description":"Get a snapshot of a registry (current or specific version).\n\nRequires authentication and validates registry ownership.","operationId":"get_registry_snapshot_memory_ontology_registry__registry_id__snapshot_get","parameters":[{"name":"registry_id","in":"path","required":true,"schema":{"type":"string","title":"Registry Id"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/registry/{registry_id}/apply":{"post":{"tags":["Ontology","Ontology"],"summary":"Apply Changeset","description":"Apply a changeset to create a new version of the registry.\n\nRequires authentication and validates registry ownership.","operationId":"apply_changeset_memory_ontology_registry__registry_id__apply_post","parameters":[{"name":"registry_id","in":"path","required":true,"schema":{"type":"string","title":"Registry Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyChangesetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/registry/{registry_id}/snapshots":{"get":{"tags":["Ontology","Ontology"],"summary":"List Registry Snapshots","description":"List snapshots for a registry.\n\nRequires authentication and validates registry ownership.","operationId":"list_registry_snapshots_memory_ontology_registry__registry_id__snapshots_get","parameters":[{"name":"registry_id","in":"path","required":true,"schema":{"type":"string","title":"Registry Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/registry/{registry_id}/changelog":{"get":{"tags":["Ontology","Ontology"],"summary":"Get Registry Changelog","description":"Get change history for a registry.\n\nRequires authentication and validates registry ownership.","operationId":"get_registry_changelog_memory_ontology_registry__registry_id__changelog_get","parameters":[{"name":"registry_id","in":"path","required":true,"schema":{"type":"string","title":"Registry Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/registry/{registry_id}/rollback":{"post":{"tags":["Ontology","Ontology"],"summary":"Rollback Registry","description":"Rollback registry to a previous version.\n\nRequires authentication and validates registry ownership.","operationId":"rollback_registry_memory_ontology_registry__registry_id__rollback_post","parameters":[{"name":"registry_id","in":"path","required":true,"schema":{"type":"string","title":"Registry Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RollbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/registry/{registry_id}/export":{"get":{"tags":["Ontology","Ontology"],"summary":"Export Registry Snapshot","description":"Export a registry snapshot.\n\nRequires authentication and validates registry ownership.","operationId":"export_registry_snapshot_memory_ontology_registry__registry_id__export_get","parameters":[{"name":"registry_id","in":"path","required":true,"schema":{"type":"string","title":"Registry Id"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/registry/{registry_id}/import":{"post":{"tags":["Ontology","Ontology"],"summary":"Import Registry Snapshot","description":"Import data into a registry.\n\nRequires authentication and validates registry ownership.","operationId":"import_registry_snapshot_memory_ontology_registry__registry_id__import_post","parameters":[{"name":"registry_id","in":"path","required":true,"schema":{"type":"string","title":"Registry Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportSnapshotRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/enrichment/providers":{"get":{"tags":["Ontology","Ontology"],"summary":"List Enrichment Providers","description":"List available enrichment providers for Studio.","operationId":"list_enrichment_providers_memory_ontology_enrichment_providers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/ontology/enrichment/run":{"post":{"tags":["Ontology","Ontology"],"summary":"Run Enrichment","description":"Run enrichment operation using specified provider.","operationId":"run_enrichment_memory_ontology_enrichment_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/grounding/run":{"post":{"tags":["Ontology","Ontology"],"summary":"Run Grounding","description":"Run grounding operation using specified grounder.","operationId":"run_grounding_memory_ontology_grounding_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroundingRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/templates":{"get":{"tags":["Ontology","Ontology"],"summary":"List Templates","description":"List all available ontology templates (built-in + custom).","operationId":"list_templates_memory_ontology_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Ontology","Ontology"],"summary":"Save As Template","description":"Save an existing ontology registry as a custom template.","operationId":"save_as_template_memory_ontology_templates_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveAsTemplateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/templates/{template_id}":{"get":{"tags":["Ontology","Ontology"],"summary":"Get Template Preview","description":"Preview template details (entity types, relationships, rules count).","operationId":"get_template_preview_memory_ontology_templates__template_id__get","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Ontology","Ontology"],"summary":"Delete Template","description":"Delete a custom template. Built-in templates cannot be deleted.","operationId":"delete_template_memory_ontology_templates__template_id__delete","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/templates/clone":{"post":{"tags":["Ontology","Ontology"],"summary":"Clone Template","description":"Clone a template into the workspace as an independent ontology.","operationId":"clone_template_memory_ontology_templates_clone_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloneTemplateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/patterns":{"get":{"tags":["Ontology","Ontology"],"summary":"List Patterns","description":"List entity patterns with stats for the current workspace.","operationId":"list_patterns_memory_ontology_patterns_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Ontology","Ontology"],"summary":"Create Pattern","description":"Manually add an entity pattern.","operationId":"create_pattern_memory_ontology_patterns_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatternCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/patterns/{pattern_name}":{"delete":{"tags":["Ontology","Ontology"],"summary":"Delete Pattern","description":"Delete an entity pattern by name. Optionally specify entity_type for disambiguation.","operationId":"delete_pattern_memory_ontology_patterns__pattern_name__delete","parameters":[{"name":"pattern_name","in":"path","required":true,"schema":{"type":"string","title":"Pattern Name"}},{"name":"entity_type","in":"query","required":false,"schema":{"type":"string","default":"","title":"Entity Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/status":{"get":{"tags":["Ontology","Ontology"],"summary":"Get Ontology Status","description":"Get ontology convergence metrics: pattern counts, type status distribution.","operationId":"get_ontology_status_memory_ontology_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/ontology/audit/summary":{"get":{"tags":["Ontology","Ontology"],"summary":"Get Audit Summary","description":"ONTO-RECONCILE-1 Phase 6: bounded audit aggregation over a time window.\n\nTwo substrate queries (counts grouped by action+actor, then recent-actions\nLIMIT N). `recent_actions` rows expose only metadata-shaped fields per\nthe privacy contract: caller-supplied content (`evidence_ref`,\n`before_json`, `after_json`) is excluded.\n\nAuthentication: routes inherit `ScopePolicy.team_required` from\n`create_router(...)`'s default, verified at base_router.py:62.\nAudit data is workspace-scoped via FalkorDB graph_name isolation.\n\nNote on `group_by`: today the substrate always groups by `(action, actor)`\njointly and folds into `by_action` and `by_actor`. The parameter is\naccepted (and validated against {\"action\", \"actor\"}) for forward\ncompatibility, but additional grouping is not yet implemented.","operationId":"get_audit_summary_memory_ontology_audit_summary_get","parameters":[{"name":"since","in":"query","required":true,"schema":{"type":"string","description":"ISO-8601 lower bound (inclusive)","title":"Since"},"description":"ISO-8601 lower bound (inclusive)"},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO-8601 upper bound (inclusive)","title":"Until"},"description":"ISO-8601 upper bound (inclusive)"},{"name":"group_by","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Subset of {'action','actor'}","title":"Group By"},"description":"Subset of {'action','actor'}"},{"name":"recent_limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":0,"description":"Cap on recent_actions rows","default":50,"title":"Recent Limit"},"description":"Cap on recent_actions rows"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/import":{"post":{"tags":["Ontology","Ontology"],"summary":"Import Ontology","description":"Import OntologyIR data to seed or migrate the ontology.\n\nAccepts a dict with OntologyIR format. Creates entity types and patterns.","operationId":"import_ontology_memory_ontology_import_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportSnapshotRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/export":{"get":{"tags":["Ontology","Ontology"],"summary":"Export Ontology","description":"Export the full ontology as a portable dict for backup/migration.","operationId":"export_ontology_memory_ontology_export_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/ontology/hitl":{"get":{"tags":["Ontology","Ontology"],"summary":"List Ontology Hitl","description":"List `:OntologyHITLQueue` rows for the caller's workspace.","operationId":"list_ontology_hitl_memory_ontology_hitl_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"enum":["open","resolved"],"type":"string","description":"Filter by status","default":"open","title":"Status"},"description":"Filter by status"},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"enum":["missing_in_graph","missing_in_registry","name_conflict_unresolvable"],"type":"string"},{"type":"null"}],"description":"Filter by kind","title":"Kind"},"description":"Filter by kind"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Max rows","default":50,"title":"Limit"},"description":"Max rows"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/hitl/{item_id}/resolve":{"post":{"tags":["Ontology","Ontology"],"summary":"Resolve Ontology Hitl","description":"Resolve one HITL queue item (open → resolved).\n\n404 if the id is not in the caller's workspace (covers missing *and*\ncross-tenant). 422 for an invalid action (Pydantic catches it first).","operationId":"resolve_ontology_hitl_memory_ontology_hitl__item_id__resolve_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveHitlRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/types":{"get":{"tags":["Ontology CRUD","Ontology CRUD"],"summary":"List Ontology Types","description":"List ontology types, keyset-paginated. Walk `next_cursor` until it is null.","operationId":"list_ontology_types_memory_ontology_types_get","parameters":[{"name":"tier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by tier (working/proposed/confirmed/retired).","title":"Tier"},"description":"Filter by tier (working/proposed/confirmed/retired)."},{"name":"layer","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by layer (public/domain/private).","title":"Layer"},"description":"Filter by layer (public/domain/private)."},{"name":"pack_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by originating pack id.","title":"Pack Id"},"description":"Filter by originating pack id."},{"name":"has_iri","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only types with (or without) an IRI.","title":"Has Iri"},"description":"Only types with (or without) an IRI."},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by class kind ('entity' or 'record').","title":"Kind"},"description":"Filter by class kind ('entity' or 'record')."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Page size (clamped to [1, 500]).","default":100,"title":"Limit"},"description":"Page size (clamped to [1, 500])."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque keyset continuation token from a prior page.","title":"Cursor"},"description":"Opaque keyset continuation token from a prior page."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyTypePage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Ontology CRUD","Ontology CRUD"],"summary":"Create Ontology Type","description":"Declare an ontology class (CORE-MEMTYPE-DECLARE-1).\n\n`kind='record'` declares a concrete record type: items may then be written\nwith `memory_type=<name>` through `/memory/add` and\n`/memory/ingest/structured`, schema-checked against `properties_schema`\n(WARNING mode in P1). 400 on an invalid schema/tier/kind/strategy, and 409\nwhen the name shadows a registered memory type or the iri/qid identity\nslot is already bound (the body names the conflict).","operationId":"create_ontology_type_memory_ontology_types_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTypeRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyTypeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/relations":{"post":{"tags":["Ontology CRUD","Ontology CRUD"],"summary":"Create Ontology Relation","description":"Declare an ontology relation (CORE-MEMTYPE-DECLARE-1, declare-only in P1).\n\nRecord links are relations with record-class domain/range. Edge writes are\nNOT validated against domain/range/cardinality yet (P3). 400 on an invalid\ntier, and 409 on an identity-slot conflict.","operationId":"create_ontology_relation_memory_ontology_relations_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRelationRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyRelationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Ontology CRUD","Ontology CRUD"],"summary":"List Ontology Relations","description":"List ontology relation types, keyset-paginated. Mirror of `GET /ontology/types`.","operationId":"list_ontology_relations_memory_ontology_relations_get","parameters":[{"name":"tier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by tier (working/proposed/confirmed/retired).","title":"Tier"},"description":"Filter by tier (working/proposed/confirmed/retired)."},{"name":"layer","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by layer (public/domain/private).","title":"Layer"},"description":"Filter by layer (public/domain/private)."},{"name":"pack_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by originating pack id.","title":"Pack Id"},"description":"Filter by originating pack id."},{"name":"has_iri","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only relations with (or without) an IRI.","title":"Has Iri"},"description":"Only relations with (or without) an IRI."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Page size (clamped to [1, 500]).","default":100,"title":"Limit"},"description":"Page size (clamped to [1, 500])."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque keyset continuation token from a prior page.","title":"Cursor"},"description":"Opaque keyset continuation token from a prior page."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyRelationPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/types/{type_id}/audit":{"get":{"tags":["Ontology CRUD","Ontology CRUD"],"summary":"Get Type Audit","description":"Full append-only audit trail for one type identifier (oldest-first).","operationId":"get_type_audit_memory_ontology_types__type_id__audit_get","parameters":[{"name":"type_id","in":"path","required":true,"schema":{"type":"string","title":"Type Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyAuditListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/types/{from_id}/migrate-to/{to_id}":{"post":{"tags":["Ontology CRUD","Ontology CRUD"],"summary":"Migrate Type Instances","description":"Reclassify every instance of `from_id` onto `to_id`. Both types stay live.","operationId":"migrate_type_instances_memory_ontology_types__from_id__migrate_to__to_id__post","parameters":[{"name":"from_id","in":"path","required":true,"schema":{"type":"string","title":"From Id"}},{"name":"to_id","in":"path","required":true,"schema":{"type":"string","title":"To Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrationResultResponse"}}}},"400":{"description":"Strict-preflight schema refusal (detail carries per-item `violations`), mixed-kind migration, or self-migration."},"404":{"description":"Either type is unresolved in this workspace."},"409":{"description":"Record merge left items on the source class, so re-run. Both classes stay live."},"500":{"description":"Record lifecycle unavailable: the data-graph seam is absent or unsupported."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/types/{type_id}/retire":{"post":{"tags":["Ontology CRUD","Ontology CRUD"],"summary":"Retire Ontology Type","description":"Retire a workspace's own confirmed record class.\n\nScope of this surface is deliberately narrow: `layer == \"private\"` AND\n`kind == \"record\"`, even though core's `retire_type` is kind-agnostic.\nCore resolves an identifier across the private -> domain -> public layers, so\nan unguarded route would let any authenticated caller retire an effective\nPUBLIC or pack class: retiring `decision` would disable a built-in memory\ntype for the whole workspace, from a route whose stated job is retiring the\nworkspace's own declared classes. Contract `record_lifecycle.retire_surface`\nauthorizes confirmed PRIVATE record classes and nothing wider.\n\nEntity classes keep the curation queue (reject) as their review action.\nWidening this surface is a deliberate decision, not a default.","operationId":"retire_ontology_type_memory_ontology_types__type_id__retire_post","parameters":[{"name":"type_id","in":"path","required":true,"schema":{"type":"string","title":"Type Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetireTypeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Type is not a workspace-private record class (see body for which check failed)."},"404":{"description":"Type not found in this workspace."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/types/{type_id}":{"get":{"tags":["Ontology CRUD","Ontology CRUD"],"summary":"Get Ontology Type","description":"Resolve a single type by iri/qid/name (follows supersede/merge redirects). 404 if absent.\n\nEnriches with `instance_count`, the number of `(:Entity)-[:INSTANCE_OF]->` this\ntype, via `OntologyService.count_type_instances` (ONTO-CRUD-1 follow-up). The count\nis best-effort enrichment: a failure logs a WARNING and leaves it null rather than\nsinking the type read (null means \"not computed\", never a fabricated 0).","operationId":"get_ontology_type_memory_ontology_types__type_id__get","parameters":[{"name":"type_id","in":"path","required":true,"schema":{"type":"string","title":"Type Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyTypeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/relations/{relation_id}/audit":{"get":{"tags":["Ontology CRUD","Ontology CRUD"],"summary":"Get Relation Audit","description":"Full append-only audit trail for one relation's canonical id (oldest-first).","operationId":"get_relation_audit_memory_ontology_relations__relation_id__audit_get","parameters":[{"name":"relation_id","in":"path","required":true,"schema":{"type":"string","title":"Relation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyAuditListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/relations/{relation_id}":{"get":{"tags":["Ontology CRUD","Ontology CRUD"],"summary":"Get Ontology Relation","description":"Resolve a single relation type by its identity (iri -> pid -> name). 404 if absent.","operationId":"get_ontology_relation_memory_ontology_relations__relation_id__get","parameters":[{"name":"relation_id","in":"path","required":true,"schema":{"type":"string","title":"Relation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyRelationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/audit":{"get":{"tags":["Ontology CRUD","Ontology CRUD"],"summary":"List Ontology Audit","description":"Cross-entity, newest-first audit feed. Malformed/date-only `since`/`until` -> 400.","operationId":"list_ontology_audit_memory_ontology_audit_get","parameters":[{"name":"actor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by actor.","title":"Actor"},"description":"Filter by actor."},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by action (e.g. migrate, retire).","title":"Action"},"description":"Filter by action (e.g. migrate, retire)."},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Full ISO-8601 lower bound (inclusive).","title":"Since"},"description":"Full ISO-8601 lower bound (inclusive)."},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Full ISO-8601 upper bound (inclusive).","title":"Until"},"description":"Full ISO-8601 upper bound (inclusive)."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Most-recent-N cap (clamped to [1, 1000]).","default":200,"title":"Limit"},"description":"Most-recent-N cap (clamped to [1, 1000])."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyAuditListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/packs/{pack_id}/audit":{"get":{"tags":["Ontology CRUD","Ontology CRUD"],"summary":"Get Pack Audit","description":"Full append-only audit trail for a pack (oldest-first), optionally version-scoped.","operationId":"get_pack_audit_memory_ontology_packs__pack_id__audit_get","parameters":[{"name":"pack_id","in":"path","required":true,"schema":{"type":"string","title":"Pack Id"}},{"name":"pack_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Scope to one installed version. Omit for all.","title":"Pack Version"},"description":"Scope to one installed version. Omit for all."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyAuditListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/queue":{"get":{"tags":["Ontology Curation","Ontology Curation"],"summary":"List Review Queue","operationId":"list_review_queue_memory_ontology_queue_get","parameters":[{"name":"tier","in":"query","required":false,"schema":{"anyOf":[{"enum":["working","proposed"],"type":"string"},{"type":"null"}],"title":"Tier"}},{"name":"assignee","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/queue/bulk":{"post":{"tags":["Ontology Curation","Ontology Curation"],"summary":"Bulk Review Action","operationId":"bulk_review_action_memory_ontology_queue_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/queue/{type_id}/approve":{"post":{"tags":["Ontology Curation","Ontology Curation"],"summary":"Approve Type","operationId":"approve_type_memory_ontology_queue__type_id__approve_post","parameters":[{"name":"type_id","in":"path","required":true,"schema":{"type":"string","title":"Type Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpectedTierRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/queue/{type_id}/reject":{"post":{"tags":["Ontology Curation","Ontology Curation"],"summary":"Reject Type","operationId":"reject_type_memory_ontology_queue__type_id__reject_post","parameters":[{"name":"type_id","in":"path","required":true,"schema":{"type":"string","title":"Type Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpectedTierRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/queue/{type_id}/merge":{"post":{"tags":["Ontology Curation","Ontology Curation"],"summary":"Merge Type","operationId":"merge_type_memory_ontology_queue__type_id__merge_post","parameters":[{"name":"type_id","in":"path","required":true,"schema":{"type":"string","title":"Type Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/queue/{type_id}/edit-promote":{"post":{"tags":["Ontology Curation","Ontology Curation"],"summary":"Edit Promote Type","operationId":"edit_promote_type_memory_ontology_queue__type_id__edit_promote_post","parameters":[{"name":"type_id","in":"path","required":true,"schema":{"type":"string","title":"Type Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditPromoteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/queue/{type_id}/assign":{"post":{"tags":["Ontology Curation","Ontology Curation"],"summary":"Assign Review","operationId":"assign_review_memory_ontology_queue__type_id__assign_post","parameters":[{"name":"type_id","in":"path","required":true,"schema":{"type":"string","title":"Type Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/registry/{registry_id}/subscribe":{"post":{"tags":["Ontology Layers","Ontology Layers"],"summary":"Subscribe To Base","description":"Subscribe an overlay ontology to a base ontology.","operationId":"subscribe_to_base_memory_ontology_registry__registry_id__subscribe_post","parameters":[{"name":"registry_id","in":"path","required":true,"schema":{"type":"string","title":"Registry Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Ontology Layers","Ontology Layers"],"summary":"Unsubscribe From Base","description":"Detach from base and flatten visible base types into overlay.","operationId":"unsubscribe_from_base_memory_ontology_registry__registry_id__subscribe_delete","parameters":[{"name":"registry_id","in":"path","required":true,"schema":{"type":"string","title":"Registry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/registry/{registry_id}/subscribe/pin":{"put":{"tags":["Ontology Layers","Ontology Layers"],"summary":"Pin Base Version","description":"Pin subscription to a specific base version.","operationId":"pin_base_version_memory_ontology_registry__registry_id__subscribe_pin_put","parameters":[{"name":"registry_id","in":"path","required":true,"schema":{"type":"string","title":"Registry Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinVersionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Ontology Layers","Ontology Layers"],"summary":"Unpin Base Version","description":"Unpin and follow latest base version.","operationId":"unpin_base_version_memory_ontology_registry__registry_id__subscribe_pin_delete","parameters":[{"name":"registry_id","in":"path","required":true,"schema":{"type":"string","title":"Registry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/registry/{registry_id}/layers":{"get":{"tags":["Ontology Layers","Ontology Layers"],"summary":"Get Layer Breakdown","description":"Get provenance map and layer counts for an ontology.","operationId":"get_layer_breakdown_memory_ontology_registry__registry_id__layers_get","parameters":[{"name":"registry_id","in":"path","required":true,"schema":{"type":"string","title":"Registry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/registry/{registry_id}/layer-diff":{"get":{"tags":["Ontology Layers","Ontology Layers"],"summary":"Get Layer Diff","description":"Compute diff between base and overlay layers.","operationId":"get_layer_diff_memory_ontology_registry__registry_id__layer_diff_get","parameters":[{"name":"registry_id","in":"path","required":true,"schema":{"type":"string","title":"Registry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/registry/{registry_id}/subscribe/hidden":{"post":{"tags":["Ontology Layers","Ontology Layers"],"summary":"Hide Base Type","description":"Hide a base entity type from the merged view.","operationId":"hide_base_type_memory_ontology_registry__registry_id__subscribe_hidden_post","parameters":[{"name":"registry_id","in":"path","required":true,"schema":{"type":"string","title":"Registry Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HideTypeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/registry/{registry_id}/subscribe/hidden/{type_name}":{"delete":{"tags":["Ontology Layers","Ontology Layers"],"summary":"Unhide Base Type","description":"Unhide a previously hidden base entity type.","operationId":"unhide_base_type_memory_ontology_registry__registry_id__subscribe_hidden__type_name__delete","parameters":[{"name":"registry_id","in":"path","required":true,"schema":{"type":"string","title":"Registry Id"}},{"name":"type_name","in":"path","required":true,"schema":{"type":"string","title":"Type Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/updates/config":{"get":{"tags":["Ontology Update","Ontology Update"],"summary":"Get Config","description":"Get the ontology update configuration for this workspace.","operationId":"get_config_memory_ontology_updates_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"patch":{"tags":["Ontology Update","Ontology Update"],"summary":"Update Config","description":"Update the ontology update configuration for this workspace.\n\nTODO: Add tier enforcement, because free-tier workspaces should not be able to set\nenabled=True. Deferred until subscription system integration (I2 tech debt).","operationId":"update_config_memory_ontology_updates_config_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/updates/trigger":{"post":{"tags":["Ontology Update","Ontology Update"],"summary":"Trigger Batch","description":"Trigger a batch ontology update run. Pro+ only.","operationId":"trigger_batch_memory_ontology_updates_trigger_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TriggerRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/updates/status":{"get":{"tags":["Ontology Update","Ontology Update"],"summary":"Get Status","description":"Get the status of the latest batch run.","operationId":"get_status_memory_ontology_updates_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/ontology/updates/history":{"get":{"tags":["Ontology Update","Ontology Update"],"summary":"Get History","description":"Get paginated history of batch runs.","operationId":"get_history_memory_ontology_updates_history_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ontology/updates/stats":{"get":{"tags":["Ontology Update","Ontology Update"],"summary":"Get Stats","description":"Get ontology update statistics for this workspace.","operationId":"get_stats_memory_ontology_updates_stats_get","parameters":[{"name":"history","in":"query","required":false,"schema":{"type":"boolean","description":"Include time-series history points from completed runs","default":false,"title":"History"},"description":"Include time-series history points from completed runs"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/opinions/create":{"post":{"tags":["Opinions","Opinions"],"summary":"Create Opinion","description":"Create a new opinion with optional agent attribution.","operationId":"create_opinion_memory_opinions_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOpinionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/patterns":{"get":{"tags":["Patterns","Patterns"],"summary":"List Patterns","description":"List active patterns, optionally filtered by scope/severity/free-text.","operationId":"list_patterns_memory_patterns_get","parameters":[{"name":"scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"}},{"name":"severity","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-text substring filter","title":"Q"},"description":"Free-text substring filter"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Patterns","Patterns"],"summary":"Create Pattern","description":"Create a new pattern.","operationId":"create_pattern_memory_patterns_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatternRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/patterns/{pattern_id}":{"get":{"tags":["Patterns","Patterns"],"summary":"Get Pattern","description":"Fetch one pattern by id.","operationId":"get_pattern_memory_patterns__pattern_id__get","parameters":[{"name":"pattern_id","in":"path","required":true,"schema":{"type":"string","title":"Pattern Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Patterns","Patterns"],"summary":"Update Pattern","description":"Mutate fields on an existing active pattern. Auto-bumps version.","operationId":"update_pattern_memory_patterns__pattern_id__put","parameters":[{"name":"pattern_id","in":"path","required":true,"schema":{"type":"string","title":"Pattern Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePatternRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Patterns","Patterns"],"summary":"Delete Pattern","description":"Soft-delete (retract) a pattern. Status becomes 'retracted'.","operationId":"delete_pattern_memory_patterns__pattern_id__delete","parameters":[{"name":"pattern_id","in":"path","required":true,"schema":{"type":"string","title":"Pattern Id"}},{"name":"reason","in":"query","required":false,"schema":{"type":"string","default":"deleted via REST","title":"Reason"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/pipeline/extraction":{"post":{"tags":["Pipeline","Pipeline"],"summary":"Extraction Stage","description":"Run extraction pipeline stage.\n\nExtracts entities and relations from content using the configured extractor.\nRequires authentication and operates on user-scoped data.","operationId":"extraction_stage_memory_pipeline_extraction_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/pipeline/storage":{"post":{"tags":["Pipeline","Pipeline"],"summary":"Storage Stage","description":"Run storage pipeline stage.\n\nStores extracted entities and relations to graph and vector databases.\nRequires authentication and operates on user-scoped data.\nRequires extraction stage to be completed first.","operationId":"storage_stage_memory_pipeline_storage_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/pipeline/linking":{"post":{"tags":["Pipeline","Pipeline"],"summary":"Linking Stage","description":"Run linking pipeline stage.\n\nLinks and deduplicates entities across the knowledge graph.\nRequires authentication and operates on user-scoped data.\nRequires storage stage to be completed first.","operationId":"linking_stage_memory_pipeline_linking_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/pipeline/enrichment":{"post":{"tags":["Pipeline","Pipeline"],"summary":"Enrichment Stage","description":"Run enrichment pipeline stage.\n\nEnriches stored entities with additional metadata (sentiment, topics, etc.).\nRequires authentication and operates on user-scoped data.\nRequires linking stage to be completed first.","operationId":"enrichment_stage_memory_pipeline_enrichment_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/service_common__models__pipeline__EnrichmentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/pipeline/grounding":{"post":{"tags":["Pipeline","Pipeline"],"summary":"Grounding Stage","description":"Run grounding pipeline stage.\n\nGrounds entities to external knowledge sources for verification.\nRequires authentication and operates on user-scoped data.","operationId":"grounding_stage_memory_pipeline_grounding_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/service_common__models__pipeline__GroundingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/pipeline/{pipeline_id}/state":{"get":{"tags":["Pipeline","Pipeline"],"summary":"Get Pipeline State","description":"Get pipeline state for a specific pipeline and run.\n\nReturns the current state of all pipeline stages.\nRequires authentication and operates on user-scoped data.","operationId":"get_pipeline_state_memory_pipeline__pipeline_id__state_get","parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string","title":"Pipeline Id"}},{"name":"run_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/pipeline/{pipeline_id}":{"delete":{"tags":["Pipeline","Pipeline"],"summary":"Reset Pipeline Endpoint","description":"Reset a pipeline, clearing its state.\n\nRequires authentication and operates on user-scoped data.","operationId":"reset_pipeline_endpoint_memory_pipeline__pipeline_id__delete","parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string","title":"Pipeline Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/pipeline/{pipeline_id}/run/{run_id}":{"delete":{"tags":["Pipeline","Pipeline"],"summary":"Clear Run State","description":"Clear all stage states for a specific pipeline run.\n\nRequires authentication and operates on user-scoped data.","operationId":"clear_run_state_memory_pipeline__pipeline_id__run__run_id__delete","parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string","title":"Pipeline Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/pipeline/configs":{"get":{"tags":["Pipeline","Pipeline"],"summary":"List Pipeline Configs","description":"List named pipeline configs for the current workspace.","operationId":"list_pipeline_configs_memory_pipeline_configs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Pipeline","Pipeline"],"summary":"Create Pipeline Config","description":"Save a named pipeline config.","operationId":"create_pipeline_config_memory_pipeline_configs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineConfigCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/pipeline/configs/{config_name}":{"get":{"tags":["Pipeline","Pipeline"],"summary":"Get Pipeline Config","description":"Load a named pipeline config.","operationId":"get_pipeline_config_memory_pipeline_configs__config_name__get","parameters":[{"name":"config_name","in":"path","required":true,"schema":{"type":"string","title":"Config Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Pipeline","Pipeline"],"summary":"Update Pipeline Config","description":"Update an existing pipeline config.","operationId":"update_pipeline_config_memory_pipeline_configs__config_name__patch","parameters":[{"name":"config_name","in":"path","required":true,"schema":{"type":"string","title":"Config Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineConfigCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Pipeline","Pipeline"],"summary":"Delete Pipeline Config","description":"Delete a named pipeline config.","operationId":"delete_pipeline_config_memory_pipeline_configs__config_name__delete","parameters":[{"name":"config_name","in":"path","required":true,"schema":{"type":"string","title":"Config Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/logs":{"get":{"tags":["Pipeline Logs","Pipeline Logs"],"summary":"Query Logs","description":"Return persisted pipeline log records for the authenticated workspace, newest first.","operationId":"query_logs_memory_logs_get","parameters":[{"name":"level","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ERROR | WARN | INFO | DEBUG","title":"Level"},"description":"ERROR | WARN | INFO | DEBUG"},{"name":"stage","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pipeline stage name","title":"Stage"},"description":"Pipeline stage name"},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 datetime lower bound","title":"Since"},"description":"ISO 8601 datetime lower bound"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/plans/create":{"post":{"tags":["Plans","Plans"],"summary":"Create Plan","description":"Create a plan with optional task nodes.","operationId":"create_plan_memory_plans_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePlanRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/plans/active/list":{"get":{"tags":["Plans","Plans"],"summary":"Get Active Plans","description":"Get all plans with status='active'.","operationId":"get_active_plans_memory_plans_active_list_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/plans/{plan_id}":{"get":{"tags":["Plans","Plans"],"summary":"Get Plan","description":"Get a plan container with all its tasks.","operationId":"get_plan_memory_plans__plan_id__get","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","pattern":"^plan_[a-f0-9]{12}$","title":"Plan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/plans/{plan_id}/task":{"patch":{"tags":["Plans","Plans"],"summary":"Update Task","description":"Update a task's status and recompute plan completion.","operationId":"update_task_memory_plans__plan_id__task_patch","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","pattern":"^plan_[a-f0-9]{12}$","title":"Plan Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTaskRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/plans/{plan_id}/complete":{"post":{"tags":["Plans","Plans"],"summary":"Complete Plan","description":"Mark plan as completed, optionally graduating to a decision record.","operationId":"complete_plan_memory_plans__plan_id__complete_post","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","pattern":"^plan_[a-f0-9]{12}$","title":"Plan Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompletePlanRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/plans/{plan_id}/fail":{"post":{"tags":["Plans","Plans"],"summary":"Fail Plan","description":"Mark plan as failed with reason.","operationId":"fail_plan_memory_plans__plan_id__fail_post","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","pattern":"^plan_[a-f0-9]{12}$","title":"Plan Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FailPlanRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/platform/ping":{"post":{"tags":["Licensing","Licensing"],"summary":"Platform Ping","description":"Validate and append a content-free direct or Marketplace health ping.","operationId":"platform_ping_memory_platform_ping_post","requestBody":{"content":{"application/json":{"schema":{"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"}}}}},"security":[]}},"/memory/plugins/catalog":{"get":{"tags":["Plugins","Plugins"],"summary":"Get Plugin Catalog","description":"List registered pipeline plugins (hub axis 3), with any records the catalog refused.","operationId":"get_plugin_catalog_memory_plugins_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/memory/policy/bundle":{"get":{"tags":["Policy","Policy"],"summary":"Get Policy Bundle","description":"Compile this workspace's active decisions into a Stratum policy bundle.\n\nErrors:\n    400 ``invalid_selector``: a status other than ``active`` was requested.\n    400 ``workspace_scope_missing``: the caller has no resolvable workspace.\n    400 ``workspace_mismatch``: the compiled bundle is not this workspace's.","operationId":"get_policy_bundle_memory_policy_bundle_get","parameters":[{"name":"workflow","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workflow selector echoed back in the bundle's `selector`. P1 does not filter rules by workflow. It records what the bundle was compiled for.","title":"Workflow"},"description":"Workflow selector echoed back in the bundle's `selector`. P1 does not filter rules by workflow. It records what the bundle was compiled for."},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact decision-domain filter (contract: `selector.domain`).","title":"Domain"},"description":"Exact decision-domain filter (contract: `selector.domain`)."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Repeatable lifecycle selector (contract: `selector.status`, default `['active']`). P1 compiles active decisions only. Any other value is a 400 `invalid_selector` rather than a silently narrowed bundle.","title":"Status"},"description":"Repeatable lifecycle selector (contract: `selector.status`, default `['active']`). P1 compiles active decisions only. Any other value is a 400 `invalid_selector` rather than a silently narrowed bundle."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Policy Bundle Memory Policy Bundle Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/policy/events":{"post":{"tags":["Policy","Policy"],"summary":"Record Enforcement Event","description":"Record one immutable Stratum enforcement event against this workspace's rules.\n\nIdempotent on ``event_id``: a replay returns 200 with ``created: false`` and\nthe item id of the event already stored.\n\nErrors:\n    400 ``invalid_event``: the event violates the exchange contract.\n    400 ``deviation_requires_human``: ``outcome='deviation'`` without\n        ``resolved_by='human'``, ``resolved_by_user_id`` and ``rationale``.\n    400 ``workspace_mismatch``: a cited rule source belongs to another\n        workspace.","operationId":"record_enforcement_event_memory_policy_events_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Event","description":"One enforcement event using the contract's `enforcement_event` keys. Accepted verbatim: validation lives in core so the error codes the producer sees are the contract's, not a re-derived service copy."}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Record Enforcement Event Memory Policy Events Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/okf/export":{"get":{"tags":["OKF Portability","OKF Portability"],"summary":"Export Okf Bundle","description":"Export the caller's workspace memories as a compressed OKF bundle.\n\nRequires a workspace admin grant or tenant admin (403 otherwise).","operationId":"export_okf_bundle_memory_okf_export_get","parameters":[{"name":"memory_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/okf/import":{"post":{"tags":["OKF Portability","OKF Portability"],"summary":"Import Okf Bundle","description":"Import an OKF bundle into the caller's workspace without re-ingestion.\n\nv0.2 imports are deliberately staged: validate all declaration conflicts,\ncreate active declarations, add items, then restore retired/superseded\nclass state.  A conflict returns before the first declaration or item write.","operationId":"import_okf_bundle_memory_okf_import_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_okf_bundle_memory_okf_import_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Import Okf Bundle Memory Okf Import Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/procedures/candidates":{"get":{"tags":["Procedure_candidates","Procedures"],"summary":"List Procedure Candidates","description":"List procedure promotion candidates from working memory patterns.\n\nAnalyzes working memory items to find repeated patterns that could be\npromoted to stored procedures for reuse.\n\nReturns candidates sorted by recommendation score (highest first).","operationId":"list_procedure_candidates_memory_procedures_candidates_get","parameters":[{"name":"min_score","in":"query","required":false,"schema":{"type":"number","maximum":1.0,"minimum":0.0,"description":"Minimum recommendation score","default":0.6,"title":"Min Score"},"description":"Minimum recommendation score"},{"name":"min_cluster_size","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":2,"description":"Minimum items in cluster","default":3,"title":"Min Cluster Size"},"description":"Minimum items in cluster"},{"name":"days_back","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"Look back period in days","default":30,"title":"Days Back"},"description":"Look back period in days"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Maximum candidates to return","default":20,"title":"Limit"},"description":"Maximum candidates to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/procedures/candidates/{cluster_id}/promote":{"post":{"tags":["Procedure_candidates","Procedures"],"summary":"Promote Procedure Candidate","description":"Promote a candidate cluster to a stored procedure.\n\nCreates a new procedural memory item from the candidate cluster's\nrepresentative content and metadata.","operationId":"promote_procedure_candidate_memory_procedures_candidates__cluster_id__promote_post","parameters":[{"name":"cluster_id","in":"path","required":true,"schema":{"type":"string","title":"Cluster Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/procedures/candidates/{cluster_id}/dismiss":{"delete":{"tags":["Procedure_candidates","Procedures"],"summary":"Dismiss Procedure Candidate","description":"Dismiss a candidate cluster from future recommendations.\n\nThe candidate will be excluded from future recommendation lists\nfor this workspace.","operationId":"dismiss_procedure_candidate_memory_procedures_candidates__cluster_id__dismiss_delete","parameters":[{"name":"cluster_id","in":"path","required":true,"schema":{"type":"string","title":"Cluster Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DismissResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/procedures/drift":{"get":{"tags":["Procedure Drift","Procedure Drift"],"summary":"List Drift Events","description":"Return drift event history for the current workspace.","operationId":"list_drift_events_memory_procedures_drift_get","parameters":[{"name":"procedure_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by procedure ID","title":"Procedure Id"},"description":"Filter by procedure ID"},{"name":"resolved","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by resolution status","title":"Resolved"},"description":"Filter by resolution status"},{"name":"breaking_only","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only show events with breaking changes","title":"Breaking Only"},"description":"Only show events with breaking changes"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO date string (inclusive)","title":"Start Date"},"description":"ISO date string (inclusive)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO date string (inclusive)","title":"End Date"},"description":"ISO date string (inclusive)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/procedures/drift/sweep":{"post":{"tags":["Procedure Drift","Procedure Drift"],"summary":"Sweep Drift","description":"Check all procedures in the workspace for schema drift.\n\nReturns a summary of procedures checked and drift events created.","operationId":"sweep_drift_memory_procedures_drift_sweep_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/procedures/drift/{event_id}":{"get":{"tags":["Procedure Drift","Procedure Drift"],"summary":"Get Drift Event","description":"Return a single drift event with full change details.","operationId":"get_drift_event_memory_procedures_drift__event_id__get","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/procedures/drift/{event_id}/resolve":{"post":{"tags":["Procedure Drift","Procedure Drift"],"summary":"Resolve Drift Event","description":"Mark a drift event as resolved.","operationId":"resolve_drift_event_memory_procedures_drift__event_id__resolve_post","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/procedures/schemas/{procedure_id}":{"get":{"tags":["Procedure Drift","Procedure Drift"],"summary":"List Schema Snapshots","description":"Return schema snapshot history for a procedure.","operationId":"list_schema_snapshots_memory_procedures_schemas__procedure_id__get","parameters":[{"name":"procedure_id","in":"path","required":true,"schema":{"type":"string","title":"Procedure Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/procedures/{procedure_id}/evolution":{"get":{"tags":["Procedure_evolution","Procedures"],"summary":"Get Procedure Evolution","description":"Get evolution history for a procedure.\n\nReturns a list of evolution events showing how the procedure was\ndiscovered and refined over time.\n\nArgs:\n    procedure_id: The procedure ID to get history for\n    limit: Maximum number of events to return (default 20)\n    offset: Number of events to skip (default 0)\n\nReturns:\n    Evolution history with current version and event list","operationId":"get_procedure_evolution_memory_procedures__procedure_id__evolution_get","parameters":[{"name":"procedure_id","in":"path","required":true,"schema":{"type":"string","title":"Procedure Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum events to return","default":20,"title":"Limit"},"description":"Maximum events to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Pagination offset","default":0,"title":"Offset"},"description":"Pagination offset"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/procedures/{procedure_id}/evolution/{event_id}":{"get":{"tags":["Procedure_evolution","Procedures"],"summary":"Get Procedure Evolution Event","description":"Get detailed information about a specific evolution event.\n\nReturns the full content snapshot and diff for a single evolution event.\n\nArgs:\n    procedure_id: The procedure ID\n    event_id: The event ID to retrieve\n\nReturns:\n    Full event detail including content snapshot and changes","operationId":"get_procedure_evolution_event_memory_procedures__procedure_id__evolution__event_id__get","parameters":[{"name":"procedure_id","in":"path","required":true,"schema":{"type":"string","title":"Procedure Id"}},{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/procedures/{procedure_id}/confidence-trajectory":{"get":{"tags":["Procedure_evolution","Procedures"],"summary":"Get Procedure Confidence Trajectory","description":"Get confidence trajectory data for charting.\n\nReturns time-series data showing how confidence has changed over the\nprocedure's lifecycle, suitable for rendering in a line chart.\n\nArgs:\n    procedure_id: The procedure ID\n\nReturns:\n    Data points with timestamp, confidence, matches, and success_rate","operationId":"get_procedure_confidence_trajectory_memory_procedures__procedure_id__confidence_trajectory_get","parameters":[{"name":"procedure_id","in":"path","required":true,"schema":{"type":"string","title":"Procedure Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/procedures/matches":{"get":{"tags":["Procedure Matches","Procedure Matches"],"summary":"List Procedure Matches","description":"Return procedure match history for the current workspace.","operationId":"list_procedure_matches_memory_procedures_matches_get","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO date string (inclusive)","title":"Start Date"},"description":"ISO date string (inclusive)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO date string (inclusive)","title":"End Date"},"description":"ISO date string (inclusive)"},{"name":"procedure_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by procedure ID","title":"Procedure Id"},"description":"Filter by procedure ID"},{"name":"feedback","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by feedback: success | failure | neutral","title":"Feedback"},"description":"Filter by feedback: success | failure | neutral"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/procedures/matches/stats":{"get":{"tags":["Procedure Matches","Procedure Matches"],"summary":"Get Procedure Match Stats","description":"Return aggregated procedure match statistics for the current workspace.","operationId":"get_procedure_match_stats_memory_procedures_matches_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/procedures/matches/{match_id}/feedback":{"post":{"tags":["Procedure Matches","Procedure Matches"],"summary":"Submit Procedure Match Feedback","description":"Submit feedback for a procedure match.","operationId":"submit_procedure_match_feedback_memory_procedures_matches__match_id__feedback_post","parameters":[{"name":"match_id","in":"path","required":true,"schema":{"type":"string","title":"Match Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/procedures":{"get":{"tags":["Procedures","Procedures"],"summary":"List Procedures","description":"List all procedural memories with aggregated match statistics.\n\nReturns procedures from the graph database joined with match stats from MongoDB.\nSupports pagination and sorting by match_count, success_rate, created_at, or name.","operationId":"list_procedures_memory_procedures_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Maximum procedures to return","default":50,"title":"Limit"},"description":"Maximum procedures to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Pagination offset","default":0,"title":"Offset"},"description":"Pagination offset"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"enum":["match_count","success_rate","created_at","name"],"type":"string"},{"type":"null"}],"description":"Sort field","title":"Sort By"},"description":"Sort field"},{"name":"sort_order","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","description":"Sort direction","default":"desc","title":"Sort Order"},"description":"Sort direction"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/procedures/{procedure_id}":{"get":{"tags":["Procedures","Procedures"],"summary":"Get Procedure","description":"Get full procedure detail with recent match history.\n\nReturns the procedure's content, metadata, and optionally the recent match history.","operationId":"get_procedure_memory_procedures__procedure_id__get","parameters":[{"name":"procedure_id","in":"path","required":true,"schema":{"type":"string","title":"Procedure Id"}},{"name":"include_matches","in":"query","required":false,"schema":{"type":"boolean","description":"Include recent match history","default":true,"title":"Include Matches"},"description":"Include recent match history"},{"name":"match_limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max matches to include","default":20,"title":"Match Limit"},"description":"Max matches to include"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/pipeline/profile-catalog":{"get":{"tags":["Profiles","Profiles"],"summary":"Get Profile Catalog","description":"List the built-in pipeline profiles (hub axis 3 \"Pipelines\"), with any registry entries the catalog refused.","operationId":"get_profile_catalog_memory_pipeline_profile_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileCatalogResponse"}}}}},"security":[]}},"/memory/pipeline/profiles":{"get":{"tags":["Profiles","Profiles"],"summary":"List Profiles","description":"List the pipeline profiles the request workspace may read (built-in + visible custom).\n\n``total`` counts these rows only.","operationId":"list_profiles_memory_pipeline_profiles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileListResponse"}}}}}},"post":{"tags":["Profiles","Profiles"],"summary":"Create Profile","description":"Create a custom pipeline profile, private to the request workspace.\n\nA name taken anywhere in the tenant (or by a built-in) returns 409 ``profile_name_unavailable`` with no\ndetail about the holder: the unique index decides, there is no tenant-wide pre-read.","operationId":"create_profile_memory_pipeline_profiles_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/pipeline/profiles/{name}":{"get":{"tags":["Profiles","Profiles"],"summary":"Get Profile","description":"Get a pipeline profile by name: a custom profile the request workspace may read, else a built-in.\n\nA profile that is missing, owned by another workspace and not shared with this one, or in another\ntenant returns the same 404 body.","operationId":"get_profile_memory_pipeline_profiles__name__get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Profiles","Profiles"],"summary":"Update Profile","description":"Update a custom pipeline profile by name.\n\nPrivate: members of the owning workspace. Org-wide: org admins only. The write is one conditional\nupdate whose filter re-asserts what this read decided; a change in between returns 409.","operationId":"update_profile_memory_pipeline_profiles__name__patch","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Profiles","Profiles"],"summary":"Delete Profile","description":"Delete a custom pipeline profile by name (same rules as update; never a name-only delete).","operationId":"delete_profile_memory_pipeline_profiles__name__delete","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/progress/stream":{"get":{"tags":["Progress","Progress"],"summary":"Get Progress Stream","description":"Stream ProgressEvents as Server-Sent Events.\n\nThree modes per progress-event-contract.json SSEEndpoint.modes.\nScope is derived server-side, and no scope query parameter is accepted.\n\nError codes per contract SSEEndpoint.errors:\n- 400: invalid query combination\n- 401: missing/invalid auth (handled by scope middleware)\n- 403: no workspace membership (handled by scope middleware)\n- 404: run_id not found in caller's stream window\n\nNo ``X-Workspace-Id`` is not an error: this is a ``team_required`` memory route, so the scope dependency asks the\nrouting resolver (WS-ROUTING-2) and a human caller streams their default workspace, membership-checked like a\nheader. 400 ``missing_team_context`` only when nothing resolves (SVC-PROGRESS-SSE-NO-WORKSPACE-HANG-1).","operationId":"get_progress_stream_memory_progress_stream_get","parameters":[{"name":"run_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter to a single run. Required when from_seq is present.","title":"Run Id"},"description":"Filter to a single run. Required when from_seq is present."},{"name":"from_seq","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Per-run replay starting point. Must accompany run_id.","title":"From Seq"},"description":"Per-run replay starting point. Must accompany run_id."},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Redis stream ID to resume from. Mutually exclusive with from_seq.","title":"Since"},"description":"Redis stream ID to resume from. Mutually exclusive with from_seq."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/{item_id}/prompt/summarize":{"get":{"tags":["Prompts","Prompts"],"summary":"Summarize Memory Prompt","description":"Generate a prompt template for summarizing a memory item.\n\nRequires authentication and validates item ownership.","operationId":"summarize_memory_prompt_memory__item_id__prompt_summarize_get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/{item_id}/prompt/analyze":{"get":{"tags":["Prompts","Prompts"],"summary":"Analyze Connections Prompt","description":"Generate a prompt template for analyzing memory connections.\n\nRequires authentication and validates item ownership.","operationId":"analyze_connections_prompt_memory__item_id__prompt_analyze_get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/read-around":{"post":{"tags":["Memory Read-Around","Memory Read-Around"],"summary":"Read Around","description":"Return a contract-shaped centered conversation window for a recall hit.\n\nErrors:\n    400 ``budget_too_small``: ``char_budget`` too small to fit the centered\n        chunk.\n    404 ``not_found``: ``item_id`` not accessible under the caller's scope.","operationId":"read_around_memory_read_around_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadAroundRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Read Around Memory Read Around Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/reasoning/challenge":{"post":{"tags":["Reasoning","Reasoning"],"summary":"Challenge Assertion","description":"Challenge an assertion against existing knowledge to detect contradictions.\n\nUses a multi-method detection cascade:\n1. LLM-based (if enabled) - most accurate\n2. Graph-based - structural analysis\n3. Embedding-based - semantic similarity + polarity\n4. Heuristic - pattern matching fallback\n\nReturns detected conflicts with confidence scores and suggested resolutions.","operationId":"challenge_assertion_memory_reasoning_challenge_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChallengeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChallengeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/reasoning/resolve":{"post":{"tags":["Reasoning","Reasoning"],"summary":"Resolve Conflict","description":"Resolve a conflict between assertions.\n\nAuto-resolution cascade (if enabled):\n1. Wikipedia lookup - verify against Wikipedia\n2. LLM reasoning - ask GPT to fact-check\n3. Grounding check - check existing provenance\n4. Recency heuristic - prefer recent info for temporal conflicts\n\nFalls back to manual strategy if auto-resolution fails.","operationId":"resolve_conflict_memory_reasoning_resolve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IdempotentResolveResponse"},{"$ref":"#/components/schemas/ResolveResponse"}],"title":"Response Resolve Conflict Memory Reasoning Resolve Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/reasoning/conflicts":{"get":{"tags":["Reasoning","Reasoning"],"summary":"List Conflicts","description":"List memory items that have unresolved conflicts.\n\nReturns items marked with:\n- needs_review=True\n- has_conflict=True\n- challenged=True","operationId":"list_conflicts_memory_reasoning_conflicts_get","parameters":[{"name":"needs_review","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Needs Review"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/reasoning/low-confidence":{"get":{"tags":["Reasoning","Reasoning"],"summary":"Get Low Confidence Items","description":"Get items with confidence below threshold.\n\nUseful for finding facts that have been challenged multiple times\nand may need review or removal.\n\nReturns items sorted by confidence (lowest first).","operationId":"get_low_confidence_items_memory_reasoning_low_confidence_get","parameters":[{"name":"threshold","in":"query","required":false,"schema":{"type":"number","default":0.5,"title":"Threshold"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/reasoning/confidence-history/{item_id}":{"get":{"tags":["Reasoning","Reasoning"],"summary":"Get Confidence History","description":"Get the confidence decay history for a specific item.\n\nReturns list of decay events with timestamps, reasons, and conflicting facts.","operationId":"get_confidence_history_memory_reasoning_confidence_history__item_id__get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/reasoning/query":{"post":{"tags":["Reasoning","Reasoning"],"summary":"Route Query","description":"Route a query to the cheapest effective retrieval method (symbolic, semantic, or hybrid).","operationId":"route_query_memory_reasoning_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/reasoning/proof":{"post":{"tags":["Reasoning","Reasoning"],"summary":"Build Proof","description":"Build an auditable proof tree for a decision, tracing evidence back to sources.","operationId":"build_proof_memory_reasoning_proof_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProofRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/reasoning/fuzzy-confidence":{"post":{"tags":["Reasoning","Reasoning"],"summary":"Fuzzy Confidence","description":"Get multi-dimensional confidence score for a decision (evidence, recency, consensus, directness).","operationId":"fuzzy_confidence_memory_reasoning_fuzzy_confidence_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FuzzyConfidenceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/reasoning/traces/extract":{"post":{"tags":["Reasoning Traces","Reasoning Traces"],"summary":"Extract Reasoning","description":"Extract reasoning traces from content.\n\nDetects chain-of-thought reasoning patterns:\n- Explicit: Thought:/Action:/Observation: markers\n- Implicit: LLM-detected reasoning patterns\n\nReturns extracted trace with quality evaluation.","operationId":"extract_reasoning_memory_reasoning_traces_extract_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractReasoningRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractReasoningResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/reasoning/traces/store":{"post":{"tags":["Reasoning Traces","Reasoning Traces"],"summary":"Store Reasoning Trace","description":"Store a reasoning trace as a memory item.\n\nCreates a 'reasoning' type memory with CAUSES relations to any artifacts.","operationId":"store_reasoning_trace_memory_reasoning_traces_store_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreReasoningRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/reasoning/traces/query":{"post":{"tags":["Reasoning Traces","Reasoning Traces"],"summary":"Query Reasoning","description":"Query reasoning traces.\n\nUse cases:\n- \"Why did I choose Python?\" → finds reasoning traces mentioning Python decisions\n- artifact_id → finds reasoning that CAUSES this artifact","operationId":"query_reasoning_memory_reasoning_traces_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryReasoningRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/reasoning/traces/{trace_id}":{"get":{"tags":["Reasoning Traces","Reasoning Traces"],"summary":"Get Reasoning Trace","description":"Get a specific reasoning trace by ID.","operationId":"get_reasoning_trace_memory_reasoning_traces__trace_id__get","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/recall/pack":{"post":{"tags":["Recall","Recall"],"summary":"Recall Pack","description":"Assemble the most useful context that fits in `budget_tokens`.\n\nReturns `{block, manifest}`. 400 on an out-of-range budget, an unknown section name or\npreset, or both `preset` and `sections`. A typo'd section must surface rather than\nsilently shrink the pack, and an ambiguous request must not be silently resolved.","operationId":"recall_pack_memory_recall_pack_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecallPackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/result-feedback":{"post":{"tags":["Result Feedback","Result Feedback"],"summary":"Submit Result Feedback","description":"Submit result-selection feedback for a completed search session.\n\nThe ``search_session_id`` is obtained from the ``X-Search-Session-Id``\nresponse header of ``POST /memory/search``.\n\nErrors:\n- 404: Session not found or expired (> 1 hour since search).\n- 400: One or more ``result_used`` IDs were not in the original result set.\n- 409: Feedback already submitted for this session (idempotency guard).","operationId":"submit_result_feedback_memory_result_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultFeedbackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultFeedbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/workspaces/{workspace_id}/retrieval-policy":{"get":{"tags":["Retrieval_policy","Retrieval Policy"],"summary":"Get Retrieval Policy","description":"Read same-tenant overrides, matching the agent recall-profile GET posture.","operationId":"get_retrieval_policy_memory_workspaces__workspace_id__retrieval_policy_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceRetrievalPolicyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Retrieval_policy","Retrieval Policy"],"summary":"Set Retrieval Policy","description":"Replace overrides. Only the workspace owner or tenant admin may mutate.","operationId":"set_retrieval_policy_memory_workspaces__workspace_id__retrieval_policy_put","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrievalPolicyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceRetrievalPolicyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/sequences/{name}/next":{"post":{"tags":["Sequences","Sequences"],"summary":"Allocate Sequence","description":"Consume the next numbers. Never blocks, as there is no contention to wait on.","operationId":"allocate_sequence_memory_sequences__name__next_post","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$","title":"Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllocateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/sequences/{name}":{"get":{"tags":["Sequences","Sequences"],"summary":"Peek Sequence","description":"Read the counter without consuming a number.","operationId":"peek_sequence_memory_sequences__name__get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SequencePeekResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/sleep/run":{"post":{"tags":["Sleep","Sleep"],"summary":"Run Sleep Cycle Now","description":"Fire one sleep cycle synchronously for the caller's workspace.\n\nBypasses the schedule but NOT the cross-replica lock: a concurrent run for\nthe same workspace returns 409 ``lock_held`` on the loser (mirrors\n``summary.generate_snapshot``).","operationId":"run_sleep_cycle_now_memory_sleep_run_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Run Sleep Cycle Now Memory Sleep Run Post"}}}}}}},"/memory/sleep/status/{workspace_id}":{"get":{"tags":["Sleep","Sleep"],"summary":"Sleep Cycle Status","description":"Read the latest workspace sweep record. Cross-workspace access is superadmin-only.","operationId":"sleep_cycle_status_memory_sleep_status__workspace_id__get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Sleep Cycle Status Memory Sleep Status  Workspace Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/ingest/structured":{"post":{"tags":["Structured Ingestion","Structured Ingestion"],"summary":"Ingest Structured","description":"Ingest structured data via a registered handler.\n\nCORE-INGEST-ROUTE-COLLISION-1: served at ``POST /memory/ingest/structured``. It\npreviously registered ``/ingest``, colliding with the NLP ingest route\n(``ingest_content``), which, registered first, shadowed this handler at dispatch\n(a structured body silently ingested as empty content) and owned the OpenAPI entry.\nNo HTTP client used the old path, so the move is non-breaking.\n\nBypasses the NLP pipeline, because the structure IS the content.\nThe handler determines strategy (FULL/INDEXED/APPEND), validates,\nconverts to MemoryItem, and creates edges and indexes.","operationId":"ingest_structured_memory_ingest_structured_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredIngestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/schemas":{"get":{"tags":["Structured Ingestion","Structured Ingestion"],"summary":"List Schemas","description":"List available structured ingestion schemas.","operationId":"list_schemas_memory_schemas_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/ingest/document":{"post":{"tags":["Structured Ingestion","Structured Ingestion"],"summary":"Ingest Document","description":"Ingest a document from a public URL.\n\nCreates a parent document node (INDEXED) and chunk nodes (FULL, embedded)\nlinked via PART_OF edges. Deduplicates by source URL + content hash.\n\nSecurity: only http:// and https:// URLs are accepted. Local file paths and\nother URI schemes (file://, gopher://, ftp://, etc.) are rejected to prevent\nSSRF/LFI attacks. Local-file ingestion is exposed via the CLI (CORE-STRUCT-CLI-1).","operationId":"ingest_document_memory_ingest_document_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentIngestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/summary/generate":{"post":{"tags":["Summary","Summary"],"summary":"Generate Snapshot","description":"Fire a manual snapshot. Bypasses min-interval (per design D3) but\nNOT the cross-replica lock: concurrent ``POST /generate`` calls for\nthe same workspace return ``409 Conflict`` with ``{reason: lock_held}``\non the loser (Codex-R4 #1).","operationId":"generate_snapshot_memory_summary_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Generate Snapshot Memory Summary Generate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/summary/latest":{"get":{"tags":["Summary","Summary"],"summary":"Latest Snapshot","operationId":"latest_snapshot_memory_summary_latest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Latest Snapshot Memory Summary Latest Get"}}}}}}},"/memory/summary/list":{"get":{"tags":["Summary","Summary"],"summary":"List Snapshots","operationId":"list_snapshots_memory_summary_list_get","parameters":[{"name":"is_heartbeat","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Heartbeat"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":20,"title":"Limit"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Before"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Snapshots Memory Summary List Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/summary/delta":{"get":{"tags":["Summary","Summary"],"summary":"Delta Snapshots","operationId":"delta_snapshots_memory_summary_delta_get","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","title":"From"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","title":"To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delta Snapshots Memory Summary Delta Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/summary/{snapshot_id}":{"get":{"tags":["Summary","Summary"],"summary":"Get Snapshot","operationId":"get_snapshot_memory_summary__snapshot_id__get","parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Snapshot Memory Summary  Snapshot Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Summary","Summary"],"summary":"Delete Snapshot","description":"Admin-only (Codex-R4 #3). Snapshots are normally retained per Decision 4.","operationId":"delete_snapshot_memory_summary__snapshot_id__delete","parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/summary/{snapshot_id}/markdown":{"get":{"tags":["Summary","Summary"],"summary":"Get Snapshot Markdown","description":"Fast path: graph-only markdown. Skips Mongo entirely.","operationId":"get_snapshot_markdown_memory_summary__snapshot_id__markdown_get","parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Get Snapshot Markdown Memory Summary  Snapshot Id  Markdown Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/support/chat":{"post":{"tags":["Support","Support"],"summary":"Support Chat","description":"One anonymous support turn. See the module docstring and the SUPPORT-CHAT-1 contract.","operationId":"support_chat_memory_support_chat_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/memory/sync/pair":{"post":{"tags":["Sync","Sync"],"summary":"Pair","operationId":"pair_memory_sync_pair_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/sync/push":{"post":{"tags":["Sync","Sync"],"summary":"Push","operationId":"push_memory_sync_push_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/sync/receipts":{"post":{"tags":["Sync","Sync"],"summary":"Receipts","operationId":"receipts_memory_sync_receipts_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/teams":{"post":{"tags":["Teams","Team Management"],"summary":"Create Team","description":"Create a new team within the user's tenant.\n\nAuthorized for tenant admins (JWT) or a service API key carrying `write:teams`\n(which is itself mintable only by a tenant admin, see api_keys.py). Always\ncreates the team in the caller's own tenant (`get_tenant_context`).","operationId":"create_team_memory_teams_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTeamRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Teams","Team Management"],"summary":"List Teams","description":"List all teams the user has access to.","operationId":"list_teams_memory_teams_get","parameters":[{"name":"include_system","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include System"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TeamResponse"},"title":"Response List Teams Memory Teams Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/teams/{team_id}":{"get":{"tags":["Teams","Team Management"],"summary":"Get Team","description":"Get details of a specific team.","operationId":"get_team_memory_teams__team_id__get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Teams","Team Management"],"summary":"Update Team","description":"Update team details (partial merge). Requires team admin or tenant admin.","operationId":"update_team_memory_teams__team_id__patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTeamRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Teams","Team Management"],"summary":"Delete Team","description":"Delete a team. Requires tenant admin.","operationId":"delete_team_memory_teams__team_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/teams/{team_id}/workspaces":{"get":{"tags":["Teams","Team Management"],"summary":"List Team Workspaces","description":"List active Workspaces granted to a visible Team.","operationId":"list_team_workspaces_memory_teams__team_id__workspaces_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamWorkspaceList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/teams/{team_id}/members":{"get":{"tags":["Teams","Team Management"],"summary":"List Team Members","description":"List all members of a team.","operationId":"list_team_members_memory_teams__team_id__members_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Teams","Team Management"],"summary":"Add Team Member","description":"Add a user to a team. Requires team admin or tenant admin.","operationId":"add_team_member_memory_teams__team_id__members_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddMemberRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/teams/{team_id}/members/{member_user_id}":{"patch":{"tags":["Teams","Team Management"],"summary":"Update Team Member","description":"Update a team member's role. Requires team admin or tenant admin.","operationId":"update_team_member_memory_teams__team_id__members__member_user_id__patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"member_user_id","in":"path","required":true,"schema":{"type":"string","title":"Member User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMemberRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Teams","Team Management"],"summary":"Remove Team Member","description":"Remove a user from a team.","operationId":"remove_team_member_memory_teams__team_id__members__member_user_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"member_user_id","in":"path","required":true,"schema":{"type":"string","title":"Member User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/teams/{team_id}/permissions":{"get":{"tags":["Teams","Team Management"],"summary":"Get Team Permissions","description":"Get available permissions for a team.\n\nReturns the permissions structure and user's current permissions.","operationId":"get_team_permissions_memory_teams__team_id__permissions_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/telemetry/sessions":{"get":{"tags":["Telemetry","Telemetry"],"summary":"List Sessions","description":"List telemetry sessions for the current workspace, sorted by started_at desc.","operationId":"list_sessions_memory_telemetry_sessions_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/telemetry/sessions/{session_id}":{"get":{"tags":["Telemetry","Telemetry"],"summary":"Get Session","description":"Get a single session with its events.","operationId":"get_session_memory_telemetry_sessions__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"}}}}}}},"/memory/telemetry/stats":{"get":{"tags":["Telemetry","Telemetry"],"summary":"Get Stats","description":"Aggregated telemetry stats for the workspace.\n\nReturns session counts (today/7d/30d), total tokens, total cost,\nand total active time.","operationId":"get_stats_memory_telemetry_stats_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/telemetry/tools":{"get":{"tags":["Telemetry","Telemetry"],"summary":"Get Tool Usage","description":"Tool usage breakdown from telemetry events.\n\nAggregates tool_result events by tool_name: count, avg duration, success rate.","operationId":"get_tool_usage_memory_telemetry_tools_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/temporal/relationships/{rel_id}/history":{"get":{"tags":["Temporal","Temporal"],"summary":"Get Relationship History","description":"Get history of a relationship.\n\nReturns all versions of a relationship with valid_time periods.","operationId":"get_relationship_history_memory_temporal_relationships__rel_id__history_get","parameters":[{"name":"rel_id","in":"path","required":true,"schema":{"type":"string","title":"Rel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/temporal/relationships/at/{timestamp}":{"get":{"tags":["Temporal","Temporal"],"summary":"Get Relationships At Time","description":"Get all relationships that existed at specific time.\n\nReturns relationships whose valid_time includes the specified timestamp.","operationId":"get_relationships_at_time_memory_temporal_relationships_at__timestamp__get","parameters":[{"name":"timestamp","in":"path","required":true,"schema":{"type":"string","title":"Timestamp"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum relationships to return","default":100,"title":"Limit"},"description":"Maximum relationships to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/temporal/relationships/{rel_id}/valid-periods":{"get":{"tags":["Temporal","Temporal"],"summary":"Get Relationship Valid Periods","description":"Get valid time periods for a relationship.\n\nReturns all time periods during which the relationship was valid.","operationId":"get_relationship_valid_periods_memory_temporal_relationships__rel_id__valid_periods_get","parameters":[{"name":"rel_id","in":"path","required":true,"schema":{"type":"string","title":"Rel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/temporal/at/{timestamp}":{"get":{"tags":["Temporal","Temporal"],"summary":"Time Travel","description":"Time-travel query - get state at specific time.\n\nReturns all memories as they existed at the specified timestamp.\nSupports both valid_time and transaction_time queries.","operationId":"time_travel_memory_temporal_at__timestamp__get","parameters":[{"name":"timestamp","in":"path","required":true,"schema":{"type":"string","title":"Timestamp"}},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional search query","title":"Query"},"description":"Optional search query"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":1,"description":"Maximum results","default":100,"title":"Limit"},"description":"Maximum results"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/temporal/search/during":{"get":{"tags":["Temporal","Temporal"],"summary":"Search During Range","description":"Search matching versions by version timestamp.\n\nFor item creation windows use POST /memory/search with since/until. Without\na version tracker current rows are marked range_applied=false and a WARNING is logged.","operationId":"search_during_range_memory_temporal_search_during_get","parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","title":"Query"}},{"name":"start_time","in":"query","required":true,"schema":{"type":"string","title":"Start Time"}},{"name":"end_time","in":"query","required":true,"schema":{"type":"string","title":"End Time"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum results","default":100,"title":"Limit"},"description":"Maximum results"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/temporal/compliance/report":{"get":{"tags":["Temporal","Temporal"],"summary":"Compliance Report","description":"Generate compliance report (HIPAA, GDPR, SOC2).\n\nReturns comprehensive audit report suitable for compliance requirements.\nIncludes all access, modifications, and deletions in time range.","operationId":"compliance_report_memory_temporal_compliance_report_get","parameters":[{"name":"start_date","in":"query","required":true,"schema":{"type":"string","description":"Report start date","title":"Start Date"},"description":"Report start date"},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","description":"Report end date","title":"End Date"},"description":"Report end date"},{"name":"report_type","in":"query","required":false,"schema":{"type":"string","description":"Report type: HIPAA, GDPR, or SOC2","default":"HIPAA","title":"Report Type"},"description":"Report type: HIPAA, GDPR, or SOC2"},{"name":"item_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Specific items to include","title":"Item Ids"},"description":"Specific items to include"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/temporal/{item_id}/history":{"get":{"tags":["Temporal","Temporal"],"summary":"Get History","description":"Get complete version history of a memory item.\n\nReturns all versions with valid_time and transaction_time,\nenabling full audit trail. Requires tenant validation.","operationId":"get_history_memory_temporal__item_id__history_get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"start_time","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start time (ISO format)","title":"Start Time"},"description":"Start time (ISO format)"},{"name":"end_time","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End time (ISO format)","title":"End Time"},"description":"End time (ISO format)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum versions to return","default":100,"title":"Limit"},"description":"Maximum versions to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/temporal/{item_id}/at/{timestamp}":{"get":{"tags":["Temporal","Temporal"],"summary":"Item At Time","description":"Get specific item as it existed at timestamp.\n\nReturns the version of the item that was valid at the specified time.","operationId":"item_at_time_memory_temporal__item_id__at__timestamp__get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"timestamp","in":"path","required":true,"schema":{"type":"string","title":"Timestamp"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/temporal/{item_id}/changes":{"get":{"tags":["Temporal","Temporal"],"summary":"Get Changes","description":"Get all changes to an item in time range.\n\nReturns detailed change log with old/new values and changed fields.","operationId":"get_changes_memory_temporal__item_id__changes_get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start time (ISO format)","title":"Since"},"description":"Start time (ISO format)"},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End time (ISO format)","title":"Until"},"description":"End time (ISO format)"},{"name":"change_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by change type","title":"Change Type"},"description":"Filter by change type"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/temporal/{item_id}/compare":{"post":{"tags":["Temporal","Temporal"],"summary":"Compare Versions","description":"Compare two versions of an item.\n\nReturns detailed diff showing what changed between versions.","operationId":"compare_versions_memory_temporal__item_id__compare_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"v1","in":"query","required":true,"schema":{"type":"integer","description":"First version number","title":"V1"},"description":"First version number"},{"name":"v2","in":"query","required":true,"schema":{"type":"integer","description":"Second version number","title":"V2"},"description":"Second version number"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/temporal/{item_id}/rollback":{"post":{"tags":["Temporal","Temporal"],"summary":"Rollback","description":"Rollback item to previous version.\n\nRestores item to specified version or timestamp.\nCreates new version (doesn't delete history).","operationId":"rollback_memory_temporal__item_id__rollback_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"to_version","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Version number to rollback to","title":"To Version"},"description":"Version number to rollback to"},{"name":"to_time","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Timestamp to rollback to","title":"To Time"},"description":"Timestamp to rollback to"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/temporal/{item_id}/audit":{"get":{"tags":["Temporal","Temporal"],"summary":"Get Audit Trail","description":"Get complete audit trail for an item.\n\nReturns detailed log of all changes with user, timestamp, and change details.\nSuitable for compliance reporting (HIPAA, GDPR, SOC2).","operationId":"get_audit_trail_memory_temporal__item_id__audit_get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"change_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by change type","title":"Change Type"},"description":"Filter by change type"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by user","title":"User Id"},"description":"Filter by user"},{"name":"start_time","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start time","title":"Start Time"},"description":"Start time"},{"name":"end_time","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End time","title":"End Time"},"description":"End time"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/token-usage":{"get":{"tags":["Token Usage","Token Usage"],"summary":"Get Token Usage","description":"Return aggregated token usage for the current workspace.\n\nReads from the ``token_usage`` MongoDB collection.","operationId":"get_token_usage_memory_token_usage_get","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO date string (inclusive)","title":"Start Date"},"description":"ISO date string (inclusive)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO date string (inclusive)","title":"End Date"},"description":"ISO date string (inclusive)"},{"name":"group_by","in":"query","required":false,"schema":{"anyOf":[{"enum":["stage","profile","day"],"type":"string"},{"type":"null"}],"description":"Group results by: stage | profile | day","title":"Group By"},"description":"Group results by: stage | profile | day"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/token-usage/current":{"get":{"tags":["Token Usage","Token Usage"],"summary":"Get Token Usage Current","description":"Return real-time cache stats and the last few pipeline runs.\n\nCombines Redis cache stats with the most recent token_usage records.","operationId":"get_token_usage_current_memory_token_usage_current_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/graph/health":{"get":{"tags":["Validation","Validation"],"summary":"Graph Health","description":"Get graph health metrics: orphan ratio, type distribution, provenance coverage.","operationId":"graph_health_memory_graph_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/validate":{"post":{"tags":["Validation","Validation"],"summary":"Validate Item","description":"Validate a memory item against schema and semantic rules.","operationId":"validate_item_memory_validate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateItemRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/inference":{"post":{"tags":["Validation","Validation"],"summary":"Run Inference","description":"Run inference engine to create inferred edges from rules.","operationId":"run_inference_memory_inference_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunInferenceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/inference/rules":{"get":{"tags":["Validation","Validation"],"summary":"List Inference Rules","description":"List available inference rules.","operationId":"list_inference_rules_memory_inference_rules_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/vector/query":{"post":{"tags":["Vector","Vector"],"summary":"Vector Query","description":"Nearest in-scope neighbours of ``text`` (embedded server-side) or a raw ``embedding``.","operationId":"vector_query_memory_vector_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/vector/stats":{"get":{"tags":["Vector","Vector"],"summary":"Vector Stats","description":"Backend, capabilities, embedder and per-collection counts for the caller's scope.","operationId":"vector_stats_memory_vector_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/vector/items/{item_id}":{"get":{"tags":["Vector","Vector"],"summary":"Vector Inspect","description":"One memory's vector row and neighbours. Not visible to the caller is 404, never 403.","operationId":"vector_inspect_memory_vector_items__item_id__get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"top_k","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Top K"}},{"name":"collection","in":"query","required":false,"schema":{"type":"string","default":"memory","title":"Collection"}},{"name":"include_embedding","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Embedding"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/vector/missing":{"get":{"tags":["Vector","Vector"],"summary":"Vector Missing","description":"One page of in-scope memories with no usable vector (``total`` is null when the backend cannot count cheaply).","operationId":"vector_missing_memory_vector_missing_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"collection","in":"query","required":false,"schema":{"type":"string","default":"memory","title":"Collection"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/vector/projection":{"get":{"tags":["Vector","Vector"],"summary":"Vector Projection","description":"The caller's in-scope vectors projected to 2D/3D for the Vectors tab map view.\n\nPCA by default (deterministic); ``method=umap`` only where the server enables it, else 501.\n``limit`` is clamped to 2000 server-side and larger scopes are sampled deterministically.","operationId":"vector_projection_memory_vector_projection_get","parameters":[{"name":"dims","in":"query","required":false,"schema":{"type":"string","default":"3","title":"Dims"}},{"name":"method","in":"query","required":false,"schema":{"type":"string","default":"pca","title":"Method"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Limit"}},{"name":"collection","in":"query","required":false,"schema":{"type":"string","default":"memory","title":"Collection"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/worker/queues":{"get":{"tags":["Worker Queues","Worker Queues"],"summary":"Get Worker Queues","description":"Return summary for all worker streams + consumer liveness. Superadmin only.","operationId":"get_worker_queues_memory_worker_queues_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/worker/queues/{stream_slug}/pending":{"get":{"tags":["Worker Queues","Worker Queues"],"summary":"Get Worker Queue Pending","description":"Return full PEL detail for one stream (XPENDING range). Superadmin only.","operationId":"get_worker_queue_pending_memory_worker_queues__stream_slug__pending_get","parameters":[{"name":"stream_slug","in":"path","required":true,"schema":{"type":"string","title":"Stream Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/worker/queues/{stream_slug}/dlq":{"get":{"tags":["Worker Queues","Worker Queues"],"summary":"Get Worker Queue Dlq","description":"Return failed (DLQ) entries for one stream. Superadmin only.","operationId":"get_worker_queue_dlq_memory_worker_queues__stream_slug__dlq_get","parameters":[{"name":"stream_slug","in":"path","required":true,"schema":{"type":"string","title":"Stream Slug"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/worker/jobs/{message_id}/retry":{"post":{"tags":["Worker Queues","Worker Queues"],"summary":"Retry Worker Job","description":"Move a DLQ entry back onto its source stream. Superadmin only.","operationId":"retry_worker_job_memory_worker_jobs__message_id__retry_post","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/workspaces":{"get":{"tags":["Workspaces","Workspace Management"],"summary":"List Workspaces","description":"List management metadata for active Workspaces in the active tenant.","operationId":"list_workspaces_memory_workspaces_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceList"}}}}}},"post":{"tags":["Workspaces","Workspace Management"],"summary":"Create Workspace","description":"Create an independent Workspace with an initial same-tenant Team grant.","operationId":"create_workspace_memory_workspaces_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspaceRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/workspaces/{workspace_id}/access":{"get":{"tags":["Workspaces","Workspace Management"],"summary":"Get Workspace Access","description":"Read one Workspace's Team grants and direct user grants.\n\nSame authority as share and revoke: a tenant admin or a caller whose\neffective permission on the Workspace is ``admin``. Another tenant's or an\nunknown Workspace id answers 404, never 403.","operationId":"get_workspace_access_memory_workspaces__workspace_id__access_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceAccess"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/workspaces/{workspace_id}/share":{"post":{"tags":["Workspaces","Workspace Management"],"summary":"Share Workspace","description":"Upsert one Team's permission on a Workspace.","operationId":"share_workspace_memory_workspaces__workspace_id__share_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareWorkspaceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/workspaces/{workspace_id}/share/{team_id}":{"delete":{"tags":["Workspaces","Workspace Management"],"summary":"Revoke Workspace Share","description":"Remove one Team grant while preserving every independent access path.\n\nA grant to a deleted, inactive or foreign Team is removable too, when this\nWorkspace stores it. A never-granted id without an active Team stays 404.","operationId":"revoke_workspace_share_memory_workspaces__workspace_id__share__team_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/zettel/notes":{"post":{"tags":["Zettelkasten","Zettelkasten"],"summary":"Create Zettel Note","description":"Create a zettel note directly.\n\nBypasses /memory/add's LLM-classification pipeline so the consumer's\nexplicit `memory_type=zettel` intent is preserved. Tags and title land\non the [Zettel] row's top-level properties, queryable via /by-tag and\n/by-property.","operationId":"create_zettel_note_memory_zettel_notes_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_create_zettel_note_memory_zettel_notes_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/zettel/by-tag/{tag}":{"get":{"tags":["Zettelkasten","Zettelkasten"],"summary":"Find Notes By Tag","description":"Find notes by tag.\n\nReturns all notes tagged with the specified tag.","operationId":"find_notes_by_tag_memory_zettel_by_tag__tag__get","parameters":[{"name":"tag","in":"path","required":true,"schema":{"type":"string","title":"Tag"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum results","default":100,"title":"Limit"},"description":"Maximum results"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/zettel/by-property":{"get":{"tags":["Zettelkasten","Zettelkasten"],"summary":"Find Notes By Property","description":"Find notes by property.\n\nReturns notes where metadata[key] == value. A private routing field (``routed_by_ref``) is refused with 400 before\nthe query unless the caller is a workspace admin (WS-ROUTING-2 S12): the match itself would confirm a guess.","operationId":"find_notes_by_property_memory_zettel_by_property_get","parameters":[{"name":"key","in":"query","required":true,"schema":{"type":"string","description":"Property key","title":"Key"},"description":"Property key"},{"name":"value","in":"query","required":true,"schema":{"type":"string","description":"Property value","title":"Value"},"description":"Property value"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum results","default":100,"title":"Limit"},"description":"Maximum results"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/zettel/mentioning/{entity_id}":{"get":{"tags":["Zettelkasten","Zettelkasten"],"summary":"Find Notes Mentioning","description":"Find notes mentioning an entity.\n\nReturns notes that reference or mention the specified entity.","operationId":"find_notes_mentioning_memory_zettel_mentioning__entity_id__get","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum results","default":100,"title":"Limit"},"description":"Maximum results"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/zettel/by-relation/{source_id}/{relation_type}":{"get":{"tags":["Zettelkasten","Zettelkasten"],"summary":"Query By Dynamic Relation","description":"Query notes by dynamic relation type.\n\nReturns notes connected to source via the specified relation type.","operationId":"query_by_dynamic_relation_memory_zettel_by_relation__source_id___relation_type__get","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}},{"name":"relation_type","in":"path","required":true,"schema":{"type":"string","title":"Relation Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum results","default":100,"title":"Limit"},"description":"Maximum results"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/zettel/{note_id}/links":{"post":{"tags":["Zettelkasten","Zettelkasten"],"summary":"Create Explicit Link","description":"Create an explicit typed link between two zettels.\n\nLINKS_TO uses the bidirectional helper. Arbitrary relation types go\nthrough add_dynamic_relation and become visible via\nGET /zettel/by-relation/{source_id}/{relation_type}.","operationId":"create_explicit_link_memory_zettel__note_id__links_post","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","title":"Note Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_create_explicit_link_memory_zettel__note_id__links_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/zettel/{note_id}/backlinks":{"get":{"tags":["Zettelkasten","Zettelkasten"],"summary":"Get Backlinks","description":"Get notes that link TO this note (backlinks).\n\nReturns notes that reference this note, enabling\nbidirectional navigation through your knowledge graph.","operationId":"get_backlinks_memory_zettel__note_id__backlinks_get","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","title":"Note Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/zettel/{note_id}/forward-links":{"get":{"tags":["Zettelkasten","Zettelkasten"],"summary":"Get Forward Links","description":"Get notes this note links TO (forward links).\n\nReturns notes referenced by this note.","operationId":"get_forward_links_memory_zettel__note_id__forward_links_get","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","title":"Note Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/zettel/{note_id}/connections":{"get":{"tags":["Zettelkasten","Zettelkasten"],"summary":"Get All Connections","description":"Get all connections (backlinks + forward links).\n\nReturns complete bidirectional link graph for this note.","operationId":"get_all_connections_memory_zettel__note_id__connections_get","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","title":"Note Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/zettel/clusters":{"get":{"tags":["Zettelkasten","Zettelkasten"],"summary":"Get Clusters","description":"Detect knowledge clusters in your Zettelkasten.\n\nFinds groups of highly interconnected notes that form\ncoherent knowledge domains.","operationId":"get_clusters_memory_zettel_clusters_get","parameters":[{"name":"min_size","in":"query","required":false,"schema":{"type":"integer","description":"Minimum cluster size","default":3,"title":"Min Size"},"description":"Minimum cluster size"},{"name":"algorithm","in":"query","required":false,"schema":{"type":"string","description":"Clustering algorithm","default":"louvain","title":"Algorithm"},"description":"Clustering algorithm"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/zettel/hubs":{"get":{"tags":["Zettelkasten","Zettelkasten"],"summary":"Get Hubs","description":"Find hub notes (highly connected notes).\n\nIdentifies notes that serve as central connection points\nin your knowledge graph.","operationId":"get_hubs_memory_zettel_hubs_get","parameters":[{"name":"min_connections","in":"query","required":false,"schema":{"type":"integer","description":"Minimum connections to be a hub","default":5,"title":"Min Connections"},"description":"Minimum connections to be a hub"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum number of hubs to return","default":20,"title":"Limit"},"description":"Maximum number of hubs to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/zettel/bridges":{"get":{"tags":["Zettelkasten","Zettelkasten"],"summary":"Get Bridges","description":"Find bridge notes (notes connecting different clusters).\n\nIdentifies notes that connect otherwise separate knowledge domains,\nenabling cross-domain insights.","operationId":"get_bridges_memory_zettel_bridges_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum number of bridges to return","default":20,"title":"Limit"},"description":"Maximum number of bridges to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/zettel/{note_id}/discoveries":{"get":{"tags":["Zettelkasten","Zettelkasten"],"summary":"Get Discoveries","description":"Find unexpected connections (serendipitous discovery).\n\nDiscovers non-obvious relationships between notes that might\nlead to new insights.","operationId":"get_discoveries_memory_zettel__note_id__discoveries_get","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","title":"Note Id"}},{"name":"max_distance","in":"query","required":false,"schema":{"type":"integer","description":"Maximum path distance","default":3,"title":"Max Distance"},"description":"Maximum path distance"},{"name":"min_surprise","in":"query","required":false,"schema":{"type":"number","description":"Minimum surprise score (0-1)","default":0.5,"title":"Min Surprise"},"description":"Minimum surprise score (0-1)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/zettel/{note_id}/path/{target_id}":{"get":{"tags":["Zettelkasten","Zettelkasten"],"summary":"Get Path","description":"Find paths between two notes.\n\nDiscovers how two notes are connected through intermediate notes,\nrevealing hidden relationships.","operationId":"get_path_memory_zettel__note_id__path__target_id__get","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","title":"Note Id"}},{"name":"target_id","in":"path","required":true,"schema":{"type":"string","title":"Target Id"}},{"name":"max_paths","in":"query","required":false,"schema":{"type":"integer","description":"Maximum number of paths to return","default":5,"title":"Max Paths"},"description":"Maximum number of paths to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/zettel/wikilink/parse":{"post":{"tags":["Zettelkasten","Zettelkasten"],"summary":"Parse Wikilinks","description":"Parse [[wikilinks]] in content.\n\nExtracts wikilink references and optionally creates\nbidirectional links automatically.","operationId":"parse_wikilinks_memory_zettel_wikilink_parse_post","parameters":[{"name":"auto_create","in":"query","required":false,"schema":{"type":"boolean","description":"Auto-create bidirectional links","default":true,"title":"Auto Create"},"description":"Auto-create bidirectional links"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_parse_wikilinks_memory_zettel_wikilink_parse_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/zettel/wikilink/resolve":{"get":{"tags":["Zettelkasten","Zettelkasten"],"summary":"Resolve Wikilink","description":"Resolve a wikilink to a note.\n\nFinds the note referenced by a wikilink (e.g., [[My Note]]).","operationId":"resolve_wikilink_memory_zettel_wikilink_resolve_get","parameters":[{"name":"link","in":"query","required":true,"schema":{"type":"string","title":"Link"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/zettel/{note_id}/graph":{"get":{"tags":["Zettelkasten","Zettelkasten"],"summary":"Get Subgraph","description":"Get subgraph around a note (for visualization).\n\nReturns nodes and edges within specified depth for\ngraph visualization.","operationId":"get_subgraph_memory_zettel__note_id__graph_get","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","title":"Note Id"}},{"name":"depth","in":"query","required":false,"schema":{"type":"integer","description":"Depth of subgraph (1-3)","default":2,"title":"Depth"},"description":"Depth of subgraph (1-3)"},{"name":"include_metadata","in":"query","required":false,"schema":{"type":"boolean","description":"Include note metadata","default":true,"title":"Include Metadata"},"description":"Include note metadata"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/zettel/concept-emergence":{"get":{"tags":["Zettelkasten","Zettelkasten"],"summary":"Detect Concept Emergence","description":"Detect emerging concepts from connection patterns.\n\nIdentifies concepts that are gaining prominence based on\nfrequency and connection patterns.","operationId":"detect_concept_emergence_memory_zettel_concept_emergence_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum concepts to return","default":20,"title":"Limit"},"description":"Maximum concepts to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/zettel/{note_id}/suggestions":{"get":{"tags":["Zettelkasten","Zettelkasten"],"summary":"Suggest Related Notes","description":"Suggest related notes for serendipitous discovery.\n\nReturns notes that might be relevant but aren't directly linked,\nenabling discovery of unexpected connections.","operationId":"suggest_related_notes_memory_zettel__note_id__suggestions_get","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","title":"Note Id"}},{"name":"count","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Number of suggestions","default":5,"title":"Count"},"description":"Number of suggestions"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/zettel/{note_id}/random-walk":{"get":{"tags":["Zettelkasten","Zettelkasten"],"summary":"Random Walk Discovery","description":"Perform random walk for serendipitous discovery.\n\nTakes a random path through the knowledge graph,\npotentially revealing unexpected insights.","operationId":"random_walk_discovery_memory_zettel__note_id__random_walk_get","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","title":"Note Id"}},{"name":"length","in":"query","required":false,"schema":{"type":"integer","description":"Walk length (1-10)","default":5,"title":"Length"},"description":"Walk length (1-10)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/subscriptions":{"get":{"tags":["Event Subscriptions","Subscriptions"],"summary":"List Subscriptions","description":"List all subscriptions for the current workspace.\n\nA caller without management authority (the workspace admin role and, for an API key, the ``write:teams`` scope)\nsees each webhook URL cut to its origin and no headers.","operationId":"list_subscriptions_memory_subscriptions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SubscriptionResponse"},"type":"array","title":"Response List Subscriptions Memory Subscriptions Get"}}}}}},"post":{"tags":["Event Subscriptions","Subscriptions"],"summary":"Create Subscription","description":"Retired: refuses with 410 ``subscriptions_retired`` and stores nothing.\n\nSVC-2.0-EVENT-SUBSCRIPTIONS-NO-PRODUCER-1: no producer writes the stream the worker matches subscriptions\nagainst, so a new subscription would be accepted and never fire. The refusal runs before any URL\nresolution or store access. Rewiring delivery onto progress events is an owner decision.","operationId":"create_subscription_memory_subscriptions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}}},"410":{"description":"Subscription creation is retired: no producer emits subscription events"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/subscriptions/{sub_id}":{"get":{"tags":["Event Subscriptions","Subscriptions"],"summary":"Get Subscription","description":"Get a single subscription by ID (the webhook URL is cut to its origin without management authority).","operationId":"get_subscription_memory_subscriptions__sub_id__get","parameters":[{"name":"sub_id","in":"path","required":true,"schema":{"type":"string","title":"Sub Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Event Subscriptions","Subscriptions"],"summary":"Delete Subscription","description":"Deactivate a subscription (soft delete).","operationId":"delete_subscription_memory_subscriptions__sub_id__delete","parameters":[{"name":"sub_id","in":"path","required":true,"schema":{"type":"string","title":"Sub Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/agents":{"get":{"tags":["Agents","Agents"],"summary":"List Agents","description":"List all agents in the current tenant.","operationId":"list_agents_memory_agents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AgentResponse"},"type":"array","title":"Response List Agents Memory Agents Get"}}}}}},"post":{"tags":["Agents","Agents"],"summary":"Create Agent","description":"Create a new AI agent as a first-class user.\n\nAgents can:\n- Store and retrieve memories\n- Be assigned to teams\n- Have specific permissions/roles","operationId":"create_agent_memory_agents_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/agents/{agent_id}":{"get":{"tags":["Agents","Agents"],"summary":"Get Agent","description":"Get details of a specific agent.","operationId":"get_agent_memory_agents__agent_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Agents","Agents"],"summary":"Delete Agent","description":"Delete (deactivate) an agent.\n\nRemoves keys whose stored user_id is the agent ID in this tenant.\nKeys previously created from the Web Agents page belong to the calling\nhuman and are not revoked here. Those keys require separate revocation.","operationId":"delete_agent_memory_agents__agent_id__delete","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/agents/{agent_id}/recall-profile":{"get":{"tags":["Agents","Agents"],"summary":"Get Recall Profile","description":"Get an agent's recall profile for personality-aware retrieval.","operationId":"get_recall_profile_memory_agents__agent_id__recall_profile_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Agents","Agents"],"summary":"Set Recall Profile","description":"Set an agent's recall profile for personality-aware retrieval.\n\nProfile shape: {\"memory_type_weights\": {\"decision\": 2.0, \"procedural\": 1.5, \"episodic\": 0.5}}\nEmpty dict clears the profile (restores default behavior).","operationId":"set_recall_profile_memory_agents__agent_id__recall_profile_put","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecallProfileUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/agents/{agent_id}/evaluation":{"get":{"tags":["Agents","Agents"],"summary":"Get Agent Evaluation","description":"Get the current evaluation for an agent on a given (dimension, domain) slot.\n\nReturns ``{evaluation: <dict>}`` when a current evaluation exists,\nor ``{evaluation: null}`` on cold-start / unseen slot (HTTP 200 either way).\n\nError codes:\n- ``404 AGENT_NOT_FOUND``: agent_id does not belong to the current tenant.\n- ``422``: required query params missing.\n\nMirrors the ``GET /{agent_id}/recall-profile`` pattern (agents.py:230).","operationId":"get_agent_evaluation_memory_agents__agent_id__evaluation_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"dimension","in":"query","required":true,"schema":{"type":"string","title":"Dimension"}},{"name":"domain","in":"query","required":true,"schema":{"type":"string","title":"Domain"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/agents/{agent_id}/evaluation/history":{"get":{"tags":["Agents","Agents"],"summary":"Get Agent Evaluation History","description":"Get the evaluation history for an agent on a given (dimension, domain) slot.\n\nReturns ``{history: [<dict>, ...]}`` sorted most-recent-first.\nReturns ``{history: []}`` when no evaluations have been written yet.\n\nError codes:\n- ``404 AGENT_NOT_FOUND``: agent_id does not belong to the current tenant.\n- ``422``: required query params missing.\n\nSplit out from ``/evaluation`` per Codex Round-3 F3 (no include_history flag).","operationId":"get_agent_evaluation_history_memory_agents__agent_id__evaluation_history_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"dimension","in":"query","required":true,"schema":{"type":"string","title":"Dimension"}},{"name":"domain","in":"query","required":true,"schema":{"type":"string","title":"Domain"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/routing/prefs":{"get":{"tags":["Write Routing","Routing"],"summary":"Get Routing Prefs","description":"The caller's routing prefs. An absent row reads as version 0 with every setting null (null = personal floor).","operationId":"get_routing_prefs_memory_routing_prefs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Routing Prefs Memory Routing Prefs Get"}}}}}},"put":{"tags":["Write Routing","Routing"],"summary":"Put Routing Prefs","description":"Set the caller's account default (``null`` clears it). ``version`` is the value last read (0 for no row).","operationId":"put_routing_prefs_memory_routing_prefs_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_put_routing_prefs_memory_routing_prefs_put"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Put Routing Prefs Memory Routing Prefs Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/routing/session":{"put":{"tags":["Write Routing","Routing"],"summary":"Put Routing Session","description":"Select ``workspace_id`` for this client (and context) until it goes idle for ``ROUTING_SESSION_IDLE_TTL_S``.","operationId":"put_routing_session_memory_routing_session_put","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_put_routing_session_memory_routing_session_put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Put Routing Session Memory Routing Session Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Write Routing","Routing"],"summary":"Delete Routing Session","description":"Clear the caller's selection for this client (and context). Clearing nothing is not an error.","operationId":"delete_routing_session_memory_routing_session_delete","parameters":[{"name":"client_key","in":"query","required":true,"schema":{"type":"string","maxLength":200,"title":"Client Key"}},{"name":"context_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Context Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Routing Session Memory Routing Session Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/routing/explain":{"get":{"tags":["Write Routing","Routing"],"summary":"Explain Routing","description":"Where a write from this caller would land now, and each lever's candidate. Writes nothing.\n\nS10: a workspace id or name appears only when the caller can use that workspace right now, or when the caller sent\nit themselves (an explicit ``X-Workspace-Id``); an unusable one reads ``inaccessible`` with no id, whether or not\nit exists. ``client_key`` and ``context_key`` select the session record (lever 3, WS-ROUTING-4); the context\nbinding lever ships in WS-ROUTING-6. Never refreshes a session's expiry.","operationId":"explain_routing_memory_routing_explain_get","parameters":[{"name":"client_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Client Key"}},{"name":"context_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Context Key"}},{"name":"file_workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"File Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Explain Routing Memory Routing Explain Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/add":{"post":{"tags":["Memory CRUD","Memory CRUD"],"summary":"Add Memory","description":"Add a memory item with optional full ingestion pipeline.\n\nRequires authentication and operates on user-scoped data.\n\nArgs:\n    content: The memory content\n    memory_type: Type of memory (semantic, episodic, procedural)\n    metadata: Additional metadata\n    use_pipeline: If True, uses full ingestion pipeline with entity extraction (default: True)\n    conversation_context: Optional conversation context for conversation-aware entity extraction\n    embed: SVC-EMBED-CONTROL-1 tri-state embedding override. True forces an\n        embedding, False suppresses one, None (default) leaves existing\n        behaviour untouched. Only honoured when `use_pipeline` is False (see the 400 below).\n\nNote:\n    Provenance like `retrieved_context_ids` travels in `metadata`. The storage\n    layer flattens metadata onto the node and lifts known fields back onto the\n    MemoryItem on read, so no dedicated body field is needed (GRAPH-API-1i,\n    wire field added then removed 2026-08-02. Metadata takes precedence at\n    storage regardless, node_types.py).","operationId":"add_memory_memory_add_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_add_memory_memory_add_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/by-metadata":{"get":{"tags":["Memory CRUD","Memory CRUD"],"summary":"Get Memory By Metadata","description":"Find memory items by exact metadata match.\n\n**Deprecated (GRAPH-API-1l):** use\n`GET /memory/list?metadata_key=<key>&metadata_value=<value>` instead. It\napplies the same filter but adds pagination and an exact `total`, which this\nroute has never had. Behaviour here is unchanged and this endpoint still\nworks. Retirement is gated on a recorded production parity diff, because\nthe two routes return different item shapes (this one carries `superseded` /\n`superseded_by` and synthesizes content for code rows).\n\nReturns a list of items whose `metadata.<metadata_key>` equals\n`metadata_value`. Empty result is HTTP 200 with `{items: [], count: 0}`, since\n\"no match\" is not an error.\n\nStorage flattens metadata into top-level node properties (separator `__`),\nso `metadata_key=\"bot_topic\"` matches the flat prop `n.bot_topic`. Nested\nkeys can be passed as `nested.key` and are translated to `nested__key`.\n\nPreviously this route hardcoded `top_k=1` and 404'd on empty. Both have\nbeen corrected here. The core `search_by_metadata` was also rewritten\n(was returning `[]` for every call due to a missing method on SmartGraph).","operationId":"get_memory_by_metadata_memory_by_metadata_get","deprecated":true,"parameters":[{"name":"metadata_key","in":"query","required":true,"schema":{"type":"string","description":"Metadata key to search","title":"Metadata Key"},"description":"Metadata key to search"},{"name":"metadata_value","in":"query","required":true,"schema":{"type":"string","description":"Metadata value to match","title":"Metadata Value"},"description":"Metadata value to match"},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Until"}},{"name":"memory_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Type of memory to filter","title":"Memory Type"},"description":"Type of memory to filter"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Max results to return","default":25,"title":"Limit"},"description":"Max results to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/entities":{"get":{"tags":["Memory CRUD","Memory CRUD"],"summary":"List Entities","description":"List entity nodes admitted by the current scope, optionally by name prefix.\n\nBacks Discord-style entity autocomplete (`/recall about:<entity>`). Entities\nare graph nodes (`node_category = 'entity'`), not metadata fields. Calling\n`/by-metadata?metadata_key=entities` does NOT work because entities are\nedge-connected, not embedded in a metadata list.\n\nEntities are scoped through connected memory nodes by the scope provider,\nhonoring USER and TENANT isolation. Empty prefix returns entities by name.","operationId":"list_entities_memory_entities_get","parameters":[{"name":"prefix","in":"query","required":false,"schema":{"type":"string","description":"Case-insensitive name prefix (empty = all)","default":"","title":"Prefix"},"description":"Case-insensitive name prefix (empty = all)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Max entities to return","default":25,"title":"Limit"},"description":"Max entities to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/search":{"get":{"tags":["Memory CRUD","Memory CRUD"],"summary":"Search Memory Get","description":"Search for memory items using semantic and contextual matching (GET method).","operationId":"search_memory_get_memory_search_get","parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","description":"Search query","title":"Query"},"description":"Search query"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum number of results","default":5,"title":"Limit"},"description":"Maximum number of results"},{"name":"memory_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Type of memory to search","title":"Memory Type"},"description":"Type of memory to search"},{"name":"exclude_speculative","in":"query","required":false,"schema":{"type":"boolean","description":"Exclude tier-3 speculative derived results, while tier-4 results remain hidden","default":false,"title":"Exclude Speculative"},"description":"Exclude tier-3 speculative derived results, while tier-4 results remain hidden"},{"name":"as_of_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Transaction-time travel: return what the system believed at this ISO-8601 instant","title":"As Of Date"},"description":"Transaction-time travel: return what the system believed at this ISO-8601 instant"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Memory CRUD","Memory CRUD"],"summary":"Search Memory","description":"Search for memory items using semantic and contextual matching.\n\nOptionally use SSG (Similarity Graph Traversal) for better multi-hop reasoning.\nSet use_ssg=true to enable SSG, or leave as null to use config default.\n\nRequires authentication and operates on user-scoped data.\nSecureSmartMemory handles tenant isolation automatically via ScopeProvider.","operationId":"search_memory_memory_search_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/list":{"get":{"tags":["Memory CRUD","Memory CRUD"],"summary":"List Memories","description":"List all memories for the current user, optionally filtered by type and metadata.\n\nRequires authentication and operates on user-scoped data.\nSecureSmartMemory automatically handles tenant isolation.\n\nGRAPH-API-1l: supersedes `GET /memory/by-metadata` for metadata lookups:\nsame filter, but with this route's pagination and `total`. Filters only ever\nnarrow the caller's own accessible set. They can never surface an item the\ncaller could not otherwise see. See\n`docs/features/GRAPH-API-1l/list-filters-contract.json`.\n\nSVC-LIST-EXCLUDE-ENTITY-1: `exclude_node_category` (repeatable) and `q` narrow\nthe set the same way, before pagination, so `total` is the filtered count.","operationId":"list_memories_memory_list_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","default":"asc","title":"Order"}},{"name":"metadata_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Metadata key to filter on (exact match). Nested keys use dot syntax, e.g. `profile.tier`. Must be supplied together with `metadata_value`.","title":"Metadata Key"},"description":"Metadata key to filter on (exact match). Nested keys use dot syntax, e.g. `profile.tier`. Must be supplied together with `metadata_value`."},{"name":"metadata_value","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Value the metadata key must equal. Must be supplied together with `metadata_key`.","title":"Metadata Value"},"description":"Value the metadata key must equal. Must be supplied together with `metadata_key`."},{"name":"memory_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact memory type filter","title":"Memory Type"},"description":"Exact memory type filter"},{"name":"include_grounding","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Include grounding nodes. Omit to inherit workspace then env (default OFF)","title":"Include Grounding"},"description":"Include grounding nodes. Omit to inherit workspace then env (default OFF)"},{"name":"exclude_node_category","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"},"maxItems":20},{"type":"null"}],"description":"Node categories to leave out, repeatable (for example `exclude_node_category=entity`). Applied before pagination, so `total` counts the filtered set.","title":"Exclude Node Category"},"description":"Node categories to leave out, repeatable (for example `exclude_node_category=entity`). Applied before pagination, so `total` counts the filtered set."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Case-insensitive substring match over `content`, applied before pagination like the other filters.","title":"Q"},"description":"Case-insensitive substring match over `content`, applied before pagination like the other filters."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/summary":{"get":{"tags":["Memory CRUD","Memory CRUD"],"summary":"Get Memory Summary","description":"Get summary statistics about the memory system for a specific user.\n\nRequires authentication and operates on user-scoped data.","operationId":"get_memory_summary_memory_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/memory/{item_id}":{"get":{"tags":["Memory CRUD","Memory CRUD"],"summary":"Get Memory","description":"Retrieve a memory item by ID.\n\nRequires authentication and validates item ownership.","operationId":"get_memory_memory__item_id__get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Memory CRUD","Memory CRUD"],"summary":"Update Memory","description":"Update a memory item (partial merge).\n\nCanonical update path (CORE-CRUD-UPDATE-1): always routes through\n`SecureSmartMemory.update_properties(item_id, properties, write_mode)`.\n\n- `content`/`metadata` are conveniences folded into the properties dict.\n- `properties` + `write_mode` expose the raw node-property update API.\n- When both are provided, `properties` takes precedence and conveniences\n  are ignored (contract: keeps the two paths cleanly separated).","operationId":"update_memory_memory__item_id__patch","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryItemUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Memory CRUD","Memory CRUD"],"summary":"Delete Memory","description":"Delete a memory item by ID with optional entity garbage collection.\n\nRequires authentication and validates item ownership.\n\nArgs:\n    item_id: ID of the memory item to delete\n    cleanup_orphans: If True, also delete entities that have no other references (default: True)\n\nReturns:\n    dict: Deletion status and garbage collection statistics","operationId":"delete_memory_memory__item_id__delete","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"cleanup_orphans","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Cleanup Orphans"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Memory Memory  Item Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/{item_id}/lineage":{"get":{"tags":["Memory CRUD","Memory CRUD"],"summary":"Get Lineage","description":"Walk the derived_from chain from item to root.\n\nReturns a list of items from the given item back to the root (item with no derived_from).\nMax depth 20 to prevent infinite loops.","operationId":"get_lineage_memory__item_id__lineage_get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/{item_id}/supersede":{"post":{"tags":["Memory CRUD","Memory CRUD"],"summary":"Supersede Memory","description":"Create a bitemporal replacement for an accessible memory item.","operationId":"supersede_memory_memory__item_id__supersede_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupersedeMemoryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/{item_id}/supersede-link":{"post":{"tags":["Memory CRUD","Memory CRUD"],"summary":"Supersede Link Memory","description":"Link two already-stored accessible items as a supersession.\n\nSVC-SUPERSEDE-LINK-1. The sibling ``POST /{item_id}/supersede`` *creates* the\nreplacement from a content payload. This one relates two records that already\nexist, which is what a caller that wrote them separately needs.\n\n``item_id`` is the OLD item, matching the sibling route's convention.\n\nThe write stamps the OLD node with ``superseded=True``, ``superseded_by`` and\n``superseded_at``, so consumers detect supersession by reading those\nproperties off a recalled record, never by scanning for inbound edges.","operationId":"supersede_link_memory_memory__item_id__supersede_link_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupersedeLinkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/clear-all":{"delete":{"tags":["Memory CRUD","Memory CRUD"],"summary":"Clear All Memories","description":"Clear all memories for the current user, or everything if nuclear=true.\n\nWARNING: This deletes memories. Cannot be undone.\nIf nuclear=true, deletes EVERYTHING (graph + cache + vectors) for dev/cleanup.\n\nSEC-ROUTE-AUTHZ-1 H10: the nuclear path wipes the entire deployment (all\ntenants), so it requires the superadmin role. The ordinary scoped clear\nstays open to any authenticated user and removes own memories only: the\nitems the caller authored. In a shared workspace other members' items and\nunattributed items are kept (SEC-CLEAR-ALL-SHARED-WS-1, enforced in\n``SecureSmartMemory.clear_user_memories``), for every role, admins included.\n\nThe role check says WHO may wipe, never WHICH deployment gets wiped, which\nis how the service security suite erased a developer host's shared graph on\n2026-08-21. `assert_nuclear_allowed` adds the missing target control: the\nnuclear path additionally requires SMARTMEMORY_ALLOW_NUCLEAR_CLEAR=true AND\na target graph that is not in SMARTMEMORY_NUCLEAR_PROTECTED_GRAPHS. See\nmemory_service/api/nuclear_guard.py.","operationId":"clear_all_memories_memory_clear_all_delete","parameters":[{"name":"nuclear","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Nuclear"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/search/advanced":{"post":{"tags":["Memory CRUD","Memory CRUD"],"summary":"Search Memory Advanced","description":"Advanced search using Similarity Graph Traversal (SSG) algorithms.\n\nSSG provides superior multi-hop reasoning and contextual retrieval compared to basic vector search.\n\nAlgorithms:\n- query_traversal: Best for general queries (100% test pass, 0.91 precision/recall)\n- triangulation_fulldim: Best for high precision (highest faithfulness)\n\nReference:\n    Eric Lester. (2025). Novel Semantic Similarity Graph Traversal Algorithms\n    for Semantic Retrieval Augmented Generation Systems.\n    https://github.com/glacier-creative-git/semantic-similarity-graph-traversal-semantic-rag-research\n\nRequires authentication and operates on user-scoped data.","operationId":"search_memory_advanced_memory_search_advanced_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_search_memory_advanced_memory_search_advanced_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memory/clear":{"post":{"tags":["Memory CRUD","Memory CRUD"],"summary":"Clear Memory","description":"Clear all memory for the current user (use with caution).\n\nThis is a destructive operation that removes all memory items\nthe authenticated user authored (other members' items in a shared\nworkspace are kept, SEC-CLEAR-ALL-SHARED-WS-1). Use DELETE /memory/clear-all for\nmore options including nuclear mode.","operationId":"clear_memory_memory_clear_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"APIKeyCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Human-readable name for the API key"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes","description":"Permissions for this API key","default":["read:memories"]},"expires_in_days":{"anyOf":[{"type":"integer","maximum":365.0,"minimum":1.0},{"type":"null"}],"title":"Expires In Days","description":"Days until expiration (optional)"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id","description":"Binds the key to this workspace: it acts only there (required for write:telemetry scope)."}},"type":"object","required":["name"],"title":"APIKeyCreate","description":"Request model for creating an API key"},"APIKeyCreated":{"properties":{"key":{"type":"string","title":"Key"},"key_id":{"type":"string","title":"Key Id"},"name":{"type":"string","title":"Name"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["key","key_id","name","scopes","expires_at","created_at"],"title":"APIKeyCreated","description":"Response model when a new API key is created (includes the actual key once)"},"APIKeyResponse":{"properties":{"id":{"type":"string","title":"Id"},"key_id":{"type":"string","title":"Key Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["id","key_id","name","key_prefix","scopes","last_used_at","expires_at","created_at","is_active"],"title":"APIKeyResponse","description":"Response model for API key (without the actual key)"},"AddMemberRequest":{"properties":{"user_id":{"type":"string","title":"User Id"},"role":{"$ref":"#/components/schemas/TeamRole","default":"member"}},"type":"object","required":["user_id"],"title":"AddMemberRequest"},"AgentCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Agent name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Agent description"},"agent_config":{"additionalProperties":true,"type":"object","title":"Agent Config","description":"Agent configuration (model, capabilities, etc.)"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles","description":"Agent roles","default":["user"]}},"type":"object","required":["name"],"title":"AgentCreate","description":"Request model for creating an agent"},"AgentResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"agent_config":{"additionalProperties":true,"type":"object","title":"Agent Config"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles"},"tenant_id":{"type":"string","title":"Tenant Id"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"created_by":{"type":"string","title":"Created By"}},"type":"object","required":["id","name","description","agent_config","roles","tenant_id","is_active","created_at","created_by"],"title":"AgentResponse","description":"Response model for agent"},"AllocateRequest":{"properties":{"floor":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Floor","description":"Raises the counter before allocating and can never lower it. Idempotent, so sending it on every call is the recommended pattern."},"count":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Count","default":1}},"type":"object","title":"AllocateRequest","description":"How many numbers to consume, and an optional high-water mark."},"AllocationResponse":{"properties":{"name":{"type":"string","title":"Name"},"value":{"type":"integer","title":"Value"},"first":{"type":"integer","title":"First"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["name","value","first","count"],"title":"AllocationResponse","description":"A permanently consumed, contiguous run of numbers."},"ApplyChangesetRequest":{"properties":{"context":{"additionalProperties":true,"type":"object","title":"Context"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"base_version":{"type":"string","title":"Base Version","default":""},"changeset":{"additionalProperties":true,"type":"object","title":"Changeset"},"message":{"type":"string","title":"Message","default":""}},"type":"object","title":"ApplyChangesetRequest"},"ApplyDecisionRequest":{"properties":{"violation_id":{"type":"string","title":"Violation Id","default":""},"action":{"type":"string","title":"Action","default":"approve"},"rationale":{"type":"string","title":"Rationale","default":""}},"type":"object","title":"ApplyDecisionRequest"},"ArchiveStoreRequest":{"properties":{"conversation_id":{"type":"string","minLength":1,"title":"Conversation Id"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["conversation_id","payload"],"title":"ArchiveStoreRequest","description":"Request body for storing an archive artifact."},"AskEvidence":{"properties":{"item_id":{"type":"string","title":"Item Id"},"content":{"type":"string","title":"Content"}},"type":"object","required":["item_id","content"],"title":"AskEvidence","description":"One retrieved memory, exactly as it was shown to the model."},"AskRelation":{"properties":{"source":{"type":"string","title":"Source"},"type":{"type":"string","title":"Type"},"target":{"type":"string","title":"Target"},"source_id":{"type":"string","title":"Source Id"},"target_id":{"type":"string","title":"Target Id"}},"type":"object","required":["source","type","target","source_id","target_id"],"title":"AskRelation","description":"One entity relation edge, with both display labels and addressable node ids."},"AskRequest":{"properties":{"question":{"type":"string","title":"Question","description":"Natural-language question to answer from memory."},"limit":{"type":"integer","title":"Limit","description":"How many memories to retrieve as evidence (1-50).","default":5},"reasoning":{"type":"boolean","title":"Reasoning","description":"Return the model's reasoning alongside the answer.","default":true}},"type":"object","required":["question"],"title":"AskRequest","description":"Request body for ``POST /memory/ask``."},"AskResponse":{"properties":{"answer":{"type":"string","title":"Answer"},"reasoning":{"type":"string","title":"Reasoning"},"evidence":{"items":{"$ref":"#/components/schemas/AskEvidence"},"type":"array","title":"Evidence"},"relations":{"items":{"$ref":"#/components/schemas/AskRelation"},"type":"array","title":"Relations"}},"type":"object","required":["answer","reasoning","evidence","relations"],"title":"AskResponse","description":"Answer plus the evidence it was grounded in."},"AssignRequest":{"properties":{"assignee":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee"}},"type":"object","title":"AssignRequest"},"AuthMeResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"tenant_id":{"type":"string","title":"Tenant Id"},"subscription_tier":{"$ref":"#/components/schemas/SubscriptionTier"},"is_active":{"type":"boolean","title":"Is Active"},"is_verified":{"type":"boolean","title":"Is Verified"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles"},"default_team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Team Id"},"default_workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Workspace Id"},"active_workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Workspace Id"},"tenant_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Role"},"tenant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Name"},"effective_tier":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionTier"},{"type":"null"}]}},"type":"object","required":["id","email","full_name","tenant_id","subscription_tier","is_active","is_verified","created_at"],"title":"AuthMeResponse","description":"The signed-in user. `subscription_tier` is the workspace's stored plan, `effective_tier` is the plan its gates apply to this login."},"AutoFixRequest":{"properties":{"confidence_threshold":{"type":"number","title":"Confidence Threshold","default":0.8}},"type":"object","title":"AutoFixRequest"},"BiasRequest":{"properties":{"context":{"additionalProperties":true,"type":"object","title":"Context"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"protected_attributes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Protected Attributes"},"sentiment_analysis":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sentiment Analysis"},"topic_analysis":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Topic Analysis"}},"type":"object","title":"BiasRequest"},"Body_add_edge_memory_edge_post":{"properties":{"source_id":{"type":"string","title":"Source Id","description":"Source node ID"},"target_id":{"type":"string","title":"Target Id","description":"Target node ID"},"relation_type":{"type":"string","title":"Relation Type","description":"Type of relation/edge"},"properties":{"additionalProperties":true,"type":"object","title":"Properties","description":"Optional edge properties"}},"type":"object","required":["source_id","target_id","relation_type"],"title":"Body_add_edge_memory_edge_post"},"Body_add_memory_memory_add_post":{"properties":{"content":{"type":"string","title":"Content"},"memory_type":{"type":"string","title":"Memory Type","default":"semantic"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"use_pipeline":{"type":"boolean","title":"Use Pipeline","default":true},"profile_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Name"},"conversation_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Conversation Context"},"embed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Embed"}},"type":"object","required":["content"],"title":"Body_add_memory_memory_add_post"},"Body_create_explicit_link_memory_zettel__note_id__links_post":{"properties":{"target_id":{"type":"string","title":"Target Id","description":"Target zettel note_id"},"link_type":{"type":"string","title":"Link Type","description":"Edge type (LINKS_TO is bidirectional)","default":"LINKS_TO"},"properties":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Properties","description":"Optional edge properties"}},"type":"object","required":["target_id"],"title":"Body_create_explicit_link_memory_zettel__note_id__links_post"},"Body_create_zettel_note_memory_zettel_notes_post":{"properties":{"content":{"type":"string","title":"Content","description":"Zettel note body content"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Optional title. Defaults to derived"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Optional tag list"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Optional short description"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Optional additional metadata"}},"type":"object","required":["content"],"title":"Body_create_zettel_note_memory_zettel_notes_post"},"Body_import_chat_export_memory_import_chat_export_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"ChatGPT or Claude export (.zip or conversations.json)"},"source_format":{"type":"string","title":"Source Format","description":"'chatgpt', 'claude', or 'auto' to detect","default":"auto"},"max_conversations":{"type":"integer","title":"Max Conversations","description":"Cap on conversations ingested (1-200). Longest kept first","default":25},"offset":{"type":"integer","title":"Offset","description":"Conversations to skip, longest first, so a large export is imported in batches. Use next_offset from the previous response","default":0},"manifest":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Manifest","description":"The Claude export manifest JSON, sent with a zip so the checklist can tick it off"},"already_received":{"type":"string","title":"Already Received","description":"category-NNN names from the ticked list of earlier uploads, so the checklist keeps its ticks","default":""}},"type":"object","required":["file"],"title":"Body_import_chat_export_memory_import_chat_export_post"},"Body_import_okf_bundle_memory_okf_import_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_import_okf_bundle_memory_okf_import_post"},"Body_parse_wikilinks_memory_zettel_wikilink_parse_post":{"properties":{"content":{"type":"string","title":"Content","description":"Content with [[wikilinks]] to parse"}},"type":"object","required":["content"],"title":"Body_parse_wikilinks_memory_zettel_wikilink_parse_post"},"Body_put_routing_prefs_memory_routing_prefs_put":{"properties":{"account_default_workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Default Workspace Id"},"version":{"type":"integer","minimum":0.0,"title":"Version"},"rules":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Rules"}},"type":"object","required":["version"],"title":"Body_put_routing_prefs_memory_routing_prefs_put"},"Body_put_routing_session_memory_routing_session_put":{"properties":{"workspace_id":{"type":"string","maxLength":200,"title":"Workspace Id"},"client_key":{"type":"string","maxLength":200,"title":"Client Key"},"context_key":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Context Key"}},"type":"object","required":["workspace_id","client_key"],"title":"Body_put_routing_session_memory_routing_session_put"},"Body_search_memory_advanced_memory_search_advanced_post":{"properties":{"query":{"type":"string","title":"Query","description":"Search query"},"algorithm":{"type":"string","title":"Algorithm","description":"SSG algorithm: query_traversal or triangulation_fulldim","default":"query_traversal"},"max_results":{"type":"integer","maximum":500.0,"minimum":1.0,"title":"Max Results","description":"Maximum number of results","default":15},"use_ssg":{"type":"boolean","title":"Use Ssg","description":"Use SSG traversal (vs basic vector search)","default":true},"exclude_speculative":{"type":"boolean","title":"Exclude Speculative","description":"Exclude tier-3 speculative derived results, while tier-4 results remain hidden","default":false}},"type":"object","required":["query"],"title":"Body_search_memory_advanced_memory_search_advanced_post"},"Body_update_llm_keys_auth_llm_keys_patch":{"properties":{"openai_key":{"type":"string","title":"Openai Key"},"anthropic_key":{"type":"string","title":"Anthropic Key"},"groq_key":{"type":"string","title":"Groq Key"},"gemini_key":{"type":"string","title":"Gemini Key"},"openrouter_key":{"type":"string","title":"Openrouter Key"}},"type":"object","title":"Body_update_llm_keys_auth_llm_keys_patch"},"BulkEdge":{"properties":{"source_id":{"type":"string","minLength":1,"title":"Source Id"},"target_id":{"type":"string","minLength":1,"title":"Target Id"},"edge_type":{"type":"string","minLength":1,"title":"Edge Type"},"properties":{"additionalProperties":true,"type":"object","title":"Properties","default":{}}},"type":"object","required":["source_id","target_id","edge_type"],"title":"BulkEdge","description":"A single edge for bulk graph upsert."},"BulkEdgesRequest":{"properties":{"node_ids":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Node Ids","description":"Node IDs to fetch edges for"}},"type":"object","required":["node_ids"],"title":"BulkEdgesRequest"},"BulkEdgesResponse":{"properties":{"edges":{"items":{"$ref":"#/components/schemas/EdgeResult"},"type":"array","title":"Edges"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["edges","count"],"title":"BulkEdgesResponse"},"BulkItemResult":{"properties":{"id":{"type":"string","title":"Id"},"ok":{"type":"boolean","title":"Ok"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["id","ok"],"title":"BulkItemResult"},"BulkNode":{"properties":{"item_id":{"type":"string","minLength":1,"title":"Item Id"},"label":{"type":"string","title":"Label","default":"Node"},"properties":{"additionalProperties":true,"type":"object","title":"Properties","default":{}}},"type":"object","required":["item_id"],"title":"BulkNode","description":"A single node for bulk graph upsert."},"BulkRequest":{"properties":{"action":{"type":"string","enum":["approve","reject","merge","edit_promote","assign"],"title":"Action"},"ids":{"items":{"type":"string"},"type":"array","title":"Ids"},"params":{"additionalProperties":true,"type":"object","title":"Params"},"expected_tier":{"anyOf":[{"type":"string","enum":["working","proposed"]},{"type":"null"}],"title":"Expected Tier"}},"type":"object","required":["action","ids"],"title":"BulkRequest"},"BulkResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/BulkItemResult"},"type":"array","title":"Results"}},"type":"object","title":"BulkResponse"},"BulkWriteRequest":{"properties":{"nodes":{"items":{"$ref":"#/components/schemas/BulkNode"},"type":"array","title":"Nodes","default":[]},"edges":{"items":{"$ref":"#/components/schemas/BulkEdge"},"type":"array","title":"Edges","default":[]},"delete_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delete Prefix","description":"Delete nodes whose item_id starts with this prefix before writing"}},"type":"object","title":"BulkWriteRequest","description":"Request body for bulk graph writes with optional prefix deletion."},"BulkWriteResponse":{"properties":{"nodes_upserted":{"type":"integer","title":"Nodes Upserted"},"edges_upserted":{"type":"integer","title":"Edges Upserted"},"nodes_deleted":{"type":"integer","title":"Nodes Deleted","default":0},"nodes_refused":{"items":{"type":"string"},"type":"array","title":"Nodes Refused","description":"Submitted node IDs refused by write authorization"}},"type":"object","required":["nodes_upserted","edges_upserted"],"title":"BulkWriteResponse","description":"Response from a bulk graph write operation."},"CataloguedCategory":{"properties":{"category":{"type":"string","title":"Category","description":"Kind of data, such as frames or design_chats"},"files":{"type":"integer","title":"Files","description":"Files inside the zip"}},"type":"object","required":["category","files"],"title":"CataloguedCategory","description":"A kind of Claude data that was found and counted but not imported."},"CategoryCount":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["id","name","count"],"title":"CategoryCount","description":"Category with integration count."},"ChallengeRequest":{"properties":{"assertion":{"type":"string","title":"Assertion","description":"The assertion to challenge against existing knowledge"},"memory_type":{"type":"string","title":"Memory Type","description":"Type of memory to search","default":"semantic"},"use_llm":{"type":"boolean","title":"Use Llm","description":"Use LLM for deep contradiction analysis","default":true}},"type":"object","required":["assertion"],"title":"ChallengeRequest","description":"Request to challenge an assertion."},"ChallengeResponse":{"properties":{"new_assertion":{"type":"string","title":"New Assertion"},"has_conflicts":{"type":"boolean","title":"Has Conflicts"},"conflicts":{"items":{"$ref":"#/components/schemas/ConflictResponse"},"type":"array","title":"Conflicts"},"related_facts_count":{"type":"integer","title":"Related Facts Count"},"overall_confidence":{"type":"number","title":"Overall Confidence"}},"type":"object","required":["new_assertion","has_conflicts","conflicts","related_facts_count","overall_confidence"],"title":"ChallengeResponse","description":"Response from challenging an assertion."},"ChatImportFormats":{"properties":{"formats":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Formats"}},"type":"object","required":["formats"],"title":"ChatImportFormats","description":"Supported export formats and where to obtain each one."},"ChatImportResponse":{"properties":{"source_format":{"type":"string","title":"Source Format","description":"Detected or supplied export format"},"conversations_imported":{"type":"integer","title":"Conversations Imported","description":"Conversations written to memory"},"conversations_failed":{"type":"integer","title":"Conversations Failed","description":"Conversations whose ingest raised","default":0},"turns_imported":{"type":"integer","title":"Turns Imported","description":"Total turns across imported conversations"},"items_created":{"type":"integer","title":"Items Created","description":"Memory items created (session chunks)"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings","description":"Everything skipped, capped, or degraded. Empty means a clean import."},"total_available":{"type":"integer","title":"Total Available","description":"Readable conversations in the whole export","default":0},"offset":{"type":"integer","title":"Offset","description":"Position (longest first) of the first conversation in this batch","default":0},"returned":{"type":"integer","title":"Returned","description":"Conversations in this batch, before ingest","default":0},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset","description":"Upload the same file with this offset for the next batch. Null when nothing is left"},"upload_kind":{"type":"string","title":"Upload Kind","description":"manifest, zip or conversations_file","default":"conversations_file"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Kind of data a zip held, judged from its contents"},"part":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Part","description":"Part number read from the zip file name"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Plain-language note about this upload, when it needs one"},"checklist":{"items":{"$ref":"#/components/schemas/ChecklistEntry"},"type":"array","title":"Checklist","description":"Every file the manifest lists, ticked when uploaded. Empty without a manifest"},"ticked":{"items":{"type":"string"},"type":"array","title":"Ticked","description":"category-NNN names received so far. Send them back as already_received"},"catalogued":{"items":{"$ref":"#/components/schemas/CataloguedCategory"},"type":"array","title":"Catalogued","description":"Kinds of Claude data found and counted but not imported yet"},"memories_imported":{"type":"integer","title":"Memories Imported","description":"Claude memory documents written to memory","default":0},"projects_imported":{"type":"integer","title":"Projects Imported","description":"Claude projects with at least one document written to memory","default":0},"documents_imported":{"type":"integer","title":"Documents Imported","description":"Memory and project documents written to memory","default":0},"documents_failed":{"type":"integer","title":"Documents Failed","description":"Memory and project documents whose ingest raised","default":0}},"type":"object","required":["source_format","conversations_imported","turns_imported","items_created"],"title":"ChatImportResponse","description":"Outcome of an import, including everything that did NOT get imported."},"CheckDriftRequest":{"properties":{"session_id":{"type":"string","title":"Session Id","description":"Session scope","default":""},"recent_outputs":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Recent Outputs","description":"Recent output strings to check against anchors"}},"type":"object","required":["recent_outputs"],"title":"CheckDriftRequest"},"CheckFailureRequest":{"properties":{"error_type":{"type":"string","minLength":1,"title":"Error Type","description":"Error class to match"},"context":{"type":"string","minLength":1,"title":"Context","description":"Context to search semantically"},"top_k":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Top K","description":"Max results","default":3}},"type":"object","required":["error_type","context"],"title":"CheckFailureRequest"},"ChecklistEntry":{"properties":{"category":{"type":"string","title":"Category","description":"Kind of data in the zip, such as conversations, memories or projects"},"part":{"type":"integer","title":"Part","description":"Part number when a category is split over several zips","default":0},"filename":{"type":"string","title":"Filename","description":"Name of the zip to download"},"ticked":{"type":"boolean","title":"Ticked","description":"True once this zip has been uploaded"},"will_import":{"type":"boolean","title":"Will Import","description":"False for kinds of data that are counted but not imported yet"},"export_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Export Url","description":"Download link from the manifest, for the signed-in user to open. Never fetched by the server"}},"type":"object","required":["category","filename","ticked","will_import"],"title":"ChecklistEntry","description":"One file the Claude export manifest lists, and whether it has been uploaded."},"CheckoutRequest":{"properties":{"tier":{"$ref":"#/components/schemas/SubscriptionTier"},"billing_period":{"type":"string","title":"Billing Period","default":"monthly"},"trial_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Days"},"seat_count":{"type":"integer","title":"Seat Count","default":1}},"type":"object","required":["tier"],"title":"CheckoutRequest","description":"Request to create a checkout session."},"CloneTemplateRequest":{"properties":{"template_id":{"type":"string","title":"Template Id","default":""},"target_name":{"type":"string","title":"Target Name","default":""}},"type":"object","title":"CloneTemplateRequest"},"CodeEntityPayload":{"properties":{"name":{"type":"string","title":"Name"},"entity_type":{"type":"string","title":"Entity Type"},"file_path":{"type":"string","title":"File Path"},"line_number":{"type":"integer","title":"Line Number"},"docstring":{"type":"string","title":"Docstring","default":""},"decorators":{"items":{"type":"string"},"type":"array","title":"Decorators","default":[]},"bases":{"items":{"type":"string"},"type":"array","title":"Bases","default":[]},"http_method":{"type":"string","title":"Http Method","default":""},"http_path":{"type":"string","title":"Http Path","default":""},"qualified_name":{"type":"string","title":"Qualified Name","default":""},"end_line_number":{"type":"integer","title":"End Line Number","default":0},"byte_start":{"type":"integer","title":"Byte Start","default":0},"byte_end":{"type":"integer","title":"Byte End","default":0},"content_hash":{"type":"string","title":"Content Hash","default":""},"source_snapshot":{"type":"string","title":"Source Snapshot","default":""},"call_evidence":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Call Evidence"},"test_evidence":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Test Evidence"},"parse_diagnostic":{"additionalProperties":true,"type":"object","title":"Parse Diagnostic"}},"additionalProperties":true,"type":"object","required":["name","entity_type","file_path","line_number"],"title":"CodeEntityPayload","description":"A single code entity to index."},"CodeIndexRequest":{"properties":{"repo":{"type":"string","minLength":1,"title":"Repo"},"entities":{"items":{"$ref":"#/components/schemas/CodeEntityPayload"},"type":"array","title":"Entities"},"relations":{"items":{"$ref":"#/components/schemas/CodeRelationPayload"},"type":"array","title":"Relations","default":[]},"commit_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Hash"},"parse_summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Parse Summary"},"repo_identity":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Repo Identity"}},"type":"object","required":["repo","entities"],"title":"CodeIndexRequest","description":"Bulk index request for code entities and relations."},"CodeRelationPayload":{"properties":{"source_id":{"type":"string","title":"Source Id"},"target_id":{"type":"string","title":"Target Id"},"relation_type":{"type":"string","title":"Relation Type"},"properties":{"additionalProperties":true,"type":"object","title":"Properties","default":{}}},"type":"object","required":["source_id","target_id","relation_type"],"title":"CodeRelationPayload","description":"A relationship between two code entities."},"CompletePlanRequest":{"properties":{"graduate":{"type":"boolean","title":"Graduate","description":"If true, create a decision record from the plan","default":false}},"type":"object","title":"CompletePlanRequest"},"ConfigUpdateRequest":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"schedule":{"anyOf":[{"type":"string","pattern":"^(hourly|daily|manual)$"},{"type":"null"}],"title":"Schedule"},"batch_size":{"anyOf":[{"type":"integer","maximum":500.0,"minimum":1.0},{"type":"null"}],"title":"Batch Size"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},"type":"object","title":"ConfigUpdateRequest"},"ConflictResponse":{"properties":{"existing_item_id":{"type":"string","title":"Existing Item Id"},"existing_fact":{"type":"string","title":"Existing Fact"},"new_fact":{"type":"string","title":"New Fact"},"conflict_type":{"type":"string","title":"Conflict Type"},"confidence":{"type":"number","title":"Confidence"},"explanation":{"type":"string","title":"Explanation"},"suggested_resolution":{"type":"string","title":"Suggested Resolution"}},"type":"object","required":["existing_item_id","existing_fact","new_fact","conflict_type","confidence","explanation","suggested_resolution"],"title":"ConflictResponse","description":"A detected conflict."},"ContextRequest":{"properties":{"session_id":{"type":"string","title":"Session Id","description":"Session scope for anchor resolution."},"query":{"type":"string","title":"Query","description":"Natural-language query for the surfacing turn."},"k":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"K","description":"Item-count cap on returned items.","default":20},"max_tokens":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Tokens","description":"Token-budget cap. When set, items are added in rank order until the budget is exhausted. Null disables token budgeting."},"strategy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy","description":"Override the SurfacingRouter's strategy choice. Null lets the router decide."}},"type":"object","required":["session_id","query"],"title":"ContextRequest","description":"Request body for ``POST /memory/context``. Mirrors contract request section."},"ContradictRequest":{"properties":{"evidence_id":{"type":"string","title":"Evidence Id","description":"Memory ID of contradicting evidence"}},"type":"object","required":["evidence_id"],"title":"ContradictRequest","description":"Request to contradict a decision with counter-evidence."},"ConversationIngestRequest":{"properties":{"turns":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Turns"},"session_boundaries":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Session Boundaries"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"session_dates":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Session Dates"},"turns_per_chunk":{"type":"integer","title":"Turns Per Chunk","default":15},"max_chunk_chars":{"type":"integer","title":"Max Chunk Chars","default":12000},"max_concurrent":{"type":"integer","title":"Max Concurrent","default":4},"use_pipeline":{"type":"boolean","title":"Use Pipeline","default":true},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context"}},"type":"object","title":"ConversationIngestRequest","description":"Request to ingest a conversation as session chunks (RLM-1g).\n\n``use_pipeline=False`` stores the chunks and their ``PART_OF`` edges without\nextraction. Full pipeline processing remains the default."},"CreateAnchorRequest":{"properties":{"content":{"type":"string","minLength":1,"title":"Content","description":"Requirement or constraint text"},"anchor_type":{"type":"string","pattern":"^(spec|scope|decision|constraint)$","title":"Anchor Type","description":"Anchor type","default":"spec"},"session_id":{"type":"string","title":"Session Id","description":"Session scope","default":""}},"type":"object","required":["content"],"title":"CreateAnchorRequest"},"CreateDecisionRequest":{"properties":{"content":{"type":"string","minLength":1,"title":"Content","description":"The decision statement"},"decision_type":{"type":"string","title":"Decision Type","description":"One of: inference, preference, classification, choice, belief, policy","default":"inference"},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence","description":"Initial confidence score","default":0.8},"source_trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Trace Id","description":"ReasoningTrace ID that produced this decision"},"source_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Session Id","description":"Conversation session ID"},"evidence_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Evidence Ids","description":"Memory IDs supporting this decision"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain","description":"Domain tag for filtered retrieval"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Producing agent id (CORE-AGENT-ATTRIBUTION-1). When omitted, the handler auto-populates from scope.resolve_agent_id(), non-null only when the caller's user_type=='agent'."},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Additional tags"},"rejected_alternatives":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Rejected Alternatives","description":"Alternatives considered and dropped (CORE-EXPERTISE-1)"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale","description":"Why this decision over the alternatives (CORE-EXPERTISE-1)"},"constraints":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Constraints","description":"Decision-scoped hard limits (CORE-EXPERTISE-1)"},"source_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Type","description":"How the decision was arrived at: reasoning | explicit | imported | inferred. Defaults to core's 'inferred' when omitted. An agent's guess must not be indistinguishable from something a human stated."},"context_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context Snapshot","description":"Caller-authored provenance travelling with the decision (external record id, idempotency key, review verdict). NOTE: the lifecycle owns superseded_reason / superseded_at / retraction_reason inside this dict and OVERWRITES a caller value there (CORE-SUPERSEDE-NOTE-1)."}},"type":"object","required":["content"],"title":"CreateDecisionRequest","description":"Request to create a new decision."},"CreateOpinionRequest":{"properties":{"content":{"type":"string","minLength":1,"title":"Content","description":"Opinion content"},"confidence":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Confidence","description":"Initial confidence","default":0.7},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject","description":"What the opinion is about"},"subject_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Type","description":"Type tag for the subject"},"disposition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Disposition","description":"Disposition payload"},"formed_from":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Formed From","description":"Source memory ids that formed the opinion"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain","description":"Optional domain tag"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Producing agent id, auto-populated from scope when user_type=='agent'"}},"type":"object","required":["content"],"title":"CreateOpinionRequest","description":"Request to create a new opinion."},"CreatePatternRequest":{"properties":{"title":{"type":"string","minLength":1,"title":"Title"},"content":{"type":"string","minLength":1,"title":"Content","description":"One-line rule statement"},"severity":{"type":"string","pattern":"^(info|warn|error)$","title":"Severity","default":"warn"},"scope":{"items":{"type":"string"},"type":"array","title":"Scope","description":"Glob/path fragments. Empty = repo-wide"},"examples":{"items":{"$ref":"#/components/schemas/PatternExample"},"type":"array","title":"Examples"},"rationale":{"type":"string","title":"Rationale","default":""},"source":{"type":"string","title":"Source","default":"user"}},"type":"object","required":["title","content"],"title":"CreatePatternRequest"},"CreatePendingDecisionRequest":{"properties":{"content":{"type":"string","minLength":1,"title":"Content","description":"The tentative decision / acceptance statement"},"requirements":{"items":{"$ref":"#/components/schemas/PendingRequirementInput"},"type":"array","minItems":1,"title":"Requirements"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain","description":"Domain tag (e.g. 'gtm')"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Producing agent id, auto-populated from scope.resolve_agent_id() when omitted"}},"type":"object","required":["content","requirements"],"title":"CreatePendingDecisionRequest","description":"Create a pending decision (Acceptance Case) with unresolved requirements."},"CreatePlanRequest":{"properties":{"title":{"type":"string","minLength":1,"title":"Title","description":"Plan title/description"},"tasks":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Tasks","description":"List of task dicts with 'content' (required), 'depends_on' (optional), 'task_index' (optional)"},"context":{"type":"string","title":"Context","description":"Why this plan was created","default":""},"created_by":{"type":"string","title":"Created By","description":"Session/agent that created it","default":""}},"type":"object","required":["title"],"title":"CreatePlanRequest"},"CreateRelationRequest":{"properties":{"name":{"type":"string","minLength":1,"title":"Name"},"iri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iri"},"wikidata_pid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wikidata Pid"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"definition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Definition"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"aliases":{"items":{"type":"string"},"type":"array","title":"Aliases"},"examples":{"items":{"type":"string"},"type":"array","title":"Examples"},"domain":{"items":{"type":"string"},"type":"array","title":"Domain"},"range":{"items":{"type":"string"},"type":"array","title":"Range"},"inverse_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inverse Of"},"cardinality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cardinality"},"temporal":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Temporal"},"properties_schema":{"additionalProperties":true,"type":"object","title":"Properties Schema"},"transitive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Transitive"},"symmetric":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Symmetric"},"reflexive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Reflexive"},"parent_relations":{"items":{"type":"string"},"type":"array","title":"Parent Relations"},"tier":{"type":"string","title":"Tier","default":"confirmed"}},"type":"object","required":["name"],"title":"CreateRelationRequest","description":"Body for `POST /ontology/relations`. Mirrors `OntologyService.create_relation`.\nDeclare-only in P1 (edge validation against domain/range/cardinality is P3)."},"CreateTeamRequest":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"data_classification":{"type":"string","title":"Data Classification","default":"internal"},"cost_center":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cost Center"},"is_system":{"type":"boolean","title":"Is System","default":false}},"type":"object","required":["name"],"title":"CreateTeamRequest"},"CreateTypeRequest":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"Class name. For kind='record' this IS the memory_type."},"kind":{"type":"string","title":"Kind","description":"'entity' (extraction vocabulary) or 'record' (concrete record class).","default":"entity"},"properties_schema":{"additionalProperties":true,"type":"object","title":"Properties Schema","description":"field name -> field spec ({type, of?, default?, indexed?, append_only?})."},"required_properties":{"items":{"type":"string"},"type":"array","title":"Required Properties"},"storage_strategy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Strategy","description":"full | indexed | append (kind='record' only)."},"storage_searchable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Storage Searchable","description":"Embedding default (kind='record' only)."},"iri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iri"},"wikidata_qid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wikidata Qid"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"definition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Definition"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"aliases":{"items":{"type":"string"},"type":"array","title":"Aliases"},"examples":{"items":{"type":"string"},"type":"array","title":"Examples"},"parent_types":{"items":{"type":"string"},"type":"array","title":"Parent Types"},"tier":{"type":"string","title":"Tier","description":"Governance tier ('working' routes through review).","default":"confirmed"}},"type":"object","required":["name"],"title":"CreateTypeRequest","description":"Body for `POST /ontology/types`. Mirrors `OntologyService.create_type`\n(CORE-MEMTYPE-DECLARE-1 declaration surface, contract\n`memory-type-contract.json` `declaration_surface.rest`)."},"CreateWorkspaceRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"team_id":{"type":"string","minLength":1,"title":"Team Id"}},"additionalProperties":false,"type":"object","required":["name","team_id"],"title":"CreateWorkspaceRequest"},"DependencyDirection":{"type":"string","enum":["dependents","dependencies","both"],"title":"DependencyDirection"},"DismissResponse":{"properties":{"status":{"type":"string","title":"Status","default":"success"},"cluster_id":{"type":"string","title":"Cluster Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["cluster_id","message"],"title":"DismissResponse","description":"Response for dismissing a candidate."},"DispatchConfigCreate":{"properties":{"mechanism":{"type":"string","title":"Mechanism","description":"Dispatch mechanism (webhook only in MVP)","default":"webhook"},"url":{"type":"string","title":"Url","description":"Webhook URL (must be external, SSRF-validated)"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","description":"Custom headers"},"timeout_ms":{"type":"integer","title":"Timeout Ms","description":"Request timeout in ms","default":5000},"max_retries":{"type":"integer","title":"Max Retries","description":"Max retry attempts","default":3}},"type":"object","required":["url"],"title":"DispatchConfigCreate","description":"Dispatch configuration for delivering matched events."},"DocumentIngestRequest":{"properties":{"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context"},"source":{"type":"string","title":"Source","description":"Public URL (http:// or https://). Local file paths are not permitted via the HTTP surface."},"source_type":{"type":"string","title":"Source Type","description":"html | pdf | docx | txt | markdown | auto","default":"auto"},"chunk_size":{"type":"integer","maximum":50000.0,"minimum":100.0,"title":"Chunk Size","description":"Max characters per chunk","default":2000},"chunk_strategy":{"type":"string","title":"Chunk Strategy","description":"paragraph | sentence | markdown | recursive","default":"paragraph"},"reference":{"type":"boolean","title":"Reference","description":"Mark nodes as reference material","default":false}},"type":"object","required":["source"],"title":"DocumentIngestRequest"},"EdgeResult":{"properties":{"source_id":{"type":"string","title":"Source Id"},"target_id":{"type":"string","title":"Target Id"},"edge_type":{"type":"string","title":"Edge Type"},"properties":{"additionalProperties":true,"type":"object","title":"Properties","default":{}},"canonical_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonical Type"},"plausibility_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Plausibility Score"}},"type":"object","required":["source_id","target_id","edge_type"],"title":"EdgeResult"},"EditPromoteRequest":{"properties":{"edits":{"additionalProperties":true,"type":"object","title":"Edits"},"expected_tier":{"anyOf":[{"type":"string","enum":["working","proposed"]},{"type":"null"}],"title":"Expected Tier"}},"type":"object","required":["edits"],"title":"EditPromoteRequest"},"EnrichmentRunRequest":{"properties":{"provider":{"type":"string","title":"Provider","default":"wikipedia"},"entities":{"items":{"type":"string"},"type":"array","title":"Entities"}},"type":"object","title":"EnrichmentRunRequest","description":"Body of ``POST /ontology/enrichment/run``.\n\nUnknown keys (``user_id`` included) are ignored: identity comes from the auth\nscope, never from the body, and nothing in the body is echoed back."},"ExpectedTierRequest":{"properties":{"expected_tier":{"anyOf":[{"type":"string","enum":["working","proposed"]},{"type":"null"}],"title":"Expected Tier"}},"type":"object","title":"ExpectedTierRequest"},"ExtractReasoningRequest":{"properties":{"content":{"type":"string","title":"Content","description":"Content to extract reasoning from"},"min_steps":{"type":"integer","title":"Min Steps","description":"Minimum steps required for a valid trace","default":2},"min_quality_score":{"type":"number","title":"Min Quality Score","description":"Minimum quality score threshold","default":0.4},"use_llm_detection":{"type":"boolean","title":"Use Llm Detection","description":"Use LLM for implicit reasoning detection","default":true}},"type":"object","required":["content"],"title":"ExtractReasoningRequest","description":"Request to extract reasoning traces from content."},"ExtractReasoningResponse":{"properties":{"trace":{"anyOf":[{"$ref":"#/components/schemas/ReasoningTraceModel"},{"type":"null"}]},"has_reasoning":{"type":"boolean","title":"Has Reasoning"},"quality_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Quality Score"},"step_count":{"type":"integer","title":"Step Count","default":0}},"type":"object","required":["has_reasoning"],"title":"ExtractReasoningResponse","description":"Response from reasoning extraction."},"ExtractionRequest":{"properties":{"content":{"type":"string","title":"Content","description":"Content to extract entities and relations from"},"pipeline_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Id","default":"default"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"profile_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Name"},"extractor_name":{"type":"string","title":"Extractor Name","default":"llm"},"max_entities":{"type":"integer","title":"Max Entities","default":25},"enable_relations":{"type":"boolean","title":"Enable Relations","default":true},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context"}},"type":"object","required":["content"],"title":"ExtractionRequest","description":"Request to run extraction pipeline stage."},"FailPlanRequest":{"properties":{"reason":{"type":"string","minLength":1,"title":"Reason","description":"Why the plan failed"}},"type":"object","required":["reason"],"title":"FailPlanRequest"},"FeedbackBody":{"properties":{"feedback":{"type":"string","enum":["success","failure","neutral"],"title":"Feedback"},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"}},"type":"object","required":["feedback"],"title":"FeedbackBody"},"FeedbackRequest":{"properties":{"item_ids":{"items":{"type":"string"},"type":"array","maxItems":50,"minItems":1,"title":"Item Ids","description":"IDs of recalled items"},"outcome":{"type":"string","enum":["helpful","misleading","neutral"],"title":"Outcome"},"query":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query","description":"Original query that produced these results"}},"type":"object","required":["item_ids","outcome"],"title":"FeedbackRequest","description":"Request body for submitting recall feedback."},"FeedbackResponse":{"properties":{"updated":{"type":"integer","title":"Updated"},"edges_strengthened":{"type":"integer","title":"Edges Strengthened"},"outcome":{"type":"string","title":"Outcome"}},"type":"object","required":["updated","edges_strengthened","outcome"],"title":"FeedbackResponse","description":"Result of a feedback submission."},"FullGraphResponse":{"properties":{"nodes":{"items":{"$ref":"#/components/schemas/GraphNodeResult"},"type":"array","title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/EdgeResult"},"type":"array","title":"Edges"},"node_count":{"type":"integer","title":"Node Count"},"edge_count":{"type":"integer","title":"Edge Count"}},"type":"object","required":["nodes","edges","node_count","edge_count"],"title":"FullGraphResponse"},"FuzzyConfidenceRequest":{"properties":{"decision_id":{"type":"string","title":"Decision Id","description":"Decision ID to score"}},"type":"object","required":["decision_id"],"title":"FuzzyConfidenceRequest","description":"Request for multi-dimensional confidence scoring."},"GenerateRequest":{"properties":{"window_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Window Start","description":"Start of the window to summarize. Defaults to last snapshot's created_at, or now if no prior."},"include_markdown":{"type":"boolean","title":"Include Markdown","default":true}},"type":"object","title":"GenerateRequest"},"GraduateRequest":{"properties":{"session_id":{"type":"string","title":"Session Id","description":"Session scope","default":""}},"type":"object","title":"GraduateRequest"},"GraphNodeResult":{"properties":{"item_id":{"type":"string","title":"Item Id"},"label":{"type":"string","title":"Label","default":""},"memory_type":{"type":"string","title":"Memory Type","default":"semantic"},"content":{"type":"string","title":"Content","default":""},"category":{"type":"string","title":"Category","default":"memory"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"}},"type":"object","required":["item_id"],"title":"GraphNodeResult"},"GroundingRunRequest":{"properties":{"item_id":{"type":"string","minLength":1,"title":"Item Id"},"candidates":{"items":{"type":"string"},"type":"array","title":"Candidates"},"grounder":{"type":"string","title":"Grounder","default":"wikipedia"}},"type":"object","required":["item_id"],"title":"GroundingRunRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HideTypeRequest":{"properties":{"type_name":{"type":"string","minLength":1,"title":"Type Name"}},"type":"object","required":["type_name"],"title":"HideTypeRequest"},"IdempotentResolveResponse":{"properties":{"auto_resolved":{"type":"boolean","title":"Auto Resolved"},"resolution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution"},"confidence":{"type":"number","title":"Confidence"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"},"evidence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evidence"},"actions_taken":{"items":{"type":"string"},"type":"array","title":"Actions Taken"},"idempotent_replay":{"type":"boolean","title":"Idempotent Replay","description":"True when this response replays an earlier successful resolution"}},"type":"object","required":["auto_resolved","resolution","confidence","method","evidence","actions_taken","idempotent_replay"],"title":"IdempotentResolveResponse","description":"Response for a request that supplied an idempotency key."},"ImportSnapshotRequest":{"properties":{"context":{"additionalProperties":true,"type":"object","title":"Context"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"message":{"type":"string","title":"Message","default":""}},"type":"object","title":"ImportSnapshotRequest"},"InferenceRunRequest":{"properties":{"context":{"additionalProperties":true,"type":"object","title":"Context"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"registry_id":{"type":"string","title":"Registry Id","default":"default"},"raw_chunks":{"items":{"$ref":"#/components/schemas/RawChunk"},"type":"array","title":"Raw Chunks"},"params":{"additionalProperties":true,"type":"object","title":"Params"}},"type":"object","title":"InferenceRunRequest"},"IngestRequest":{"properties":{"content":{"type":"string","title":"Content","default":""},"profile_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Name"},"extractor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extractor Name"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context"},"extract_decisions":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Extract Decisions"},"extract_reasoning":{"type":"boolean","title":"Extract Reasoning","default":false}},"type":"object","title":"IngestRequest","description":"Request to ingest content through the pipeline."},"Integration":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"long_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Long Description"},"category":{"type":"string","title":"Category"},"status":{"type":"string","title":"Status"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"is_new":{"type":"boolean","title":"Is New","default":false},"is_popular":{"type":"boolean","title":"Is Popular","default":false},"vote_count":{"type":"integer","title":"Vote Count","default":0},"usage_percentage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Usage Percentage"},"data_types":{"items":{"type":"string"},"type":"array","title":"Data Types","default":[]},"sync_frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Frequency"},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions","default":[]},"expected_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Date"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"import_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Import Ref"},"import_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Import Url"},"publisher_id":{"type":"string","title":"Publisher Id"},"publisher_name":{"type":"string","title":"Publisher Name"},"review_status":{"type":"string","enum":["approved","pending_review","rejected","suspended"],"title":"Review Status"},"pricing":{"$ref":"#/components/schemas/Pricing"},"connect":{"anyOf":[{"type":"string","const":"oauth"},{"type":"null"}],"title":"Connect"}},"type":"object","required":["id","name","description","category","status","publisher_id","publisher_name","review_status","pricing"],"title":"Integration","description":"Integration catalog entry."},"IntegrationRequest":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"use_case":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Use Case"}},"type":"object","required":["name"],"title":"IntegrationRequest","description":"User request for a new integration."},"LeaseRequest":{"properties":{"ttl_seconds":{"type":"integer","maximum":300.0,"minimum":5.0,"title":"Ttl Seconds","default":30}},"type":"object","title":"LeaseRequest","description":"Requested lease duration."},"LeaseResponse":{"properties":{"key":{"type":"string","title":"Key"},"token":{"type":"string","title":"Token"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"ttl_remaining_ms":{"type":"integer","title":"Ttl Remaining Ms"}},"type":"object","required":["key","token","expires_at","ttl_remaining_ms"],"title":"LeaseResponse","description":"Opaque lease capability and its server-side expiry."},"LinkRequest":{"properties":{"source_id":{"type":"string","title":"Source Id","default":""},"target_id":{"type":"string","title":"Target Id","default":""},"link_type":{"type":"string","title":"Link Type","default":"RELATED"},"properties":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Properties"}},"type":"object","title":"LinkRequest","description":"Request to create a link between memory items."},"LinkingRequest":{"properties":{"run_id":{"type":"string","title":"Run Id","description":"Pipeline run ID from storage stage"},"pipeline_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Id","default":"default"},"profile_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Name"},"linking_algorithm":{"type":"string","title":"Linking Algorithm","default":"default"},"similarity_threshold":{"type":"number","title":"Similarity Threshold","default":0.8},"deduplication_enabled":{"type":"boolean","title":"Deduplication Enabled","default":true}},"type":"object","required":["run_id"],"title":"LinkingRequest","description":"Request to run linking pipeline stage."},"LogFailureRequest":{"properties":{"error_type":{"type":"string","minLength":1,"title":"Error Type","description":"Error class name (e.g. TypeError)"},"content":{"type":"string","minLength":1,"title":"Content","description":"Error message/stack trace"},"context":{"type":"string","minLength":1,"title":"Context","description":"What was being attempted"},"plan_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Id","description":"Linked plan ID"},"task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id","description":"Linked task ID"},"attempted_fix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attempted Fix","description":"What was tried"},"resolution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution","description":"What actually fixed it"}},"type":"object","required":["error_type","content","context"],"title":"LogFailureRequest"},"MemoryItemResponse":{"properties":{"item_id":{"type":"string","title":"Item Id"},"content":{"type":"string","title":"Content"},"memory_type":{"type":"string","title":"Memory Type","default":"semantic"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"rerank_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rerank Score"},"rerank_status":{"type":"string","enum":["scored","unscored_tail","bypass_disabled","bypass_pending","bypass_memory_type","bypass_recency","bypass_empty_query","bypass_small_pool","model_unavailable","prediction_failed","invalid_score","post_rerank_insertion","not_reranked"],"title":"Rerank Status","default":"not_reranked"},"rerank_model":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Rerank Model"},"rerank_pool_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rerank Pool Size"},"rerank_candidate_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rerank Candidate Count"},"rerank_scored_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rerank Scored Count"},"rerank_pool_capped":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Rerank Pool Capped"},"rerank_max_doc_chars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rerank Max Doc Chars"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"embedding":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Embedding"},"valid_start_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valid Start Time"},"valid_end_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valid End Time"},"transaction_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transaction Time"},"entities":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Entities"},"relations":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Relations"},"node_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Node Category"},"entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Name"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"},"lineage_roots":{"items":{"type":"string"},"type":"array","title":"Lineage Roots"}},"type":"object","required":["item_id","content"],"title":"MemoryItemResponse","description":"Response model for memory items.\n\nAligned with core SmartMemory SDK MemoryItem for full feature parity.\nIncludes bi-temporal fields, extracted entities/relations, and tenancy."},"MemoryItemUpdate":{"properties":{"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"properties":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Properties"},"write_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Write Mode"}},"type":"object","title":"MemoryItemUpdate","description":"Request to update an existing memory item.\n\nSee CORE-CRUD-UPDATE-1 contract for full semantics.\n`content` and `metadata` are conveniences folded into properties.\n`properties` + `write_mode` give direct access to the canonical\n`SmartMemory.update_properties` surface."},"MemoryListResponse":{"properties":{"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"policy":{"$ref":"#/components/schemas/ResolvedListPolicy"},"skipped_rows":{"type":"integer","minimum":0.0,"title":"Skipped Rows","description":"Rows in the caller's scope that the listing could not read, so they are not in `items` or `total`. A destructive caller must not treat the listing as complete while this is above 0."}},"type":"object","required":["items","total","limit","offset","policy","skipped_rows"],"title":"MemoryListResponse"},"MergeRequest":{"properties":{"into_id":{"type":"string","title":"Into Id"},"expected_tier":{"anyOf":[{"type":"string","enum":["working","proposed"]},{"type":"null"}],"title":"Expected Tier"}},"type":"object","required":["into_id"],"title":"MergeRequest"},"MigrateRequest":{"properties":{"reason":{"type":"string","title":"Reason","description":"Why the migration is being performed (audit evidence)."},"batch_size":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Batch Size","description":"Instance edges rewritten per chunk.","default":500},"on_violation":{"type":"string","enum":["refuse","skip"],"title":"On Violation","description":"Record migrations: refuse all violations or skip invalid source items.","default":"refuse"}},"type":"object","required":["reason"],"title":"MigrateRequest","description":"Body for `POST /ontology/types/{from_id}/migrate-to/{to_id}`."},"MigrationResultResponse":{"properties":{"from_name":{"type":"string","title":"From Name"},"into_name":{"type":"string","title":"Into Name"},"instances_migrated":{"type":"integer","title":"Instances Migrated"},"batches":{"type":"integer","title":"Batches","default":0},"notes":{"items":{"type":"string"},"type":"array","title":"Notes"},"moved_item_ids":{"items":{"type":"string"},"type":"array","title":"Moved Item Ids"},"skipped_items":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Skipped Items"},"vector_metadata_updated":{"type":"integer","title":"Vector Metadata Updated","default":0},"vector_metadata_missing":{"type":"integer","title":"Vector Metadata Missing","default":0},"vector_metadata_failed":{"type":"integer","title":"Vector Metadata Failed","default":0},"searchable_mismatch_count":{"type":"integer","title":"Searchable Mismatch Count","default":0}},"type":"object","required":["from_name","into_name","instances_migrated"],"title":"MigrationResultResponse","description":"Projection of `smartmemory.ontology.management.MigrationResult`."},"NodeUpdateRequest":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"}},"type":"object","title":"NodeUpdateRequest"},"OAuthExchangeRequest":{"properties":{"token":{"type":"string","maxLength":8192,"title":"Token"}},"additionalProperties":false,"type":"object","required":["token"],"title":"OAuthExchangeRequest","description":"A Clerk OAuth token submitted to the hosted MCP bridge endpoint."},"OAuthExchangeResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"user_id":{"type":"string","title":"User Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"default_team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Team Id"},"default_workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Workspace Id"},"active_workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Workspace Id"},"tenant_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Role"},"email":{"type":"string","title":"Email"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"}},"type":"object","required":["access_token","expires_at","user_id","tenant_id","default_team_id","default_workspace_id","active_workspace_id","tenant_role","email"],"title":"OAuthExchangeResponse","description":"Access-only SmartMemory token returned by the hosted OAuth bridge."},"OffboardConflictRepair":{"properties":{"release_ids":{"items":{"type":"string"},"type":"array","title":"Release Ids","default":[]}},"type":"object","title":"OffboardConflictRepair"},"OidcSessionRequest":{"properties":{"id_token":{"type":"string","maxLength":16384,"minLength":1,"title":"Id Token"},"nonce":{"type":"string","maxLength":512,"minLength":1,"title":"Nonce"}},"additionalProperties":false,"type":"object","required":["id_token","nonce"],"title":"OidcSessionRequest","description":"Browser OIDC ID-token exchange input. Token material is never persisted."},"OnboardingCompleteRequest":{"properties":{"onboarding_id":{"type":"string","title":"Onboarding Id"}},"type":"object","required":["onboarding_id"],"title":"OnboardingCompleteRequest","description":"Request body for completing/polling onboarding."},"OnboardingResponse":{"properties":{"onboarding_id":{"type":"string","title":"Onboarding Id"},"status":{"$ref":"#/components/schemas/OnboardingStatus"},"selected_tier":{"$ref":"#/components/schemas/SubscriptionTier"},"checkout_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkout Url"},"login_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Login Url"},"csrf_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Csrf Token"},"retry_available":{"type":"boolean","title":"Retry Available","default":false},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["onboarding_id","status","selected_tier"],"title":"OnboardingResponse","description":"Response payload for onboarding orchestration endpoints."},"OnboardingRetryRequest":{"properties":{"onboarding_id":{"type":"string","title":"Onboarding Id"}},"type":"object","required":["onboarding_id"],"title":"OnboardingRetryRequest","description":"Request body for retrying failed onboarding steps."},"OnboardingStartRequest":{"properties":{"email":{"type":"string","title":"Email"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"selected_tier":{"$ref":"#/components/schemas/SubscriptionTier","default":"free"},"billing_period":{"type":"string","title":"Billing Period","default":"monthly"},"seat_count":{"type":"integer","title":"Seat Count","default":1},"success_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success Url"},"cancel_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Url"}},"type":"object","required":["email"],"title":"OnboardingStartRequest","description":"Request body for starting hosted onboarding."},"OnboardingStatus":{"type":"string","enum":["pending","awaiting_payment","active","failed"],"title":"OnboardingStatus","description":"Onboarding state machine status."},"OntologyAuditListResponse":{"properties":{"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Items"}},"type":"object","title":"OntologyAuditListResponse","description":"Audit feed envelope. Rows are substrate audit dicts (passthrough)."},"OntologyRelationPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OntologyRelationResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","title":"OntologyRelationPage","description":"Keyset-paginated envelope for `GET /ontology/relations`."},"OntologyRelationResponse":{"properties":{"name":{"type":"string","title":"Name"},"iri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iri"},"wikidata_pid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wikidata Pid"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"definition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Definition"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"aliases":{"items":{"type":"string"},"type":"array","title":"Aliases"},"examples":{"items":{"type":"string"},"type":"array","title":"Examples"},"domain":{"items":{"type":"string"},"type":"array","title":"Domain"},"range":{"items":{"type":"string"},"type":"array","title":"Range"},"inverse_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inverse Of"},"cardinality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cardinality"},"temporal":{"type":"boolean","title":"Temporal","default":false},"properties_schema":{"additionalProperties":true,"type":"object","title":"Properties Schema"},"transitive":{"type":"boolean","title":"Transitive","default":false},"symmetric":{"type":"boolean","title":"Symmetric","default":false},"reflexive":{"type":"boolean","title":"Reflexive","default":false},"parent_relations":{"items":{"type":"string"},"type":"array","title":"Parent Relations"},"equivalent_relations":{"items":{"type":"string"},"type":"array","title":"Equivalent Relations"},"tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier"},"trust_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trust Origin"},"layer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Layer"},"pack_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pack Id"},"pack_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pack Version"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"confidence":{"type":"number","title":"Confidence","default":0.0},"frequency":{"type":"integer","title":"Frequency","default":0}},"type":"object","required":["name"],"title":"OntologyRelationResponse","description":"Projection of `smartmemory.ontology_types.OntologyRelation`."},"OntologyTypePage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OntologyTypeResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","title":"OntologyTypePage","description":"Keyset-paginated envelope for `GET /ontology/types`."},"OntologyTypeResponse":{"properties":{"name":{"type":"string","title":"Name"},"iri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iri"},"wikidata_qid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wikidata Qid"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"definition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Definition"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"aliases":{"items":{"type":"string"},"type":"array","title":"Aliases"},"examples":{"items":{"type":"string"},"type":"array","title":"Examples"},"parent_types":{"items":{"type":"string"},"type":"array","title":"Parent Types"},"equivalent_types":{"items":{"type":"string"},"type":"array","title":"Equivalent Types"},"properties_schema":{"additionalProperties":true,"type":"object","title":"Properties Schema"},"required_properties":{"items":{"type":"string"},"type":"array","title":"Required Properties"},"kind":{"type":"string","title":"Kind","default":"entity"},"storage_strategy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Strategy"},"storage_searchable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Storage Searchable"},"tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier"},"trust_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trust Origin"},"layer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Layer"},"pack_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pack Id"},"pack_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pack Version"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"confidence":{"type":"number","title":"Confidence","default":0.0},"frequency":{"type":"integer","title":"Frequency","default":0},"canonical":{"type":"boolean","title":"Canonical","default":false},"superseded_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Superseded By"},"auto_promote_override":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Promote Override"},"instance_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Instance Count"}},"type":"object","required":["name"],"title":"OntologyTypeResponse","description":"Projection of `smartmemory.ontology_types.OntologyType` for the HTTP read API."},"PatternCreateRequest":{"properties":{"name":{"type":"string","title":"Name","default":""},"entity_type":{"type":"string","title":"Entity Type","default":""},"confidence":{"type":"number","title":"Confidence","default":0.9},"is_global":{"type":"boolean","title":"Is Global","default":false}},"type":"object","title":"PatternCreateRequest"},"PatternExample":{"properties":{"kind":{"type":"string","pattern":"^(positive|negative)$","title":"Kind"},"code":{"type":"string","minLength":0,"title":"Code"},"note":{"type":"string","title":"Note","default":""}},"type":"object","required":["kind","code"],"title":"PatternExample"},"PendingRequirementInput":{"properties":{"description":{"type":"string","minLength":1,"title":"Description","description":"What must be true"},"requirement_type":{"type":"string","title":"Requirement Type","description":"Free string. GTM uses capability | uat | proof (core default: evidence)","default":"evidence"},"query_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query Hint","description":"Optional retrieval hint, e.g. FEATURE:code-index"}},"type":"object","required":["description"],"title":"PendingRequirementInput","description":"One proof gap on an Acceptance Case (GTM-COCKPIT-PENDING-LIFECYCLE-1).\n\nrequirement_id is NOT accepted. Core assigns it (req_<uuid8>)."},"PersonalizationRequest":{"properties":{"traits":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Traits"},"preferences":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Preferences"}},"type":"object","title":"PersonalizationRequest","description":"Request to update user personalization settings."},"PinVersionRequest":{"properties":{"version":{"type":"string","minLength":1,"title":"Version"}},"type":"object","required":["version"],"title":"PinVersionRequest"},"PipelineConfigCreateRequest":{"properties":{"name":{"type":"string","title":"Name","default":""},"description":{"type":"string","title":"Description","default":""},"config":{"additionalProperties":true,"type":"object","title":"Config"}},"type":"object","title":"PipelineConfigCreateRequest"},"Pricing":{"properties":{"model":{"type":"string","enum":["free","paid"],"title":"Model"},"price_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price Ref"},"trial_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Days"}},"type":"object","required":["model"],"title":"Pricing","description":"Price of a listing (hub-catalog-contract.json ``$defs/Pricing``). ``price_ref`` is opaque (later a Stripe Price\nid). ``trial_days`` stays None until the owner decides what a trial means."},"ProfileCatalogResponse":{"properties":{"generated_at":{"type":"string","title":"Generated At"},"tiles":{"items":{"$ref":"#/components/schemas/ProfileTile"},"type":"array","title":"Tiles"},"refused":{"items":{"$ref":"#/components/schemas/RefusedProfile"},"type":"array","title":"Refused"}},"type":"object","required":["generated_at","tiles","refused"],"title":"ProfileCatalogResponse"},"ProfileCreateRequest":{"properties":{"name":{"type":"string","title":"Name","description":"Profile name (snake_case, unique per tenant)"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"Human-readable display name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Profile description"},"composition":{"additionalProperties":{"type":"string"},"type":"object","title":"Composition","description":"Stage profile references, e.g. {'extraction': 'extraction.full'}"},"overrides":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Overrides","description":"Per-stage config overrides"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","description":"Tags for categorization"}},"additionalProperties":false,"type":"object","required":["name"],"title":"ProfileCreateRequest","description":"Request to create a custom pipeline profile.\n\n``extra=\"forbid\"``: ``visibility``, ``workspace_id``, ``shared_workspace_ids`` and any other unknown key are\nrefused (422). The owning workspace is the request workspace and a new profile is always private."},"ProfileListResponse":{"properties":{"profiles":{"items":{"$ref":"#/components/schemas/ProfileResponse"},"type":"array","title":"Profiles"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["profiles","total"],"title":"ProfileListResponse","description":"Response for listing profiles. ``total`` counts the profiles visible to the request workspace only."},"ProfileResponse":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_builtin":{"type":"boolean","title":"Is Builtin"},"is_active":{"type":"boolean","title":"Is Active","default":true},"composition":{"additionalProperties":{"type":"string"},"type":"object","title":"Composition"},"overrides":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Overrides"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"usage_count":{"type":"integer","title":"Usage Count","default":0},"visibility":{"type":"string","enum":["private","org","published"],"title":"Visibility"},"access":{"type":"string","enum":["builtin","owner_workspace","shared","org"],"title":"Access"}},"type":"object","required":["name","display_name","is_builtin","visibility","access"],"title":"ProfileResponse","description":"Response for a single profile."},"ProfileStageTile":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"stage_profile":{"type":"string","title":"Stage Profile"},"enabled":{"type":"boolean","title":"Enabled"},"ingest_stages":{"items":{"type":"string"},"type":"array","title":"Ingest Stages"}},"type":"object","required":["id","label","stage_profile","enabled","ingest_stages"],"title":"ProfileStageTile"},"ProfileTile":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"aliases":{"items":{"type":"string"},"type":"array","title":"Aliases"},"stages":{"items":{"$ref":"#/components/schemas/ProfileStageTile"},"type":"array","title":"Stages"},"studio_url":{"type":"string","title":"Studio Url"},"visibility":{"type":"string","const":"published","title":"Visibility"},"source":{"$ref":"#/components/schemas/ProfileTileSource"}},"type":"object","required":["id","name","aliases","stages","studio_url","visibility","source"],"title":"ProfileTile"},"ProfileTileSource":{"properties":{"kind":{"type":"string","const":"builtin","title":"Kind"},"ref":{"type":"string","title":"Ref"}},"type":"object","required":["kind","ref"],"title":"ProfileTileSource"},"ProfileUpdateRequest":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"composition":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Composition"},"overrides":{"anyOf":[{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object"},{"type":"null"}],"title":"Overrides"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"additionalProperties":false,"type":"object","title":"ProfileUpdateRequest","description":"Request to update a custom pipeline profile. ``extra=\"forbid\"``: only the editable fields are accepted."},"PromoteRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name","description":"Name for the procedure (uses suggested_name if omitted)"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description for the procedure"},"procedure_type":{"type":"string","title":"Procedure Type","description":"Type of procedure","default":"extraction"},"preferred_profile":{"type":"string","title":"Preferred Profile","description":"Preferred pipeline profile","default":"quick_extract"},"remove_working_items":{"type":"boolean","title":"Remove Working Items","description":"Remove working items after promotion","default":false}},"type":"object","title":"PromoteRequest","description":"Request body for promoting a candidate to a procedure."},"PromoteResponse":{"properties":{"status":{"type":"string","title":"Status","default":"success"},"procedure_id":{"type":"string","title":"Procedure Id"},"name":{"type":"string","title":"Name"},"items_promoted":{"type":"integer","title":"Items Promoted"},"items_removed":{"type":"integer","title":"Items Removed"}},"type":"object","required":["procedure_id","name","items_promoted","items_removed"],"title":"PromoteResponse","description":"Response for successful promotion."},"ProofRequest":{"properties":{"decision_id":{"type":"string","title":"Decision Id","description":"Decision ID to trace provenance for"},"max_depth":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Max Depth","description":"Max depth to traverse","default":5}},"type":"object","required":["decision_id"],"title":"ProofRequest","description":"Request to build a proof tree for a decision."},"QueryReasoningRequest":{"properties":{"query":{"type":"string","title":"Query","description":"Query like 'why did I choose X?'"},"artifact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Artifact Id","description":"Find reasoning that led to this artifact"},"limit":{"type":"integer","maximum":500.0,"minimum":1.0,"title":"Limit","description":"Maximum traces to return","default":10}},"type":"object","required":["query"],"title":"QueryReasoningRequest","description":"Request to query reasoning traces."},"QueryRequest":{"properties":{"query":{"type":"string","minLength":1,"title":"Query","description":"The query to route and execute"},"top_k":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Top K","description":"Max results to return","default":10}},"type":"object","required":["query"],"title":"QueryRequest","description":"Request to route a query through the symbolic/semantic router."},"RawChunk":{"properties":{"doc_id":{"type":"string","title":"Doc Id","default":""},"text":{"type":"string","title":"Text","default":""}},"type":"object","title":"RawChunk"},"ReadAroundCursor":{"properties":{"prev_pos":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Prev Pos","description":"Position to page backward from."},"next_pos":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Pos","description":"Position to page forward from."}},"type":"object","title":"ReadAroundCursor","description":"Continue-cursor: chunk positions just past each window edge."},"ReadAroundRequest":{"properties":{"item_id":{"type":"string","title":"Item Id","description":"A matched conversation-chunk item_id."},"char_budget":{"type":"integer","minimum":1.0,"title":"Char Budget","description":"Total CHARACTER budget for the returned window.","default":20000},"before_ratio":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Before Ratio","description":"Fraction of the budget spent walking backward (earlier chunks).","default":0.3},"after_ratio":{"type":"number","maximum":1.0,"minimum":0.0,"title":"After Ratio","description":"Fraction of the budget spent walking forward (later chunks).","default":0.7},"cursor":{"anyOf":[{"$ref":"#/components/schemas/ReadAroundCursor"},{"type":"null"}],"description":"Optional continue-cursor from a prior response for directional paging."}},"type":"object","required":["item_id"],"title":"ReadAroundRequest","description":"Request body for ``POST /memory/read-around``. Mirrors contract request section."},"ReasoningStepModel":{"properties":{"type":{"type":"string","title":"Type","description":"Step type: thought, action, observation, decision, conclusion, reflection"},"content":{"type":"string","title":"Content","description":"Content of this reasoning step"}},"type":"object","required":["type","content"],"title":"ReasoningStepModel","description":"A single step in a reasoning trace."},"ReasoningTraceModel":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"steps":{"items":{"$ref":"#/components/schemas/ReasoningStepModel"},"type":"array","title":"Steps"},"task_context":{"anyOf":[{"$ref":"#/components/schemas/TaskContextModel"},{"type":"null"}]},"artifact_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Artifact Ids"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"has_explicit_markup":{"type":"boolean","title":"Has Explicit Markup","default":false}},"type":"object","required":["trace_id","steps"],"title":"ReasoningTraceModel","description":"A complete reasoning trace."},"RecallPackRequest":{"properties":{"budget_tokens":{"type":"integer","title":"Budget Tokens","default":0},"query":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query"},"sections":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Sections"},"preset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preset"}},"type":"object","title":"RecallPackRequest","description":"Request for a token-budgeted context pack (CORE-RECALL-BUDGET-1).\n\n``budget_tokens`` is ``StrictInt``, not ``int``, deliberately: Pydantic's lax mode\ncoerces JSON ``true`` and ``\"1\"`` to the integer ``1``, so a plain ``int`` annotation\nturns two clearly-invalid bodies into a successful 200 with a 1-token budget. By the\ntime the route's own range check runs the value is a genuine ``int`` and the guard\ncannot tell it apart from a caller who really asked for 1. Strict mode rejects both at\nthe parse boundary, where the caller still learns what was wrong."},"RecallProfileUpdate":{"properties":{"recall_profile":{"additionalProperties":true,"type":"object","title":"Recall Profile","description":"Recall profile with optional memory_type_weights dict"}},"type":"object","required":["recall_profile"],"title":"RecallProfileUpdate","description":"Request model for updating agent recall profile."},"RefreshTokenRequest":{"properties":{"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"}},"type":"object","title":"RefreshTokenRequest","description":"Refresh token request schema."},"RefusedProfile":{"properties":{"id":{"type":"string","title":"Id"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["id","reason"],"title":"RefusedProfile"},"RegistryCreateRequest":{"properties":{"context":{"additionalProperties":true,"type":"object","title":"Context"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"name":{"type":"string","title":"Name","default":""},"description":{"type":"string","title":"Description","default":""},"domain":{"type":"string","title":"Domain","default":"general"}},"type":"object","title":"RegistryCreateRequest"},"ReinforceRequest":{"properties":{"evidence_id":{"type":"string","title":"Evidence Id","description":"Memory ID of supporting evidence"}},"type":"object","required":["evidence_id"],"title":"ReinforceRequest","description":"Request to reinforce a decision with new evidence."},"ResolveBody":{"properties":{"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"}},"type":"object","title":"ResolveBody"},"ResolveHitlRequest":{"properties":{"action":{"type":"string","enum":["accepted","dismissed","deferred"],"title":"Action","description":"Resolution action"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional free-text note"}},"type":"object","required":["action"],"title":"ResolveHitlRequest","description":"Resolve a HITL queue item. Invalid `action` → 422 (Pydantic), before core."},"ResolveRequest":{"properties":{"existing_item_id":{"type":"string","title":"Existing Item Id","description":"ID of the existing memory item in conflict"},"new_fact":{"type":"string","title":"New Fact","description":"The new fact that conflicts"},"auto_resolve":{"type":"boolean","title":"Auto Resolve","description":"Attempt auto-resolution before manual strategy","default":true},"strategy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy","description":"Manual resolution strategy if auto fails"},"use_wikipedia":{"type":"boolean","title":"Use Wikipedia","description":"Use Wikipedia for verification","default":true},"use_llm":{"type":"boolean","title":"Use Llm","description":"Use LLM for reasoning","default":true},"idempotency_key":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Idempotency Key","description":"Optional caller-supplied key for replay-safe conflict resolution"}},"type":"object","required":["existing_item_id","new_fact"],"title":"ResolveRequest","description":"Request to resolve a conflict."},"ResolveRequirementRequest":{"properties":{"requirement_id":{"type":"string","minLength":1,"title":"Requirement Id"},"memory_id":{"type":"string","minLength":1,"title":"Memory Id","description":"Memory id that satisfies the requirement"}},"type":"object","required":["requirement_id","memory_id"],"title":"ResolveRequirementRequest","description":"Mark one pending requirement resolved by a memory item."},"ResolveResponse":{"properties":{"auto_resolved":{"type":"boolean","title":"Auto Resolved"},"resolution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution"},"confidence":{"type":"number","title":"Confidence"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"},"evidence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evidence"},"actions_taken":{"items":{"type":"string"},"type":"array","title":"Actions Taken"}},"type":"object","required":["auto_resolved","resolution","confidence","method","evidence","actions_taken"],"title":"ResolveResponse","description":"Response from resolving a conflict."},"ResolvedListPolicy":{"properties":{"include_grounding":{"type":"boolean","title":"Include Grounding"},"source":{"type":"string","enum":["request","workspace","env"],"title":"Source"}},"type":"object","required":["include_grounding","source"],"title":"ResolvedListPolicy"},"ResultFeedbackRequest":{"properties":{"search_session_id":{"type":"string","title":"Search Session Id","description":"Server-generated session ID from the search response header"},"result_used":{"items":{"type":"string"},"type":"array","title":"Result Used","description":"Item IDs the agent/user selected from the result set"}},"type":"object","required":["search_session_id"],"title":"ResultFeedbackRequest","description":"Request body for result-selection feedback."},"ResultFeedbackResponse":{"properties":{"status":{"type":"string","title":"Status"},"search_session_id":{"type":"string","title":"Search Session Id"},"result_used_count":{"type":"integer","title":"Result Used Count"},"result_shown_count":{"type":"integer","title":"Result Shown Count"}},"type":"object","required":["status","search_session_id","result_used_count","result_shown_count"],"title":"ResultFeedbackResponse","description":"Response for a successful feedback submission."},"RetireTypeRequest":{"properties":{"reason":{"type":"string","minLength":1,"title":"Reason","description":"Why this type is being retired (audit evidence)."},"superseded_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Superseded By","description":"Optional surviving private type identifier for an explicit retirement redirect."}},"type":"object","required":["reason"],"title":"RetireTypeRequest","description":"Body for `POST /ontology/types/{type_id}/retire`."},"RetractRequest":{"properties":{"reason":{"type":"string","minLength":1,"title":"Reason","description":"Why the decision is being retracted"}},"type":"object","required":["reason"],"title":"RetractRequest","description":"Request to retract a decision."},"RetrievalPolicyOverrides":{"properties":{"include_grounding":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Grounding"},"reranker":{"anyOf":[{"type":"string","enum":["cross-encoder","none"]},{"type":"null"}],"title":"Reranker"}},"additionalProperties":false,"type":"object","title":"RetrievalPolicyOverrides","description":"Only stated knobs override the next layer. Null/omitted means inherit."},"RetrievalPolicyUpdate":{"properties":{"retrieval_policy":{"$ref":"#/components/schemas/RetrievalPolicyOverrides","description":"Empty object restores inheritance"}},"additionalProperties":false,"type":"object","required":["retrieval_policy"],"title":"RetrievalPolicyUpdate"},"ReviewItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"tier":{"type":"string","enum":["working","proposed"],"title":"Tier"},"layer":{"type":"string","title":"Layer"},"pack_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pack Id"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"confidence":{"type":"number","title":"Confidence","default":0.0},"frequency":{"type":"integer","title":"Frequency","default":0},"evidence":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Evidence"},"review_assignee":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Assignee"},"status":{"type":"string","enum":["open","decided"],"title":"Status"}},"type":"object","required":["id","name","tier","layer","status"],"title":"ReviewItem","description":"Review projection for one private-layer `OntologyType`."},"ReviewQueueResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ReviewItem"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","title":"ReviewQueueResponse"},"RollbackRequest":{"properties":{"context":{"additionalProperties":true,"type":"object","title":"Context"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"target_version":{"type":"string","title":"Target Version","default":""},"message":{"type":"string","title":"Message","default":""}},"type":"object","title":"RollbackRequest"},"RunAnalysisRequest":{"properties":{"query":{"type":"string","title":"Query","default":"*"},"top_k":{"type":"integer","maximum":500.0,"minimum":1.0,"title":"Top K","default":100},"memory_items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Memory Items"}},"type":"object","title":"RunAnalysisRequest"},"RunInferenceRequest":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run","description":"If true, report matches without creating edges","default":false}},"type":"object","title":"RunInferenceRequest","description":"Request to run inference engine."},"SaveAsTemplateRequest":{"properties":{"registry_id":{"type":"string","title":"Registry Id","default":""},"name":{"type":"string","title":"Name","default":""},"description":{"type":"string","title":"Description","default":""}},"type":"object","title":"SaveAsTemplateRequest"},"SearchRequest":{"properties":{"query":{"type":"string","title":"Query","default":""},"top_k":{"type":"integer","maximum":500.0,"minimum":1.0,"title":"Top K","default":5},"memory_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory Type"},"use_ssg":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Ssg"},"enable_hybrid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enable Hybrid","default":true},"decompose":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Decompose","default":false},"include_reference":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Reference","default":false},"reranker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reranker"},"channel_weights":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Channel Weights"},"hop_strategy":{"anyOf":[{"type":"string","enum":["consensus","relevance","semantic"]},{"type":"null"}],"title":"Hop Strategy"},"multi_hop":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Multi Hop","default":false},"max_hops":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Hops","default":3},"budget_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Budget Ms","default":1500},"semantic_hops":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Semantic Hops","default":false},"expertise":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Expertise","default":false},"cite":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Cite","default":false},"include_consolidated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Consolidated","default":false},"consolidation_first":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Consolidation First","default":false},"since":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since"},"until":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Until"},"as_of_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of Date"},"as_of_strict":{"type":"boolean","title":"As Of Strict","default":false},"include_superseded":{"type":"boolean","title":"Include Superseded","default":false},"include_retracted":{"type":"boolean","title":"Include Retracted","default":false},"include_archived":{"type":"boolean","title":"Include Archived","default":false},"exclude_speculative":{"type":"boolean","title":"Exclude Speculative","default":false},"metadata_filter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata Filter"}},"type":"object","title":"SearchRequest","description":"Request to search memory items."},"SequencePeekResponse":{"properties":{"name":{"type":"string","title":"Name"},"value":{"type":"integer","title":"Value"}},"type":"object","required":["name","value"],"title":"SequencePeekResponse","description":"The current counter, with nothing consumed."},"ShareResult":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"team_id":{"type":"string","title":"Team Id"},"permission":{"type":"string","enum":["view","edit","admin"],"title":"Permission"}},"additionalProperties":false,"type":"object","required":["workspace_id","team_id","permission"],"title":"ShareResult"},"ShareWorkspaceRequest":{"properties":{"team_id":{"type":"string","minLength":1,"title":"Team Id"},"permission":{"type":"string","minLength":1,"title":"Permission"}},"additionalProperties":false,"type":"object","required":["team_id","permission"],"title":"ShareWorkspaceRequest"},"StageResult":{"properties":{"success":{"type":"boolean","title":"Success"},"stage":{"type":"string","title":"Stage"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"execution_time":{"type":"number","title":"Execution Time","default":0.0},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["success","stage","data"],"title":"StageResult","description":"Result from a pipeline stage execution."},"StorageRequest":{"properties":{"run_id":{"type":"string","title":"Run Id","description":"Pipeline run ID from extraction stage"},"pipeline_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Id","default":"default"},"profile_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Name"},"storage_strategy":{"type":"string","title":"Storage Strategy","default":"dual_node"},"create_ontology_relations":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Create Ontology Relations","default":true},"enable_triple_processing":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enable Triple Processing","default":true},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context"}},"type":"object","required":["run_id"],"title":"StorageRequest","description":"Request to run storage pipeline stage."},"StoreReasoningRequest":{"properties":{"trace":{"$ref":"#/components/schemas/ReasoningTraceModel"},"artifact_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Artifact Ids","description":"IDs of artifacts this reasoning produced"}},"type":"object","required":["trace"],"title":"StoreReasoningRequest","description":"Request to store a reasoning trace."},"StructuredIngestRequest":{"properties":{"data":{"additionalProperties":true,"type":"object","title":"Data","description":"Structured data matching the schema handler"},"schema_name":{"type":"string","title":"Schema Name","description":"Handler schema: decision, tool_call, plan_task, plan, etc."}},"type":"object","required":["data","schema_name"],"title":"StructuredIngestRequest"},"SubscribeRequest":{"properties":{"base_registry_id":{"type":"string","minLength":1,"title":"Base Registry Id"},"pinned_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pinned Version"}},"type":"object","required":["base_registry_id"],"title":"SubscribeRequest"},"SubscriptionCreate":{"properties":{"filter":{"$ref":"#/components/schemas/SubscriptionFilterCreate"},"dispatch":{"$ref":"#/components/schemas/DispatchConfigCreate"},"subscriber_type":{"type":"string","title":"Subscriber Type","description":"Subscriber type: agent or user","default":"agent"}},"type":"object","required":["filter","dispatch"],"title":"SubscriptionCreate","description":"Request model for creating a subscription."},"SubscriptionFilterCreate":{"properties":{"event_types":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Event Types","description":"Required. Event types to match."},"memory_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Memory Types","description":"Memory types to match (None = any)"},"entity_prefixes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Entity Prefixes","description":"Entity name prefixes to match"},"source_agent_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Source Agent Ids","description":"Source agent IDs to match"}},"type":"object","required":["event_types"],"title":"SubscriptionFilterCreate","description":"Filter criteria for matching events."},"SubscriptionResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"subscriber_id":{"type":"string","title":"Subscriber Id"},"subscriber_type":{"type":"string","title":"Subscriber Type"},"filter":{"additionalProperties":true,"type":"object","title":"Filter"},"dispatch":{"additionalProperties":true,"type":"object","title":"Dispatch"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","workspace_id","tenant_id","subscriber_id","subscriber_type","filter","dispatch","is_active","created_at","updated_at"],"title":"SubscriptionResponse","description":"Response model for a subscription."},"SubscriptionTier":{"type":"string","enum":["free","starter","pro","team","enterprise"],"title":"SubscriptionTier","description":"Subscription tier enum."},"SupersedeLinkRequest":{"properties":{"new_item_id":{"type":"string","minLength":1,"title":"New Item Id"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["new_item_id"],"title":"SupersedeLinkRequest","description":"Relate two items that already exist (SVC-SUPERSEDE-LINK-1).\n\nDistinct from ``SupersedeMemoryRequest``, which carries the content of a\nreplacement to be created. Here both records are already stored."},"SupersedeMemoryRequest":{"properties":{"content":{"type":"string","minLength":1,"title":"Content"},"memory_type":{"type":"string","minLength":1,"title":"Memory Type"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"reason":{"type":"string","minLength":1,"title":"Reason"}},"type":"object","required":["content","memory_type","reason"],"title":"SupersedeMemoryRequest","description":"Append a replacement while retaining the prior item's history."},"SupersedeRequest":{"properties":{"new_content":{"type":"string","minLength":1,"title":"New Content","description":"Content of the replacement decision"},"new_decision_type":{"type":"string","title":"New Decision Type","description":"Type of the new decision","default":"inference"},"new_confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"New Confidence","default":0.8},"reason":{"type":"string","minLength":1,"title":"Reason","description":"Why the old decision is being superseded"},"rejected_alternatives":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Rejected Alternatives","description":"Alternatives considered and dropped for the replacement decision"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale","description":"Why the replacement was chosen"},"constraints":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Constraints","description":"Hard limits applying to the replacement decision"}},"type":"object","required":["new_content","reason"],"title":"SupersedeRequest","description":"Request to supersede a decision."},"TaskContextModel":{"properties":{"goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Goal"},"input":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input"},"task_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Type"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"complexity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Complexity"}},"type":"object","title":"TaskContextModel","description":"Context about the task being reasoned about."},"TeamResponse":{"properties":{"team_id":{"type":"string","title":"Team Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"data_classification":{"type":"string","title":"Data Classification"},"cost_center":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cost Center"},"member_count":{"type":"integer","title":"Member Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"is_system":{"type":"boolean","title":"Is System","default":false},"is_default":{"type":"boolean","title":"Is Default","default":false},"user_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Role"}},"type":"object","required":["team_id","name","description","data_classification","cost_center","member_count","created_at"],"title":"TeamResponse"},"TeamRole":{"type":"string","enum":["admin","member","viewer"],"title":"TeamRole","description":"Team-level roles."},"TeamWorkspaceList":{"properties":{"team_id":{"type":"string","title":"Team Id"},"workspaces":{"items":{"$ref":"#/components/schemas/TeamWorkspaceSummary"},"type":"array","title":"Workspaces"}},"additionalProperties":false,"type":"object","required":["team_id","workspaces"],"title":"TeamWorkspaceList"},"TeamWorkspaceSummary":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_personal":{"type":"boolean","title":"Is Personal"},"effective_permission":{"anyOf":[{"type":"string","enum":["view","edit","admin"]},{"type":"null"}],"title":"Effective Permission"},"sharing_count":{"type":"integer","title":"Sharing Count"},"member_count":{"type":"integer","title":"Member Count"},"can_manage_shares":{"type":"boolean","title":"Can Manage Shares"},"team_permission":{"type":"string","enum":["view","edit","admin"],"title":"Team Permission"},"is_paired_grant":{"type":"boolean","title":"Is Paired Grant"}},"additionalProperties":false,"type":"object","required":["workspace_id","tenant_id","name","description","is_personal","effective_permission","sharing_count","member_count","can_manage_shares","team_permission","is_paired_grant"],"title":"TeamWorkspaceSummary"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In","default":86400}},"type":"object","required":["access_token","refresh_token"],"title":"TokenResponse","description":"Token response schema."},"TriggerRequest":{"properties":{"batch_size":{"anyOf":[{"type":"integer","maximum":500.0,"minimum":1.0},{"type":"null"}],"title":"Batch Size","description":"Override default batch size for this run"}},"type":"object","title":"TriggerRequest"},"UpdateMemberRequest":{"properties":{"role":{"$ref":"#/components/schemas/TeamRole"}},"type":"object","required":["role"],"title":"UpdateMemberRequest"},"UpdatePatternRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"severity":{"anyOf":[{"type":"string","pattern":"^(info|warn|error)$"},{"type":"null"}],"title":"Severity"},"scope":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scope"},"examples":{"anyOf":[{"items":{"$ref":"#/components/schemas/PatternExample"},"type":"array"},{"type":"null"}],"title":"Examples"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","title":"UpdatePatternRequest"},"UpdateTaskRequest":{"properties":{"task_id":{"type":"string","title":"Task Id","description":"Task node ID to update"},"status":{"type":"string","pattern":"^(pending|in_progress|complete|blocked)$","title":"Status","description":"New task status"}},"type":"object","required":["task_id","status"],"title":"UpdateTaskRequest"},"UpdateTeamRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"data_classification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Classification"},"cost_center":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cost Center"}},"type":"object","title":"UpdateTeamRequest"},"UpgradeRequest":{"properties":{"tier":{"$ref":"#/components/schemas/SubscriptionTier"},"billing_period":{"type":"string","title":"Billing Period","default":"monthly"},"payment_method_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method Id"},"use_checkout":{"type":"boolean","title":"Use Checkout","default":false},"seat_count":{"type":"integer","title":"Seat Count","default":1}},"type":"object","required":["tier"],"title":"UpgradeRequest","description":"Request to upgrade subscription."},"UserClassMove":{"properties":{"user_class":{"type":"string","enum":["customer","demo","internal"],"title":"User Class"}},"type":"object","required":["user_class"],"title":"UserClassMove"},"UserResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"tenant_id":{"type":"string","title":"Tenant Id"},"subscription_tier":{"$ref":"#/components/schemas/SubscriptionTier"},"is_active":{"type":"boolean","title":"Is Active"},"is_verified":{"type":"boolean","title":"Is Verified"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles"},"default_team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Team Id"},"default_workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Workspace Id"},"active_workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Workspace Id"},"tenant_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Role"},"tenant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Name"}},"type":"object","required":["id","email","full_name","tenant_id","subscription_tier","is_active","is_verified","created_at"],"title":"UserResponse","description":"User response schema (no sensitive data)."},"ValidateItemRequest":{"properties":{"item_id":{"type":"string","title":"Item Id","description":"ID of the memory item to validate"}},"type":"object","required":["item_id"],"title":"ValidateItemRequest","description":"Request to validate a memory item by ID."},"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"},"VectorQueryRequest":{"properties":{"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"embedding":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Embedding"},"top_k":{"type":"integer","title":"Top K","default":10},"memory_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory Type"},"origin_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Prefix"},"collection":{"type":"string","title":"Collection","default":"memory"},"include_embedding":{"type":"boolean","title":"Include Embedding","default":false}},"type":"object","title":"VectorQueryRequest"},"WorkspaceAccess":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"teams":{"items":{"$ref":"#/components/schemas/WorkspaceAccessTeam"},"type":"array","title":"Teams"},"users":{"items":{"$ref":"#/components/schemas/WorkspaceAccessUser"},"type":"array","title":"Users"}},"additionalProperties":false,"type":"object","required":["workspace_id","teams","users"],"title":"WorkspaceAccess"},"WorkspaceAccessTeam":{"properties":{"team_id":{"type":"string","title":"Team Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"permission":{"type":"string","title":"Permission"},"team_exists":{"type":"boolean","title":"Team Exists"}},"additionalProperties":false,"type":"object","required":["team_id","name","permission","team_exists"],"title":"WorkspaceAccessTeam"},"WorkspaceAccessUser":{"properties":{"user_id":{"type":"string","title":"User Id"},"permission":{"type":"string","title":"Permission"}},"additionalProperties":false,"type":"object","required":["user_id","permission"],"title":"WorkspaceAccessUser"},"WorkspaceList":{"properties":{"workspaces":{"items":{"$ref":"#/components/schemas/WorkspaceSummary"},"type":"array","title":"Workspaces"}},"additionalProperties":false,"type":"object","required":["workspaces"],"title":"WorkspaceList"},"WorkspaceRetrievalPolicyResponse":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"retrieval_policy":{"$ref":"#/components/schemas/RetrievalPolicyOverrides"}},"type":"object","required":["workspace_id","retrieval_policy"],"title":"WorkspaceRetrievalPolicyResponse"},"WorkspaceSummary":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_personal":{"type":"boolean","title":"Is Personal"},"effective_permission":{"anyOf":[{"type":"string","enum":["view","edit","admin"]},{"type":"null"}],"title":"Effective Permission"},"sharing_count":{"type":"integer","title":"Sharing Count"},"member_count":{"type":"integer","title":"Member Count"},"can_manage_shares":{"type":"boolean","title":"Can Manage Shares"}},"additionalProperties":false,"type":"object","required":["workspace_id","tenant_id","name","description","is_personal","effective_permission","sharing_count","member_count","can_manage_shares"],"title":"WorkspaceSummary"},"memory_service__api__request_models__EnrichmentRequest":{"properties":{"item_id":{"type":"string","title":"Item Id","default":""},"routines":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Routines"}},"type":"object","title":"EnrichmentRequest","description":"Request to enrich a memory item."},"memory_service__api__request_models__GroundingRequest":{"properties":{"item_id":{"type":"string","title":"Item Id","default":""},"source_url":{"type":"string","title":"Source Url","default":""},"validation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Validation"}},"type":"object","title":"GroundingRequest","description":"Request to ground a memory item with external sources."},"service_common__models__pipeline__EnrichmentRequest":{"properties":{"run_id":{"type":"string","title":"Run Id","description":"Pipeline run ID from linking stage"},"pipeline_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Id","default":"default"},"profile_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Name"},"enrichment_types":{"items":{"type":"string"},"type":"array","title":"Enrichment Types"},"enable_llm":{"type":"boolean","title":"Enable Llm","default":false}},"type":"object","required":["run_id"],"title":"EnrichmentRequest","description":"Request to run enrichment pipeline stage."},"service_common__models__pipeline__GroundingRequest":{"properties":{"run_id":{"type":"string","title":"Run Id","description":"Pipeline run ID from enrichment stage"},"pipeline_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Id","default":"default"},"profile_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Name"},"grounding_sources":{"items":{"type":"string"},"type":"array","title":"Grounding Sources"},"confidence_threshold":{"type":"number","title":"Confidence Threshold","default":0.7}},"type":"object","required":["run_id"],"title":"GroundingRequest","description":"Request to run grounding pipeline stage."}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"Send `Authorization: Bearer <token>`. The token is either a Clerk session JWT or a SmartMemory API key (prefix `sm_live_`, `sm_test_`, or legacy `sk_`)."},"SessionCookie":{"type":"apiKey","in":"cookie","name":"sm_access_token","description":"Browser session cookie, used only when no Authorization header is sent."}}},"security":[{"BearerAuth":[]},{"SessionCookie":[]}]}