{ "openapi": "3.1.0", "info": { "title": "Ninai", "description": "Enterprise Agentic AI Cognitive Operating System", "version": "1.0.0" }, "paths": { "/health": { "get": { "tags": [ "Health" ], "summary": "Health Check", "description": "Health check endpoint for container orchestration.\n\nReturns:\n dict: Health status with application name", "operationId": "health_check_health_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "x-ninai-cognitive-domain": "health" } }, "/api/v1/auth/methods": { "get": { "tags": [ "Authentication" ], "summary": "Auth Methods", "description": "Return which auth methods are enabled (public endpoint).", "operationId": "auth_methods_api_v1_auth_methods_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthMethodsResponse" } } } } }, "x-ninai-cognitive-domain": "authentication" } }, "/api/v1/auth/login": { "post": { "tags": [ "Authentication" ], "summary": "Login", "description": "Authenticate user and return tokens.\n\nReturns access and refresh tokens on successful authentication.", "operationId": "login_api_v1_auth_login_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "authentication" } }, "/api/v1/auth/oidc/exchange": { "post": { "tags": [ "Authentication" ], "summary": "Oidc Exchange", "description": "Exchange an OIDC ID token for Ninai tokens.", "operationId": "oidc_exchange_api_v1_auth_oidc_exchange_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OidcExchangeRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "authentication" } }, "/api/v1/auth/refresh": { "post": { "tags": [ "Authentication" ], "summary": "Refresh Token", "description": "Refresh access token using refresh token.", "operationId": "refresh_token_api_v1_auth_refresh_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RefreshTokenRequest" } } }, "required": true }, "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" } } } } }, "x-ninai-cognitive-domain": "authentication" } }, "/api/v1/auth/me": { "get": { "tags": [ "Authentication" ], "summary": "Get Current User", "description": "Get current authenticated user's profile.", "operationId": "get_current_user_api_v1_auth_me_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "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" } } } } }, "x-ninai-cognitive-domain": "authentication" }, "patch": { "tags": [ "Authentication" ], "summary": "Patch Current User", "description": "Update current user's profile and/or preferences.", "operationId": "patch_current_user_api_v1_auth_me_patch", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/app__schemas__auth__UserUpdate" } } } }, "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" } } } } }, "x-ninai-cognitive-domain": "authentication" } }, "/api/v1/auth/switch-org": { "post": { "tags": [ "Authentication" ], "summary": "Switch Organization", "description": "Switch to a different organization context.\n\nReturns a new access token scoped to the requested organization.\nUser must have a role in the target organization.", "operationId": "switch_organization_api_v1_auth_switch_org_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgSwitchRequest" } } } }, "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" } } } } }, "x-ninai-cognitive-domain": "authentication" } }, "/api/v1/auth/logout": { "post": { "tags": [ "Authentication" ], "summary": "Logout", "description": "Log out current user.\n\nIn a full implementation, this would invalidate the refresh token.", "operationId": "logout_api_v1_auth_logout_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "authentication" } }, "/api/v1/admin/dashboard": { "get": { "tags": [ "admin" ], "summary": "Get Dashboard", "description": "Get admin dashboard with KPIs, service health, and recent activities.\nRequires: system:read permission", "operationId": "get_dashboard_api_v1_admin_dashboard_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DashboardResponse" } } } } }, "x-ninai-cognitive-domain": "admin" } }, "/api/v1/admin/roles": { "post": { "tags": [ "admin" ], "summary": "Create Role", "description": "Create new admin role", "operationId": "create_role_api_v1_admin_roles_post", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminRoleCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminRoleResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" }, "get": { "tags": [ "admin" ], "summary": "List Roles", "description": "List all admin roles", "operationId": "list_roles_api_v1_admin_roles_get", "parameters": [ { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Skip" } }, { "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": { "type": "array", "items": { "$ref": "#/components/schemas/AdminRoleResponse" }, "title": "Response List Roles Api V1 Admin Roles Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" } }, "/api/v1/admin/roles/{role_id}": { "get": { "tags": [ "admin" ], "summary": "Get Role", "description": "Get role by ID", "operationId": "get_role_api_v1_admin_roles__role_id__get", "parameters": [ { "name": "role_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Role Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminRoleResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" }, "put": { "tags": [ "admin" ], "summary": "Update Role", "description": "Update admin role", "operationId": "update_role_api_v1_admin_roles__role_id__put", "parameters": [ { "name": "role_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Role Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminRoleUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminRoleResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" }, "delete": { "tags": [ "admin" ], "summary": "Delete Role", "description": "Delete admin role", "operationId": "delete_role_api_v1_admin_roles__role_id__delete", "parameters": [ { "name": "role_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Role Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" } }, "/api/v1/admin/settings": { "post": { "tags": [ "admin" ], "summary": "Create Setting", "description": "Create new setting", "operationId": "create_setting_api_v1_admin_settings_post", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" }, "get": { "tags": [ "admin" ], "summary": "List Settings", "description": "List settings", "operationId": "list_settings_api_v1_admin_settings_get", "parameters": [ { "name": "category", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Category" } }, { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Skip" } }, { "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": { "$ref": "#/components/schemas/AdminSettingListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" } }, "/api/v1/admin/settings/{setting_id}": { "get": { "tags": [ "admin" ], "summary": "Get Setting", "description": "Get setting by ID", "operationId": "get_setting_api_v1_admin_settings__setting_id__get", "parameters": [ { "name": "setting_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Setting Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" }, "put": { "tags": [ "admin" ], "summary": "Update Setting", "description": "Update setting", "operationId": "update_setting_api_v1_admin_settings__setting_id__put", "parameters": [ { "name": "setting_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Setting Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" }, "delete": { "tags": [ "admin" ], "summary": "Delete Setting", "description": "Delete setting", "operationId": "delete_setting_api_v1_admin_settings__setting_id__delete", "parameters": [ { "name": "setting_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Setting Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" } }, "/api/v1/admin/audit-logs": { "get": { "tags": [ "admin" ], "summary": "List Audit Logs", "description": "List audit logs", "operationId": "list_audit_logs_api_v1_admin_audit_logs_get", "parameters": [ { "name": "admin_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Admin Id" } }, { "name": "action", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Action" } }, { "name": "resource_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resource Type" } }, { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Skip" } }, { "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": { "$ref": "#/components/schemas/AdminAuditLogListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" } }, "/api/v1/admin/audit-logs/{log_id}": { "get": { "tags": [ "admin" ], "summary": "Get Audit Log", "description": "Get audit log by ID", "operationId": "get_audit_log_api_v1_admin_audit_logs__log_id__get", "parameters": [ { "name": "log_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Log Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminAuditLogResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" } }, "/api/v1/admin/permissions": { "get": { "tags": [ "admin" ], "summary": "Get Permissions", "description": "Get available permissions", "operationId": "get_permissions_api_v1_admin_permissions_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PermissionsResponse" } } } } }, "x-ninai-cognitive-domain": "admin" } }, "/api/v1/admin/users": { "get": { "tags": [ "admin" ], "summary": "List Users", "description": "List users", "operationId": "list_users_api_v1_admin_users_get", "parameters": [ { "name": "search", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Search" } }, { "name": "role_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Role Id" } }, { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Skip" } }, { "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": { "$ref": "#/components/schemas/UserListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" } }, "/api/v1/admin/users/{user_id}": { "get": { "tags": [ "admin" ], "summary": "Get User", "description": "Get user by ID", "operationId": "get_user_api_v1_admin_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": { "$ref": "#/components/schemas/app__schemas__admin__UserAdminResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" } }, "/api/v1/admin/users/{user_id}/disable": { "post": { "tags": [ "admin" ], "summary": "Disable User", "description": "Disable user account", "operationId": "disable_user_api_v1_admin_users__user_id__disable_post", "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/app__schemas__admin__UserAdminResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" } }, "/api/v1/admin/users/{user_id}/enable": { "post": { "tags": [ "admin" ], "summary": "Enable User", "description": "Enable user account", "operationId": "enable_user_api_v1_admin_users__user_id__enable_post", "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/app__schemas__admin__UserAdminResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" } }, "/api/v1/agents/agent-runs": { "get": { "tags": [ "Agents" ], "summary": "List Agent Runs", "operationId": "list_agent_runs_api_v1_agents_agent_runs_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by memory_id", "title": "Memory Id" }, "description": "Filter by memory_id" }, { "name": "agent_name", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by agent_name", "title": "Agent Name" }, "description": "Filter by agent_name" }, { "name": "trace_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by trace_id", "title": "Trace Id" }, "description": "Filter by trace_id" }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by status", "title": "Status" }, "description": "Filter by status" }, { "name": "started_after", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "started_at >= started_after", "title": "Started After" }, "description": "started_at >= started_after" }, { "name": "started_before", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "started_at <= started_before", "title": "Started Before" }, "description": "started_at <= started_before" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 500, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AgentRunSummaryResponse" }, "title": "Response List Agent Runs Api V1 Agents Agent Runs Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "agents" } }, "/api/v1/agents/agent-runs/{agent_run_id}": { "get": { "tags": [ "Agents" ], "summary": "Get Agent Run", "operationId": "get_agent_run_api_v1_agents_agent_runs__agent_run_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "agent_run_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Agent Run Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentRunDetailResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "agents" } }, "/api/v1/agents/agent-runs/{agent_run_id}/events": { "get": { "tags": [ "Agents" ], "summary": "List Agent Run Events", "operationId": "list_agent_run_events_api_v1_agents_agent_runs__agent_run_id__events_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "agent_run_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Agent Run Id" } }, { "name": "event_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by event_type", "title": "Event Type" }, "description": "Filter by event_type" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 200, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AgentRunEventResponse" }, "title": "Response List Agent Run Events Api V1 Agents Agent Runs Agent Run Id Events Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "agents" }, "post": { "tags": [ "Agents" ], "summary": "Create Agent Run Event", "operationId": "create_agent_run_event_api_v1_agents_agent_runs__agent_run_id__events_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "agent_run_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Agent Run Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentRunEventCreateRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentRunEventResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "agents" } }, "/api/v1/agents/agent-run-events/search": { "get": { "tags": [ "Agents" ], "summary": "Search Agent Run Events", "description": "Search trajectory events by summary text.\n\nUses Postgres FTS (simple + plainto_tsquery) for robustness.", "operationId": "search_agent_run_events_api_v1_agents_agent_run_events_search_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "q", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 5000, "description": "Search query", "title": "Q" }, "description": "Search query" }, { "name": "agent_run_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by agent_run_id", "title": "Agent Run Id" }, "description": "Filter by agent_run_id" }, { "name": "memory_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by memory_id", "title": "Memory Id" }, "description": "Filter by memory_id" }, { "name": "event_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by event_type", "title": "Event Type" }, "description": "Filter by event_type" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 500, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AgentRunEventResponse" }, "title": "Response Search Agent Run Events Api V1 Agents Agent Run Events Search Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "agents" } }, "/api/v1/agents/agent-runs/{agent_run_id}/replay": { "get": { "tags": [ "Agents" ], "summary": "Replay Agent Run", "description": "Get deterministic snapshots for time-travel debugging.\n\nReturns all checkpoints up to specified step (or all steps if not specified).\nEach checkpoint contains: inputs, retrieval state, model config, outputs.", "operationId": "replay_agent_run_api_v1_agents_agent_runs__agent_run_id__replay_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "agent_run_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Agent Run Id" } }, { "name": "to_step", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ], "description": "Maximum step index (inclusive)", "title": "To Step" }, "description": "Maximum step index (inclusive)" }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReplayResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "agents" } }, "/api/v1/agents/agent-runs/{agent_run_id}/explain-retrieval": { "get": { "tags": [ "Agents" ], "summary": "Explain Retrieval", "description": "Explain what was retrieved at a specific step and why.\n\nAnswers: \"Which memories were recalled? What filters/scores were applied?\"\nUseful for debugging retrieval quality and understanding agent decisions.", "operationId": "explain_retrieval_api_v1_agents_agent_runs__agent_run_id__explain_retrieval_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "agent_run_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Agent Run Id" } }, { "name": "step_index", "in": "query", "required": true, "schema": { "type": "integer", "minimum": 0, "description": "Step to explain", "title": "Step Index" }, "description": "Step to explain" }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RetrievalExplanation" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "agents" } }, "/api/v1/agents/agent-runs/{agent_run_id}/reproduce": { "post": { "tags": [ "Agents" ], "summary": "Reproduce Step", "description": "Reproduce a specific step using its checkpoint snapshot.\n\nReturns the checkpoint data for sandbox re-execution.\n(Actual sandbox execution is delegated to caller for safety/flexibility.)", "operationId": "reproduce_step_api_v1_agents_agent_runs__agent_run_id__reproduce_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "agent_run_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Agent Run Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReproduceRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReproduceResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "agents" } }, "/api/v1/admin/settings/auth": { "get": { "tags": [ "Admin" ], "summary": "Get Auth Settings", "operationId": "get_auth_settings_api_v1_admin_settings_auth_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthConfigResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" }, "put": { "tags": [ "Admin" ], "summary": "Put Auth Settings", "operationId": "put_auth_settings_api_v1_admin_settings_auth_put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthConfigUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthConfigResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" } }, "/api/v1/admin/settings/env": { "get": { "tags": [ "Admin" ], "summary": "Get Env Settings", "operationId": "get_env_settings_api_v1_admin_settings_env_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EnvSettingsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" } }, "/api/v1/admin/cognitive-autonomy": { "get": { "tags": [ "Admin" ], "summary": "Get Cognitive Autonomy Settings", "operationId": "get_cognitive_autonomy_settings_api_v1_admin_cognitive_autonomy_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CognitiveAutonomyConfigResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" }, "put": { "tags": [ "Admin" ], "summary": "Put Cognitive Autonomy Settings", "operationId": "put_cognitive_autonomy_settings_api_v1_admin_cognitive_autonomy_put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CognitiveAutonomyConfigUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CognitiveAutonomyConfigResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" } }, "/api/v1/admin/feedback-learning": { "get": { "tags": [ "Admin" ], "summary": "Get Feedback Learning Config", "description": "Return the current feedback learning calibration for this organisation.", "operationId": "get_feedback_learning_config_api_v1_admin_feedback_learning_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FeedbackLearningResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" }, "delete": { "tags": [ "Admin" ], "summary": "Reset Feedback Learning Config", "description": "Delete the feedback learning calibration row for this organisation, forcing a fresh start.", "operationId": "reset_feedback_learning_config_api_v1_admin_feedback_learning_delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" } }, "/api/v1/admin/api-keys": { "get": { "tags": [ "Admin" ], "summary": "List Api Keys", "operationId": "list_api_keys_api_v1_admin_api_keys_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ApiKeyResponse" }, "title": "Response List Api Keys Api V1 Admin Api Keys Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" }, "post": { "tags": [ "Admin" ], "summary": "Create Api Key", "operationId": "create_api_key_api_v1_admin_api_keys_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiKeyCreateRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiKeyCreateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" } }, "/api/v1/admin/api-keys/{api_key_id}/revoke": { "post": { "tags": [ "Admin" ], "summary": "Revoke Api Key", "operationId": "revoke_api_key_api_v1_admin_api_keys__api_key_id__revoke_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "api_key_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Api Key Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiKeyResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" } }, "/api/v1/admin/webhooks": { "get": { "tags": [ "Admin" ], "summary": "List Webhooks", "operationId": "list_webhooks_api_v1_admin_webhooks_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/app__schemas__webhook__WebhookSubscriptionResponse" }, "title": "Response List Webhooks Api V1 Admin Webhooks Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" }, "post": { "tags": [ "Admin" ], "summary": "Create Webhook", "operationId": "create_webhook_api_v1_admin_webhooks_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookSubscriptionCreateRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookSubscriptionCreateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" } }, "/api/v1/admin/webhooks/{webhook_id}": { "delete": { "tags": [ "Admin" ], "summary": "Delete Webhook", "operationId": "delete_webhook_api_v1_admin_webhooks__webhook_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Webhook Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" } }, "/api/v1/admin/webhooks/{webhook_id}/deliveries": { "get": { "tags": [ "Admin" ], "summary": "Get Webhook Deliveries", "description": "Get delivery history for a webhook subscription.", "operationId": "get_webhook_deliveries_api_v1_admin_webhooks__webhook_id__deliveries_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Webhook Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 50, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "Offset" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookDeliveryHistoryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" } }, "/api/v1/admin/exports/jobs": { "get": { "tags": [ "Admin" ], "summary": "List Export Jobs", "operationId": "list_export_jobs_api_v1_admin_exports_jobs_get", "security": [ { "HTTPBearer": [] } ], "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": 200, "minimum": 1, "default": 50, "title": "Page Size" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" } }, "/api/v1/admin/exports/snapshots": { "post": { "tags": [ "Admin" ], "summary": "Create Snapshot Export Job", "operationId": "create_snapshot_export_job_api_v1_admin_exports_snapshots_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SnapshotExportRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportJobResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" } }, "/api/v1/admin/exports/jobs/{job_id}": { "get": { "tags": [ "Admin" ], "summary": "Get Export Job", "operationId": "get_export_job_api_v1_admin_exports_jobs__job_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportJobResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" } }, "/api/v1/admin/exports/jobs/{job_id}/download-token": { "get": { "tags": [ "Admin" ], "summary": "Create Export Job Download Token", "operationId": "create_export_job_download_token_api_v1_admin_exports_jobs__job_id__download_token_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } }, { "name": "expires_in_seconds", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 86400, "minimum": 60, "default": 900, "title": "Expires In Seconds" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportJobDownloadTokenResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin" } }, "/api/v1/admin/knowledge/review-requests": { "get": { "tags": [ "Admin - Knowledge" ], "summary": "List Review Requests", "operationId": "list_review_requests_api_v1_admin_knowledge_review_requests_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by status (pending|approved|rejected)", "title": "Status" }, "description": "Filter by status (pending|approved|rejected)" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeReviewListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin---knowledge" } }, "/api/v1/admin/knowledge/review-requests/{request_id}/approve": { "post": { "tags": [ "Admin - Knowledge" ], "summary": "Approve Review Request", "operationId": "approve_review_request_api_v1_admin_knowledge_review_requests__request_id__approve_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "request_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Request Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeReviewDecision" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeReviewRequestResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin---knowledge" } }, "/api/v1/admin/knowledge/review-requests/{request_id}/reject": { "post": { "tags": [ "Admin - Knowledge" ], "summary": "Reject Review Request", "operationId": "reject_review_request_api_v1_admin_knowledge_review_requests__request_id__reject_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "request_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Request Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeReviewDecision" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeReviewRequestResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin---knowledge" } }, "/api/v1/admin/knowledge/items/{item_id}/versions": { "get": { "tags": [ "Admin - Knowledge" ], "summary": "List Versions", "operationId": "list_versions_api_v1_admin_knowledge_items__item_id__versions_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "item_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Item Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeItemVersionsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin---knowledge" } }, "/api/v1/admin/knowledge/items/{item_id}/rollback": { "post": { "tags": [ "Admin - Knowledge" ], "summary": "Rollback Item", "operationId": "rollback_item_api_v1_admin_knowledge_items__item_id__rollback_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "item_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Item Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeRollbackRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin---knowledge" } }, "/api/v1/knowledge/review-requests": { "post": { "tags": [ "Knowledge" ], "summary": "Submit Knowledge For Review", "operationId": "submit_knowledge_for_review_api_v1_knowledge_review_requests_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeSubmissionCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeReviewRequestResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "knowledge" } }, "/api/v1/review/knowledge/review-requests": { "get": { "tags": [ "Review - Knowledge" ], "summary": "List Review Requests", "operationId": "list_review_requests_api_v1_review_knowledge_review_requests_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by status (pending|approved|rejected)", "default": "pending", "title": "Status" }, "description": "Filter by status (pending|approved|rejected)" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeReviewListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "review---knowledge" } }, "/api/v1/review/knowledge/review-requests/{request_id}/approve": { "post": { "tags": [ "Review - Knowledge" ], "summary": "Approve Review Request", "operationId": "approve_review_request_api_v1_review_knowledge_review_requests__request_id__approve_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "request_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Request Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeReviewDecision" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeReviewRequestResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "review---knowledge" } }, "/api/v1/review/knowledge/review-requests/{request_id}/reject": { "post": { "tags": [ "Review - Knowledge" ], "summary": "Reject Review Request", "operationId": "reject_review_request_api_v1_review_knowledge_review_requests__request_id__reject_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "request_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Request Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeReviewDecision" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeReviewRequestResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "review---knowledge" } }, "/api/v1/review/knowledge/items/{item_id}/versions": { "get": { "tags": [ "Review - Knowledge" ], "summary": "List Versions", "operationId": "list_versions_api_v1_review_knowledge_items__item_id__versions_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "item_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Item Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeItemVersionsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "review---knowledge" } }, "/api/v1/memories/stream": { "get": { "tags": [ "Memories" ], "summary": "Stream Memory Events", "description": "Stream memory-related events as SSE.\n\nNotes:\n- Org-scoped via TenantContext and `organization_id` filtering.\n- Uses DB polling (no extra infra). Intended as a \"lite\" stream.\n- `max_events` is primarily for testing/debugging.", "operationId": "stream_memory_events_api_v1_memories_stream_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "since", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Since" } }, { "name": "poll_interval_seconds", "in": "query", "required": false, "schema": { "type": "number", "maximum": 10.0, "minimum": 0.2, "default": 1.0, "title": "Poll Interval Seconds" } }, { "name": "max_events", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "maximum": 1000, "minimum": 1 }, { "type": "null" } ], "title": "Max Events" } }, { "name": "Last-Event-ID", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last-Event-Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memories" } }, "/api/v1/memories/insights": { "get": { "tags": [ "Memory Insights", "Memory Insights" ], "summary": "Aggregate memory insights for the dashboard", "operationId": "get_memory_insights_api_v1_memories_insights_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "days", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 90, "minimum": 1, "description": "Lookback window for creation trend", "default": 30, "title": "Days" }, "description": "Lookback window for creation trend" }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InsightsSummary" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-insights" } }, "/api/v1/memories": { "post": { "tags": [ "Memories" ], "summary": "Create Memory", "description": "Create a new memory.\n\nThe content will be embedded and stored in both Postgres (metadata)\nand Qdrant (vector + payload).\n\n**Required permissions:** `memory:create:{scope}`", "operationId": "create_memory_api_v1_memories_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memories" }, "get": { "tags": [ "Memories" ], "summary": "List Memories", "description": "List long-term memories with optional filters.", "operationId": "list_memories_api_v1_memories_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "scope", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope" } }, { "name": "tags", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "title": "Tags" } }, { "name": "memory_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Memory Type" } }, { "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": 20, "title": "Page Size" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "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" } } } } }, "x-ninai-cognitive-domain": "memories" } }, "/api/v1/memories/batch/update": { "post": { "tags": [ "Memories" ], "summary": "Batch Update Memories", "description": "Update multiple memories in a single transaction.\n\nEach memory can have different updates. Use this for bulk metadata updates,\ntag additions, or scope changes.\n\n**Limits**: Max 200 memories per batch.", "operationId": "batch_update_memories_api_v1_memories_batch_update_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryBatchUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryBatchUpdateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memories" } }, "/api/v1/memories/batch/delete": { "post": { "tags": [ "Memories" ], "summary": "Batch Delete Memories", "description": "Delete multiple memories in a single transaction.\n\nAll deletions succeed or all fail (atomic operation).\n\n**Limits**: Max 500 memories per batch.\n**Warning**: This is a destructive operation and cannot be undone.", "operationId": "batch_delete_memories_api_v1_memories_batch_delete_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryBatchDeleteRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryBatchDeleteResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memories" } }, "/api/v1/memories/batch/share": { "post": { "tags": [ "Memories" ], "summary": "Batch Share Memories", "description": "Share multiple memories with an agent in a single transaction.\n\nAll shares succeed or all fail (atomic operation).\n\n**Limits**: Max 500 memories per batch.", "operationId": "batch_share_memories_api_v1_memories_batch_share_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryBatchShareRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryBatchShareResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memories" } }, "/api/v1/memories/all": { "get": { "tags": [ "Memories" ], "summary": "List All Memories", "description": "List all memories for the current user from both short-term and long-term storage.\n\nReturns memories grouped by storage type:\n- `short_term`: Memories in Redis (temporary, may expire)\n- `long_term`: Memories in PostgreSQL (permanent)", "operationId": "list_all_memories_api_v1_memories_all_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "include_short_term", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Include short-term memories from Redis", "default": true, "title": "Include Short Term" }, "description": "Include short-term memories from Redis" }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memories" } }, "/api/v1/memories/stats": { "get": { "tags": [ "Memories" ], "summary": "Get Memory Stats", "description": "Get statistics about memory storage across short-term and long-term.", "operationId": "get_memory_stats_api_v1_memories_stats_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memories" } }, "/api/v1/memories/{memory_id}/attachments": { "get": { "tags": [ "Memories" ], "summary": "List Memory Attachments", "operationId": "list_memory_attachments_api_v1_memories__memory_id__attachments_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryAttachmentListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memories" }, "post": { "tags": [ "Memories" ], "summary": "Upload Memory Attachment", "operationId": "upload_memory_attachment_api_v1_memories__memory_id__attachments_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_upload_memory_attachment_api_v1_memories__memory_id__attachments_post" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryAttachmentResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memories" } }, "/api/v1/memories/{memory_id}/attachments/{attachment_id}": { "get": { "tags": [ "Memories" ], "summary": "Download Memory Attachment", "operationId": "download_memory_attachment_api_v1_memories__memory_id__attachments__attachment_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "attachment_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Attachment Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memories" }, "delete": { "tags": [ "Memories" ], "summary": "Delete Memory Attachment", "operationId": "delete_memory_attachment_api_v1_memories__memory_id__attachments__attachment_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "attachment_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Attachment Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memories" } }, "/api/v1/memories/smart": { "post": { "tags": [ "Memories" ], "summary": "Create Memory Smart", "description": "Create a memory using the hybrid architecture.\n\nBy default, memories start in short-term storage (Redis) and are\nautomatically promoted to long-term storage (PostgreSQL + Qdrant) when:\n- Accessed 3+ times (frequently used)\n- Content contains important keywords (orders, preferences, etc.)\n\nSet `force_long_term=true` to skip short-term and store directly in long-term.\n\n**This is the recommended way to create memories.**", "operationId": "create_memory_smart_api_v1_memories_smart_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "force_long_term", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Force immediate long-term storage", "default": false, "title": "Force Long Term" }, "description": "Force immediate long-term storage" }, { "name": "ttl", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "description": "Short-term memory TTL in seconds (overrides default if set)", "title": "Ttl" }, "description": "Short-term memory TTL in seconds (overrides default if set)" }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memories" } }, "/api/v1/memories/search": { "get": { "tags": [ "Memories" ], "summary": "Search Memories", "description": "Search memories using hybrid semantic + lexical search.\n\n## Search Modes\n\n**Hybrid Search (default):**\n- Combines BM25-style full-text search with vector similarity\n- Better recall for exact terms (IDs, error codes, technical terms)\n- Maintains semantic understanding from vector search\n- Uses PostgreSQL's ts_rank_cd with weighted fields:\n - Title: 1.0x weight (highest priority)\n - Content: 0.4x weight\n - Tags: 0.1x weight (lowest priority)\n\n**Vector-Only Search:**\n- Set `hybrid=false` to use only semantic vector similarity\n- Best for conceptual/semantic queries\n- Uses embeddings from Qdrant vector store\n\n## Security\n\nAll searches are:\n- Scoped to your organization automatically\n- Filtered by Row-Level Security (RLS) in PostgreSQL\n- Verified by permission checker before returning results\n- Logged in audit trail\n\n## Examples\n\n```bash\n# Hybrid search for error codes (benefits from BM25 exact matching)\nGET /api/v1/memories/search?query=ERROR-404&hybrid=true\n\n# Semantic search for concepts\nGET /api/v1/memories/search?query=database performance issues&hybrid=true&hnms_mode=research\n\n# Recent memories only (performance mode)\nGET /api/v1/memories/search?query=sprint planning&hybrid=true&hnms_mode=performance&limit=20\n\n# Team-scoped search\nGET /api/v1/memories/search?query=deployment&scope=team&team_id=&hybrid=true\n```\n\n## Response\n\nReturns ranked memories with:\n- Combined score from vector + lexical signals\n- Temporal decay weighting (based on hnms_mode)\n- Relevance feedback adjustments (if enabled)\n- Provenance metadata for citations", "operationId": "search_memories_api_v1_memories_search_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "query", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 1000, "description": "Search query text", "title": "Query" }, "description": "Search query text" }, { "name": "scope", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by scope: personal, team, department, organization", "title": "Scope" }, "description": "Filter by scope: personal, team, department, organization" }, { "name": "team_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by team ID (requires scope=team)", "title": "Team Id" }, "description": "Filter by team ID (requires scope=team)" }, { "name": "hybrid", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Enable hybrid search (BM25 + vector similarity). When true, combines full-text lexical search with semantic vector search for better recall.", "default": true, "title": "Hybrid" }, "description": "Enable hybrid search (BM25 + vector similarity). When true, combines full-text lexical search with semantic vector search for better recall." }, { "name": "hnms_mode", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/SearchHnmsMode" }, { "type": "null" } ], "description": "HNMS-inspired ranking mode: balanced (default), performance (prefer recent), research (prefer historical)", "examples": { "performance": { "summary": "Prefer recency (strong temporal decay)", "value": "performance" }, "research": { "summary": "Prefer older context (weak temporal decay)", "value": "research" }, "balanced": { "summary": "Balanced temporal weighting (default)", "value": "balanced" } }, "title": "Hnms Mode" }, "description": "HNMS-inspired ranking mode: balanced (default), performance (prefer recent), research (prefer historical)" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "description": "Maximum number of results to return", "default": 10, "title": "Limit" }, "description": "Maximum number of results to return" }, { "name": "include_enrichment", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Include facts_used and disputed_facts enrichment", "default": false, "title": "Include Enrichment" }, "description": "Include facts_used and disputed_facts enrichment" }, { "name": "include_playbooks", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Include playbook matches for this query", "default": false, "title": "Include Playbooks" }, "description": "Include playbook matches for this query" }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemorySearchResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memories" } }, "/api/v1/memories/{memory_id}": { "get": { "tags": [ "Memories" ], "summary": "Get Memory", "description": "Get a memory by ID.\n\nReturns the memory if the user has read permission.", "operationId": "get_memory_api_v1_memories__memory_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memories" }, "patch": { "tags": [ "Memories" ], "summary": "Update Memory", "description": "Update a memory.\n\n**Required permissions:** Write access to the memory.", "operationId": "update_memory_api_v1_memories__memory_id__patch", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memories" }, "delete": { "tags": [ "Memories" ], "summary": "Delete Memory", "description": "Delete a memory (soft delete).\n\nMemories under legal hold cannot be deleted.\n\n**Required permissions:** Delete access to the memory.", "operationId": "delete_memory_api_v1_memories__memory_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memories" } }, "/api/v1/memories/{memory_id}/feedback": { "post": { "tags": [ "Memories" ], "summary": "Submit Memory Feedback", "description": "Submit feedback signals about a memory.\n\nRequires the user to have read access to the memory.", "operationId": "submit_memory_feedback_api_v1_memories__memory_id__feedback_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryFeedbackCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryFeedbackResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memories" }, "get": { "tags": [ "Memories" ], "summary": "List Memory Feedback", "description": "List feedback entries for a memory (requires read access).", "operationId": "list_memory_feedback_api_v1_memories__memory_id__feedback_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "include_applied", "in": "query", "required": false, "schema": { "type": "boolean", "default": true, "title": "Include Applied" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryFeedbackListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memories" } }, "/api/v1/memories/{memory_id}/relevance": { "post": { "tags": [ "Memories" ], "summary": "Submit Memory Relevance Feedback", "description": "Submit explicit relevance feedback (thumbs up/down) for a memory.\n\nThis is a convenience wrapper around the generic feedback endpoint that stores\na standardized payload for feedback_type=\"relevance\".", "operationId": "submit_memory_relevance_feedback_api_v1_memories__memory_id__relevance_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryRelevanceFeedbackCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryFeedbackResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memories" } }, "/api/v1/memories/{memory_id}/explain": { "get": { "tags": [ "Memories" ], "summary": "Explain Memory Access", "description": "Explain why user can or cannot access a memory.\n\nReturns detailed explanation of access decisions for all\naction types (read, write, share, delete).", "operationId": "explain_memory_access_api_v1_memories__memory_id__explain_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccessExplanation" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memories" } }, "/api/v1/memories/{memory_id}/share": { "post": { "tags": [ "Memories" ], "summary": "Share Memory", "description": "Share a memory with a user, team, or other entity.\n\n**Required permissions:** Share access to the memory.", "operationId": "share_memory_api_v1_memories__memory_id__share_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryShareRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemorySharingResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memories" } }, "/api/v1/memories/{memory_id}/promote": { "post": { "tags": [ "Memories" ], "summary": "Promote Memory", "description": "Manually promote a short-term memory to long-term storage.\n\nUse this to immediately promote a memory from Redis to PostgreSQL + Qdrant\nwithout waiting for automatic promotion criteria to be met.", "operationId": "promote_memory_api_v1_memories__memory_id__promote_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memories" } }, "/api/v1/memories/{memory_id}/consolidate": { "post": { "tags": [ "Memories" ], "summary": "Consolidate Memory", "description": "Consolidate a memory with related memories.\n\nThis triggers the memory consolidation pipeline:\n1. Find related memories using semantic similarity\n2. Extract common themes and deduplicate information\n3. Create a consolidated memory entry\n4. Update references and maintain lineage\n\nReturns immediately with a task_id. Use task status endpoint to check progress.", "operationId": "consolidate_memory_api_v1_memories__memory_id__consolidate_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memories" } }, "/api/v1/episodes": { "post": { "tags": [ "Episodes" ], "summary": "Create episode", "description": "Create a new episode for case/ticket/thread tracking", "operationId": "create_episode_api_v1_episodes_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EpisodeCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EpisodeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "episodes" }, "get": { "tags": [ "Episodes" ], "summary": "List episodes", "description": "List episodes with filters (RLS enforced)", "operationId": "list_episodes_api_v1_episodes_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" } }, { "name": "episode_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Episode Type" } }, { "name": "owner_user_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Owner User Id" } }, { "name": "tags", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Comma-separated tags", "title": "Tags" }, "description": "Comma-separated tags" }, { "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": 20, "title": "Page Size" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EpisodeListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "episodes" } }, "/api/v1/episodes/{episode_id}": { "get": { "tags": [ "Episodes" ], "summary": "Get episode", "description": "Get episode by ID (RLS enforced)", "operationId": "get_episode_api_v1_episodes__episode_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "episode_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Episode Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EpisodeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "episodes" }, "patch": { "tags": [ "Episodes" ], "summary": "Update episode", "description": "Update episode (RLS enforced)", "operationId": "update_episode_api_v1_episodes__episode_id__patch", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "episode_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Episode Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EpisodeUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EpisodeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "episodes" } }, "/api/v1/episodes/{episode_id}/resolve": { "post": { "tags": [ "Episodes" ], "summary": "Resolve episode", "description": "Mark episode as resolved (RLS enforced)", "operationId": "resolve_episode_api_v1_episodes__episode_id__resolve_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "episode_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Episode Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EpisodeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "episodes" } }, "/api/v1/episodes/events": { "post": { "tags": [ "Episodes" ], "summary": "Create episode event", "description": "Create a new event in an episode timeline", "operationId": "create_episode_event_api_v1_episodes_events_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EpisodeEventCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EpisodeEventResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "episodes" } }, "/api/v1/episodes/{episode_id}/events": { "get": { "tags": [ "Episodes" ], "summary": "List episode events", "description": "List events for an episode (RLS enforced)", "operationId": "list_episode_events_api_v1_episodes__episode_id__events_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "episode_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Episode Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 100, "title": "Limit" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EpisodeEventListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "episodes" } }, "/api/v1/episodes/links": { "post": { "tags": [ "Episodes" ], "summary": "Create episode link", "description": "Create a relationship between two episodes", "operationId": "create_episode_link_api_v1_episodes_links_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EpisodeLinkCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EpisodeLinkResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "episodes" } }, "/api/v1/episodes/{episode_id}/links": { "get": { "tags": [ "Episodes" ], "summary": "List episode links", "description": "List all links connected to an episode (RLS enforced)", "operationId": "list_episode_links_api_v1_episodes__episode_id__links_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "episode_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Episode Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EpisodeLinkListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "episodes" } }, "/api/v1/eval/eval/suites": { "post": { "tags": [ "Evaluation", "evaluation" ], "summary": "Create Eval Suite", "description": "Create a new evaluation suite.", "operationId": "create_eval_suite_api_v1_eval_eval_suites_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvalSuiteCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvalSuiteResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "evaluation" }, "get": { "tags": [ "Evaluation", "evaluation" ], "summary": "List Eval Suites", "description": "List evaluation suites for the organization.", "operationId": "list_eval_suites_api_v1_eval_eval_suites_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "is_active", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Active" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 50, "title": "Limit" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EvalSuiteResponse" }, "title": "Response List Eval Suites Api V1 Eval Eval Suites Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "evaluation" } }, "/api/v1/eval/eval/suites/{suite_id}": { "get": { "tags": [ "Evaluation", "evaluation" ], "summary": "Get Eval Suite", "description": "Get an evaluation suite by ID.", "operationId": "get_eval_suite_api_v1_eval_eval_suites__suite_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "suite_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Suite Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvalSuiteResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "evaluation" }, "patch": { "tags": [ "Evaluation", "evaluation" ], "summary": "Update Eval Suite", "description": "Update an evaluation suite.", "operationId": "update_eval_suite_api_v1_eval_eval_suites__suite_id__patch", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "suite_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Suite Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvalSuiteUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvalSuiteResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "evaluation" }, "delete": { "tags": [ "Evaluation", "evaluation" ], "summary": "Delete Eval Suite", "description": "Delete an evaluation suite.", "operationId": "delete_eval_suite_api_v1_eval_eval_suites__suite_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "suite_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Suite Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "evaluation" } }, "/api/v1/eval/eval/runs": { "post": { "tags": [ "Evaluation", "evaluation" ], "summary": "Trigger Eval Run", "description": "Trigger an evaluation run (async).", "operationId": "trigger_eval_run_api_v1_eval_eval_runs_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvalRunTrigger" } } } }, "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Response Trigger Eval Run Api V1 Eval Eval Runs Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "evaluation" }, "get": { "tags": [ "Evaluation", "evaluation" ], "summary": "List Eval Runs", "description": "List evaluation runs for the organization.", "operationId": "list_eval_runs_api_v1_eval_eval_runs_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "suite_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Suite Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 50, "title": "Limit" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EvalRunResponse" }, "title": "Response List Eval Runs Api V1 Eval Eval Runs Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "evaluation" } }, "/api/v1/eval/eval/runs/{run_id}": { "get": { "tags": [ "Evaluation", "evaluation" ], "summary": "Get Eval Run", "description": "Get an evaluation run by ID.", "operationId": "get_eval_run_api_v1_eval_eval_runs__run_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "run_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Run Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvalRunResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "evaluation" } }, "/api/v1/eval/eval/drift": { "post": { "tags": [ "Evaluation", "evaluation" ], "summary": "Trigger Drift Computation", "description": "Trigger drift computation between two eval runs (async).", "operationId": "trigger_drift_computation_api_v1_eval_eval_drift_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DriftReportTrigger" } } } }, "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Response Trigger Drift Computation Api V1 Eval Eval Drift Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "evaluation" }, "get": { "tags": [ "Evaluation", "evaluation" ], "summary": "List Drift Reports", "description": "List drift reports for the organization.", "operationId": "list_drift_reports_api_v1_eval_eval_drift_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "severity", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Severity" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 50, "title": "Limit" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DriftReportResponse" }, "title": "Response List Drift Reports Api V1 Eval Eval Drift Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "evaluation" } }, "/api/v1/eval/eval/drift/{drift_id}": { "get": { "tags": [ "Evaluation", "evaluation" ], "summary": "Get Drift Report", "description": "Get a drift report by ID.", "operationId": "get_drift_report_api_v1_eval_eval_drift__drift_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "drift_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Drift Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DriftReportResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "evaluation" } }, "/api/v1/memories/{memory_id}/recommendations": { "get": { "tags": [ "Recommendations", "recommendations" ], "summary": "Get Memory Recommendations", "description": "Get personalized memory recommendations.\n\nReturns up to N similar memories ranked by:\n- 50% Semantic Similarity (from graph relationships)\n- 20% Recency (recently created/updated memories)\n- 20% Interaction (views, edits, shares)\n- 10% Feedback (user upvotes on past recommendations)\n\nQuery Parameters:\n- memory_id: Memory to get recommendations for (path)\n- org_id: Organization ID\n- limit: Number of recommendations (1-50, default 10)\n- min_similarity: Minimum relationship similarity (0.0-1.0)\n- max_age_days: Exclude memories older than N days\n- use_cache: Use cached results if available (default true)\n\nReturns:\n- recommendations: List of ranked memories with scores and factors\n- memory_id: Input memory ID\n- count: Number of recommendations returned", "operationId": "get_memory_recommendations_api_v1_memories__memory_id__recommendations_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "title": "Org Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 50, "minimum": 1, "default": 10, "title": "Limit" } }, { "name": "min_similarity", "in": "query", "required": false, "schema": { "type": "number", "maximum": 1.0, "minimum": 0.0, "default": 0.0, "title": "Min Similarity" } }, { "name": "max_age_days", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "maximum": 365, "minimum": 1 }, { "type": "null" } ], "title": "Max Age Days" } }, { "name": "use_cache", "in": "query", "required": false, "schema": { "type": "boolean", "default": true, "title": "Use Cache" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Get Memory Recommendations Api V1 Memories Memory Id Recommendations Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "recommendations" } }, "/api/v1/recommendations/feedback/{recommended_memory_id}": { "post": { "tags": [ "Recommendations", "recommendations" ], "summary": "Submit Recommendation Feedback", "description": "Submit feedback on a memory recommendation.\n\nHelp improve recommendation algorithm by rating recommendations as helpful or not.\n\nQuery Parameters:\n- base_memory_id: Original memory that was recommended from\n- recommended_memory_id: Memory that was recommended (path)\n- org_id: Organization ID\n- helpful: True if helpful, False if not\n- reason: Optional reason text (max 500 chars)\n\nReturns:\n- status: success/error\n- feedback: Stored feedback object", "operationId": "submit_recommendation_feedback_api_v1_recommendations_feedback__recommended_memory_id__post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "recommended_memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Recommended Memory Id" } }, { "name": "base_memory_id", "in": "query", "required": true, "schema": { "type": "string", "title": "Base Memory Id" } }, { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "title": "Org Id" } }, { "name": "helpful", "in": "query", "required": true, "schema": { "type": "boolean", "title": "Helpful" } }, { "name": "reason", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Reason" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Submit Recommendation Feedback Api V1 Recommendations Feedback Recommended Memory Id Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "recommendations" } }, "/api/v1/recommendations/metrics": { "get": { "tags": [ "Recommendations", "recommendations" ], "summary": "Recommendation Metrics", "description": "Get metrics about recommendations for organization.\n\nReturns:\n- total_feedback: Total feedback submissions\n- helpful_ratio: Percentage marked as helpful\n- helpful_count: Number of helpful votes\n- not_helpful_count: Number of unhelpful votes", "operationId": "recommendation_metrics_api_v1_recommendations_metrics_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "title": "Org Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Recommendation Metrics Api V1 Recommendations Metrics Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "recommendations" } }, "/api/v1/recommendations/weights": { "get": { "tags": [ "Recommendations", "recommendations" ], "summary": "Get Recommendation Weights", "description": "Get current recommendation ranking weights.\n\nReturns weights for each factor:\n- similarity: Weight for semantic similarity (50% default)\n- recency: Weight for recent memories (20% default)\n- interaction: Weight for interaction history (20% default)\n- feedback: Weight for user feedback (10% default)", "operationId": "get_recommendation_weights_api_v1_recommendations_weights_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Get Recommendation Weights Api V1 Recommendations Weights Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "recommendations" }, "patch": { "tags": [ "Recommendations", "recommendations" ], "summary": "Update Recommendation Weights", "description": "Update recommendation ranking weights.\n\nWeights must sum to 1.0 exactly. Useful for A/B testing different algorithms.\n\nQuery Parameters:\n- similarity: New weight for similarity (0.0-1.0)\n- recency: New weight for recency (0.0-1.0)\n- interaction: New weight for interaction (0.0-1.0)\n- feedback: New weight for feedback (0.0-1.0)\n\nAll must be provided together and sum to 1.0.\n\nReturns:\n- weights: New weights", "operationId": "update_recommendation_weights_api_v1_recommendations_weights_patch", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "similarity", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "number", "maximum": 1.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Similarity" } }, { "name": "recency", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "number", "maximum": 1.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Recency" } }, { "name": "interaction", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "number", "maximum": 1.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Interaction" } }, { "name": "feedback", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "number", "maximum": 1.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Feedback" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Update Recommendation Weights Api V1 Recommendations Weights Patch" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "recommendations" } }, "/api/v1/recommendations/cache": { "delete": { "tags": [ "Recommendations", "recommendations" ], "summary": "Clear Recommendation Cache", "description": "Clear cached recommendations for organization.\n\nUseful after major algorithm changes or to force refresh.", "operationId": "clear_recommendation_cache_api_v1_recommendations_cache_delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "title": "Org Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Clear Recommendation Cache Api V1 Recommendations Cache Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "recommendations" } }, "/api/v1/graph/relationships/populate": { "post": { "tags": [ "Graph", "graph" ], "summary": "Populate Relationships", "description": "Populate graph relationships based on embedding similarity.\n\nFinds similar memories and creates RELATES_TO relationships.\n\nQuery Parameters:\n- org_id: Organization ID (required)\n- similarity_threshold: Min similarity 0.0-1.0 (default 0.75)\n- max_relationships: Max relationships per memory (default 5)\n- async_: Run async via Celery (default true)\n\nReturns:\n- If async: {task_id, status, org_id}\n- If sync: {relationships_created, similarities, ...}", "operationId": "populate_relationships_api_v1_graph_relationships_populate_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "description": "Organization ID", "title": "Org Id" }, "description": "Organization ID" }, { "name": "similarity_threshold", "in": "query", "required": false, "schema": { "type": "number", "maximum": 1.0, "minimum": 0.0, "default": 0.75, "title": "Similarity Threshold" } }, { "name": "max_relationships", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 50, "minimum": 1, "default": 5, "title": "Max Relationships" } }, { "name": "async_", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Run async via Celery", "default": true, "title": "Async " }, "description": "Run async via Celery" }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Populate Relationships Api V1 Graph Relationships Populate Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "graph" } }, "/api/v1/graph/relationships": { "get": { "tags": [ "Graph", "graph" ], "summary": "List Relationships", "description": "List graph relationships for organization.\n\nQuery Parameters:\n- org_id: Organization ID\n- memory_id: Filter by specific memory (both incoming and outgoing)\n- relationship_type: Filter by type (RELATES_TO, DEPENDS_ON, etc)\n- auto_created_only: Show only auto-generated relationships\n- min_similarity: Filter by minimum similarity score\n- limit: Results per page\n- offset: Pagination offset", "operationId": "list_relationships_api_v1_graph_relationships_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "title": "Org Id" } }, { "name": "memory_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by memory ID", "title": "Memory Id" }, "description": "Filter by memory ID" }, { "name": "relationship_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Relationship Type" } }, { "name": "auto_created_only", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Auto Created Only" } }, { "name": "min_similarity", "in": "query", "required": false, "schema": { "type": "number", "maximum": 1.0, "minimum": 0.0, "default": 0.0, "title": "Min Similarity" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 100, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response List Relationships Api V1 Graph Relationships Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "graph" } }, "/api/v1/graph/relationships/stats": { "get": { "tags": [ "Graph", "graph" ], "summary": "Relationship Stats", "description": "Get statistics about graph relationships for organization.\n\nReturns:\n- total: Total relationships\n- auto_created: Count of auto-generated\n- manually_created: Count of manual\n- avg_similarity: Average similarity score\n- min/max_similarity: Range of scores\n- by_type: Breakdown by relationship type", "operationId": "relationship_stats_api_v1_graph_relationships_stats_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "title": "Org Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Relationship Stats Api V1 Graph Relationships Stats Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "graph" } }, "/api/v1/graph/relationships/config": { "get": { "tags": [ "Graph", "graph" ], "summary": "Get Graph Config", "description": "Get graph relationship generation config for organization.", "operationId": "get_graph_config_api_v1_graph_relationships_config_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "title": "Org Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Get Graph Config Api V1 Graph Relationships Config Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "graph" }, "patch": { "tags": [ "Graph", "graph" ], "summary": "Update Graph Config", "description": "Update graph relationship generation config.\n\nThese settings will be used for next population run.", "operationId": "update_graph_config_api_v1_graph_relationships_config_patch", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "title": "Org Id" } }, { "name": "similarity_threshold", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "number", "maximum": 1.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Similarity Threshold" } }, { "name": "max_relationships", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "maximum": 50, "minimum": 1 }, { "type": "null" } ], "title": "Max Relationships" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Update Graph Config Api V1 Graph Relationships Config Patch" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "graph" } }, "/api/v1/graph/relationships/memory/{memory_id}/related": { "get": { "tags": [ "Graph", "graph" ], "summary": "Get Related Memories", "description": "Get memories related to a specific memory via graph relationships.\n\nReturns both incoming and outgoing relationships.", "operationId": "get_related_memories_api_v1_graph_relationships_memory__memory_id__related_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "title": "Org Id" } }, { "name": "relationship_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Relationship Type" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 50, "minimum": 1, "default": 10, "title": "Limit" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Get Related Memories Api V1 Graph Relationships Memory Memory Id Related Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "graph" } }, "/api/v1/topics": { "get": { "tags": [ "Topics", "topics" ], "summary": "List Topics", "operationId": "list_topics_api_v1_topics_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "title": "Org Id" } }, { "name": "scope", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope" } }, { "name": "scope_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope Id" } }, { "name": "label_query", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Substring match on label", "title": "Label Query" }, "description": "Substring match on label" }, { "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" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TopicListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "topics" } }, "/api/v1/topics/{topic_id}": { "get": { "tags": [ "Topics", "topics" ], "summary": "Get Topic", "operationId": "get_topic_api_v1_topics__topic_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "topic_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Topic Id" } }, { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "title": "Org Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TopicResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "topics" } }, "/api/v1/topics/{topic_id}/memories": { "get": { "tags": [ "Topics", "topics" ], "summary": "List Topic Memories", "operationId": "list_topic_memories_api_v1_topics__topic_id__memories_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "topic_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Topic Id" } }, { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "title": "Org Id" } }, { "name": "primary_only", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Primary Only" } }, { "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" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TopicMemoriesResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "topics" } }, "/api/v1/memories/{memory_id}/topics": { "get": { "tags": [ "Topics", "topics" ], "summary": "List Memory Topics", "operationId": "list_memory_topics_api_v1_memories__memory_id__topics_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "title": "Org Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TopicResponse" }, "title": "Response List Memory Topics Api V1 Memories Memory Id Topics Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "topics" } }, "/api/v1/topics/admin/reassignment-ratio": { "get": { "tags": [ "Topics", "topics" ], "summary": "Get Topic Reassignment Ratio", "description": "Get reassignment ratio for semantic nodes (org admin only).", "operationId": "get_topic_reassignment_ratio_api_v1_topics_admin_reassignment_ratio_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "org_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org Id" } }, { "name": "scope", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope" } }, { "name": "scope_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TopicReassignmentRatioResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "topics" } }, "/api/v1/topics/admin/restructure": { "post": { "tags": [ "Topics", "topics" ], "summary": "Run Topic Restructure", "description": "Run periodic topic restructure (org admin only).", "operationId": "run_topic_restructure_api_v1_topics_admin_restructure_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TopicRestructureRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TopicRestructureResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "topics" } }, "/api/v1/knowledge/reports/summary": { "get": { "tags": [ "Knowledge", "knowledge" ], "summary": "Knowledge Summary", "operationId": "knowledge_summary_api_v1_knowledge_reports_summary_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "title": "Org Id" } }, { "name": "topic_limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 50, "minimum": 1, "default": 10, "title": "Topic Limit" } }, { "name": "relationship_limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 50, "minimum": 1, "default": 10, "title": "Relationship Limit" } }, { "name": "recent_limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 50, "minimum": 1, "default": 10, "title": "Recent Limit" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeSummaryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "knowledge" } }, "/api/v1/knowledge/reports/synthesis/create": { "post": { "tags": [ "Knowledge", "knowledge" ], "summary": "Create Synthesis Report", "description": "Create a comprehensive knowledge synthesis report.\n\nAnalyzes memories and relationships to identify:\n- Concept clusters\n- Trends over time\n- Key insights and patterns\n\nParameters:\n- `tags`: Filter by comma-separated tags (e.g., \"ai,performance\")\n- `days_back`: Include memories from last N days (default: 30)\n- `title`: Custom report title\n\nReturns: Synthesis report with clusters, trends, and insights", "operationId": "create_synthesis_report_api_v1_knowledge_reports_synthesis_create_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "org_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org Id" } }, { "name": "tags", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Comma-separated tags to filter", "title": "Tags" }, "description": "Comma-separated tags to filter" }, { "name": "days_back", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 365, "minimum": 1, "default": 30, "title": "Days Back" } }, { "name": "title", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "knowledge" } }, "/api/v1/knowledge/reports/synthesis/export": { "get": { "tags": [ "Knowledge", "knowledge" ], "summary": "Export Synthesis", "description": "Export a synthesis report in the specified format.\n\nFormats:\n- `markdown`: GitHub-flavored markdown\n- `json`: JSON structure\n- `pdf`: PDF document (if available)", "operationId": "export_synthesis_api_v1_knowledge_reports_synthesis_export_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "report_id", "in": "query", "required": true, "schema": { "type": "string", "title": "Report Id" } }, { "name": "format", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(markdown|json|pdf)$", "default": "markdown", "title": "Format" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "knowledge" } }, "/api/v1/memories/advanced-search": { "post": { "tags": [ "Advanced Search" ], "summary": "Advanced Search", "description": "Advanced search with query operators.\n\nSupports operators:\n- `tag:important` - Filter by tag\n- `before:2024-01-01`, `after:2024-01-01` - Date filters\n- `within:7d` - Within time period (d=days, w=weeks, m=months)\n- `relates_to:memory_id` - Find related memories\n- `scope:team` - Filter by scope (team, personal, shared)\n- `author:john` - Filter by creator\n- `status:active` - Filter by status (active, archived, deleted)\n- `faceted` - Return faceted breakdown\n\n## Examples\n\n```\n# Important memories from last 7 days\ntag:important within:7d\n\n# Team memories about performance\nperformance scope:team\n\n# Recent failures related to deployment\ndeployment relates_to:abc123 after:2024-01-01 status:active\n\n# Get faceted breakdown\nsprint planning faceted\n```", "operationId": "advanced_search_api_v1_memories_advanced_search_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdvancedSearchRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdvancedSearchResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "advanced-search" } }, "/api/v1/memories/faceted-search": { "get": { "tags": [ "Advanced Search" ], "summary": "Faceted Search", "description": "Get faceted breakdown of search results.\n\nFacet Fields:\n- `tags`: All tags in matching memories\n- `status`: Memory status distribution\n- `scope`: Scope distribution (personal, team, shared, org)\n- `authors`: Memory creators\n- `dates`: Temporal distribution (by week)\n- `memory_types`: Memory type distribution", "operationId": "faceted_search_api_v1_memories_faceted_search_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "query", "in": "query", "required": true, "schema": { "type": "string", "description": "Search query", "title": "Query" }, "description": "Search query" }, { "name": "facet_field", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Specific facet field", "title": "Facet Field" }, "description": "Specific facet field" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 50, "title": "Limit" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Faceted Search Api V1 Memories Faceted Search Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "advanced-search" } }, "/api/v1/memories/saved-searches": { "post": { "tags": [ "Advanced Search" ], "summary": "Create Saved Search", "description": "Create and save a search query for future use.\n\nSaved searches can be reused with a simple ID lookup.", "operationId": "create_saved_search_api_v1_memories_saved_searches_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedSearchCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedSearchResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "advanced-search" }, "get": { "tags": [ "Advanced Search" ], "summary": "List Saved Searches", "description": "List all saved searches for current user.", "operationId": "list_saved_searches_api_v1_memories_saved_searches_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SavedSearchResponse" }, "title": "Response List Saved Searches Api V1 Memories Saved Searches Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "advanced-search" } }, "/api/v1/memories/saved-searches/{search_id}": { "get": { "tags": [ "Advanced Search" ], "summary": "Get Saved Search", "description": "Get a saved search by ID.", "operationId": "get_saved_search_api_v1_memories_saved_searches__search_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "search_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Search Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedSearchResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "advanced-search" }, "delete": { "tags": [ "Advanced Search" ], "summary": "Delete Saved Search", "description": "Delete a saved search.", "operationId": "delete_saved_search_api_v1_memories_saved_searches__search_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "search_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Search Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Response Delete Saved Search Api V1 Memories Saved Searches Search Id Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "advanced-search" } }, "/api/v1/memories/saved-searches/{search_id}/execute": { "post": { "tags": [ "Advanced Search" ], "summary": "Execute Saved Search", "description": "Execute a saved search.", "operationId": "execute_saved_search_api_v1_memories_saved_searches__search_id__execute_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "search_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Search Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 50, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "Offset" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdvancedSearchResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "advanced-search" } }, "/api/v1/memory-activation/retrieval-explanations": { "get": { "tags": [ "Memory Activation" ], "summary": "List Retrieval Explanations", "description": "List retrieval explanation logs.\n\nDefault: returns only the caller's logs.\nOrg/system admins may query across the org.", "operationId": "list_retrieval_explanations_api_v1_memory_activation_retrieval_explanations_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } }, { "name": "user_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by user_id (org_admin only unless self)", "title": "User Id" }, "description": "Filter by user_id (org_admin only unless self)" }, { "name": "query_hash", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by query_hash", "title": "Query Hash" }, "description": "Filter by query_hash" }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MemoryRetrievalExplanationSchema" }, "title": "Response List Retrieval Explanations Api V1 Memory Activation Retrieval Explanations Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-activation" } }, "/api/v1/memory-activation/retrieval-explanations/{explanation_id}": { "get": { "tags": [ "Memory Activation" ], "summary": "Get Retrieval Explanation", "description": "Get a single retrieval explanation by id.\n\nNon-admin users can only access their own logs.", "operationId": "get_retrieval_explanation_api_v1_memory_activation_retrieval_explanations__explanation_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "explanation_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Explanation Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryRetrievalExplanationSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-activation" } }, "/api/v1/memory-activation/causal-hypotheses": { "get": { "tags": [ "Memory Activation" ], "summary": "List Causal Hypotheses", "description": "List causal hypotheses (admin only).", "operationId": "list_causal_hypotheses_api_v1_memory_activation_causal_hypotheses_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by status (proposed|active|contested|rejected)", "title": "Status" }, "description": "Filter by status (proposed|active|contested|rejected)" }, { "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" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CausalHypothesisSchema" }, "title": "Response List Causal Hypotheses Api V1 Memory Activation Causal Hypotheses Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-activation" } }, "/api/v1/memory-activation/causal-hypotheses/{hypothesis_id}": { "get": { "tags": [ "Memory Activation" ], "summary": "Get Causal Hypothesis", "description": "Get a causal hypothesis by id (admin only).", "operationId": "get_causal_hypothesis_api_v1_memory_activation_causal_hypotheses__hypothesis_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "hypothesis_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Hypothesis Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CausalHypothesisSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-activation" } }, "/api/v1/memory-activation/admin/causal-hypotheses/refresh": { "post": { "tags": [ "Memory Activation" ], "summary": "Enqueue Causal Hypothesis Refresh", "description": "Enqueue causal hypothesis refresh for an org (admin only).", "operationId": "enqueue_causal_hypothesis_refresh_api_v1_memory_activation_admin_causal_hypotheses_refresh_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CausalHypothesisRefreshRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CausalHypothesisRefreshResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-activation" } }, "/api/v1/memory-activation/coactivation/edges/{memory_id}": { "get": { "tags": [ "Memory Activation" ], "summary": "List Coactivation Edges", "description": "List co-activation edges for a memory.\n\nAdmin-only for now (debug/ops). This avoids having to re-check\nper-edge RBAC for both endpoint memories.", "operationId": "list_coactivation_edges_api_v1_memory_activation_coactivation_edges__memory_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CoactivationEdgeSchema" }, "title": "Response List Coactivation Edges Api V1 Memory Activation Coactivation Edges Memory Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-activation" } }, "/api/v1/memory-activation/coactivation/neighbors/{memory_id}": { "get": { "tags": [ "Memory Activation" ], "summary": "List Coactivation Neighbors", "description": "List co-activated neighbor memories that the caller can read.\n\nThis is the end-user safe variant of coactivation graph access:\n- requires read access to the requested memory\n- filters neighbor nodes by read access", "operationId": "list_coactivation_neighbors_api_v1_memory_activation_coactivation_neighbors__memory_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 25, "title": "Limit" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CoactivatedNeighborSchema" }, "title": "Response List Coactivation Neighbors Api V1 Memory Activation Coactivation Neighbors Memory Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-activation" } }, "/api/v1/memory-activation/coactivation/neighbors/{memory_id}/details": { "get": { "tags": [ "Memory Activation" ], "summary": "List Coactivation Neighbors With Metadata", "description": "List co-activated neighbors, including each neighbor's memory metadata.\n\nKeeps the same permission semantics as /coactivation/neighbors/{memory_id}:\n- requires read access to the requested memory\n- filters neighbor nodes by read access", "operationId": "list_coactivation_neighbors_with_metadata_api_v1_memory_activation_coactivation_neighbors__memory_id__details_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 25, "title": "Limit" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CoactivatedNeighborDetailSchema" }, "title": "Response List Coactivation Neighbors With Metadata Api V1 Memory Activation Coactivation Neighbors Memory Id Details Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-activation" } }, "/api/v1/memory-activation/admin/nightly-decay-refresh": { "post": { "tags": [ "Memory Activation" ], "summary": "Enqueue Nightly Decay Refresh", "description": "Enqueue the nightly decay refresh task (admin only).\n\nThis is an ops/backfill endpoint. It enqueues the task and returns the Celery task id.\nIn unit-test mode (memory:// broker) it becomes a safe no-op.", "operationId": "enqueue_nightly_decay_refresh_api_v1_memory_activation_admin_nightly_decay_refresh_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NightlyDecayRefreshRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NightlyDecayRefreshResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-activation" } }, "/api/v1/api/v1/capability-tokens/": { "post": { "tags": [ "Capability Tokens", "Capability Tokens" ], "summary": "Create Capability Token", "description": "Issue a new capability token.\n\n**Admin only**. Creates a new capability token with specified scopes and quotas.\n\nScopes:\n- `read`: Read/retrieve memory operations\n- `write`: Create/update memory operations \n- `search`: Vector and BM25 search operations\n- `consolidate`: Short-term to long-term memory migration\n- `promote`: Auto-promotion of memories\n- `append`: Append-only memory operations\n- `upsert`: Update or insert operations\n\nThe token is returned **only once** on creation. Store it securely.", "operationId": "create_capability_token_api_v1_api_v1_capability_tokens__post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CapabilityTokenCreateRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CapabilityTokenResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "capability-tokens" }, "get": { "tags": [ "Capability Tokens", "Capability Tokens" ], "summary": "List Capability Tokens", "description": "List all capability tokens for the organization.\n\n**Admin only**. Returns tokens without the actual token value (for security).", "operationId": "list_capability_tokens_api_v1_api_v1_capability_tokens__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "active_only", "in": "query", "required": false, "schema": { "type": "boolean", "default": true, "title": "Active Only" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 50, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "Offset" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CapabilityTokenResponse" }, "title": "Response List Capability Tokens Api V1 Api V1 Capability Tokens Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "capability-tokens" } }, "/api/v1/api/v1/capability-tokens/{token_id}": { "get": { "tags": [ "Capability Tokens", "Capability Tokens" ], "summary": "Get Capability Token", "description": "Get details of a specific capability token.\n\n**Admin only**. Does not return the actual token value.", "operationId": "get_capability_token_api_v1_api_v1_capability_tokens__token_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "token_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Token Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CapabilityTokenResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "capability-tokens" }, "delete": { "tags": [ "Capability Tokens", "Capability Tokens" ], "summary": "Revoke Capability Token", "description": "Revoke a capability token.\n\n**Admin only**. Once revoked, the token cannot be used for any operations.", "operationId": "revoke_capability_token_api_v1_api_v1_capability_tokens__token_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "token_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Token Id" } }, { "name": "reason", "in": "query", "required": false, "schema": { "type": "string", "default": "Admin revocation", "title": "Reason" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "capability-tokens" } }, "/api/v1/api/v1/capability-tokens/validate": { "post": { "tags": [ "Capability Tokens", "Capability Tokens" ], "summary": "Validate Capability Token", "description": "Validate a capability token and check scopes.\n\nPublic endpoint for agents/services to validate their tokens.\nReturns 200 if valid, 401/403 if invalid or insufficient scopes.", "operationId": "validate_capability_token_api_v1_api_v1_capability_tokens_validate_post", "parameters": [ { "name": "authorization", "in": "header", "required": true, "schema": { "type": "string", "description": "Bearer token", "title": "Authorization" }, "description": "Bearer token" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" }, "default": [], "title": "Required Scopes" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "capability-tokens" } }, "/api/v1/api/v1/snapshots/": { "post": { "tags": [ "Memory Snapshots", "Memory Snapshots" ], "summary": "Create Snapshot", "description": "Create a new memory snapshot.\n\n**Formats**:\n- `json` - Structured JSON export\n- `markdown` - Human-readable Markdown\n- `zip` - ZIP archive with both formats\n\n**Snapshot Types**:\n- `FULL` - All memories matching filters\n- `INCREMENTAL` - Only new/changed since last snapshot\n- `DIFFERENTIAL` - Changes since last full snapshot", "operationId": "create_snapshot_api_v1_api_v1_snapshots__post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/app__api__v1__endpoints__snapshots__SnapshotCreateRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/app__api__v1__endpoints__snapshots__SnapshotResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-snapshots" }, "get": { "tags": [ "Memory Snapshots", "Memory Snapshots" ], "summary": "List Snapshots", "description": "List all snapshots for the organization.", "operationId": "list_snapshots_api_v1_api_v1_snapshots__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "status_filter", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/SnapshotStatus" }, { "type": "null" } ], "title": "Status Filter" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 50, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "Offset" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/app__api__v1__endpoints__snapshots__SnapshotResponse" }, "title": "Response List Snapshots Api V1 Api V1 Snapshots Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-snapshots" } }, "/api/v1/api/v1/snapshots/{snapshot_id}": { "get": { "tags": [ "Memory Snapshots", "Memory Snapshots" ], "summary": "Get Snapshot", "description": "Get snapshot details.", "operationId": "get_snapshot_api_v1_api_v1_snapshots__snapshot_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "snapshot_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Snapshot Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/app__api__v1__endpoints__snapshots__SnapshotResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-snapshots" }, "delete": { "tags": [ "Memory Snapshots", "Memory Snapshots" ], "summary": "Delete Snapshot", "description": "Delete a snapshot and its file.", "operationId": "delete_snapshot_api_v1_api_v1_snapshots__snapshot_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "snapshot_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Snapshot Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-snapshots" } }, "/api/v1/api/v1/snapshots/{snapshot_id}/download": { "get": { "tags": [ "Memory Snapshots", "Memory Snapshots" ], "summary": "Download Snapshot", "description": "Download snapshot file.\n\nReturns the snapshot content with appropriate Content-Type header.", "operationId": "download_snapshot_api_v1_api_v1_snapshots__snapshot_id__download_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "snapshot_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Snapshot Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-snapshots" } }, "/api/v1/api/v1/snapshots/import": { "post": { "tags": [ "Memory Snapshots", "Memory Snapshots" ], "summary": "Import Snapshot", "description": "Import memories from snapshot file.\n\n**Supported formats**: json, zip\n\n**Overwrite**: If true, existing memories will be updated.\nIf false, existing memories are skipped.", "operationId": "import_snapshot_api_v1_api_v1_snapshots_import_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "format", "in": "query", "required": false, "schema": { "type": "string", "default": "json", "title": "Format" } }, { "name": "overwrite", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Overwrite" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_import_snapshot_api_v1_api_v1_snapshots_import_post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImportResult" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-snapshots" } }, "/api/v1/api/v1/snapshots/cleanup": { "post": { "tags": [ "Memory Snapshots", "Memory Snapshots" ], "summary": "Cleanup Expired Snapshots", "description": "Cleanup expired snapshots.\n\nAdmin operation to delete snapshots past their retention period.", "operationId": "cleanup_expired_snapshots_api_v1_api_v1_snapshots_cleanup_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-snapshots" } }, "/api/v1/api/v1/dlq/tasks": { "get": { "tags": [ "DLQ Management", "DLQ Management" ], "summary": "List Dlq Tasks", "description": "List all failed tasks in DLQ.\n\nAdmin only.", "operationId": "list_dlq_tasks_api_v1_api_v1_dlq_tasks_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "task_name", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Task Name" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 50, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "Offset" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DLQTaskResponse" }, "title": "Response List Dlq Tasks Api V1 Api V1 Dlq Tasks Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "dlq-management" } }, "/api/v1/api/v1/dlq/retry-task": { "post": { "tags": [ "DLQ Management", "DLQ Management" ], "summary": "Retry Dlq Task", "description": "Retry a single failed task with exponential backoff.\n\nAdmin only. Task will be retried after 60/300/900 seconds (attempt 1/2/3).", "operationId": "retry_dlq_task_api_v1_api_v1_dlq_retry_task_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RetryTaskRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "dlq-management" } }, "/api/v1/api/v1/dlq/retry-all": { "post": { "tags": [ "DLQ Management", "DLQ Management" ], "summary": "Retry All Dlq Tasks", "description": "Retry all failed tasks, optionally filtered by task name.\n\nAdmin only. All matching tasks will be queued for retry.", "operationId": "retry_all_dlq_tasks_api_v1_api_v1_dlq_retry_all_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RetryAllRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "dlq-management" } }, "/api/v1/api/v1/dlq/purge-task": { "delete": { "tags": [ "DLQ Management", "DLQ Management" ], "summary": "Purge Dlq Task", "description": "Permanently delete a task from DLQ.\n\nAdmin only. This cannot be undone.", "operationId": "purge_dlq_task_api_v1_api_v1_dlq_purge_task_delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PurgeTaskRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "dlq-management" } }, "/api/v1/api/v1/dlq/purge-old": { "delete": { "tags": [ "DLQ Management", "DLQ Management" ], "summary": "Purge Old Dlq Tasks", "description": "Delete tasks older than N days from DLQ.\n\nAdmin only. Default: 30 days.", "operationId": "purge_old_dlq_tasks_api_v1_api_v1_dlq_purge_old_delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PurgeOldRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "dlq-management" } }, "/api/v1/api/v1/dlq/stats": { "get": { "tags": [ "DLQ Management", "DLQ Management" ], "summary": "Get Dlq Stats", "description": "Get DLQ statistics and metrics.\n\nAdmin only. Returns task counts, retry statistics, and age information.", "operationId": "get_dlq_stats_api_v1_api_v1_dlq_stats_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DLQStatsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "dlq-management" } }, "/api/v1/api/v1/policy-versions/": { "post": { "tags": [ "Policy Versioning", "Policy Versioning" ], "summary": "Create Policy Version", "description": "Create a new policy version.\n\nAdmin only. Creates policy in 'draft' status. Use /activate to deploy.\n\nPolicy types:\n- rbac: Role-based access control rules\n- capability: Memory syscall capabilities\n- rate_limit: API rate limiting rules", "operationId": "create_policy_version_api_v1_api_v1_policy_versions__post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyVersionCreateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyVersionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "policy-versioning" } }, "/api/v1/api/v1/policy-versions/activate": { "post": { "tags": [ "Policy Versioning", "Policy Versioning" ], "summary": "Activate Policy Version", "description": "Activate a policy version with optional canary rollout.\n\nAdmin only.\n\nRollout strategy:\n- 0-50%: Canary rollout to subset of users\n- 50-99%: Gradual rollout\n- 100%: Full deployment\n\nExample: POST /activate with 50% to test new policy on 50% of users.", "operationId": "activate_policy_version_api_v1_api_v1_policy_versions_activate_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyActivateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Activate Policy Version Api V1 Api V1 Policy Versions Activate Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "policy-versioning" } }, "/api/v1/api/v1/policy-versions/rollback": { "post": { "tags": [ "Policy Versioning", "Policy Versioning" ], "summary": "Rollback Policy", "description": "Rollback policy to a specific previous version.\n\nAdmin only. Useful for reverting problematic policy changes.", "operationId": "rollback_policy_api_v1_api_v1_policy_versions_rollback_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyRollbackRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Rollback Policy Api V1 Api V1 Policy Versions Rollback Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "policy-versioning" } }, "/api/v1/api/v1/policy-versions/history/{name}/{policy_type}": { "get": { "tags": [ "Policy Versioning", "Policy Versioning" ], "summary": "Get Policy History", "description": "Get version history for a specific policy.\n\nAdmin only. Returns all versions and events in descending order.", "operationId": "get_policy_history_api_v1_api_v1_policy_versions_history__name___policy_type__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string", "title": "Name" } }, { "name": "policy_type", "in": "path", "required": true, "schema": { "type": "string", "title": "Policy Type" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PolicyHistoryResponse" }, "title": "Response Get Policy History Api V1 Api V1 Policy Versions History Name Policy Type Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "policy-versioning" } }, "/api/v1/api/v1/policy-versions/compare/{policy_id_1}/{policy_id_2}": { "get": { "tags": [ "Policy Versioning", "Policy Versioning" ], "summary": "Compare Policy Versions", "description": "Compare two policy versions and show differences.\n\nAdmin only. Returns metadata differences and content change indicator.", "operationId": "compare_policy_versions_api_v1_api_v1_policy_versions_compare__policy_id_1___policy_id_2__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "policy_id_1", "in": "path", "required": true, "schema": { "type": "string", "title": "Policy Id 1" } }, { "name": "policy_id_2", "in": "path", "required": true, "schema": { "type": "string", "title": "Policy Id 2" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Compare Policy Versions Api V1 Api V1 Policy Versions Compare Policy Id 1 Policy Id 2 Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "policy-versioning" } }, "/api/v1/api/v1/memory-backups/create": { "post": { "tags": [ "Memory Backup", "Memory Backup" ], "summary": "Create Memory Backup", "description": "Create a backup of all memories.\n\nAdmin only.\n\nBackup types:\n- full: Complete snapshot of all memories\n- incremental: Only changes since last backup", "operationId": "create_memory_backup_api_v1_api_v1_memory_backups_create_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryBackupCreateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryBackupResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-backup" } }, "/api/v1/api/v1/memory-backups/restore": { "post": { "tags": [ "Memory Backup", "Memory Backup" ], "summary": "Restore Memory Backup", "description": "Restore from a memory backup.\n\nAdmin only. Set dry_run=True to validate without restoring.", "operationId": "restore_memory_backup_api_v1_api_v1_memory_backups_restore_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryRestoreRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryRestoreResultResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-backup" } }, "/api/v1/api/v1/memory-backups/list": { "get": { "tags": [ "Memory Backup", "Memory Backup" ], "summary": "List Memory Backups", "description": "List all memory backups for the organization.\n\nAdmin only.", "operationId": "list_memory_backups_api_v1_api_v1_memory_backups_list_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 50, "title": "Limit" } }, { "name": "include_expired", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Include Expired" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MemoryBackupResponse" }, "title": "Response List Memory Backups Api V1 Api V1 Memory Backups List Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-backup" } }, "/api/v1/api/v1/memory-backups/{backup_id}": { "get": { "tags": [ "Memory Backup", "Memory Backup" ], "summary": "Get Memory Backup Info", "description": "Get detailed information about a memory backup.\n\nAdmin only. Includes restore history.", "operationId": "get_memory_backup_info_api_v1_api_v1_memory_backups__backup_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "backup_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Backup Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Get Memory Backup Info Api V1 Api V1 Memory Backups Backup Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-backup" }, "delete": { "tags": [ "Memory Backup", "Memory Backup" ], "summary": "Delete Memory Backup", "description": "Delete a memory backup.\n\nAdmin only. Backup file will be removed.", "operationId": "delete_memory_backup_api_v1_api_v1_memory_backups__backup_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "backup_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Backup Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Response Delete Memory Backup Api V1 Api V1 Memory Backups Backup Id Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-backup" } }, "/api/v1/api/v1/memory-backups/schedule": { "post": { "tags": [ "Memory Backup", "Memory Backup" ], "summary": "Create Memory Backup Schedule", "description": "Create an automated memory backup schedule.\n\nAdmin only.\n\nSchedules:\n- hourly: Every hour\n- daily: Every 24 hours\n- weekly: Every 7 days\n- monthly: Every 30 days", "operationId": "create_memory_backup_schedule_api_v1_api_v1_memory_backups_schedule_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryBackupScheduleRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryBackupScheduleResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-backup" } }, "/api/v1/organizations/me": { "get": { "tags": [ "Organizations" ], "summary": "Get Current Organization", "description": "Get the current organization context.", "operationId": "get_current_organization_api_v1_organizations_me_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "organizations" } }, "/api/v1/organizations": { "get": { "tags": [ "Organizations" ], "summary": "List Organizations", "description": "List all organizations.\n\n**Required role:** system_admin", "operationId": "list_organizations_api_v1_organizations_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrganizationResponse" }, "title": "Response List Organizations Api V1 Organizations Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "organizations" }, "post": { "tags": [ "Organizations" ], "summary": "Create Organization", "description": "Create a new organization.\n\n**Required role:** system_admin", "operationId": "create_organization_api_v1_organizations_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "organizations" } }, "/api/v1/organizations/{org_id}": { "get": { "tags": [ "Organizations" ], "summary": "Get Organization", "description": "Get organization by ID.", "operationId": "get_organization_api_v1_organizations__org_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "org_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Org Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "organizations" }, "patch": { "tags": [ "Organizations" ], "summary": "Update Organization", "description": "Update organization.\n\n**Required role:** org_admin or system_admin", "operationId": "update_organization_api_v1_organizations__org_id__patch", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "org_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Org Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "organizations" } }, "/api/v1/organizations/structure/tree": { "get": { "tags": [ "Organizations" ], "summary": "Get Hierarchy Tree", "description": "Get the full organizational hierarchy tree.", "operationId": "get_hierarchy_tree_api_v1_organizations_structure_tree_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HierarchyTreeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "organizations" } }, "/api/v1/organizations/structure/nodes": { "post": { "tags": [ "Organizations" ], "summary": "Create Hierarchy Node", "description": "Create a new hierarchy node (division, department, or team).\n\n**Required role:** org_admin or system_admin", "operationId": "create_hierarchy_node_api_v1_organizations_structure_nodes_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HierarchyNodeCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HierarchyNodeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "organizations" } }, "/api/v1/organizations/structure/nodes/{node_id}": { "get": { "tags": [ "Organizations" ], "summary": "Get Hierarchy Node", "description": "Get a hierarchy node by ID.", "operationId": "get_hierarchy_node_api_v1_organizations_structure_nodes__node_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "node_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Node Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HierarchyNodeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "organizations" } }, "/api/v1/teams": { "get": { "tags": [ "Teams" ], "summary": "List Teams", "description": "List all teams in the organization.", "operationId": "list_teams_api_v1_teams_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TeamResponse" }, "title": "Response List Teams Api V1 Teams Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "teams" }, "post": { "tags": [ "Teams" ], "summary": "Create Team", "description": "Create a new team.\n\n**Required role:** org_admin, department_manager, or system_admin", "operationId": "create_team_api_v1_teams_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "teams" } }, "/api/v1/teams/{team_id}": { "get": { "tags": [ "Teams" ], "summary": "Get Team", "description": "Get team by ID.", "operationId": "get_team_api_v1_teams__team_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Team Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "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" } } } } }, "x-ninai-cognitive-domain": "teams" }, "patch": { "tags": [ "Teams" ], "summary": "Update Team", "description": "Update a team.\n\n**Required role:** org_admin, team_lead (of this team), or system_admin", "operationId": "update_team_api_v1_teams__team_id__patch", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Team Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamUpdate" } } } }, "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" } } } } }, "x-ninai-cognitive-domain": "teams" }, "delete": { "tags": [ "Teams" ], "summary": "Delete Team", "description": "Delete a team (soft delete).\n\n**Required role:** org_admin or system_admin", "operationId": "delete_team_api_v1_teams__team_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Team Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "teams" } }, "/api/v1/teams/{team_id}/members": { "get": { "tags": [ "Teams" ], "summary": "Get Team Members", "description": "Get team with members list.", "operationId": "get_team_members_api_v1_teams__team_id__members_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Team Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamMembersResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "teams" }, "post": { "tags": [ "Teams" ], "summary": "Add Team Member", "description": "Add a member to a team.\n\n**Required role:** org_admin, team_lead (of this team), or system_admin", "operationId": "add_team_member_api_v1_teams__team_id__members_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Team Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamMemberAdd" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamMemberResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "teams" } }, "/api/v1/teams/{team_id}/members/{user_id}": { "delete": { "tags": [ "Teams" ], "summary": "Remove Team Member", "description": "Remove a member from a team.\n\n**Required role:** org_admin, team_lead (of this team), or system_admin", "operationId": "remove_team_member_api_v1_teams__team_id__members__user_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Team Id" } }, { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "teams" } }, "/api/v1/users": { "get": { "tags": [ "Users" ], "summary": "List Users", "description": "List users in the organization.\n\n**Required role:** org_admin or system_admin", "operationId": "list_users_api_v1_users_get", "security": [ { "HTTPBearer": [] } ], "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": 20, "title": "Page Size" } }, { "name": "search", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Search" } }, { "name": "is_active", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Active" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedResponse_UserAdminListItemResponse_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "users" }, "post": { "tags": [ "Users" ], "summary": "Create User", "description": "Create a new user.\n\n**Required role:** org_admin or system_admin\n\nNote: For SSO users, use external_id instead of password.", "operationId": "create_user_api_v1_users_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/app__api__v1__endpoints__users__UserAdminResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "users" } }, "/api/v1/users/{user_id}": { "get": { "tags": [ "Users" ], "summary": "Get User", "description": "Get user details with roles.\n\n**Required role:** org_admin or system_admin", "operationId": "get_user_api_v1_users__user_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserWithRolesResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "users" }, "patch": { "tags": [ "Users" ], "summary": "Update User", "description": "Update a user.\n\n**Required role:** org_admin or system_admin", "operationId": "update_user_api_v1_users__user_id__patch", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/app__api__v1__endpoints__users__UserUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/app__api__v1__endpoints__users__UserAdminResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "users" }, "delete": { "tags": [ "Users" ], "summary": "Deactivate User", "description": "Deactivate a user (soft delete).\n\n**Required role:** org_admin or system_admin", "operationId": "deactivate_user_api_v1_users__user_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "users" } }, "/api/v1/users/roles": { "get": { "tags": [ "Users" ], "summary": "List Roles", "description": "List available roles.\n\n**Required role:** org_admin or system_admin", "operationId": "list_roles_api_v1_users_roles_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/RoleResponse" }, "title": "Response List Roles Api V1 Users Roles Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "users" } }, "/api/v1/users/{user_id}/roles": { "post": { "tags": [ "Users" ], "summary": "Assign Role", "description": "Assign a role to a user.\n\n**Required role:** org_admin or system_admin", "operationId": "assign_role_api_v1_users__user_id__roles_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserRoleAssign" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserRoleResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "users" } }, "/api/v1/users/{user_id}/roles/{role_assignment_id}": { "delete": { "tags": [ "Users" ], "summary": "Revoke Role", "description": "Revoke a role assignment.\n\n**Required role:** org_admin or system_admin", "operationId": "revoke_role_api_v1_users__user_id__roles__role_assignment_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } }, { "name": "role_assignment_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Role Assignment Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "users" } }, "/api/v1/audit/events": { "get": { "tags": [ "Audit" ], "summary": "List Audit Events", "description": "List audit events with filtering.\n\n**Required role:** org_admin, security_admin, or system_admin\n\nCommon event types:\n- auth.login, auth.logout, auth.failed_login\n- memory.create, memory.read, memory.update, memory.delete\n- permission.granted, permission.denied, permission.change\n- admin.user_created, admin.role_assigned", "operationId": "list_audit_events_api_v1_audit_events_get", "security": [ { "HTTPBearer": [] } ], "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": 50, "title": "Page Size" } }, { "name": "event_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Event Type" } }, { "name": "actor_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Actor Id" } }, { "name": "resource_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resource Type" } }, { "name": "resource_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resource Id" } }, { "name": "action", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Action" } }, { "name": "start_date", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "End Date" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "audit" } }, "/api/v1/audit/events/{event_id}": { "get": { "tags": [ "Audit" ], "summary": "Get Audit Event", "description": "Get a specific audit event.\n\n**Required role:** org_admin, security_admin, or system_admin", "operationId": "get_audit_event_api_v1_audit_events__event_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "event_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Event Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuditEventResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "audit" } }, "/api/v1/audit/events/{event_id}/related": { "get": { "tags": [ "Audit" ], "summary": "Get Related Events", "description": "Get events related to a specific event (same request_id or parent chain).\n\n**Required role:** org_admin, security_admin, or system_admin", "operationId": "get_related_events_api_v1_audit_events__event_id__related_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "event_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Event Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AuditEventResponse" }, "title": "Response Get Related Events Api V1 Audit Events Event Id Related Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "audit" } }, "/api/v1/audit/access-logs": { "get": { "tags": [ "Audit" ], "summary": "List Access Logs", "description": "List memory access logs with filtering.\n\n**Required role:** org_admin, security_admin, or system_admin\n\nAccess types: read, update, delete, share, search", "operationId": "list_access_logs_api_v1_audit_access_logs_get", "security": [ { "HTTPBearer": [] } ], "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": 50, "title": "Page Size" } }, { "name": "memory_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Memory Id" } }, { "name": "user_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Id" } }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "access_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Access Type" } }, { "name": "access_granted", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Access Granted" } }, { "name": "start_date", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "End Date" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "audit" } }, "/api/v1/audit/access-logs/memory/{memory_id}": { "get": { "tags": [ "Audit" ], "summary": "Get Memory Access History", "description": "Get complete access history for a specific memory.\n\n**Required role:** org_admin, security_admin, or system_admin", "operationId": "get_memory_access_history_api_v1_audit_access_logs_memory__memory_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 100, "title": "Limit" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AccessLogResponse" }, "title": "Response Get Memory Access History Api V1 Audit Access Logs Memory Memory Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "audit" } }, "/api/v1/audit/stats": { "get": { "tags": [ "Audit" ], "summary": "Get Audit Stats", "description": "Get audit statistics for a time period.\n\n**Required role:** org_admin, security_admin, or system_admin", "operationId": "get_audit_stats_api_v1_audit_stats_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "start_date", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "Period start (defaults to 7 days ago)", "title": "Start Date" }, "description": "Period start (defaults to 7 days ago)" }, { "name": "end_date", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "Period end (defaults to now)", "title": "End Date" }, "description": "Period end (defaults to now)" }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuditStatsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "audit" } }, "/api/v1/audit/stats/denials": { "get": { "tags": [ "Audit" ], "summary": "Get Recent Denials", "description": "Get recent access denials for security review.\n\n**Required role:** org_admin, security_admin, or system_admin", "operationId": "get_recent_denials_api_v1_audit_stats_denials_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AccessLogResponse" }, "title": "Response Get Recent Denials Api V1 Audit Stats Denials Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "audit" } }, "/api/v1/logseq/export/markdown": { "post": { "tags": [ "Logseq" ], "summary": "Export Markdown", "description": "Render a Logseq-friendly Markdown export.\n\nRead-only: any authenticated user can generate the Markdown.\n\nNotes:\n- If `memory_ids` is provided, we fetch those memories (and optionally STM).\n- If `memory_ids` is empty, we export up to `limit` LTM memories visible to the caller.", "operationId": "export_markdown_api_v1_logseq_export_markdown_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LogseqExportRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LogseqExportResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "logseq" } }, "/api/v1/logseq/graph": { "post": { "tags": [ "Logseq" ], "summary": "Graph Data", "description": "Return nodes/edges representing memories, tags, and entities.\n\nRead-only: any authenticated user can retrieve the graph for their visible memories.", "operationId": "graph_data_api_v1_logseq_graph_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LogseqExportRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LogseqGraphResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "logseq" } }, "/api/v1/logseq/export/write": { "post": { "tags": [ "Logseq" ], "summary": "Write Export To Disk", "description": "Admin-only: write a Markdown export file to disk.\n\nThis is restricted to org_admin/system_admin roles.", "operationId": "write_export_to_disk_api_v1_logseq_export_write_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LogseqExportRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LogseqWriteExportResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "logseq" } }, "/api/v1/logseq/export/config": { "get": { "tags": [ "Logseq" ], "summary": "Get Export Config", "description": "Admin-only: view effective Logseq export path configuration.", "operationId": "get_export_config_api_v1_logseq_export_config_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LogseqExportConfigResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "logseq" }, "put": { "tags": [ "Logseq" ], "summary": "Put Export Config", "description": "Admin-only: update Logseq export base directory override.\n\nSend {\"export_base_dir\": null} to revert to env/default.", "operationId": "put_export_config_api_v1_logseq_export_config_put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LogseqExportConfigUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LogseqExportConfigResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "logseq" } }, "/api/v1/logseq/export/zip": { "get": { "tags": [ "Logseq" ], "summary": "Download Export Zip", "description": "Admin-only: download a zip of the org's Logseq export directory.", "operationId": "download_export_zip_api_v1_logseq_export_zip_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "logseq" } }, "/api/v1/logseq/export/logs": { "get": { "tags": [ "Logseq" ], "summary": "List Export Logs", "description": "Admin-only: list Logseq write-to-disk export logs.", "operationId": "list_export_logs_api_v1_logseq_export_logs_get", "security": [ { "HTTPBearer": [] } ], "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": 200, "minimum": 1, "default": 50, "title": "Page Size" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "logseq" } }, "/api/v1/exports/jobs/{job_id}/download": { "get": { "tags": [ "Exports" ], "summary": "Download Export Job Bundle", "operationId": "download_export_job_bundle_api_v1_exports_jobs__job_id__download_get", "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } }, { "name": "token", "in": "query", "required": true, "schema": { "type": "string", "description": "Signed download token", "title": "Token" }, "description": "Signed download token" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "exports" } }, "/api/v1/cognitive/sessions": { "post": { "tags": [ "Cognitive" ], "summary": "Create Cognitive Session", "operationId": "create_cognitive_session_api_v1_cognitive_sessions_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-Trace-ID", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Trace-Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CognitiveSessionCreateRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CognitiveSessionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "cognitive" } }, "/api/v1/cognitive/sessions/{session_id}/run": { "post": { "tags": [ "Cognitive" ], "summary": "Run Cognitive Session", "operationId": "run_cognitive_session_api_v1_cognitive_sessions__session_id__run_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "cognitive" } }, "/api/v1/cognitive/sessions/{session_id}": { "get": { "tags": [ "Cognitive" ], "summary": "Get Cognitive Session", "operationId": "get_cognitive_session_api_v1_cognitive_sessions__session_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CognitiveSessionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "cognitive" } }, "/api/v1/cognitive/sessions/{session_id}/iterations": { "get": { "tags": [ "Cognitive" ], "summary": "List Cognitive Iterations", "operationId": "list_cognitive_iterations_api_v1_cognitive_sessions__session_id__iterations_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CognitiveIterationResponse" }, "title": "Response List Cognitive Iterations Api V1 Cognitive Sessions Session Id Iterations Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "cognitive" } }, "/api/v1/cognitive/sessions/{session_id}/tool-calls": { "get": { "tags": [ "Cognitive" ], "summary": "List Tool Calls", "operationId": "list_tool_calls_api_v1_cognitive_sessions__session_id__tool_calls_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "status_filter", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status Filter" } }, { "name": "tool_name", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Name" } }, { "name": "iteration_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Iteration Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 200, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "Offset" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ToolCallLogResponse" }, "title": "Response List Tool Calls Api V1 Cognitive Sessions Session Id Tool Calls Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "cognitive" } }, "/api/v1/cognitive/sessions/{session_id}/report": { "get": { "tags": [ "Cognitive" ], "summary": "Get Evaluation Report", "operationId": "get_evaluation_report_api_v1_cognitive_sessions__session_id__report_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvaluationReportResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "cognitive" } }, "/api/v1/meta/review/memories/{memory_id}": { "post": { "tags": [ "Meta" ], "summary": "Enqueue Meta Review Memory", "operationId": "enqueue_meta_review_memory_api_v1_meta_review_memories__memory_id__post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "X-Trace-ID", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Trace-Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "meta" } }, "/api/v1/meta/review/cognitive-sessions/{session_id}": { "post": { "tags": [ "Meta" ], "summary": "Enqueue Meta Review Cognitive Session", "operationId": "enqueue_meta_review_cognitive_session_api_v1_meta_review_cognitive_sessions__session_id__post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "X-Trace-ID", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Trace-Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "meta" } }, "/api/v1/meta/runs": { "get": { "tags": [ "Meta" ], "summary": "List Meta Runs", "operationId": "list_meta_runs_api_v1_meta_runs_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "resource_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resource Type" } }, { "name": "resource_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resource Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 50, "title": "Limit" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MetaAgentRunOut" }, "title": "Response List Meta Runs Api V1 Meta Runs Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "meta" } }, "/api/v1/meta/conflicts": { "get": { "tags": [ "Meta" ], "summary": "List Meta Conflicts", "operationId": "list_meta_conflicts_api_v1_meta_conflicts_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "status_filter", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status Filter" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 50, "title": "Limit" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MetaConflictOut" }, "title": "Response List Meta Conflicts Api V1 Meta Conflicts Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "meta" } }, "/api/v1/meta/calibration-profile": { "get": { "tags": [ "Meta" ], "summary": "Get Calibration Profile", "operationId": "get_calibration_profile_api_v1_meta_calibration_profile_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CalibrationProfileOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "meta" }, "put": { "tags": [ "Meta" ], "summary": "Update Calibration Profile", "operationId": "update_calibration_profile_api_v1_meta_calibration_profile_put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CalibrationProfileUpdateIn" } } } }, "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "meta" } }, "/api/v1/meta/metrics": { "get": { "tags": [ "Meta" ], "summary": "Meta Metrics", "operationId": "meta_metrics_api_v1_meta_metrics_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "meta" } }, "/api/v1/goals": { "post": { "tags": [ "Goals" ], "summary": "Create Goal", "operationId": "create_goal_api_v1_goals_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GoalCreateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GoalResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "goals" }, "get": { "tags": [ "Goals" ], "summary": "List Goals", "operationId": "list_goals_api_v1_goals_get", "security": [ { "HTTPBearer": [] } ], "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": 50, "title": "Page Size" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedResponse_GoalResponse_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "goals" } }, "/api/v1/goals/propose": { "post": { "tags": [ "Goals" ], "summary": "Propose Goal From Request", "description": "Suggest a goal graph (proposal only).\n\nThis does not create any DB rows; it returns a deterministic JSON proposal.", "operationId": "propose_goal_from_request_api_v1_goals_propose_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GoalProposeRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GoalPlannerAgentOutput" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "goals" } }, "/api/v1/goals/link-suggestions": { "post": { "tags": [ "Goals" ], "summary": "Suggest Goal Links", "description": "Suggest goal-memory links (proposal only).", "operationId": "suggest_goal_links_api_v1_goals_link_suggestions_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GoalLinkSuggestionsRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GoalLinkingAgentOutput" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "goals" } }, "/api/v1/goals/{goal_id}": { "get": { "tags": [ "Goals" ], "summary": "Get Goal", "operationId": "get_goal_api_v1_goals__goal_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "goal_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Goal Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GoalDetailResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "goals" }, "patch": { "tags": [ "Goals" ], "summary": "Update Goal", "operationId": "update_goal_api_v1_goals__goal_id__patch", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "goal_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Goal Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GoalUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GoalResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "goals" } }, "/api/v1/goals/{goal_id}/nodes": { "post": { "tags": [ "Goals" ], "summary": "Add Node", "operationId": "add_node_api_v1_goals__goal_id__nodes_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "goal_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Goal Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GoalNodeCreateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GoalNodeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "goals" } }, "/api/v1/goals/{goal_id}/dependencies": { "post": { "tags": [ "Goals" ], "summary": "Add Dependency", "operationId": "add_dependency_api_v1_goals__goal_id__dependencies_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "goal_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Goal Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GoalEdgeCreateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GoalEdgeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "goals" } }, "/api/v1/goals/{goal_id}/link-memory": { "post": { "tags": [ "Goals" ], "summary": "Link Memory", "operationId": "link_memory_api_v1_goals__goal_id__link_memory_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "goal_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Goal Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GoalMemoryLinkCreateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GoalMemoryLinkResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "goals" } }, "/api/v1/goals/{goal_id}/activity": { "get": { "tags": [ "Goals" ], "summary": "Get Goal Activity", "operationId": "get_goal_activity_api_v1_goals__goal_id__activity_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "goal_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Goal Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 500, "minimum": 1, "default": 100, "title": "Limit" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GoalActivityLogResponse" }, "title": "Response Get Goal Activity Api V1 Goals Goal Id Activity Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "goals" } }, "/api/v1/goals/{goal_id}/nodes/{node_id}": { "patch": { "tags": [ "Goals" ], "summary": "Update Node", "operationId": "update_node_api_v1_goals__goal_id__nodes__node_id__patch", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "goal_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Goal Id" } }, { "name": "node_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Node Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GoalNodeUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GoalNodeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "goals" } }, "/api/v1/goals/{goal_id}/tree": { "get": { "tags": [ "Goals" ], "summary": "Get Goal Tree", "operationId": "get_goal_tree_api_v1_goals__goal_id__tree_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "goal_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Goal Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GoalTreeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "goals" } }, "/api/v1/goals/{goal_id}/blockers": { "get": { "tags": [ "Goals" ], "summary": "Get Goal Blockers", "operationId": "get_goal_blockers_api_v1_goals__goal_id__blockers_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "goal_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Goal Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GoalBlockersResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "goals" } }, "/api/v1/selfmodel/bundle": { "get": { "tags": [ "SelfModel" ], "summary": "Get Self Model Bundle", "operationId": "get_self_model_bundle_api_v1_selfmodel_bundle_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SelfModelBundleResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "selfmodel" } }, "/api/v1/selfmodel/recompute": { "post": { "tags": [ "SelfModel" ], "summary": "Recompute Self Model", "operationId": "recompute_self_model_api_v1_selfmodel_recompute_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "selfmodel" } }, "/api/v1/selfmodel/samples/tool-outcome": { "post": { "tags": [ "SelfModel" ], "summary": "Submit Tool Outcome Sample", "operationId": "submit_tool_outcome_sample_api_v1_selfmodel_samples_tool_outcome_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolOutcomeSampleIn" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolOutcomeSampleOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "selfmodel" } }, "/api/v1/selfmodel/reliability/tools/{tool_name}": { "get": { "tags": [ "SelfModel" ], "summary": "Get Tool Reliability", "operationId": "get_tool_reliability_api_v1_selfmodel_reliability_tools__tool_name__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tool_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Tool Name" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolReliabilityResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "selfmodel" } }, "/api/v1/self-model/bundle": { "get": { "tags": [ "SelfModel" ], "summary": "Get Self Model Bundle", "operationId": "get_self_model_bundle_api_v1_self_model_bundle_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SelfModelBundleResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "selfmodel" } }, "/api/v1/self-model/recompute": { "post": { "tags": [ "SelfModel" ], "summary": "Recompute Self Model", "operationId": "recompute_self_model_api_v1_self_model_recompute_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "selfmodel" } }, "/api/v1/self-model/samples/tool-outcome": { "post": { "tags": [ "SelfModel" ], "summary": "Submit Tool Outcome Sample", "operationId": "submit_tool_outcome_sample_api_v1_self_model_samples_tool_outcome_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolOutcomeSampleIn" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolOutcomeSampleOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "selfmodel" } }, "/api/v1/self-model/reliability/tools/{tool_name}": { "get": { "tags": [ "SelfModel" ], "summary": "Get Tool Reliability", "operationId": "get_tool_reliability_api_v1_self_model_reliability_tools__tool_name__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tool_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Tool Name" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolReliabilityResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "selfmodel" } }, "/api/v1/simulation-reports": { "get": { "tags": [ "Simulation" ], "summary": "List Simulation Reports", "operationId": "list_simulation_reports_api_v1_simulation_reports_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "session_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Session Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 100, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "Offset" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SimulationReportResponse" }, "title": "Response List Simulation Reports Api V1 Simulation Reports Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "simulation" } }, "/api/v1/tools": { "get": { "tags": [ "Tools" ], "summary": "List Tools", "operationId": "list_tools_api_v1_tools_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ToolSpecOut" }, "title": "Response List Tools Api V1 Tools Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "tools" } }, "/api/v1/tools/invoke": { "post": { "tags": [ "Tools" ], "summary": "Invoke Tool", "operationId": "invoke_tool_api_v1_tools_invoke_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-Trace-ID", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Trace-Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolInvokeRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolInvokeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "tools" } }, "/api/v1/llm/complete-json": { "post": { "tags": [ "LLM" ], "summary": "Complete Json", "operationId": "complete_json_api_v1_llm_complete_json_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompleteJsonRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompleteJsonResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "llm" } }, "/api/v1/ops/processes": { "get": { "tags": [ "Operations" ], "summary": "List Agent Processes", "description": "List agent processes with optional filtering.", "operationId": "list_agent_processes_api_v1_ops_processes_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "status_filter", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by status (queued|running|blocked|succeeded|failed)", "title": "Status Filter" }, "description": "Filter by status (queued|running|blocked|succeeded|failed)" }, { "name": "agent_name_filter", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by agent_name (partial match)", "title": "Agent Name Filter" }, "description": "Filter by agent_name (partial match)" }, { "name": "session_id_filter", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by session_id", "title": "Session Id Filter" }, "description": "Filter by session_id" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 500, "minimum": 1, "description": "Limit results", "default": 100, "title": "Limit" }, "description": "Limit results" }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "description": "Offset results", "default": 0, "title": "Offset" }, "description": "Offset results" }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentProcessListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "operations" } }, "/api/v1/ops/processes/{process_id}": { "get": { "tags": [ "Operations" ], "summary": "Get Agent Process", "description": "Inspect a single agent process.", "operationId": "get_agent_process_api_v1_ops_processes__process_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "process_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Process Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentProcessResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "operations" } }, "/api/v1/graph/stats": { "get": { "tags": [ "Graph" ], "summary": "Get Graph Statistics", "description": "Get graph statistics for the organization.\n\nReturns node counts, relationship counts, and graph metrics.", "operationId": "get_graph_statistics_api_v1_graph_stats_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GraphStatsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "graph" } }, "/api/v1/graph/memories/{memory_id}/related": { "get": { "tags": [ "Graph" ], "summary": "Get Related Memories", "description": "Find memories related to a specific memory via graph traversal.\n\nUses FalkorDB (Redis-based) graph database to traverse relationships and find connected memories.", "operationId": "get_related_memories_api_v1_graph_memories__memory_id__related_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "relationship_types", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "description": "Filter by relationship types", "title": "Relationship Types" }, "description": "Filter by relationship types" }, { "name": "max_depth", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 5, "minimum": 1, "description": "Maximum traversal depth", "default": 2, "title": "Max Depth" }, "description": "Maximum traversal depth" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "description": "Maximum results", "default": 50, "title": "Limit" }, "description": "Maximum results" }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RelatedMemoriesResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "graph" } }, "/api/v1/graph/path": { "get": { "tags": [ "Graph" ], "summary": "Find Shortest Path", "description": "Find shortest path between two nodes in the graph.\n\nReturns the shortest path with nodes and relationships.", "operationId": "find_shortest_path_api_v1_graph_path_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "from_id", "in": "query", "required": true, "schema": { "type": "string", "description": "Source node ID", "title": "From Id" }, "description": "Source node ID" }, { "name": "to_id", "in": "query", "required": true, "schema": { "type": "string", "description": "Target node ID", "title": "To Id" }, "description": "Target node ID" }, { "name": "max_depth", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 10, "minimum": 1, "description": "Maximum path length", "default": 5, "title": "Max Depth" }, "description": "Maximum path length" }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GraphPathResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "graph" } }, "/api/v1/graph/nodes/{node_id}/degree": { "get": { "tags": [ "Graph" ], "summary": "Get Node Degree", "description": "Get the degree (number of connections) for a node.\n\nReturns in-degree, out-degree, and total degree.", "operationId": "get_node_degree_api_v1_graph_nodes__node_id__degree_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "node_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Node Id" } }, { "name": "direction", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(in|out|both)$", "default": "both", "title": "Direction" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GraphDegreeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "graph" } }, "/api/v1/graph/memories/{memory_id}/relationships": { "post": { "tags": [ "Graph" ], "summary": "Create Memory Relationship", "description": "Create a relationship between two memories in the graph.\n\nRelationship types:\n- RELATES_TO: General relationship\n- DEPENDS_ON: Dependency relationship\n- REFERENCES: Reference relationship\n- FOLLOWS: Sequential relationship", "operationId": "create_memory_relationship_api_v1_graph_memories__memory_id__relationships_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "target_id", "in": "query", "required": true, "schema": { "type": "string", "description": "Target memory ID", "title": "Target Id" }, "description": "Target memory ID" }, { "name": "relationship_type", "in": "query", "required": false, "schema": { "type": "string", "description": "Relationship type", "default": "RELATES_TO", "title": "Relationship Type" }, "description": "Relationship type" }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "graph" } }, "/api/v1/admin/pipelines/stats": { "get": { "tags": [ "Admin - Pipelines" ], "summary": "Get Pipeline Stats", "description": "Get pipeline queue statistics and metrics.\n\nRequires: pipelines.view capability\nReturns stats for the user's organization.", "operationId": "get_pipeline_stats_api_v1_admin_pipelines_stats_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PipelineStatsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin---pipelines" } }, "/api/v1/admin/pipelines": { "get": { "tags": [ "Admin - Pipelines" ], "summary": "List Pipeline Tasks", "description": "List pipeline tasks with optional filtering.\n\nRequires: pipelines.view capability\nReturns tasks for the user's organization.", "operationId": "list_pipeline_tasks_api_v1_admin_pipelines_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "status_filter", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by status: queued, running, blocked, succeeded, failed", "title": "Status Filter" }, "description": "Filter by status: queued, running, blocked, succeeded, failed" }, { "name": "task_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by task type", "title": "Task Type" }, "description": "Filter by task type" }, { "name": "sla_breached_only", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Show only SLA-breached tasks", "default": false, "title": "Sla Breached Only" }, "description": "Show only SLA-breached tasks" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 500, "minimum": 1, "description": "Max tasks to return", "default": 100, "title": "Limit" }, "description": "Max tasks to return" }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PipelineTaskResponse" }, "title": "Response List Pipeline Tasks Api V1 Admin Pipelines Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin---pipelines" }, "post": { "tags": [ "Admin - Pipelines" ], "summary": "Create Pipeline Task", "description": "Manually enqueue a pipeline task.\n\nRequires: pipelines.manage capability\nUses SLASchedulerService to ensure proper scheduling.", "operationId": "create_pipeline_task_api_v1_admin_pipelines_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PipelineTaskCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PipelineTaskResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin---pipelines" } }, "/api/v1/admin/pipelines/{task_id}": { "get": { "tags": [ "Admin - Pipelines" ], "summary": "Get Pipeline Task", "description": "Get a specific pipeline task by ID.\n\nRequires: pipelines.view capability", "operationId": "get_pipeline_task_api_v1_admin_pipelines__task_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "task_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Task Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PipelineTaskResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin---pipelines" } }, "/api/v1/admin/pipelines/{task_id}/priority": { "put": { "tags": [ "Admin - Pipelines" ], "summary": "Update Task Priority", "description": "Update the priority of a queued or blocked pipeline task.\n\nRequires: pipelines.admin capability\nCannot change priority of running/completed tasks.", "operationId": "update_task_priority_api_v1_admin_pipelines__task_id__priority_put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "task_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Task Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PipelineTaskUpdatePriority" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PipelineTaskResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin---pipelines" } }, "/api/v1/admin/pipelines/{task_id}/cancel": { "post": { "tags": [ "Admin - Pipelines" ], "summary": "Cancel Pipeline Task", "description": "Cancel a queued or running pipeline task.\n\nRequires: pipelines.admin capability\nSets status to FAILED with cancellation reason.", "operationId": "cancel_pipeline_task_api_v1_admin_pipelines__task_id__cancel_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "task_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Task Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PipelineTaskResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin---pipelines" } }, "/api/v1/admin/pipelines/{task_id}/retry": { "post": { "tags": [ "Admin - Pipelines" ], "summary": "Retry Pipeline Task", "description": "Retry a failed or cancelled pipeline task.\n\nRequires: pipelines.admin capability\nResets status to QUEUED and clears error.", "operationId": "retry_pipeline_task_api_v1_admin_pipelines__task_id__retry_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "task_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Task Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PipelineTaskResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin---pipelines" } }, "/api/v1/admin/pipelines/stats/history": { "get": { "tags": [ "Admin - Pipelines" ], "summary": "Get Pipeline Stats History", "description": "Get historical pipeline statistics for trending.\n\nRequires: pipelines.view capability\nReturns hourly snapshots of queue stats for the specified time range.", "operationId": "get_pipeline_stats_history_api_v1_admin_pipelines_stats_history_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "hours", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 168, "minimum": 1, "description": "Hours of history to return", "default": 24, "title": "Hours" }, "description": "Hours of history to return" }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object" }, "title": "Response Get Pipeline Stats History Api V1 Admin Pipelines Stats History Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin---pipelines" } }, "/api/v1/admin/pipelines/export": { "get": { "tags": [ "Admin - Pipelines" ], "summary": "Export Pipeline Tasks", "description": "Export pipeline tasks as CSV or JSON.\n\nRequires: pipelines.view capability\nDownloads task history for analysis.", "operationId": "export_pipeline_tasks_api_v1_admin_pipelines_export_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "format", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(csv|json)$", "description": "Export format", "default": "csv", "title": "Format" }, "description": "Export format" }, { "name": "status_filter", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by status", "title": "Status Filter" }, "description": "Filter by status" }, { "name": "hours", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 720, "minimum": 1, "description": "Hours of history", "default": 24, "title": "Hours" }, "description": "Hours of history" }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin---pipelines" } }, "/api/v1/admin/pipelines/{task_id}/dependencies": { "get": { "tags": [ "Admin - Pipelines" ], "summary": "Get Task Dependencies", "description": "Get dependency tree for a pipeline task.\n\nRequires: pipelines.view capability\nReturns tasks that this task blocks on (dependencies) and tasks blocked by this task (dependents).", "operationId": "get_task_dependencies_api_v1_admin_pipelines__task_id__dependencies_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "task_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Task Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Get Task Dependencies Api V1 Admin Pipelines Task Id Dependencies Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin---pipelines" } }, "/api/v1/admin/dlq/stats": { "get": { "tags": [ "Admin - DLQ" ], "summary": "Get Dlq Stats", "description": "Get Dead Letter Queue statistics.\n\nRequires: dlq.view capability", "operationId": "get_dlq_stats_api_v1_admin_dlq_stats_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeadLetterQueueStats" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin---dlq" } }, "/api/v1/admin/dlq": { "get": { "tags": [ "Admin - DLQ" ], "summary": "List Dlq Tasks", "description": "List Dead Letter Queue tasks with optional filtering.\n\nRequires: dlq.view capability", "operationId": "list_dlq_tasks_api_v1_admin_dlq_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "is_resolved", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Resolved" } }, { "name": "task_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Task Type" } }, { "name": "failure_reason", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Failure Reason" } }, { "name": "min_priority", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "maximum": 10, "minimum": 1 }, { "type": "null" } ], "title": "Min Priority" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "default": 100, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DeadLetterTaskResponse" }, "title": "Response List Dlq Tasks Api V1 Admin Dlq Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin---dlq" } }, "/api/v1/admin/dlq/{dlq_id}": { "get": { "tags": [ "Admin - DLQ" ], "summary": "Get Dlq Task", "description": "Get a specific Dead Letter Queue task.\n\nRequires: dlq.view capability", "operationId": "get_dlq_task_api_v1_admin_dlq__dlq_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "dlq_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Dlq Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeadLetterTaskResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin---dlq" } }, "/api/v1/admin/dlq/{dlq_id}/requeue": { "post": { "tags": [ "Admin - DLQ" ], "summary": "Requeue Dlq Task", "description": "Requeue a DLQ task back to the pipeline.\n\nRequires: dlq.manage capability", "operationId": "requeue_dlq_task_api_v1_admin_dlq__dlq_id__requeue_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "dlq_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Dlq Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeadLetterTaskRequeue" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeadLetterTaskResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin---dlq" } }, "/api/v1/admin/dlq/{dlq_id}/discard": { "post": { "tags": [ "Admin - DLQ" ], "summary": "Discard Dlq Task", "description": "Permanently discard a DLQ task.\n\nRequires: dlq.manage capability", "operationId": "discard_dlq_task_api_v1_admin_dlq__dlq_id__discard_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "dlq_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Dlq Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeadLetterTaskDiscard" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeadLetterTaskResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin---dlq" } }, "/api/v1/admin/dlq/detect-poison-messages": { "post": { "tags": [ "Admin - DLQ" ], "summary": "Detect Poison Messages", "description": "Scan for and quarantine poison messages.\n\nRequires: dlq.manage capability", "operationId": "detect_poison_messages_api_v1_admin_dlq_detect_poison_messages_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin---dlq" } }, "/api/v1/health": { "get": { "tags": [ "Health" ], "summary": "Health Check", "description": "Basic health check.", "operationId": "health_check_api_v1_health_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "x-ninai-cognitive-domain": "health" } }, "/api/v1/health/bootstrap": { "get": { "tags": [ "Health" ], "summary": "Bootstrap Status", "description": "Get bootstrap initialization status.", "operationId": "bootstrap_status_api_v1_health_bootstrap_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "x-ninai-cognitive-domain": "health" } }, "/api/v1/health/circuit-breakers": { "get": { "tags": [ "Health" ], "summary": "Circuit Breaker Status", "description": "Get circuit breaker status for all services.", "operationId": "circuit_breaker_status_api_v1_health_circuit_breakers_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "x-ninai-cognitive-domain": "health" } }, "/api/v1/health/resources": { "get": { "tags": [ "Health" ], "summary": "Resource Status", "description": "Get resource consumption status.", "operationId": "resource_status_api_v1_health_resources_get", "parameters": [ { "name": "organization_id", "in": "query", "required": false, "schema": { "type": "string", "title": "Organization Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "health" } }, "/api/v1/health/full": { "get": { "tags": [ "Health" ], "summary": "Full Status", "description": "Get complete system health status.", "operationId": "full_status_api_v1_health_full_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "x-ninai-cognitive-domain": "health" } }, "/api/v1/memory/syscall/read": { "post": { "tags": [ "Memory Syscall", "memory_syscall" ], "summary": "Syscall Read", "description": "Read knowledge item via capability token.\n\nRequires: Capability token with 'read' scope", "operationId": "syscall_read_api_v1_memory_syscall_read_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "authorization", "in": "header", "required": true, "schema": { "type": "string", "title": "Authorization" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryReadRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-syscall" } }, "/api/v1/memory/syscall/append": { "post": { "tags": [ "Memory Syscall", "memory_syscall" ], "summary": "Syscall Append", "description": "Append new knowledge item via capability token.\n\nRequires: Capability token with 'append' scope", "operationId": "syscall_append_api_v1_memory_syscall_append_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "authorization", "in": "header", "required": true, "schema": { "type": "string", "title": "Authorization" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryAppendRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-syscall" } }, "/api/v1/memory/syscall/search": { "post": { "tags": [ "Memory Syscall", "memory_syscall" ], "summary": "Syscall Search", "description": "Search knowledge via vector similarity with RLS verification.\n\nRequires: Capability token with 'search' scope\nProcess: Qdrant vector search + Postgres RLS re-verification", "operationId": "syscall_search_api_v1_memory_syscall_search_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "authorization", "in": "header", "required": true, "schema": { "type": "string", "title": "Authorization" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemorySearchRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-syscall" } }, "/api/v1/memory/syscall/upsert": { "post": { "tags": [ "Memory Syscall", "memory_syscall" ], "summary": "Syscall Upsert", "description": "Update or insert knowledge item via capability token.\n\nRequires: Capability token with 'upsert' scope", "operationId": "syscall_upsert_api_v1_memory_syscall_upsert_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "authorization", "in": "header", "required": true, "schema": { "type": "string", "title": "Authorization" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryUpsertRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-syscall" } }, "/api/v1/memory/syscall/consolidate": { "post": { "tags": [ "Memory Syscall", "memory_syscall" ], "summary": "Syscall Consolidate", "description": "Consolidate (merge) multiple knowledge items.\n\nRequires: Capability token with 'consolidate' scope", "operationId": "syscall_consolidate_api_v1_memory_syscall_consolidate_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "authorization", "in": "header", "required": true, "schema": { "type": "string", "title": "Authorization" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryConsolidateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-syscall" } }, "/api/v1/memory/capabilities/issue": { "post": { "tags": [ "Memory Syscall", "memory_syscall" ], "summary": "Issue Capability Token", "description": "Issue a new capability token (admin only).\n\nReturns: Token with .token field containing Bearer value", "operationId": "issue_capability_token_api_v1_memory_capabilities_issue_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CapabilityTokenCreateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-syscall" } }, "/api/v1/memory/capabilities/{token_id}/revoke": { "post": { "tags": [ "Memory Syscall", "memory_syscall" ], "summary": "Revoke Capability Token", "description": "Revoke a capability token (admin only).", "operationId": "revoke_capability_token_api_v1_memory_capabilities__token_id__revoke_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "token_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Token Id" } }, { "name": "reason", "in": "query", "required": true, "schema": { "type": "string", "title": "Reason" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-syscall" } }, "/api/v1/memory/capabilities": { "get": { "tags": [ "Memory Syscall", "memory_syscall" ], "summary": "List Capability Tokens", "description": "List organization's capability tokens (admin only).", "operationId": "list_capability_tokens_api_v1_memory_capabilities_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "agent_name", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Name" } }, { "name": "include_revoked", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Include Revoked" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-syscall" } }, "/api/v1/memory/capabilities/{token_id}": { "get": { "tags": [ "Memory Syscall", "memory_syscall" ], "summary": "Get Capability Token", "description": "Get capability token details (admin only).", "operationId": "get_capability_token_api_v1_memory_capabilities__token_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "token_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Token Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-syscall" } }, "/api/v1/api/v1/consolidations/suggestions": { "get": { "tags": [ "Consolidations", "Consolidations" ], "summary": "Get Consolidation Suggestions", "description": "Find memories that can be consolidated.\n\nReturns groups of similar memories that could be merged.", "operationId": "get_consolidation_suggestions_api_v1_api_v1_consolidations_suggestions_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Specific memory to check", "title": "Memory Id" }, "description": "Specific memory to check" }, { "name": "similarity_threshold", "in": "query", "required": false, "schema": { "type": "number", "maximum": 1.0, "minimum": 0.0, "default": 0.85, "title": "Similarity Threshold" } }, { "name": "scope", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by memory scope", "title": "Scope" }, "description": "Filter by memory scope" }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FindCandidatesResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "consolidations" } }, "/api/v1/api/v1/consolidations": { "post": { "tags": [ "Consolidations", "Consolidations" ], "summary": "Create Consolidation", "description": "Create a consolidated summary memory and persist a consolidation record.", "operationId": "create_consolidation_api_v1_api_v1_consolidations_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateConsolidationRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConsolidationRecordResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "consolidations" } }, "/api/v1/api/v1/consolidations/memories/{memory_id}/status": { "get": { "tags": [ "Consolidations", "Consolidations" ], "summary": "Get Memory Consolidation Status", "description": "Get in-place consolidation status for a given memory.", "operationId": "get_memory_consolidation_status_api_v1_api_v1_consolidations_memories__memory_id__status_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConsolidationStatus" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "consolidations" } }, "/api/v1/api/v1/consolidations/{consolidation_id}": { "get": { "tags": [ "Consolidations", "Consolidations" ], "summary": "Get Consolidation Record", "operationId": "get_consolidation_record_api_v1_api_v1_consolidations__consolidation_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "consolidation_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Consolidation Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConsolidationRecordResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "consolidations" }, "delete": { "tags": [ "Consolidations", "Consolidations" ], "summary": "Delete Consolidation Record", "operationId": "delete_consolidation_record_api_v1_api_v1_consolidations__consolidation_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "consolidation_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Consolidation Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "consolidations" } }, "/api/v1/v1/consolidation/start": { "post": { "tags": [ "Consolidation PR-2", "consolidation-pr2" ], "summary": "Start Consolidation Session", "description": "Trigger a full PR-2 memory consolidation cycle.", "operationId": "start_consolidation_session_api_v1_v1_consolidation_start_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConsolidationStartRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConsolidationSessionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "consolidation-pr-2" } }, "/api/v1/v1/consolidation/sessions": { "get": { "tags": [ "Consolidation PR-2", "consolidation-pr2" ], "summary": "List Consolidation Sessions", "description": "List recent consolidation sessions.", "operationId": "list_consolidation_sessions_api_v1_v1_consolidation_sessions_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Limit" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConsolidationSessionsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "consolidation-pr-2" } }, "/api/v1/v1/consolidation/{session_id}/report": { "get": { "tags": [ "Consolidation PR-2", "consolidation-pr2" ], "summary": "Get Consolidation Report", "description": "Get detailed report for one consolidation session.", "operationId": "get_consolidation_report_api_v1_v1_consolidation__session_id__report_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConsolidationSessionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "consolidation-pr-2" } }, "/api/v1/v1/memory/{memory_id}/arc": { "get": { "tags": [ "Consolidation PR-2", "consolidation-pr2" ], "summary": "Get Memory Arc", "description": "Return trajectory analysis for a single memory.", "operationId": "get_memory_arc_api_v1_v1_memory__memory_id__arc_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryArcResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "consolidation-pr-2" } }, "/api/v1/v1/consolidation/pin/{memory_id}": { "post": { "tags": [ "Consolidation PR-2", "consolidation-pr2" ], "summary": "Pin Memory", "description": "Mark memory as pinned (do not prune during forgetting curve).", "operationId": "pin_memory_api_v1_v1_consolidation_pin__memory_id__post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PinMemoryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "consolidation-pr-2" } }, "/api/v1/v1/consolidation/unpin/{memory_id}": { "post": { "tags": [ "Consolidation PR-2", "consolidation-pr2" ], "summary": "Unpin Memory", "description": "Remove pinned flag for memory pruning eligibility.", "operationId": "unpin_memory_api_v1_v1_consolidation_unpin__memory_id__post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PinMemoryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "consolidation-pr-2" } }, "/api/v1/v1/autonomous-goals/": { "get": { "tags": [ "Autonomous Goals PR-3", "autonomous-goals" ], "summary": "List Autonomous Goals", "description": "List autonomous goals with optional filtering.\n\nQuery parameters:\n- status: Filter by status (proposed|active|completed|abandoned)\n- initiator: Filter by initiator (curiosity|prediction|self_improvement|priority_rebalance)\n- sort_by: Sort field (urgency|expected_value|created_at)\n- limit: Max results (1-500)", "operationId": "list_autonomous_goals_api_v1_v1_autonomous_goals__get", "parameters": [ { "name": "status", "in": "query", "required": false, "schema": { "type": "string", "title": "Status" } }, { "name": "initiator", "in": "query", "required": false, "schema": { "type": "string", "title": "Initiator" } }, { "name": "sort_by", "in": "query", "required": false, "schema": { "type": "string", "default": "urgency", "title": "Sort By" } }, { "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": { "type": "array", "items": { "$ref": "#/components/schemas/AutonomousGoalResponse" }, "title": "Response List Autonomous Goals Api V1 V1 Autonomous Goals Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "autonomous-goals-pr-3" }, "post": { "tags": [ "Autonomous Goals PR-3", "autonomous-goals" ], "summary": "Create Autonomous Goal", "description": "Create a new autonomous goal.\n\nThis endpoint is typically used internally by the goal generation pipeline,\nbut can also be used to manually create goals for testing.", "operationId": "create_autonomous_goal_api_v1_v1_autonomous_goals__post", "parameters": [ { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Organization ID", "title": "Org Id" }, "description": "Organization ID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutonomousGoalCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutonomousGoalResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "autonomous-goals-pr-3" } }, "/api/v1/v1/autonomous-goals/{goal_id}": { "get": { "tags": [ "Autonomous Goals PR-3", "autonomous-goals" ], "summary": "Get Autonomous Goal", "description": "Get a specific autonomous goal by ID.", "operationId": "get_autonomous_goal_api_v1_v1_autonomous_goals__goal_id__get", "parameters": [ { "name": "goal_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Goal Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutonomousGoalResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "autonomous-goals-pr-3" }, "patch": { "tags": [ "Autonomous Goals PR-3", "autonomous-goals" ], "summary": "Update Autonomous Goal", "description": "Update an autonomous goal.", "operationId": "update_autonomous_goal_api_v1_v1_autonomous_goals__goal_id__patch", "parameters": [ { "name": "goal_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Goal Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutonomousGoalUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutonomousGoalResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "autonomous-goals-pr-3" } }, "/api/v1/v1/autonomous-goals/{goal_id}/complete": { "post": { "tags": [ "Autonomous Goals PR-3", "autonomous-goals" ], "summary": "Complete Autonomous Goal", "description": "Mark an autonomous goal as completed.\n\nArgs:\n goal_id: Goal ID\n completion_evidence: Memory IDs proving goal completion", "operationId": "complete_autonomous_goal_api_v1_v1_autonomous_goals__goal_id__complete_post", "parameters": [ { "name": "goal_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Goal Id" } }, { "name": "completion_evidence", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "default": [], "title": "Completion Evidence" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutonomousGoalResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "autonomous-goals-pr-3" } }, "/api/v1/v1/autonomous-goals/knowledge-gaps": { "get": { "tags": [ "Autonomous Goals PR-3", "autonomous-goals" ], "summary": "List Knowledge Gaps", "description": "List detected knowledge gaps.\n\nQuery parameters:\n- domain: Filter by domain (e.g., \"customer_preferences\")\n- gap_type: Filter by type (missing_fact|contradiction|outdated|low_confidence)\n- resolved: Show only resolved gaps (default: False)\n- limit: Max results", "operationId": "list_knowledge_gaps_api_v1_v1_autonomous_goals_knowledge_gaps_get", "parameters": [ { "name": "domain", "in": "query", "required": false, "schema": { "type": "string", "title": "Domain" } }, { "name": "gap_type", "in": "query", "required": false, "schema": { "type": "string", "title": "Gap Type" } }, { "name": "resolved", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Resolved" } }, { "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": { "type": "array", "items": { "$ref": "#/components/schemas/KnowledgeGapResponse" }, "title": "Response List Knowledge Gaps Api V1 V1 Autonomous Goals Knowledge Gaps Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "autonomous-goals-pr-3" }, "post": { "tags": [ "Autonomous Goals PR-3", "autonomous-goals" ], "summary": "Create Knowledge Gap", "description": "Create a new knowledge gap record.", "operationId": "create_knowledge_gap_api_v1_v1_autonomous_goals_knowledge_gaps_post", "parameters": [ { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Organization ID", "title": "Org Id" }, "description": "Organization ID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeGapCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeGapResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "autonomous-goals-pr-3" } }, "/api/v1/v1/autonomous-goals/{goal_id}/outcomes": { "post": { "tags": [ "Autonomous Goals PR-3", "autonomous-goals" ], "summary": "Record Goal Outcome", "description": "Record the outcome of an autonomous goal.\n\nUsed to track whether goals were valuable, helping improve future\ngoal generation through reinforcement learning.", "operationId": "record_goal_outcome_api_v1_v1_autonomous_goals__goal_id__outcomes_post", "parameters": [ { "name": "goal_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Goal Id" } }, { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Organization ID", "title": "Org Id" }, "description": "Organization ID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GoalOutcomeCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GoalOutcomeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "autonomous-goals-pr-3" } }, "/api/v1/v1/autonomous-goals/generate": { "post": { "tags": [ "Autonomous Goals PR-3", "autonomous-goals" ], "summary": "Generate Autonomous Goals", "description": "Generate autonomous goals based on intrinsic motivation.\n\nThis endpoint orchestrates the full autonomous goal generation pipeline:\n1. Detect knowledge gaps\n2. Generate curiosity goals from gaps\n3. Predict user needs\n4. Identify self-improvement opportunities\n5. Estimate value for each goal\n6. Propose and auto-activate top goals", "operationId": "generate_autonomous_goals_api_v1_v1_autonomous_goals_generate_post", "parameters": [ { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Organization ID", "title": "Org Id" }, "description": "Organization ID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenerateGoalsRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenerateGoalsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "autonomous-goals-pr-3" } }, "/api/v1/v1/autonomous-goals/metrics": { "get": { "tags": [ "Autonomous Goals PR-3", "autonomous-goals" ], "summary": "Get Motivation Metrics", "description": "Get metrics on autonomous goal generation quality.\n\nReturns statistics on:\n- Goal success rates (valuable goals / total)\n- User expectation alignment\n- Time to completion\n- Performance by initiator type", "operationId": "get_motivation_metrics_api_v1_v1_autonomous_goals_metrics_get", "parameters": [ { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Organization ID", "title": "Org Id" }, "description": "Organization ID" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MotivationMetrics" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "autonomous-goals-pr-3" } }, "/api/v1/v1/tools/capabilities": { "post": { "tags": [ "Tool Learning PR-4", "adaptive_strategy" ], "summary": "Register Tool Capability", "description": "Register or update a tool capability.\n\nTool capabilities track learned performance metrics for tools,\nenabling the agent to adapt its tool selection over time.", "operationId": "register_tool_capability_api_v1_v1_tools_capabilities_post", "parameters": [ { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Org Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolCapabilityCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolCapabilityResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "tool-learning-pr-4" }, "get": { "tags": [ "Tool Learning PR-4", "adaptive_strategy" ], "summary": "List Tool Capabilities", "description": "List all registered tool capabilities for an organization.\n\nOptionally filter by tool type or minimum reliability score.", "operationId": "list_tool_capabilities_api_v1_v1_tools_capabilities_get", "parameters": [ { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Org Id" } }, { "name": "tool_type", "in": "query", "required": false, "schema": { "type": "string", "title": "Tool Type" } }, { "name": "min_reliability", "in": "query", "required": false, "schema": { "type": "number", "default": 0.0, "title": "Min Reliability" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response List Tool Capabilities Api V1 V1 Tools Capabilities Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "tool-learning-pr-4" } }, "/api/v1/v1/tools/usage": { "post": { "tags": [ "Tool Learning PR-4", "adaptive_strategy" ], "summary": "Record Tool Usage", "description": "Record tool usage to update performance metrics.\n\nThis feedback helps the agent learn which tools are most effective\nfor different types of tasks.", "operationId": "record_tool_usage_api_v1_v1_tools_usage_post", "parameters": [ { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Org Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolUsageRecord" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolUsageResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "tool-learning-pr-4" } }, "/api/v1/v1/tools/recommendation": { "post": { "tags": [ "Tool Learning PR-4", "adaptive_strategy" ], "summary": "Get Tool Recommendation", "description": "Get the best tool recommendation for a goal type.\n\nUses learned performance metrics to rank tools and recommend\nthe most effective one based on success rates and efficiency.", "operationId": "get_tool_recommendation_api_v1_v1_tools_recommendation_post", "parameters": [ { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Org Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolRecommendationRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolRecommendationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "tool-learning-pr-4" } }, "/api/v1/v1/tools/recommendations": { "get": { "tags": [ "Tool Learning PR-4", "adaptive_strategy" ], "summary": "List Tool Recommendations", "description": "Get ranked list of tool recommendations for a goal.\n\nReturns multiple tools scored by reliability and success rate,\nallowing the agent to make informed choices.", "operationId": "list_tool_recommendations_api_v1_v1_tools_recommendations_get", "parameters": [ { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Org Id" } }, { "name": "goal_type", "in": "query", "required": true, "schema": { "type": "string", "title": "Goal Type" } }, { "name": "domain", "in": "query", "required": false, "schema": { "type": "string", "default": "", "title": "Domain" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 5, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ToolRecommendationsListResponse" }, "title": "Response List Tool Recommendations Api V1 V1 Tools Recommendations Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "tool-learning-pr-4" } }, "/api/v1/v1/tools/strategies/adaptation": { "post": { "tags": [ "Tool Learning PR-4", "adaptive_strategy" ], "summary": "Record Strategy Adaptation", "description": "Record strategy adaptation for a goal.\n\nTracks when the agent switches tools/strategies, why it made the change,\nand enables measurement of adaptation effectiveness.", "operationId": "record_strategy_adaptation_api_v1_v1_tools_strategies_adaptation_post", "parameters": [ { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Org Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StrategyAdaptationRecord" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StrategyAdaptationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "tool-learning-pr-4" } }, "/api/v1/v1/tools/strategies/{goal_id}": { "get": { "tags": [ "Tool Learning PR-4", "adaptive_strategy" ], "summary": "Get Strategy History", "description": "Get strategy adaptation history for a goal.\n\nReturns all strategy changes made for a specific goal in chronological order,\nallowing analysis of the agent's learning process.", "operationId": "get_strategy_history_api_v1_v1_tools_strategies__goal_id__get", "parameters": [ { "name": "goal_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Goal Id" } }, { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Org Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/StrategyHistoryEntry" }, "title": "Response Get Strategy History Api V1 V1 Tools Strategies Goal Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "tool-learning-pr-4" } }, "/api/v1/v1/tools/discoveries": { "post": { "tags": [ "Tool Learning PR-4", "adaptive_strategy" ], "summary": "Record Capability Discovery", "description": "Record a discovered tool or capability.\n\nTracks new tool discoveries, capability gaps, and synergies\nthat should be investigated further.", "operationId": "record_capability_discovery_api_v1_v1_tools_discoveries_post", "parameters": [ { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Org Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CapabilityDiscoveryRecord" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CapabilityDiscoveryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "tool-learning-pr-4" } }, "/api/v1/v1/tools/discoveries/backlog": { "get": { "tags": [ "Tool Learning PR-4", "adaptive_strategy" ], "summary": "Get Discovery Backlog", "description": "Get pending capability discoveries for investigation.\n\nReturns discoveries that haven't been validated yet,\nprioritized by potential value.", "operationId": "get_discovery_backlog_api_v1_v1_tools_discoveries_backlog_get", "parameters": [ { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Org Id" } }, { "name": "status", "in": "query", "required": false, "schema": { "type": "string", "default": "unvalidated", "title": "Status" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "tool-learning-pr-4" } }, "/api/v1/v1/temporal/facts/tag-validity": { "post": { "tags": [ "Temporal Reasoning PR-5" ], "summary": "Tag Fact Validity", "description": "Tag a fact with temporal validity interval.\n\nArgs:\n request: Temporal fact request with:\n - fact_id: Fact being tagged\n - onset_timestamp: When fact becomes true\n - offset_timestamp: When fact stops being true (optional)\n - confidence: How sure? (0-1)\n - change_type: onset | offset | stable | transient\n\nReturns:\n Temporal fact metadata with ID", "operationId": "tag_fact_validity_api_v1_v1_temporal_facts_tag_validity_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemporalFactRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Tag Fact Validity Api V1 V1 Temporal Facts Tag Validity Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "temporal-reasoning-pr-5" } }, "/api/v1/v1/temporal/sequences/detect": { "post": { "tags": [ "Temporal Reasoning PR-5" ], "summary": "Detect Sequences", "description": "Detect recurring event sequences.\n\nArgs:\n requests: List of sequence detection requests with:\n - entities: Ordered list of entity IDs\n - min_gap_seconds: Minimum gap between events\n - max_gap_seconds: Maximum gap between events\n - min_strength: Minimum pattern strength (0-1)\n\nReturns:\n List of detected sequences with pattern metadata", "operationId": "detect_sequences_api_v1_v1_temporal_sequences_detect_post", "requestBody": { "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/TemporalSequenceRequest" }, "type": "array", "title": "Requests" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Detect Sequences Api V1 V1 Temporal Sequences Detect Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "temporal-reasoning-pr-5" } }, "/api/v1/v1/temporal/trajectories/compute": { "post": { "tags": [ "Temporal Reasoning PR-5" ], "summary": "Compute Trajectory", "description": "Analyze how quantities change over time.\n\nArgs:\n requests: List of trajectory requests with:\n - entity_id: What entity (user, problem, metric)\n - quantity: What metric (sentiment, strength, rate)\n - measurements: List of {timestamp, value} measurements\n\nReturns:\n Trajectory analysis with trend, inflection points, forecast", "operationId": "compute_trajectory_api_v1_v1_temporal_trajectories_compute_post", "requestBody": { "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/TrajectoryRequest" }, "type": "array", "title": "Requests" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Compute Trajectory Api V1 V1 Temporal Trajectories Compute Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "temporal-reasoning-pr-5" } }, "/api/v1/v1/temporal/trajectories/forecast": { "post": { "tags": [ "Temporal Reasoning PR-5" ], "summary": "Forecast Trajectory", "description": "Forecast future values for a trajectory.\n\nArgs:\n request: Forecast request with:\n - entity_id: ID of trajectory to forecast\n - horizon_steps: How many periods ahead?\n - confidence_level: Desired confidence (0.8-0.99)\n\nReturns:\n List of forecasts with confidence intervals", "operationId": "forecast_trajectory_api_v1_v1_temporal_trajectories_forecast_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForecastRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Forecast Trajectory Api V1 V1 Temporal Trajectories Forecast Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "temporal-reasoning-pr-5" } }, "/api/v1/v1/temporal/trajectories/{entity_id}/inflection-points": { "get": { "tags": [ "Temporal Reasoning PR-5" ], "summary": "Get Inflection Points", "description": "Identify significant changes in trajectory.\n\nArgs:\n entity_id: ID of trajectory to analyze\n sensitivity: How many std devs = inflection point?\n\nReturns:\n List of inflection points with timestamps and severity", "operationId": "get_inflection_points_api_v1_v1_temporal_trajectories__entity_id__inflection_points_get", "parameters": [ { "name": "entity_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Entity Id" } }, { "name": "sensitivity", "in": "query", "required": false, "schema": { "type": "number", "maximum": 3.0, "minimum": 0.5, "default": 1.5, "title": "Sensitivity" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Get Inflection Points Api V1 V1 Temporal Trajectories Entity Id Inflection Points Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "temporal-reasoning-pr-5" } }, "/api/v1/v1/temporal/query": { "get": { "tags": [ "Temporal Reasoning PR-5" ], "summary": "Temporal Query", "description": "Execute SQL-like temporal queries.\n\nExamples:\n- query_type=facts_valid_at_time×tamp=2026-03-01T12:00:00\n- query_type=facts_updated_after&after=2026-02-01T00:00:00\n- query_type=trajectory_crosses_threshold&entity_id=xyz&threshold=0.8\n\nArgs:\n query_type: Type of temporal query\n timestamp: Query timestamp (ISO format)\n entity_id: Entity to query\n threshold: Threshold value for crossing queries\n start_time: Query start time\n end_time: Query end time\n\nReturns:\n Query results", "operationId": "temporal_query_api_v1_v1_temporal_query_get", "parameters": [ { "name": "query_type", "in": "query", "required": true, "schema": { "type": "string", "description": "facts_valid_at_time | facts_updated_after | trajectory_crosses_threshold", "title": "Query Type" }, "description": "facts_valid_at_time | facts_updated_after | trajectory_crosses_threshold" }, { "name": "timestamp", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Timestamp" } }, { "name": "entity_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Entity Id" } }, { "name": "threshold", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Threshold" } }, { "name": "start_time", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Start Time" } }, { "name": "end_time", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "End Time" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Temporal Query Api V1 V1 Temporal Query Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "temporal-reasoning-pr-5" } }, "/api/v1/v1/temporal/when-should-act": { "post": { "tags": [ "Temporal Reasoning PR-5" ], "summary": "When Should Act", "description": "Estimate optimal time to act given goal and trajectory.\n\nArgs:\n request: Action timing request with:\n - entity_id: Entity to analyze\n - threshold: Critical threshold value\n - measurements: Current measurements\n - lookahead_hours: How far to look ahead?\n\nReturns:\n Recommended action time and reasoning", "operationId": "when_should_act_api_v1_v1_temporal_when_should_act_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActionTimingRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response When Should Act Api V1 V1 Temporal When Should Act Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "temporal-reasoning-pr-5" } }, "/api/v1/v1/meta-cognitive/estimate-complexity": { "get": { "tags": [ "Meta-Cognitive Planning PR-6" ], "summary": "Estimate Complexity", "operationId": "estimate_complexity_api_v1_v1_meta_cognitive_estimate_complexity_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "query", "in": "query", "required": true, "schema": { "type": "string", "description": "Query text to estimate complexity for", "title": "Query" }, "description": "Query text to estimate complexity for" }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ComplexityResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "meta-cognitive-planning-pr-6" } }, "/api/v1/v1/meta-cognitive/strategy": { "post": { "tags": [ "Meta-Cognitive Planning PR-6" ], "summary": "Select Strategy", "operationId": "select_strategy_api_v1_v1_meta_cognitive_strategy_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StrategyRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StrategyResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "meta-cognitive-planning-pr-6" } }, "/api/v1/v1/meta-cognitive/confidence-calibration": { "get": { "tags": [ "Meta-Cognitive Planning PR-6" ], "summary": "Confidence Calibration", "operationId": "confidence_calibration_api_v1_v1_meta_cognitive_confidence_calibration_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConfidenceCalibrationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "meta-cognitive-planning-pr-6" } }, "/api/v1/v1/epistemic-state": { "get": { "tags": [ "Meta-Cognitive Planning PR-6" ], "summary": "Get Epistemic State", "operationId": "get_epistemic_state_api_v1_v1_epistemic_state_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EpistemicStateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "meta-cognitive-planning-pr-6" } }, "/api/v1/v1/composition/abstract-procedure/extract": { "post": { "tags": [ "Compositional Generalization PR-7" ], "summary": "Extract Abstract Procedure", "operationId": "extract_abstract_procedure_api_v1_v1_composition_abstract_procedure_extract_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExtractAbstractProcedureRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Extract Abstract Procedure Api V1 V1 Composition Abstract Procedure Extract Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "compositional-generalization-pr-7" } }, "/api/v1/v1/composition/abstract-procedure/instantiate": { "post": { "tags": [ "Compositional Generalization PR-7" ], "summary": "Instantiate Abstract Procedure", "operationId": "instantiate_abstract_procedure_api_v1_v1_composition_abstract_procedure_instantiate_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstantiateAbstractProcedureRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Instantiate Abstract Procedure Api V1 V1 Composition Abstract Procedure Instantiate Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "compositional-generalization-pr-7" } }, "/api/v1/v1/composition/abstract-procedure/compose": { "post": { "tags": [ "Compositional Generalization PR-7" ], "summary": "Compose Abstract Procedures", "operationId": "compose_abstract_procedures_api_v1_v1_composition_abstract_procedure_compose_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ComposeProceduresRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Compose Abstract Procedures Api V1 V1 Composition Abstract Procedure Compose Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "compositional-generalization-pr-7" } }, "/api/v1/v1/composition/analogies": { "get": { "tags": [ "Compositional Generalization PR-7" ], "summary": "Find Analogies", "operationId": "find_analogies_api_v1_v1_composition_analogies_get", "parameters": [ { "name": "problem_domain", "in": "query", "required": true, "schema": { "type": "string", "title": "Problem Domain" } }, { "name": "target_domain", "in": "query", "required": true, "schema": { "type": "string", "title": "Target Domain" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FindAnalogiesResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "compositional-generalization-pr-7" } }, "/api/v1/v1/composition/transfer-solution": { "post": { "tags": [ "Compositional Generalization PR-7" ], "summary": "Transfer Solution", "operationId": "transfer_solution_api_v1_v1_composition_transfer_solution_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransferSolutionRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Transfer Solution Api V1 V1 Composition Transfer Solution Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "compositional-generalization-pr-7" } }, "/api/v1/v1/affective/analyze": { "post": { "tags": [ "Emotional & Affective Memory PR-8" ], "summary": "Analyze Emotional Content", "description": "Analyze emotional valence, arousal, and tags from memory content.\n\nReturns:\n- valence: -1.0 (very negative) to +1.0 (very positive)\n- arousal: 0 (calm) to 1 (intense/excited)\n- emotional_tags: categorical emotional labels\n- significance: how emotionally important (0-1)", "operationId": "analyze_emotional_content_api_v1_v1_affective_analyze_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AffectiveMemoryRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AffectiveAnalysisResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "emotional-&-affective-memory-pr-8" } }, "/api/v1/v1/user/{user_id}/emotional-trajectory": { "get": { "tags": [ "Emotional & Affective Memory PR-8" ], "summary": "Get Emotional Trajectory", "description": "Get user's emotional state over time.\n\nReturns trajectory with trend analysis, current state, escalation risk, and\nrecommended de-escalation strategies.", "operationId": "get_emotional_trajectory_api_v1_v1_user__user_id__emotional_trajectory_get", "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } }, { "name": "lookback_days", "in": "query", "required": false, "schema": { "type": "integer", "description": "Days to look back", "default": 30, "title": "Lookback Days" }, "description": "Days to look back" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmotionalTrajectoryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "emotional-&-affective-memory-pr-8" } }, "/api/v1/v1/user/{user_id}/escalation-risk": { "get": { "tags": [ "Emotional & Affective Memory PR-8" ], "summary": "Get Escalation Risk", "description": "Get escalation risk for a user.\n\nReturns:\n- escalation_risk: 0-1 probability of escalation\n- should_escalate_to_human: whether human should take over\n- recommended_strategy: suggested de-escalation approach", "operationId": "get_escalation_risk_api_v1_v1_user__user_id__escalation_risk_get", "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EscalationRiskResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "emotional-&-affective-memory-pr-8" } }, "/api/v1/v1/respond-empathetically": { "post": { "tags": [ "Emotional & Affective Memory PR-8" ], "summary": "Adjust Response Empathetically", "description": "Adjust response tone to match user's emotional state.\n\nMakes response more empathetic by:\n- Adding validation of feelings\n- Matching arousal level\n- Personalizing to emotional context", "operationId": "adjust_response_empathetically_api_v1_v1_respond_empathetically_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmpatheticResponseRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmpatheticResponseResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "emotional-&-affective-memory-pr-8" } }, "/api/v1/v1/interaction-outcome": { "post": { "tags": [ "Emotional & Affective Memory PR-8" ], "summary": "Record Interaction Outcome", "description": "Record the outcome of an emotional interaction.\n\nUsed for:\n- Training emotion detection\n- Understanding escalation patterns\n- Improving de-escalation strategies", "operationId": "record_interaction_outcome_api_v1_v1_interaction_outcome_post", "parameters": [ { "name": "user_id", "in": "query", "required": true, "schema": { "type": "string", "title": "User Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InteractionOutcomeRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InteractionOutcomeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "emotional-&-affective-memory-pr-8" } }, "/api/v1/federated/contribute-pattern": { "post": { "tags": [ "Federated Memory & Collective Intelligence PR-10", "federated-memory" ], "summary": "Contribute Pattern", "description": "Contribute organization's anonymized patterns to federation.\n\nRequires privacy policy allowing pattern_sharing.\nPatterns are anonymized and aggregated with peer organizations.", "operationId": "contribute_pattern_api_v1_federated_contribute_pattern_post", "parameters": [ { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "title": "Org Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContributePatternRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FederatedKnowledgeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "federated-memory-&-collective-intelligence-pr-10" } }, "/api/v1/federated/contribute-playbook": { "post": { "tags": [ "Federated Memory & Collective Intelligence PR-10", "federated-memory" ], "summary": "Contribute Playbook", "description": "Share a playbook with the federation.\n\nPublicity levels:\n- private: Not shared\n- org_only: Within organization\n- peer_group: Similar organizations\n- public: All federation members", "operationId": "contribute_playbook_api_v1_federated_contribute_playbook_post", "parameters": [ { "name": "org_id", "in": "query", "required": true, "schema": { "type": "string", "title": "Org Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContributePlaybookRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContributePlaybookResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "federated-memory-&-collective-intelligence-pr-10" } }, "/api/v1/federated/knowledge": { "get": { "tags": [ "Federated Memory & Collective Intelligence PR-10", "federated-memory" ], "summary": "Get Federated Knowledge", "description": "Retrieve relevant aggregated knowledge from federation.\n\nReturns cross-organizational insights, best practices, and patterns\nrelevant to the specified domain and problem type.", "operationId": "get_federated_knowledge_api_v1_federated_knowledge_get", "parameters": [ { "name": "domain", "in": "query", "required": true, "schema": { "type": "string", "title": "Domain" } }, { "name": "problem_type", "in": "query", "required": false, "schema": { "type": "string", "title": "Problem Type" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 10, "title": "Limit" } }, { "name": "org_id", "in": "query", "required": false, "schema": { "type": "string", "default": "default_org", "title": "Org Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/FederatedKnowledgeResponse" }, "title": "Response Get Federated Knowledge Api V1 Federated Knowledge Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "federated-memory-&-collective-intelligence-pr-10" } }, "/api/v1/federated/knowledge/{knowledge_id}/validate": { "post": { "tags": [ "Federated Memory & Collective Intelligence PR-10", "federated-memory" ], "summary": "Validate Knowledge", "description": "Provide feedback on federated knowledge usefulness.\n\nQuality scores improve when multiple organizations validate.", "operationId": "validate_knowledge_api_v1_federated_knowledge__knowledge_id__validate_post", "parameters": [ { "name": "knowledge_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Knowledge Id" } }, { "name": "org_id", "in": "query", "required": false, "schema": { "type": "string", "default": "default_org", "title": "Org Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidateFederatedKnowledgeRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "federated-memory-&-collective-intelligence-pr-10" } }, "/api/v1/federated/contributions": { "get": { "tags": [ "Federated Memory & Collective Intelligence PR-10", "federated-memory" ], "summary": "Get Contribution Stats", "description": "Get statistics about organization's contributions to federation.\n\nShows impact of shared knowledge and contribution trends.", "operationId": "get_contribution_stats_api_v1_federated_contributions_get", "parameters": [ { "name": "org_id", "in": "query", "required": false, "schema": { "type": "string", "default": "default_org", "title": "Org Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContributionStatsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "federated-memory-&-collective-intelligence-pr-10" } }, "/api/v1/federated/benchmarks/compute": { "post": { "tags": [ "Federated Memory & Collective Intelligence PR-10", "federated-memory" ], "summary": "Compute Benchmarks", "description": "Compute organization's performance benchmarks vs peer group.\n\nMetrics:\n- memory_quality: Overall memory system health\n- response_time: Average response latency\n- customer_satisfaction: User satisfaction scores\n- tool_success_rate: Tool execution success\n- knowledge_coverage: Breadth of domains", "operationId": "compute_benchmarks_api_v1_federated_benchmarks_compute_post", "parameters": [ { "name": "org_id", "in": "query", "required": false, "schema": { "type": "string", "default": "default_org", "title": "Org Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ComputeBenchmarksRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrgBenchmarkResponse" }, "title": "Response Compute Benchmarks Api V1 Federated Benchmarks Compute Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "federated-memory-&-collective-intelligence-pr-10" } }, "/api/v1/federated/benchmarks/report": { "get": { "tags": [ "Federated Memory & Collective Intelligence PR-10", "federated-memory" ], "summary": "Get Benchmark Report", "description": "Generate comprehensive benchmarking report.\n\nIncludes:\n- Overall health score and percentile ranking\n- Per-metric performance vs peers\n- Trend analysis (improving/stable/declining)\n- Actionable recommendations", "operationId": "get_benchmark_report_api_v1_federated_benchmarks_report_get", "parameters": [ { "name": "org_id", "in": "query", "required": false, "schema": { "type": "string", "default": "default_org", "title": "Org Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BenchmarkReportResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "federated-memory-&-collective-intelligence-pr-10" } }, "/api/v1/federated/benchmarks/history/{metric_type}": { "get": { "tags": [ "Federated Memory & Collective Intelligence PR-10", "federated-memory" ], "summary": "Get Benchmark History", "description": "Get historical benchmark data for trend analysis.\n\nShows how organization's performance has evolved over time.", "operationId": "get_benchmark_history_api_v1_federated_benchmarks_history__metric_type__get", "parameters": [ { "name": "metric_type", "in": "path", "required": true, "schema": { "type": "string", "title": "Metric Type" } }, { "name": "lookback_days", "in": "query", "required": false, "schema": { "type": "integer", "default": 90, "title": "Lookback Days" } }, { "name": "org_id", "in": "query", "required": false, "schema": { "type": "string", "default": "default_org", "title": "Org Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BenchmarkHistoryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "federated-memory-&-collective-intelligence-pr-10" } }, "/api/v1/federated/benchmarks/compare-target": { "post": { "tags": [ "Federated Memory & Collective Intelligence PR-10", "federated-memory" ], "summary": "Compare With Target", "description": "Compare organization's performance against target percentile.\n\nIdentifies priority gaps and provides improvement roadmap.", "operationId": "compare_with_target_api_v1_federated_benchmarks_compare_target_post", "parameters": [ { "name": "org_id", "in": "query", "required": false, "schema": { "type": "string", "default": "default_org", "title": "Org Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TargetComparisonRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TargetComparisonResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "federated-memory-&-collective-intelligence-pr-10" } }, "/api/v1/federated/privacy-policy": { "post": { "tags": [ "Federated Memory & Collective Intelligence PR-10", "federated-memory" ], "summary": "Create Or Update Privacy Policy", "description": "Create or update organization's privacy policy for federation.\n\nControls:\n- What data can be shared\n- Anonymization requirements\n- Excluded domains\n- Benchmark participation", "operationId": "create_or_update_privacy_policy_api_v1_federated_privacy_policy_post", "parameters": [ { "name": "org_id", "in": "query", "required": false, "schema": { "type": "string", "default": "default_org", "title": "Org Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PrivacyPolicyCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PrivacyPolicyResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "federated-memory-&-collective-intelligence-pr-10" }, "get": { "tags": [ "Federated Memory & Collective Intelligence PR-10", "federated-memory" ], "summary": "Get Privacy Policy", "description": "Retrieve organization's current privacy policy.", "operationId": "get_privacy_policy_api_v1_federated_privacy_policy_get", "parameters": [ { "name": "org_id", "in": "query", "required": false, "schema": { "type": "string", "default": "default_org", "title": "Org Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PrivacyPolicyResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "federated-memory-&-collective-intelligence-pr-10" } }, "/api/v1/federated/privacy/add-noise": { "post": { "tags": [ "Federated Memory & Collective Intelligence PR-10", "federated-memory" ], "summary": "Add Differential Privacy Noise", "description": "Add differential privacy noise to data.\n\nImplements Laplace mechanism for \u03b5-differential privacy.", "operationId": "add_differential_privacy_noise_api_v1_federated_privacy_add_noise_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddNoiseRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddNoiseResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "federated-memory-&-collective-intelligence-pr-10" } }, "/api/v1/federated/privacy/private-aggregate": { "post": { "tags": [ "Federated Memory & Collective Intelligence PR-10", "federated-memory" ], "summary": "Compute Private Aggregate", "description": "Compute aggregate statistic with differential privacy.\n\nSupported aggregations: mean, median, sum, count, variance", "operationId": "compute_private_aggregate_api_v1_federated_privacy_private_aggregate_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Body_compute_private_aggregate_api_v1_federated_privacy_private_aggregate_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PrivateAggregateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "federated-memory-&-collective-intelligence-pr-10" } }, "/api/v1/federated/privacy/reidentification-risk": { "post": { "tags": [ "Federated Memory & Collective Intelligence PR-10", "federated-memory" ], "summary": "Estimate Reidentification Risk", "description": "Estimate risk of re-identifying an organization from aggregated data.\n\nFactors:\n- Number of contributing orgs (more = lower risk)\n- Data dimensionality (higher = higher risk)\n- Privacy budget epsilon (larger = higher risk)", "operationId": "estimate_reidentification_risk_api_v1_federated_privacy_reidentification_risk_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReidentificationRiskRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReidentificationRiskResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "federated-memory-&-collective-intelligence-pr-10" } }, "/api/v1/federated/health": { "get": { "tags": [ "Federated Memory & Collective Intelligence PR-10", "federated-memory" ], "summary": "Get Federation Health", "description": "Get overall federation health metrics.\n\nShows participation rates, knowledge quality, and privacy compliance.", "operationId": "get_federation_health_api_v1_federated_health_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FederationHealthResponse" } } } } }, "x-ninai-cognitive-domain": "federated-memory-&-collective-intelligence-pr-10" } }, "/api/v1/events/": { "get": { "tags": [ "Events & Batch Operations", "events_and_batch" ], "summary": "List Events", "description": "List events for the organization.\n\nSupports filtering by event_type, resource_type, resource_id.", "operationId": "list_events_api_v1_events__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "event_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Event Type" } }, { "name": "resource_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resource Type" } }, { "name": "resource_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resource Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 100, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EventListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "events-&-batch-operations" } }, "/api/v1/events/webhooks": { "post": { "tags": [ "Events & Batch Operations", "events_and_batch" ], "summary": "Create Webhook", "description": "Create a new webhook subscription.", "operationId": "create_webhook_api_v1_events_webhooks_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookSubscriptionCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/app__schemas__event_publishing__WebhookSubscriptionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "events-&-batch-operations" }, "get": { "tags": [ "Events & Batch Operations", "events_and_batch" ], "summary": "List Webhooks", "description": "List webhook subscriptions for the organization.", "operationId": "list_webhooks_api_v1_events_webhooks_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 100, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookSubscriptionListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "events-&-batch-operations" } }, "/api/v1/events/webhooks/{subscription_id}": { "patch": { "tags": [ "Events & Batch Operations", "events_and_batch" ], "summary": "Update Webhook", "description": "Update a webhook subscription.", "operationId": "update_webhook_api_v1_events_webhooks__subscription_id__patch", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "subscription_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Subscription Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookSubscriptionUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/app__schemas__event_publishing__WebhookSubscriptionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "events-&-batch-operations" }, "delete": { "tags": [ "Events & Batch Operations", "events_and_batch" ], "summary": "Delete Webhook", "description": "Delete a webhook subscription.", "operationId": "delete_webhook_api_v1_events_webhooks__subscription_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "subscription_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Subscription Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "events-&-batch-operations" } }, "/api/v1/events/batch/memory/update": { "post": { "tags": [ "Events & Batch Operations", "events_and_batch" ], "summary": "Batch Update Memory", "description": "Bulk update memory items.", "operationId": "batch_update_memory_api_v1_events_batch_memory_update_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BatchUpdateMemoryRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BatchOperationResult" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "events-&-batch-operations" } }, "/api/v1/events/batch/memory/delete": { "post": { "tags": [ "Events & Batch Operations", "events_and_batch" ], "summary": "Batch Delete Memory", "description": "Bulk delete memory items.", "operationId": "batch_delete_memory_api_v1_events_batch_memory_delete_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BatchDeleteMemoryRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BatchOperationResult" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "events-&-batch-operations" } }, "/api/v1/events/batch/memory/share": { "post": { "tags": [ "Events & Batch Operations", "events_and_batch" ], "summary": "Batch Share Memory", "description": "Bulk share memory items.", "operationId": "batch_share_memory_api_v1_events_batch_memory_share_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BatchShareMemoryRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BatchOperationResult" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "events-&-batch-operations" } }, "/api/v1/events/batch/knowledge/update": { "post": { "tags": [ "Events & Batch Operations", "events_and_batch" ], "summary": "Batch Update Knowledge", "description": "Bulk update knowledge items.", "operationId": "batch_update_knowledge_api_v1_events_batch_knowledge_update_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BatchUpdateKnowledgeRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BatchOperationResult" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "events-&-batch-operations" } }, "/api/v1/events/batch/knowledge/delete": { "post": { "tags": [ "Events & Batch Operations", "events_and_batch" ], "summary": "Batch Delete Knowledge", "description": "Bulk delete knowledge items.", "operationId": "batch_delete_knowledge_api_v1_events_batch_knowledge_delete_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BatchDeleteKnowledgeRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BatchOperationResult" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "events-&-batch-operations" } }, "/api/v1/events/snapshots": { "post": { "tags": [ "Events & Batch Operations", "events_and_batch" ], "summary": "Create Snapshot", "description": "Create a snapshot/export of memory or knowledge items.", "operationId": "create_snapshot_api_v1_events_snapshots_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/app__schemas__event_publishing__SnapshotCreateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/app__schemas__event_publishing__SnapshotResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "events-&-batch-operations" }, "get": { "tags": [ "Events & Batch Operations", "events_and_batch" ], "summary": "List Snapshots", "description": "List snapshots for the organization.", "operationId": "list_snapshots_api_v1_events_snapshots_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "resource_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resource Type" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 100, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SnapshotListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "events-&-batch-operations" } }, "/api/v1/events/snapshots/{snapshot_id}": { "get": { "tags": [ "Events & Batch Operations", "events_and_batch" ], "summary": "Get Snapshot", "description": "Get a specific snapshot.", "operationId": "get_snapshot_api_v1_events_snapshots__snapshot_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "snapshot_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Snapshot Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/app__schemas__event_publishing__SnapshotResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "events-&-batch-operations" }, "delete": { "tags": [ "Events & Batch Operations", "events_and_batch" ], "summary": "Delete Snapshot", "description": "Delete a snapshot.", "operationId": "delete_snapshot_api_v1_events_snapshots__snapshot_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "snapshot_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Snapshot Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "events-&-batch-operations" } }, "/api/v1/mfa/status": { "get": { "tags": [ "MFA", "mfa" ], "summary": "Get Mfa Status", "description": "Get MFA status and enrolled devices for current user", "operationId": "get_mfa_status_api_v1_mfa_status_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MFAStatusResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "mfa" } }, "/api/v1/mfa/totp/setup": { "post": { "tags": [ "MFA", "mfa" ], "summary": "Setup Totp", "description": "Setup TOTP for current user", "operationId": "setup_totp_api_v1_mfa_totp_setup_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TOTPSetupRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TOTPSetupResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "mfa" } }, "/api/v1/mfa/totp/verify": { "post": { "tags": [ "MFA", "mfa" ], "summary": "Verify Totp", "description": "Verify TOTP token to complete setup", "operationId": "verify_totp_api_v1_mfa_totp_verify_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TOTPVerifyRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TOTPVerifyResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "mfa" } }, "/api/v1/mfa/totp/verify-login": { "post": { "tags": [ "MFA", "mfa" ], "summary": "Verify Totp Login", "description": "Verify TOTP token during login", "operationId": "verify_totp_login_api_v1_mfa_totp_verify_login_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TOTPVerifyRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TOTPVerifyResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "mfa" } }, "/api/v1/mfa/sms/setup": { "post": { "tags": [ "MFA", "mfa" ], "summary": "Setup Sms", "description": "Setup SMS OTP for current user", "operationId": "setup_sms_api_v1_mfa_sms_setup_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SMSSetupRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SMSSetupResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "mfa" } }, "/api/v1/mfa/sms/send-otp": { "post": { "tags": [ "MFA", "mfa" ], "summary": "Send Sms Otp", "description": "Send OTP via SMS", "operationId": "send_sms_otp_api_v1_mfa_sms_send_otp_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SMSSendOTPRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "mfa" } }, "/api/v1/mfa/sms/verify-otp": { "post": { "tags": [ "MFA", "mfa" ], "summary": "Verify Sms Otp", "description": "Verify SMS OTP", "operationId": "verify_sms_otp_api_v1_mfa_sms_verify_otp_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SMSOTPVerifyRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SMSOTPVerifyResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "mfa" } }, "/api/v1/backups/create": { "post": { "tags": [ "Backups", "backups" ], "summary": "Create Backup", "description": "Create a new database backup", "operationId": "create_backup_api_v1_backups_create_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateBackupRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateBackupResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "backups" } }, "/api/v1/backups/statistics": { "get": { "tags": [ "Backups", "backups" ], "summary": "Get Backup Statistics", "description": "Get backup statistics", "operationId": "get_backup_statistics_api_v1_backups_statistics_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BackupStatisticsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "backups" } }, "/api/v1/backups": { "get": { "tags": [ "Backups", "backups" ], "summary": "List Backups", "description": "List all backups with pagination", "operationId": "list_backups_api_v1_backups_get", "security": [ { "HTTPBearer": [] } ], "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" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BackupListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "backups" } }, "/api/v1/backups/schedule": { "get": { "tags": [ "Backups", "backups" ], "summary": "Get Backup Schedule", "description": "Get backup schedule configuration", "operationId": "get_backup_schedule_api_v1_backups_schedule_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BackupScheduleResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "backups" }, "post": { "tags": [ "Backups", "backups" ], "summary": "Create Backup Schedule", "description": "Create or update backup schedule", "operationId": "create_backup_schedule_api_v1_backups_schedule_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScheduleBackupRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScheduleBackupResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "backups" }, "patch": { "tags": [ "Backups", "backups" ], "summary": "Update Backup Schedule", "description": "Update backup schedule configuration", "operationId": "update_backup_schedule_api_v1_backups_schedule_patch", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateScheduleRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateScheduleResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "backups" } }, "/api/v1/backups/restore": { "post": { "tags": [ "Backups", "backups" ], "summary": "Restore Backup", "description": "Restore database from backup", "operationId": "restore_backup_api_v1_backups_restore_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RestoreBackupRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RestoreBackupResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "backups" } }, "/api/v1/backups/{backup_id}": { "get": { "tags": [ "Backups", "backups" ], "summary": "Get Backup By Id", "description": "Get specific backup by ID", "operationId": "get_backup_by_id_api_v1_backups__backup_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "backup_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Backup Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BackupTaskResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "backups" }, "delete": { "tags": [ "Backups", "backups" ], "summary": "Delete Backup", "description": "Delete a backup", "operationId": "delete_backup_api_v1_backups__backup_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "backup_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Backup Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "backups" } }, "/api/v1/admission/check": { "post": { "tags": [ "Admission Control", "admission-control" ], "summary": "Check Admission", "description": "Check if a request should be admitted.\n\nEvaluates:\n- Circuit breaker state\n- Quota limits\n- System load\n- Rate limits", "operationId": "check_admission_api_v1_admission_check_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdmissionCheckRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdmissionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admission-control" } }, "/api/v1/admission/quota": { "post": { "tags": [ "Admission Control", "admission-control" ], "summary": "Update Quota", "description": "Update quota for a user/request type.\n\nRequires admin permissions.", "operationId": "update_quota_api_v1_admission_quota_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuotaUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admission-control" } }, "/api/v1/admission/stats": { "get": { "tags": [ "Admission Control", "admission-control" ], "summary": "Get Admission Stats", "description": "Get admission control statistics.\n\nReturns:\n- Active quotas\n- Load thresholds\n- Admission/rejection counts", "operationId": "get_admission_stats_api_v1_admission_stats_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admission-control" } }, "/api/v1/admission/load-threshold": { "put": { "tags": [ "Admission Control", "admission-control" ], "summary": "Update Load Threshold", "description": "Update system load threshold for admission control.\n\nRequires admin permissions.", "operationId": "update_load_threshold_api_v1_admission_load_threshold_put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoadThresholdUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admission-control" } }, "/api/v1/admission/circuit-breaker/reset": { "post": { "tags": [ "Admission Control", "admission-control" ], "summary": "Reset Circuit Breaker", "description": "Manually reset circuit breaker for a request type.\n\nRequires admin permissions.", "operationId": "reset_circuit_breaker_api_v1_admission_circuit_breaker_reset_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CircuitBreakerReset" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admission-control" } }, "/api/v1/features": { "get": { "tags": [ "Features", "features" ], "summary": "Get Features", "description": "Get available features based on license.\n\nCommunity builds: All enterprise features False\nEnterprise builds: Features determined by license claims", "operationId": "get_features_api_v1_features_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FeatureFlags" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "features" } }, "/api/v1/memories/{memory_id}/enrichment": { "get": { "tags": [ "Memory Enrichment" ], "summary": "Full enrichment for a memory", "operationId": "get_enrichment_api_v1_memories__memory_id__enrichment_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EnrichmentResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-enrichment" } }, "/api/v1/memories/{memory_id}/narrative": { "get": { "tags": [ "Memory Enrichment" ], "summary": "Narrative synthesis for a memory", "operationId": "get_narrative_api_v1_memories__memory_id__narrative_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NarrativeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-enrichment" } }, "/api/v1/memories/{memory_id}/uncertainty": { "get": { "tags": [ "Memory Enrichment" ], "summary": "Uncertainty report for a memory", "operationId": "get_uncertainty_api_v1_memories__memory_id__uncertainty_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UncertaintyResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-enrichment" } }, "/api/v1/memories/{memory_id}/anomalies": { "get": { "tags": [ "Memory Enrichment" ], "summary": "Anomaly detection report for a memory", "operationId": "get_anomalies_api_v1_memories__memory_id__anomalies_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnomalyResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-enrichment" } }, "/api/v1/memories/{memory_id}/query-intelligence": { "get": { "tags": [ "Memory Enrichment" ], "summary": "Query intelligence report for a memory", "operationId": "get_query_intelligence_api_v1_memories__memory_id__query_intelligence_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueryIntelligenceResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-enrichment" } }, "/api/v1/memories/{memory_id}/enrichment-feedback": { "post": { "tags": [ "Memory Enrichment" ], "summary": "Submit human review verdict for a memory's enrichment", "operationId": "submit_feedback_api_v1_memories__memory_id__enrichment_feedback_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FeedbackRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FeedbackResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "memory-enrichment" } }, "/api/v1/features/readiness": { "get": { "tags": [ "Feature Readiness" ], "summary": "Feature readiness for all enrichment agents", "description": "Return the current readiness state for every enrichment agent.\n\nIf no evaluation has been run for this tenant yet, triggers a fresh\nsynchronous evaluation before returning. Subsequent calls return the\npersisted state instantly.", "operationId": "get_readiness_api_v1_features_readiness_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReadinessListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "feature-readiness" } }, "/api/v1/features/readiness/evaluate": { "post": { "tags": [ "Feature Readiness" ], "summary": "Force re-evaluate feature readiness", "description": "Trigger a synchronous readiness evaluation and return fresh results.\n\nUse this after a bulk data import or during tenant onboarding to get\nup-to-date readiness without waiting for the nightly Celery sweep.", "operationId": "evaluate_readiness_api_v1_features_readiness_evaluate_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReadinessListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "feature-readiness" } }, "/api/v1/features/readiness/{agent_name}": { "patch": { "tags": [ "Feature Readiness" ], "summary": "Override enabled flag or params for an agent", "description": "Admin endpoint to force-enable, force-disable, or tune an agent's params.\n\nSetting ``enabled=False`` greys out the feature in the UI regardless of\ndata readiness. Setting ``enabled=True`` forces it active even if the\ndata thresholds are not yet met (use with caution \u2014 results may be noisy).", "operationId": "update_agent_config_api_v1_features_readiness__agent_name__patch", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "agent_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Agent Name" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateConfigRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentReadinessItem" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "feature-readiness" } }, "/api/v1/graph/neighbors": { "get": { "tags": [ "Knowledge Graph" ], "summary": "Entity neighbors from WorldModelAgent graph", "description": "Return all entities that co-occur with the given entity across tenant memories.", "operationId": "get_entity_neighbors_api_v1_graph_neighbors_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "entity", "in": "query", "required": true, "schema": { "type": "string", "description": "Canonical entity name to look up", "title": "Entity" }, "description": "Canonical entity name to look up" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "description": "Max neighbors to return", "default": 20, "title": "Limit" }, "description": "Max neighbors to return" }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NeighborsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "knowledge-graph" } }, "/api/v1/graph/entity-path": { "get": { "tags": [ "Knowledge Graph" ], "summary": "Shortest entity-to-entity path through the co-occurrence graph", "description": "Find the shortest path between two entities in the WorldModelAgent graph.", "operationId": "get_entity_path_api_v1_graph_entity_path_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "from_entity", "in": "query", "required": true, "schema": { "type": "string", "description": "Source entity name", "title": "From Entity" }, "description": "Source entity name" }, { "name": "to_entity", "in": "query", "required": true, "schema": { "type": "string", "description": "Target entity name", "title": "To Entity" }, "description": "Target entity name" }, { "name": "max_hops", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 10, "minimum": 1, "description": "Maximum BFS depth", "default": 6, "title": "Max Hops" }, "description": "Maximum BFS depth" }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EntityPathResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "knowledge-graph" } }, "/api/v1/graph/changes": { "get": { "tags": [ "Knowledge Graph" ], "summary": "Entity state changes detected by WorldModelAgent", "description": "Return state-change events (domain expansions, high-confidence nodes) for the tenant.", "operationId": "get_entity_changes_api_v1_graph_changes_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "entity", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter to a specific entity (omit for all)", "title": "Entity" }, "description": "Filter to a specific entity (omit for all)" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 500, "minimum": 1, "description": "Max changes to return", "default": 50, "title": "Limit" }, "description": "Max changes to return" }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChangesResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "knowledge-graph" } }, "/api/v1/review/queue": { "get": { "tags": [ "Human Review Queue" ], "summary": "List memories queued for human review", "description": "Return memories currently in the review queue, ordered by priority.", "operationId": "get_review_queue_api_v1_review_queue_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "priority", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by priority: low|normal|high|urgent", "title": "Priority" }, "description": "Filter by priority: low|normal|high|urgent" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "description": "Max items to return", "default": 50, "title": "Limit" }, "description": "Max items to return" }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "description": "Pagination offset", "default": 0, "title": "Offset" }, "description": "Pagination offset" }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueueResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "human-review-queue" } }, "/api/v1/review/claim": { "post": { "tags": [ "Human Review Queue" ], "summary": "Claim a queued memory for review", "description": "Claim a queued memory and return its full reviewer context.", "operationId": "claim_review_item_api_v1_review_claim_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClaimRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClaimResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "human-review-queue" } }, "/api/v1/review/resolve": { "post": { "tags": [ "Human Review Queue" ], "summary": "Submit a review verdict for a queued memory", "description": "Record a human review verdict; feeds back into FeedbackIntegrationAgent.", "operationId": "resolve_review_item_api_v1_review_resolve_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResolveRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResolveResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "human-review-queue" } }, "/api/v1/causal/discover/{episode_id}": { "post": { "tags": [ "Causal Reasoning", "causal" ], "summary": "Discover Causal Edges", "description": "Discover causal edges within an episode.\n\nThis endpoint analyzes an episode to identify potential causal relationships\nbetween facts. It uses three discovery signals:\n\n1. **Temporal precedence**: Earlier facts might cause later facts\n2. **Correlational**: Co-occurrence suggests causation\n3. **LLM inference**: \"What causes what in this episode?\"\n\nThe discovered edges have strength estimates based on discovery signal confidence.\n\n## Why This Works\n\nGeneral intelligence requires moving from Observation \u2192 Intervention \u2192 Counterfactual.\nThis endpoint discovers edges so agents can later predict (intervention) and\nexplore hypotheticals (counterfactual).\n\nArgs:\n episode_id: The episode to analyze\n request: Discovery request with auto_save flag\n current_user: Authenticated user\n db: Database session\n\nReturns:\n Discovered edges with strengths and mechanisms\n\nExample:\n ```json\n {\n \"episode_id\": \"ep_123\",\n \"edges_discovered\": 3,\n \"edges\": [\n {\n \"id\": \"edge_1\",\n \"cause_entity_id\": \"fact_1\",\n \"effect_entity_id\": \"fact_2\",\n \"mechanism\": \"temporal\",\n \"strength\": 0.85\n }\n ]\n }\n ```", "operationId": "discover_causal_edges_api_v1_causal_discover__episode_id__post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "episode_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Episode Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DiscoverCausalEdgesRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DiscoverCausalEdgesResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "causal-reasoning" } }, "/api/v1/causal/edges": { "get": { "tags": [ "Causal Reasoning", "causal" ], "summary": "Get Causal Edges", "description": "Retrieve causal edges matching criteria.\n\nFilters edges by cause/effect entities. Can retrieve:\n- All outgoing edges from an entity (from_entity specified)\n- All incoming edges to an entity (to_entity specified)\n- All edges between two entities (both specified)\n\nArgs:\n from_entity: Filter by cause entity\n to_entity: Filter by effect entity\n current_user: Authenticated user\n db: Database session\n\nReturns:\n List of matching edges with full details", "operationId": "get_causal_edges_api_v1_causal_edges_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "from_entity", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Source entity ID", "title": "From Entity" }, "description": "Source entity ID" }, { "name": "to_entity", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Target entity ID", "title": "To Entity" }, "description": "Target entity ID" }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object" }, "title": "Response Get Causal Edges Api V1 Causal Edges Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "causal-reasoning" } }, "/api/v1/causal/predict": { "post": { "tags": [ "Causal Reasoning", "causal" ], "summary": "Predict Outcome", "description": "Predict outcomes given causes (Interventional reasoning).\n\nThis implements the second level of Pearl's Causal Ladder:\n\"What if I DO X?\" (vs. just observing)\n\nGiven a set of causes, predicts the most likely effect by:\n1. Finding all causal paths from causes to target\n2. Weighting paths by edge strength\n3. Estimating probability of target outcome\n\n## Why This Matters\n\nPlanning requires interventional reasoning. We can:\n- Ask \"If I take action X, what will happen?\"\n- Trace causal chains to predict downstream effects\n- Identify necessary conditions for goals\n\nArgs:\n request: Cause IDs and target to predict\n current_user: Authenticated user\n db: Database session\n\nReturns:\n Predicted outcome with probability and causal chain\n\nExample:\n ```\n Causes: [\"memory_user_said_hello\", \"memory_i_responded\"]\n Target: \"user_satisfaction\"\n \n Returns:\n {\n \"outcome_id\": \"user_satisfaction\",\n \"probability\": 0.78,\n \"confidence\": 0.85,\n \"causal_chain\": [\"said_hello\", \"responded\", \"user_satisfaction\"]\n }\n ```", "operationId": "predict_outcome_api_v1_causal_predict_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PredictionRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PredictionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "causal-reasoning" } }, "/api/v1/causal/explain/{effect_id}": { "get": { "tags": [ "Causal Reasoning", "causal" ], "summary": "Explain Effect", "description": "Explain an effect by finding root causes (Causal explanation).\n\nAnswers \"Why did X happen?\" by:\n1. Finding all causal edges leading to the effect\n2. Recursively finding causes of those causes\n3. Returning root causes ranked by total strength\n\n## Why This Matters\n\nDebugging and learning require causal explanation:\n- \"Why did the prediction fail?\"\n- \"What caused user satisfaction?\"\n- \"What leads to memory consolidation?\"\n\nEnables agents to trace failures to decisions and improve.\n\nArgs:\n effect_id: Effect/outcome to explain\n current_user: Authenticated user\n db: Database session\n\nReturns:\n Root causes ranked by strength\n\nExample:\n ```\n Effect: \"agent_decision_good\"\n \n Returns:\n {\n \"effect_id\": \"agent_decision_good\",\n \"root_causes\": [\n {\n \"cause_id\": \"memory_past_success\",\n \"strength\": 0.92,\n \"chain_depth\": 2\n },\n {\n \"cause_id\": \"user_clear_intent\",\n \"strength\": 0.78,\n \"chain_depth\": 1\n }\n ]\n }\n ```", "operationId": "explain_effect_api_v1_causal_explain__effect_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "effect_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Effect Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExplainResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "causal-reasoning" } }, "/api/v1/causal/counterfactual": { "post": { "tags": [ "Causal Reasoning", "causal" ], "summary": "Counterfactual Query", "description": "Explore counterfactual scenarios (Hypothetical reasoning).\n\nThis implements the third level of Pearl's Causal Ladder:\n\"What if I HAD done X?\" (exploring alternate histories)\n\nCreates a counterfactual scenario (hypothetical) and tracks it:\n- When the condition manifests in reality, record actual outcomes\n- Calculate accuracy of predictions\n- Learn from mismatches to improve causal understanding\n\n## Why This Matters\n\nLearning requires counterfactual reasoning:\n- \"I predicted X would happen if I did Y. Did it actually happen?\"\n- \"What would've happened if I chose differently?\"\n- Improves causal edge strength based on prediction accuracy\n\nThis is how agents improve via experience: predict \u2192 observe \u2192 validate.\n\nArgs:\n request: Condition and query\n current_user: Authenticated user\n db: Database session\n\nReturns:\n Created counterfactual scenario ID\n\nExample:\n ```\n Condition: \"If I had responded earlier\"\n Query: {\"outcome\": \"user_satisfaction\"}\n \n Returns:\n {\n \"scenario_id\": \"cf_456\",\n \"condition\": \"If I had responded earlier\",\n \"status\": \"pending\"\n }\n \n When reality manifests:\n {\n \"scenario_id\": \"cf_456\",\n \"condition\": \"If I had responded earlier\",\n \"status\": \"resolved\",\n \"predicted\": {\"user_satisfaction\": 0.85},\n \"actual\": {\"user_satisfaction\": 0.88},\n \"accuracy\": 0.97\n }\n ```", "operationId": "counterfactual_query_api_v1_causal_counterfactual_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CounterfactualRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CounterfactualResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "causal-reasoning" } }, "/api/v1/causal/do-calculus": { "get": { "tags": [ "Causal Reasoning", "causal" ], "summary": "Estimate Causal Effect", "description": "Estimate causal effects using do-calculus (Pearl's do-operator).\n\nComputes E[Y | do(X=x)] - \"the expected Y if we intervene to set X\"\n\nDiffers from observational inference P(Y|X) because interventions break\nconfounding. Eliminates backdoor paths and estimates true causal effect.\n\n## Why This Matters\n\nOptimal decision-making requires causal effects:\n- \"If I change X, how much will Y improve?\"\n- \"What's the causal impact (not just correlation)?\"\n- Avoids Simpson's paradox and confounding errors\n\nClassical example: Treatment A correlates with worse outcomes, but has\npositive causal effect. Do-calculus distinguishes these.\n\nArgs:\n treatment: Intervention variable\n outcome: Outcome to measure\n current_user: Authenticated user\n db: Database session\n\nReturns:\n Causal effect estimate and number of paths considered\n\nExample:\n ```\n Treatment: \"increased_context_window\"\n Outcome: \"task_success_rate\"\n \n Returns:\n {\n \"treatment\": \"increased_context_window\",\n \"outcome\": \"task_success_rate\",\n \"causal_effect\": 0.23,\n \"num_paths\": 5\n }\n \n Interpretation: Interventional increase in context window causally\n increases task success by 23 percentage points.\n ```", "operationId": "estimate_causal_effect_api_v1_causal_do_calculus_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "treatment", "in": "query", "required": true, "schema": { "type": "string", "description": "Intervention variable", "title": "Treatment" }, "description": "Intervention variable" }, { "name": "outcome", "in": "query", "required": true, "schema": { "type": "string", "description": "Outcome to measure", "title": "Outcome" }, "description": "Outcome to measure" }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DoCalculusResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "causal-reasoning" } }, "/api/v1/causal/validate": { "post": { "tags": [ "Causal Reasoning", "causal" ], "summary": "Validate Edge", "description": "Validate a causal edge based on observed outcomes.\n\nWhen a prediction is made and later verified/falsified, update edge strength:\n- Success: Increase strength (edge was correct)\n- Failure: Decrease strength (edge was wrong)\n\nUses Bayesian averaging to accumulate evidence:\n```\nnew_strength = (old_strength * count + adjustment) / (count + 1)\n```\n\nAlso tracks validation_count and invalidation_count for meta-analysis:\n- Edges with many validations are reliable\n- Edges with mixed validation are uncertain\n- Completely invalidated edges can be removed\n\n## Why This Matters\n\nCausal edges are hypotheses. This endpoint turns them into tested knowledge:\n- Observing outcomes validates predictions\n- Strength gradually approaches ground truth\n- Enables continuous improvement via experience\n\nThis is how Ninai learns from the world: discover \u2192 predict \u2192 observe \u2192 validate.\n\nArgs:\n request: Edge ID, success flag, and strength adjustment\n current_user: Authenticated user\n db: Database session\n\nReturns:\n Updated edge with new strength and validation counts\n\nExample:\n ```\n Edge: \"user_context \u2192 model_accuracy\" (strength 0.6)\n Observed: Accuracy improved 23% when context increased\n \n Request:\n {\n \"edge_id\": \"edge_123\",\n \"success\": true,\n \"strength_adjustment\": 0.25\n }\n \n Returns:\n {\n \"id\": \"edge_123\",\n \"strength\": 0.725,\n \"validation_count\": 5,\n \"invalidation_count\": 1,\n \"last_validated_at\": \"2026-03-02T10:30:00Z\"\n }\n ```", "operationId": "validate_edge_api_v1_causal_validate_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidateEdgeRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidateEdgeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "causal-reasoning" } }, "/api/v1/compliance/retention-policy": { "get": { "tags": [ "Compliance (GDPR)", "Compliance (GDPR)" ], "summary": "Get Retention Policy", "description": "Return the data retention policy for the caller's organization.", "operationId": "get_retention_policy_api_v1_compliance_retention_policy_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RetentionPolicyResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "compliance-(gdpr)" }, "put": { "tags": [ "Compliance (GDPR)", "Compliance (GDPR)" ], "summary": "Upsert Retention Policy", "description": "Create or update the retention policy. Admin only.", "operationId": "upsert_retention_policy_api_v1_compliance_retention_policy_put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RetentionPolicyUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RetentionPolicyResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "compliance-(gdpr)" } }, "/api/v1/compliance/deletion-request": { "post": { "tags": [ "Compliance (GDPR)", "Compliance (GDPR)" ], "summary": "Create Deletion Request", "description": "Initiate a GDPR right-to-be-forgotten request. Admin only.", "operationId": "create_deletion_request_api_v1_compliance_deletion_request_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeletionRequestCreate" } } } }, "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeletionRequestResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "compliance-(gdpr)" } }, "/api/v1/compliance/deletion-request/{request_id}": { "get": { "tags": [ "Compliance (GDPR)", "Compliance (GDPR)" ], "summary": "Get Deletion Request", "description": "Poll the status of a deletion request. Admin only.", "operationId": "get_deletion_request_api_v1_compliance_deletion_request__request_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "request_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Request Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeletionRequestResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "compliance-(gdpr)" } }, "/api/v1/compliance/deletion-requests": { "get": { "tags": [ "Compliance (GDPR)", "Compliance (GDPR)" ], "summary": "List Deletion Requests", "description": "List deletion requests for the organization. Admin only.", "operationId": "list_deletion_requests_api_v1_compliance_deletion_requests_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "status_filter", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status Filter" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 50, "title": "Limit" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DeletionRequestResponse" }, "title": "Response List Deletion Requests Api V1 Compliance Deletion Requests Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "compliance-(gdpr)" } }, "/api/v1/compliance/data-export": { "get": { "tags": [ "Compliance (GDPR)", "Compliance (GDPR)" ], "summary": "Request Data Export", "description": "Request a JSON export of a user's data. Returns an export job ID.\n\nUses the existing ExportJobService. Admins may specify user_id; otherwise\nthe export covers the caller's own data.", "operationId": "request_data_export_api_v1_compliance_data_export_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "user_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Request Data Export Api V1 Compliance Data Export Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "compliance-(gdpr)" } }, "/api/v1/compliance/consent": { "post": { "tags": [ "Compliance (GDPR)", "Compliance (GDPR)" ], "summary": "Record Consent", "description": "Record a user consent grant or revoke.", "operationId": "record_consent_api_v1_compliance_consent_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConsentCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConsentResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "compliance-(gdpr)" }, "get": { "tags": [ "Compliance (GDPR)", "Compliance (GDPR)" ], "summary": "List Consents", "description": "List all consent records for the calling user.", "operationId": "list_consents_api_v1_compliance_consent_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ConsentResponse" }, "title": "Response List Consents Api V1 Compliance Consent Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "compliance-(gdpr)" } }, "/api/v1/digests/latest": { "get": { "tags": [ "Intelligence Digest", "Intelligence Digest" ], "summary": "Get Latest Digest", "description": "Return the most recent intelligence digest for the caller's organization.", "operationId": "get_latest_digest_api_v1_digests_latest_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "digest_type", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(daily|weekly)$", "default": "daily", "title": "Digest Type" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DigestReportResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "intelligence-digest" } }, "/api/v1/digests/history": { "get": { "tags": [ "Intelligence Digest", "Intelligence Digest" ], "summary": "List Digest History", "description": "Return paginated digest history for the caller's organization.", "operationId": "list_digest_history_api_v1_digests_history_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "digest_type", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(daily|weekly)$", "default": "daily", "title": "Digest Type" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 90, "minimum": 1, "default": 30, "title": "Limit" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DigestReportResponse" }, "title": "Response List Digest History Api V1 Digests History Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "intelligence-digest" } }, "/api/v1/digests/trigger": { "post": { "tags": [ "Intelligence Digest", "Intelligence Digest" ], "summary": "Trigger Digest", "description": "Manually build and save a digest for the caller's org. Admin only.", "operationId": "trigger_digest_api_v1_digests_trigger_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "digest_type", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(daily|weekly)$", "default": "daily", "title": "Digest Type" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Trigger Digest Api V1 Digests Trigger Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "intelligence-digest" } }, "/api/v1/proof/scorecard": { "post": { "tags": [ "Proof" ], "summary": "Compute Proof Scorecard", "operationId": "compute_proof_scorecard_api_v1_proof_scorecard_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProofScorecardRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProofScorecardResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "proof" } }, "/api/v1/proof/monthly-impact": { "post": { "tags": [ "Proof" ], "summary": "Compute Monthly Impact", "operationId": "compute_monthly_impact_api_v1_proof_monthly_impact_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MonthlyImpactRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MonthlyImpactResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "proof" } }, "/api/v1/integrations/connectors": { "post": { "tags": [ "Connector Hub" ], "summary": "Register Connector", "operationId": "register_connector_api_v1_integrations_connectors_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "title": "Payload" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Register Connector Api V1 Integrations Connectors Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "connector-hub" }, "get": { "tags": [ "Connector Hub" ], "summary": "List Connectors", "operationId": "list_connectors_api_v1_integrations_connectors_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object" }, "title": "Response List Connectors Api V1 Integrations Connectors Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "connector-hub" } }, "/api/v1/integrations/connectors/{connector_id}": { "get": { "tags": [ "Connector Hub" ], "summary": "Get Connector", "operationId": "get_connector_api_v1_integrations_connectors__connector_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "connector_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Connector Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Get Connector Api V1 Integrations Connectors Connector Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "connector-hub" }, "delete": { "tags": [ "Connector Hub" ], "summary": "Delete Connector", "operationId": "delete_connector_api_v1_integrations_connectors__connector_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "connector_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Connector Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Delete Connector Api V1 Integrations Connectors Connector Id Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "connector-hub" } }, "/api/v1/integrations/connectors/{connector_id}/activate": { "patch": { "tags": [ "Connector Hub" ], "summary": "Set Connector Active", "operationId": "set_connector_active_api_v1_integrations_connectors__connector_id__activate_patch", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "connector_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Connector Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "title": "Payload" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Set Connector Active Api V1 Integrations Connectors Connector Id Activate Patch" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "connector-hub" } }, "/api/v1/integrations/connectors/{connector_id}/test": { "post": { "tags": [ "Connector Hub" ], "summary": "Test Connector", "operationId": "test_connector_api_v1_integrations_connectors__connector_id__test_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "connector_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Connector Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Test Connector Api V1 Integrations Connectors Connector Id Test Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "connector-hub" } }, "/api/v1/integrations/connectors/inbound/{connector_type}": { "post": { "tags": [ "Connector Hub" ], "summary": "Receive Inbound Event", "description": "Convert an inbound webhook from an external system into a Ninai memory record.\n\nSteps:\n1. Parse and normalize the external payload into a NormalizedEvent.\n2. Build MemoryCreate from the normalized fields.\n3. Write the memory (force_long_term=True so it persists in Postgres/Qdrant\n with a zero-vector embedding; a background pipeline re-embeds it).\n4. If severity is high or critical, fire meta_review_memory_task so the\n autonomous cognitive loop investigates the event.\n\nReturns 202 Accepted with memory_id and whether a cognitive review was triggered.", "operationId": "receive_inbound_event_api_v1_integrations_connectors_inbound__connector_type__post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "connector_type", "in": "path", "required": true, "schema": { "type": "string", "title": "Connector Type" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "title": "Payload" } } } }, "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Receive Inbound Event Api V1 Integrations Connectors Inbound Connector Type Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "connector-hub" } }, "/api/v1/cognitive/gateway/write": { "post": { "tags": [ "Cognitive Gateway" ], "summary": "Gateway Write", "description": "Store and enrich a memory record.\n\nRequest body:\n content (str, required)\n title (str, optional)\n tags (list[str], optional)\n metadata (dict, optional)\n context_id (str, optional) \u2014 chain with prior gateway calls", "operationId": "gateway_write_api_v1_cognitive_gateway_write_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "title": "Payload" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Gateway Write Api V1 Cognitive Gateway Write Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "cognitive-gateway" } }, "/api/v1/cognitive/gateway/read": { "post": { "tags": [ "Cognitive Gateway" ], "summary": "Gateway Read", "description": "Retrieve and rank memories for a query.\n\nRequest body:\n query (str, required)\n memories (list[dict], optional \u2014 pass pre-fetched candidates)\n limit (int, optional, default 10)\n context_id (str, optional) \u2014 merge prior memories from chain", "operationId": "gateway_read_api_v1_cognitive_gateway_read_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "title": "Payload" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Gateway Read Api V1 Cognitive Gateway Read Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "cognitive-gateway" } }, "/api/v1/cognitive/gateway/decide": { "post": { "tags": [ "Cognitive Gateway" ], "summary": "Gateway Decide", "description": "Run the enrichment pipeline and return a decision with confidence.\n\nRequest body:\n content (str, required)\n enrichment (dict, optional \u2014 pass existing enrichment to build on)\n context_id (str, optional) \u2014 merge accumulated enrichment from chain", "operationId": "gateway_decide_api_v1_cognitive_gateway_decide_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "title": "Payload" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Gateway Decide Api V1 Cognitive Gateway Decide Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "cognitive-gateway" } }, "/api/v1/cognitive/gateway/plan": { "post": { "tags": [ "Cognitive Gateway" ], "summary": "Gateway Plan", "description": "Decompose a goal into ordered, actionable steps.\n\nRequest body:\n goal (str, required)\n context (dict, optional)\n context_id (str, optional) \u2014 carry forward prior decision into context", "operationId": "gateway_plan_api_v1_cognitive_gateway_plan_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "title": "Payload" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Gateway Plan Api V1 Cognitive Gateway Plan Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "cognitive-gateway" } }, "/api/v1/cognitive/gateway/explain/{memory_id}": { "get": { "tags": [ "Cognitive Gateway" ], "summary": "Gateway Explain", "description": "Return audit trail and explainability summary for a memory.\n\nIn production this fetches AgentDecisionTrail rows for the memory.\nIn heuristic mode returns the explainability structure with empty decisions.", "operationId": "gateway_explain_api_v1_cognitive_gateway_explain__memory_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Gateway Explain Api V1 Cognitive Gateway Explain Memory Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "cognitive-gateway" } }, "/api/v1/cognitive/gateway/context/{context_id}": { "get": { "tags": [ "Cognitive Gateway" ], "summary": "Get Gateway Context", "description": "Inspect the accumulated state of a gateway context chain.\n\nReturns the context session including prior decision, steps, memories,\nand enrichment accumulated across calls sharing this context_id.\nReturns 404 if the context has expired (> 1h since last use) or never existed.", "operationId": "get_gateway_context_api_v1_cognitive_gateway_context__context_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "context_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Context Id" } }, { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Get Gateway Context Api V1 Cognitive Gateway Context Context Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "cognitive-gateway" } }, "/api/v1/cognitive/gateway/context": { "post": { "tags": [ "Cognitive Gateway" ], "summary": "Create Gateway Context", "description": "Create a new gateway context_id for chaining multiple verb calls.\n\nReturns a fresh context_id that callers pass to write/read/decide/plan/explain\nto accumulate state across calls.", "operationId": "create_gateway_context_api_v1_cognitive_gateway_context_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Create Gateway Context Api V1 Cognitive Gateway Context Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "cognitive-gateway" } }, "/api/v1/cognitive/gateway/state": { "get": { "tags": [ "Cognitive Gateway" ], "summary": "Get Cognitive State", "description": "Return the current SystemCognitionState for this org.\n\nShows what the Cognitive OS is currently attending to, cognitive load,\nunresolved anomaly count, and the time of the last heartbeat.\nUpdated every 5 minutes by the autonomous heartbeat task.", "operationId": "get_cognitive_state_api_v1_cognitive_gateway_state_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Get Cognitive State Api V1 Cognitive Gateway State Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "cognitive-gateway" } }, "/api/v1/cognitive/gateway/stream/decide": { "post": { "tags": [ "Cognitive Gateway Stream" ], "summary": "Stream Gateway Decide", "description": "Stream anomaly detection and decision as SSE.\n\nRequest body: content (str, required), enrichment (dict), context_id (str)", "operationId": "stream_gateway_decide_api_v1_cognitive_gateway_stream_decide_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "title": "Payload" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "cognitive-gateway-stream" } }, "/api/v1/cognitive/gateway/stream/plan": { "post": { "tags": [ "Cognitive Gateway Stream" ], "summary": "Stream Gateway Plan", "description": "Stream goal decomposition as SSE \u2014 one frame per step.\n\nRequest body: goal (str, required), context (dict), context_id (str)", "operationId": "stream_gateway_plan_api_v1_cognitive_gateway_stream_plan_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "title": "Payload" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "cognitive-gateway-stream" } }, "/api/v1/cognitive/gateway/stream/read": { "post": { "tags": [ "Cognitive Gateway Stream" ], "summary": "Stream Gateway Read", "description": "Stream memory retrieval as SSE \u2014 one frame per memory result.\n\nRequest body: query (str, required), memories (list), limit (int), context_id (str)", "operationId": "stream_gateway_read_api_v1_cognitive_gateway_stream_read_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "X-API-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "title": "Payload" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "cognitive-gateway-stream" } }, "/api/v1/admin/benchmarks": { "post": { "tags": [ "Admin - Benchmarks", "Admin - Benchmarks" ], "summary": "Create Benchmark Run", "operationId": "create_benchmark_run_api_v1_admin_benchmarks_post", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BenchmarkRunCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BenchmarkRunResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin---benchmarks" }, "get": { "tags": [ "Admin - Benchmarks", "Admin - Benchmarks" ], "summary": "List Benchmark Runs", "description": "List benchmark runs ordered newest-first. Requires admin role.", "operationId": "list_benchmark_runs_api_v1_admin_benchmarks_get", "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "strategy", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Strategy" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/BenchmarkRunResponse" }, "title": "Response List Benchmark Runs Api V1 Admin Benchmarks Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-ninai-cognitive-domain": "admin---benchmarks" } }, "/api/v1/admin/benchmarks/latest": { "get": { "tags": [ "Admin - Benchmarks", "Admin - Benchmarks" ], "summary": "Get Latest Benchmark Run", "description": "Return the most recent benchmark run. Requires admin role.", "operationId": "get_latest_benchmark_run_api_v1_admin_benchmarks_latest_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BenchmarkRunResponse" } } } } }, "x-ninai-cognitive-domain": "admin---benchmarks" } } }, "components": { "schemas": { "AccessExplanation": { "properties": { "memory_id": { "type": "string", "title": "Memory Id" }, "user_id": { "type": "string", "title": "User Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "clearance_level": { "type": "integer", "title": "Clearance Level" }, "access": { "type": "object", "title": "Access" }, "user_roles": { "items": { "type": "object" }, "type": "array", "title": "User Roles" }, "checked_at": { "type": "string", "format": "date-time", "title": "Checked At" } }, "type": "object", "required": [ "memory_id", "user_id", "organization_id", "clearance_level", "access", "user_roles", "checked_at" ], "title": "AccessExplanation", "description": "Full explanation of access to a memory." }, "AccessLogResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "timestamp": { "type": "string", "format": "date-time", "title": "Timestamp" }, "memory_id": { "type": "string", "title": "Memory Id" }, "user_id": { "type": "string", "title": "User Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "action": { "type": "string", "title": "Action" }, "authorized": { "type": "boolean", "title": "Authorized" }, "authorization_method": { "type": "string", "title": "Authorization Method" }, "denial_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Denial Reason" }, "access_context": { "type": "object", "title": "Access Context" }, "request_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Request Id" }, "ip_address": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Ip Address" }, "user_agent": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Agent" }, "justification": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Justification" }, "case_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Case Id" } }, "type": "object", "required": [ "id", "timestamp", "memory_id", "user_id", "organization_id", "action", "authorized", "authorization_method", "denial_reason", "access_context", "request_id", "ip_address", "user_agent", "justification", "case_id" ], "title": "AccessLogResponse", "description": "Memory access log response." }, "ActionTimingRequest": { "properties": { "entity_id": { "type": "string", "title": "Entity Id", "description": "Entity to analyze" }, "threshold": { "type": "number", "title": "Threshold", "description": "Critical threshold value" }, "measurements": { "items": { "type": "object" }, "type": "array", "title": "Measurements", "description": "Current measurements" }, "lookahead_hours": { "type": "integer", "maximum": 2400.0, "minimum": 0.0, "title": "Lookahead Hours", "description": "How far to look ahead", "default": 24 } }, "type": "object", "required": [ "entity_id", "threshold", "measurements" ], "title": "ActionTimingRequest", "description": "Request to determine optimal action timing." }, "ActivationComponentsSchema": { "properties": { "rel": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Rel", "description": "Relevance (vector similarity)" }, "rec": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Rec", "description": "Recency (exp decay)" }, "freq": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Freq", "description": "Frequency (access count)" }, "imp": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Imp", "description": "Importance (base + feedback)" }, "conf": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Conf", "description": "Confidence (adjusted for contradiction)" }, "ctx": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Ctx", "description": "Context gate (scope/episode/goal)" }, "prov": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Prov", "description": "Provenance (evidence links)" }, "risk": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Risk", "description": "Risk (classification)" }, "nbr": { "anyOf": [ { "type": "number", "maximum": 1.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Nbr", "description": "Neighbor boost (co-activation)" } }, "type": "object", "required": [ "rel", "rec", "freq", "imp", "conf", "ctx", "prov", "risk" ], "title": "ActivationComponentsSchema", "description": "Breakdown of all 8 activation components for a single memory result." }, "AddNoiseRequest": { "properties": { "data": { "items": { "type": "number" }, "type": "array", "title": "Data" }, "sensitivity": { "type": "number", "minimum": 0.0, "title": "Sensitivity", "default": 1.0 }, "epsilon": { "anyOf": [ { "type": "number", "minimum": 0.0 }, { "type": "null" } ], "title": "Epsilon" } }, "type": "object", "required": [ "data" ], "title": "AddNoiseRequest", "description": "Request to add differential privacy noise." }, "AddNoiseResponse": { "properties": { "noisy_data": { "items": { "type": "number" }, "type": "array", "title": "Noisy Data" }, "epsilon_used": { "type": "number", "title": "Epsilon Used" }, "noise_scale": { "type": "number", "title": "Noise Scale" } }, "type": "object", "required": [ "noisy_data", "epsilon_used", "noise_scale" ], "title": "AddNoiseResponse", "description": "Response with noisy data." }, "AdminAuditLogListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/AdminAuditLogResponse" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" } }, "type": "object", "required": [ "items", "total", "page", "page_size" ], "title": "AdminAuditLogListResponse", "description": "List of admin audit logs" }, "AdminAuditLogResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "admin_id": { "type": "string", "format": "uuid", "title": "Admin Id" }, "action": { "type": "string", "title": "Action" }, "resource_type": { "type": "string", "title": "Resource Type" }, "resource_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resource Id" }, "old_values": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Old Values" }, "new_values": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "New Values" }, "ip_address": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Ip Address" }, "user_agent": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Agent" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "admin_id", "action", "resource_type", "resource_id", "old_values", "new_values", "ip_address", "user_agent", "created_at" ], "title": "AdminAuditLogResponse", "description": "Admin audit log response" }, "AdminRoleCreate": { "properties": { "name": { "type": "string", "maxLength": 100, "minLength": 1, "title": "Name", "description": "Role name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description", "description": "Role description" }, "permissions": { "items": { "type": "string" }, "type": "array", "title": "Permissions", "description": "List of permissions (e.g., 'users:read', 'users:write')", "default": [] } }, "type": "object", "required": [ "name" ], "title": "AdminRoleCreate", "description": "Create admin role" }, "AdminRoleResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "permissions": { "items": { "type": "string" }, "type": "array", "title": "Permissions" }, "is_system": { "type": "boolean", "title": "Is System" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "created_by": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Created By" } }, "type": "object", "required": [ "id", "name", "description", "permissions", "is_system", "created_at", "updated_at", "created_by" ], "title": "AdminRoleResponse", "description": "Admin role response" }, "AdminRoleUpdate": { "properties": { "name": { "anyOf": [ { "type": "string", "maxLength": 100, "minLength": 1 }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "permissions": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Permissions" } }, "type": "object", "title": "AdminRoleUpdate", "description": "Update admin role" }, "AdminSettingCreate": { "properties": { "category": { "type": "string", "maxLength": 50, "minLength": 1, "title": "Category" }, "key": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Key" }, "value": { "title": "Value", "description": "Setting value (any JSON type)" }, "type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Type", "description": "Setting type: string, number, boolean, json" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "is_secret": { "type": "boolean", "title": "Is Secret", "description": "Whether value should be hidden", "default": false } }, "type": "object", "required": [ "category", "key", "value" ], "title": "AdminSettingCreate", "description": "Create admin setting" }, "AdminSettingListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/AdminSettingResponse" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "category": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Category" } }, "type": "object", "required": [ "items", "total", "category" ], "title": "AdminSettingListResponse", "description": "List of admin settings" }, "AdminSettingResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "category": { "type": "string", "title": "Category" }, "key": { "type": "string", "title": "Key" }, "value": { "title": "Value", "description": "Omitted if is_secret=True" }, "type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Type" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "is_secret": { "type": "boolean", "title": "Is Secret" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "updated_by": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Updated By" } }, "type": "object", "required": [ "id", "category", "key", "type", "description", "is_secret", "updated_at", "updated_by" ], "title": "AdminSettingResponse", "description": "Admin setting response" }, "AdminSettingUpdate": { "properties": { "value": { "anyOf": [ {}, { "type": "null" } ], "title": "Value" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "is_secret": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Secret" } }, "type": "object", "title": "AdminSettingUpdate", "description": "Update admin setting" }, "AdmissionCheckRequest": { "properties": { "request_type": { "type": "string", "title": "Request Type", "description": "Type of request" }, "user_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "User Id", "description": "User ID (uses current user if not provided)" }, "priority": { "type": "integer", "maximum": 10.0, "minimum": 1.0, "title": "Priority", "description": "Request priority (1-10)", "default": 5 }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Metadata", "description": "Additional metadata" } }, "type": "object", "required": [ "request_type" ], "title": "AdmissionCheckRequest", "description": "Request to check if a request should be admitted." }, "AdmissionResponse": { "properties": { "admitted": { "type": "boolean", "title": "Admitted", "description": "Whether request was admitted" }, "reason": { "type": "string", "title": "Reason", "description": "Reason for admission/rejection" }, "priority": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Priority", "description": "Request priority" }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Metadata", "description": "Additional response data" }, "quota_remaining": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Quota Remaining", "description": "Remaining quota" }, "retry_after": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Retry After", "description": "Seconds to wait before retry" } }, "type": "object", "required": [ "admitted", "reason" ], "title": "AdmissionResponse", "description": "Response indicating admission decision." }, "AdvancedSearchRequest": { "properties": { "query": { "type": "string", "title": "Query" }, "limit": { "type": "integer", "title": "Limit", "default": 50 }, "offset": { "type": "integer", "title": "Offset", "default": 0 }, "return_facets": { "type": "boolean", "title": "Return Facets", "default": false } }, "type": "object", "required": [ "query" ], "title": "AdvancedSearchRequest", "description": "Advanced search request with operators." }, "AdvancedSearchResponse": { "properties": { "results": { "items": { "type": "object" }, "type": "array", "title": "Results" }, "total": { "type": "integer", "title": "Total" }, "offset": { "type": "integer", "title": "Offset" }, "limit": { "type": "integer", "title": "Limit" }, "facets": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Facets" }, "parsed_query": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Parsed Query" }, "query_time_ms": { "type": "integer", "title": "Query Time Ms" } }, "type": "object", "required": [ "results", "total", "offset", "limit", "query_time_ms" ], "title": "AdvancedSearchResponse", "description": "Advanced search response." }, "AffectiveAnalysisResponse": { "properties": { "valence": { "type": "number", "title": "Valence", "description": "Emotional tone: -1.0 (negative) to +1.0 (positive)" }, "arousal": { "type": "number", "title": "Arousal", "description": "Emotional intensity: 0 (calm) to 1 (intense)" }, "emotional_tags": { "items": { "type": "string" }, "type": "array", "title": "Emotional Tags", "description": "Categorical emotional labels" }, "significance": { "type": "number", "title": "Significance", "description": "How emotionally important is this? 0-1" }, "confidence_in_measurement": { "type": "number", "title": "Confidence In Measurement", "description": "Confidence in analysis: 0-1" } }, "type": "object", "required": [ "valence", "arousal", "emotional_tags", "significance", "confidence_in_measurement" ], "title": "AffectiveAnalysisResponse", "description": "Response with emotional analysis." }, "AffectiveMemoryRequest": { "properties": { "memory_content": { "type": "string", "title": "Memory Content", "description": "Memory text content to analyze" }, "user_ids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "User Ids", "description": "User IDs involved in this memory" } }, "type": "object", "required": [ "memory_content" ], "title": "AffectiveMemoryRequest", "description": "Request to analyze emotional content of a memory." }, "AgentCoverage": { "properties": { "agent_name": { "type": "string", "title": "Agent Name" }, "memory_count": { "type": "integer", "title": "Memory Count" } }, "type": "object", "required": [ "agent_name", "memory_count" ], "title": "AgentCoverage" }, "AgentProcessListResponse": { "properties": { "total": { "type": "integer", "title": "Total" }, "items": { "items": { "$ref": "#/components/schemas/AgentProcessResponse" }, "type": "array", "title": "Items" }, "status_summary": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "Status Summary" } }, "type": "object", "required": [ "total", "items" ], "title": "AgentProcessListResponse" }, "AgentProcessResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "session_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Session Id" }, "agent_run_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Run Id" }, "agent_name": { "type": "string", "title": "Agent Name" }, "priority": { "type": "integer", "title": "Priority" }, "status": { "type": "string", "title": "Status" }, "attempts": { "type": "integer", "title": "Attempts" }, "max_attempts": { "type": "integer", "title": "Max Attempts" }, "quota_tokens": { "type": "integer", "title": "Quota Tokens" }, "quota_storage_mb": { "type": "integer", "title": "Quota Storage Mb" }, "started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Started At" }, "finished_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Finished At" }, "trace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trace Id" }, "last_error": { "type": "string", "title": "Last Error" }, "process_metadata": { "type": "object", "title": "Process Metadata" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "agent_name", "priority", "status", "attempts", "max_attempts", "quota_tokens", "quota_storage_mb", "last_error", "created_at", "updated_at" ], "title": "AgentProcessResponse" }, "AgentReadinessItem": { "properties": { "agent_name": { "type": "string", "title": "Agent Name" }, "description": { "type": "string", "title": "Description" }, "enabled": { "type": "boolean", "title": "Enabled" }, "is_ready": { "type": "boolean", "title": "Is Ready" }, "active": { "type": "boolean", "title": "Active", "description": "True when both enabled=True and is_ready=True \u2014 the UI should show the feature as fully available" }, "readiness_state": { "type": "object", "title": "Readiness State" }, "params": { "type": "object", "title": "Params" }, "thresholds": { "type": "object", "title": "Thresholds" }, "notes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Notes" }, "evaluated_at": { "anyOf": [ {}, { "type": "null" } ], "title": "Evaluated At" } }, "type": "object", "required": [ "agent_name", "description", "enabled", "is_ready", "active" ], "title": "AgentReadinessItem" }, "AgentRunDetailResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "memory_id": { "type": "string", "title": "Memory Id" }, "agent_name": { "type": "string", "title": "Agent Name" }, "agent_version": { "type": "string", "title": "Agent Version" }, "status": { "type": "string", "title": "Status", "description": "success|retry|failed|skipped" }, "confidence": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Confidence" }, "started_at": { "type": "string", "format": "date-time", "title": "Started At" }, "finished_at": { "type": "string", "format": "date-time", "title": "Finished At" }, "trace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trace Id" }, "inputs_hash": { "type": "string", "title": "Inputs Hash" }, "outputs": { "type": "object", "title": "Outputs" }, "provenance": { "items": { "type": "object" }, "type": "array", "title": "Provenance" }, "warnings": { "items": { "type": "string" }, "type": "array", "title": "Warnings" }, "errors": { "items": { "type": "string" }, "type": "array", "title": "Errors" } }, "type": "object", "required": [ "id", "organization_id", "memory_id", "agent_name", "agent_version", "status", "confidence", "started_at", "finished_at", "inputs_hash" ], "title": "AgentRunDetailResponse", "description": "Full agent run record." }, "AgentRunEventCreateRequest": { "properties": { "event_type": { "type": "string", "maxLength": 50, "minLength": 1, "title": "Event Type" }, "step_index": { "type": "integer", "minimum": 0.0, "title": "Step Index", "default": 0 }, "payload": { "type": "object", "title": "Payload" }, "summary_text": { "type": "string", "maxLength": 20000, "title": "Summary Text", "default": "" }, "created_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Created At", "description": "Optional timestamp override (UTC). If omitted, server sets now()." }, "trace_id": { "anyOf": [ { "type": "string", "maxLength": 100 }, { "type": "null" } ], "title": "Trace Id" } }, "type": "object", "required": [ "event_type" ], "title": "AgentRunEventCreateRequest" }, "AgentRunEventResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "agent_run_id": { "type": "string", "title": "Agent Run Id" }, "memory_id": { "type": "string", "title": "Memory Id" }, "event_type": { "type": "string", "title": "Event Type" }, "step_index": { "type": "integer", "title": "Step Index" }, "payload": { "type": "object", "title": "Payload" }, "summary_text": { "type": "string", "title": "Summary Text" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "trace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trace Id" } }, "type": "object", "required": [ "id", "organization_id", "agent_run_id", "memory_id", "event_type", "step_index", "payload", "summary_text", "created_at" ], "title": "AgentRunEventResponse" }, "AgentRunSummaryResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "memory_id": { "type": "string", "title": "Memory Id" }, "agent_name": { "type": "string", "title": "Agent Name" }, "agent_version": { "type": "string", "title": "Agent Version" }, "status": { "type": "string", "title": "Status", "description": "success|retry|failed|skipped" }, "confidence": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Confidence" }, "started_at": { "type": "string", "format": "date-time", "title": "Started At" }, "finished_at": { "type": "string", "format": "date-time", "title": "Finished At" }, "trace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trace Id" } }, "type": "object", "required": [ "id", "organization_id", "memory_id", "agent_name", "agent_version", "status", "confidence", "started_at", "finished_at" ], "title": "AgentRunSummaryResponse", "description": "Lightweight agent run record suitable for lists." }, "AnomalyResponse": { "properties": { "memory_id": { "type": "string", "title": "Memory Id" }, "anomaly_detected": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Anomaly Detected" }, "anomaly_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Anomaly Type" }, "severity": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Severity" }, "affected_fields": { "items": { "type": "string" }, "type": "array", "title": "Affected Fields" }, "anomaly_score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Anomaly Score" }, "confidence": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Confidence" }, "retrieved_at": { "type": "string", "format": "date-time", "title": "Retrieved At" } }, "type": "object", "required": [ "memory_id", "retrieved_at" ], "title": "AnomalyResponse" }, "AnonymizationLevel": { "type": "string", "enum": [ "full", "partial", "none" ], "title": "AnonymizationLevel", "description": "Data anonymization level." }, "ApiKeyCreateRequest": { "properties": { "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" } }, "type": "object", "required": [ "name" ], "title": "ApiKeyCreateRequest" }, "ApiKeyCreateResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "prefix": { "type": "string", "title": "Prefix" }, "user_id": { "type": "string", "title": "User Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "last_used_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Used At" }, "revoked_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Revoked At" }, "api_key": { "type": "string", "title": "Api Key" } }, "type": "object", "required": [ "id", "name", "prefix", "user_id", "created_at", "api_key" ], "title": "ApiKeyCreateResponse" }, "ApiKeyResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "prefix": { "type": "string", "title": "Prefix" }, "user_id": { "type": "string", "title": "User Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "last_used_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Used At" }, "revoked_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Revoked At" } }, "type": "object", "required": [ "id", "name", "prefix", "user_id", "created_at" ], "title": "ApiKeyResponse" }, "AuditEventResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "timestamp": { "type": "string", "format": "date-time", "title": "Timestamp" }, "organization_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Organization Id" }, "event_type": { "type": "string", "title": "Event Type" }, "event_category": { "type": "string", "title": "Event Category" }, "severity": { "type": "string", "title": "Severity" }, "actor_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Actor Id" }, "actor_type": { "type": "string", "title": "Actor Type" }, "resource_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resource Type" }, "resource_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resource Id" }, "request_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Request Id" }, "ip_address": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Ip Address" }, "user_agent": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Agent" }, "success": { "type": "boolean", "title": "Success" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "details": { "type": "object", "title": "Details" }, "changes": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Changes" } }, "type": "object", "required": [ "id", "timestamp", "organization_id", "event_type", "event_category", "severity", "actor_id", "actor_type", "resource_type", "resource_id", "request_id", "ip_address", "user_agent", "success", "error_message", "details", "changes" ], "title": "AuditEventResponse", "description": "Audit event response." }, "AuditStatsResponse": { "properties": { "total_events": { "type": "integer", "title": "Total Events" }, "events_by_type": { "type": "object", "title": "Events By Type" }, "events_by_action": { "type": "object", "title": "Events By Action" }, "top_actors": { "items": { "type": "object" }, "type": "array", "title": "Top Actors" }, "recent_denials": { "type": "integer", "title": "Recent Denials" }, "period_start": { "type": "string", "format": "date-time", "title": "Period Start" }, "period_end": { "type": "string", "format": "date-time", "title": "Period End" } }, "type": "object", "required": [ "total_events", "events_by_type", "events_by_action", "top_actors", "recent_denials", "period_start", "period_end" ], "title": "AuditStatsResponse", "description": "Audit statistics." }, "AuthConfig": { "properties": { "auth_mode": { "type": "string", "enum": [ "password", "oidc", "both" ], "title": "Auth Mode", "default": "password" }, "oidc_issuer": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Oidc Issuer" }, "oidc_client_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Oidc Client Id" }, "oidc_audience": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Oidc Audience" }, "oidc_allowed_email_domains": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Oidc Allowed Email Domains" }, "oidc_default_org_slug": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Oidc Default Org Slug" }, "oidc_default_org_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Oidc Default Org Id" }, "oidc_default_role": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Oidc Default Role" }, "oidc_groups_claim": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Oidc Groups Claim" }, "oidc_group_to_role_json": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Oidc Group To Role Json" } }, "type": "object", "title": "AuthConfig" }, "AuthConfigResponse": { "properties": { "effective": { "$ref": "#/components/schemas/AuthConfig" }, "overrides": { "type": "object", "title": "Overrides" } }, "type": "object", "required": [ "effective", "overrides" ], "title": "AuthConfigResponse" }, "AuthConfigUpdate": { "properties": { "auth_mode": { "anyOf": [ { "type": "string", "enum": [ "password", "oidc", "both" ] }, { "type": "null" } ], "title": "Auth Mode" }, "oidc_issuer": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Oidc Issuer" }, "oidc_client_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Oidc Client Id" }, "oidc_audience": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Oidc Audience" }, "oidc_allowed_email_domains": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Oidc Allowed Email Domains" }, "oidc_default_org_slug": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Oidc Default Org Slug" }, "oidc_default_org_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Oidc Default Org Id" }, "oidc_default_role": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Oidc Default Role" }, "oidc_groups_claim": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Oidc Groups Claim" }, "oidc_group_to_role_json": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Oidc Group To Role Json" } }, "type": "object", "title": "AuthConfigUpdate", "description": "Patch-like update.\n\nAny provided field overwrites the saved override.\nTo revert a field back to its .env/default value, send it as null." }, "AuthMethodsResponse": { "properties": { "password_enabled": { "type": "boolean", "title": "Password Enabled" }, "oidc_enabled": { "type": "boolean", "title": "Oidc Enabled" } }, "type": "object", "required": [ "password_enabled", "oidc_enabled" ], "title": "AuthMethodsResponse", "description": "Which authentication methods are enabled." }, "AutonomousGoalCreate": { "properties": { "initiator": { "$ref": "#/components/schemas/GoalInitiator" }, "title": { "type": "string", "title": "Title" }, "description": { "type": "string", "title": "Description" }, "trigger_memory_ids": { "items": { "type": "string" }, "type": "array", "title": "Trigger Memory Ids", "default": [] }, "expected_value": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Expected Value", "default": 0.5 }, "urgency": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Urgency", "default": 0.5 }, "confidence": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Confidence", "default": 0.7 }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Metadata", "default": {} } }, "type": "object", "required": [ "initiator", "title", "description" ], "title": "AutonomousGoalCreate", "description": "Create autonomous goal" }, "AutonomousGoalResponse": { "properties": { "initiator": { "$ref": "#/components/schemas/GoalInitiator" }, "title": { "type": "string", "title": "Title" }, "description": { "type": "string", "title": "Description" }, "trigger_memory_ids": { "items": { "type": "string" }, "type": "array", "title": "Trigger Memory Ids", "default": [] }, "expected_value": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Expected Value", "default": 0.5 }, "urgency": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Urgency", "default": 0.5 }, "confidence": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Confidence", "default": 0.7 }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Metadata", "default": {} }, "id": { "type": "string", "format": "uuid", "title": "Id" }, "status": { "$ref": "#/components/schemas/GoalStatus" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "activated_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Activated At" }, "completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Completed At" }, "completion_evidence": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Completion Evidence" } }, "type": "object", "required": [ "initiator", "title", "description", "id", "status", "created_at" ], "title": "AutonomousGoalResponse", "description": "Autonomous goal response from API" }, "AutonomousGoalUpdate": { "properties": { "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "expected_value": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Expected Value" }, "urgency": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Urgency" }, "status": { "anyOf": [ { "$ref": "#/components/schemas/GoalStatus" }, { "type": "null" } ] } }, "type": "object", "title": "AutonomousGoalUpdate", "description": "Update autonomous goal" }, "BackupListResponse": { "properties": { "backups": { "items": { "$ref": "#/components/schemas/BackupTaskResponse" }, "type": "array", "title": "Backups" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" } }, "type": "object", "required": [ "backups", "total", "page", "page_size" ], "title": "BackupListResponse", "description": "Response for backup list" }, "BackupScheduleResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "frequency": { "type": "string", "title": "Frequency" }, "retention_days": { "type": "integer", "title": "Retention Days" }, "backup_time": { "type": "string", "title": "Backup Time" }, "enabled": { "type": "boolean", "title": "Enabled" }, "s3_bucket": { "type": "string", "title": "S3 Bucket" }, "max_backup_size_gb": { "type": "integer", "title": "Max Backup Size Gb" }, "enable_incremental": { "type": "boolean", "title": "Enable Incremental" }, "last_run_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Run At" }, "next_run_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Next Run At" }, "last_success_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Success At" }, "consecutive_failures": { "type": "integer", "title": "Consecutive Failures" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "frequency", "retention_days", "backup_time", "enabled", "s3_bucket", "max_backup_size_gb", "enable_incremental", "consecutive_failures", "created_at" ], "title": "BackupScheduleResponse", "description": "Response for backup schedule info" }, "BackupStatisticsResponse": { "properties": { "total_backups": { "type": "integer", "title": "Total Backups" }, "total_size_gb": { "type": "number", "title": "Total Size Gb" }, "failed_backups": { "type": "integer", "title": "Failed Backups" }, "last_backup_time": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Backup Time" }, "success_rate": { "type": "number", "title": "Success Rate" } }, "type": "object", "required": [ "total_backups", "total_size_gb", "failed_backups", "success_rate" ], "title": "BackupStatisticsResponse", "description": "Response for backup statistics" }, "BackupTaskResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "backup_type": { "type": "string", "title": "Backup Type" }, "status": { "type": "string", "title": "Status" }, "size_bytes": { "type": "integer", "title": "Size Bytes" }, "duration_seconds": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Duration Seconds" }, "checksum_sha256": { "type": "string", "title": "Checksum Sha256" }, "s3_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "S3 Path" }, "s3_object_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "S3 Object Key" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "backup_type", "status", "size_bytes", "checksum_sha256", "created_at", "updated_at" ], "title": "BackupTaskResponse", "description": "Response for backup task info" }, "BatchDeleteKnowledgeRequest": { "properties": { "knowledge_ids": { "items": { "type": "string" }, "type": "array", "maxItems": 1000, "minItems": 1, "title": "Knowledge Ids" }, "soft_delete": { "type": "boolean", "title": "Soft Delete", "default": true } }, "type": "object", "required": [ "knowledge_ids" ], "title": "BatchDeleteKnowledgeRequest", "description": "Bulk delete knowledge items." }, "BatchDeleteMemoryRequest": { "properties": { "memory_ids": { "items": { "type": "string" }, "type": "array", "maxItems": 1000, "minItems": 1, "title": "Memory Ids" }, "soft_delete": { "type": "boolean", "title": "Soft Delete", "default": true } }, "type": "object", "required": [ "memory_ids" ], "title": "BatchDeleteMemoryRequest", "description": "Bulk delete memory items." }, "BatchOperationResult": { "properties": { "operation_type": { "type": "string", "title": "Operation Type" }, "resource_type": { "type": "string", "title": "Resource Type" }, "total_items": { "type": "integer", "title": "Total Items" }, "successful": { "type": "integer", "title": "Successful" }, "failed": { "type": "integer", "title": "Failed" }, "errors": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Errors" }, "duration_seconds": { "type": "number", "title": "Duration Seconds" } }, "type": "object", "required": [ "operation_type", "resource_type", "total_items", "successful", "failed", "duration_seconds" ], "title": "BatchOperationResult", "description": "Result of a batch operation." }, "BatchShareMemoryRequest": { "properties": { "memory_ids": { "items": { "type": "string" }, "type": "array", "maxItems": 1000, "minItems": 1, "title": "Memory Ids" }, "shared_with_user_ids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Shared With User Ids" }, "shared_with_team_ids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Shared With Team Ids" }, "access_level": { "type": "string", "pattern": "^(view|edit|admin)$", "title": "Access Level", "default": "view" } }, "type": "object", "required": [ "memory_ids" ], "title": "BatchShareMemoryRequest", "description": "Bulk share memory items." }, "BatchUpdateKnowledgeRequest": { "properties": { "knowledge_ids": { "items": { "type": "string" }, "type": "array", "maxItems": 1000, "minItems": 1, "title": "Knowledge Ids" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" }, "is_published": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Published" }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Metadata" } }, "type": "object", "required": [ "knowledge_ids" ], "title": "BatchUpdateKnowledgeRequest", "description": "Bulk update knowledge items." }, "BatchUpdateMemoryRequest": { "properties": { "memory_ids": { "items": { "type": "string" }, "type": "array", "maxItems": 1000, "minItems": 1, "title": "Memory Ids" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "is_starred": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Starred" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Metadata" } }, "type": "object", "required": [ "memory_ids" ], "title": "BatchUpdateMemoryRequest", "description": "Bulk update memory items." }, "BenchmarkHistoryResponse": { "properties": { "metric_type": { "type": "string", "title": "Metric Type" }, "history": { "items": { "type": "object" }, "type": "array", "title": "History" } }, "type": "object", "required": [ "metric_type", "history" ], "title": "BenchmarkHistoryResponse", "description": "Response with historical benchmark data." }, "BenchmarkReportResponse": { "properties": { "organization_id": { "type": "string", "title": "Organization Id" }, "report_date": { "type": "string", "title": "Report Date" }, "overall_health_percentile": { "type": "number", "title": "Overall Health Percentile" }, "overall_ranking": { "type": "string", "title": "Overall Ranking" }, "metrics": { "additionalProperties": { "type": "object" }, "type": "object", "title": "Metrics" }, "improvements": { "items": { "type": "string" }, "type": "array", "title": "Improvements" }, "recommendations": { "items": { "type": "string" }, "type": "array", "title": "Recommendations" }, "peer_comparison_count": { "type": "integer", "title": "Peer Comparison Count" } }, "type": "object", "required": [ "organization_id", "report_date", "overall_health_percentile", "overall_ranking", "metrics", "improvements", "recommendations", "peer_comparison_count" ], "title": "BenchmarkReportResponse", "description": "Response with comprehensive benchmark report." }, "BenchmarkRunCreate": { "properties": { "run_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Run At" }, "mode": { "type": "string", "title": "Mode" }, "strategy": { "type": "string", "title": "Strategy" }, "dataset": { "type": "string", "title": "Dataset" }, "vllm_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "vLLM Model" }, "duration_seconds": { "type": "number", "title": "Duration Seconds" }, "composite_score": { "type": "number", "title": "Composite Score" }, "results": { "items": {}, "type": "array", "title": "Results" } }, "type": "object", "required": [ "mode", "strategy", "dataset", "duration_seconds", "composite_score", "results" ], "title": "BenchmarkRunCreate" }, "BenchmarkRunResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "run_at": { "type": "string", "title": "Run At" }, "mode": { "type": "string", "title": "Mode" }, "strategy": { "type": "string", "title": "Strategy" }, "dataset": { "type": "string", "title": "Dataset" }, "vllm_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "vLLM Model" }, "duration_seconds": { "type": "number", "title": "Duration Seconds" }, "composite_score": { "type": "number", "title": "Composite Score" }, "results": { "items": {}, "type": "array", "title": "Results" } }, "type": "object", "required": [ "id", "run_at", "mode", "strategy", "dataset", "vllm_model", "duration_seconds", "composite_score", "results" ], "title": "BenchmarkRunResponse" }, "Body_compute_private_aggregate_api_v1_federated_privacy_private_aggregate_post": { "properties": { "request": { "$ref": "#/components/schemas/PrivateAggregateRequest" }, "org_data": { "type": "object", "title": "Org Data" } }, "type": "object", "required": [ "request", "org_data" ], "title": "Body_compute_private_aggregate_api_v1_federated_privacy_private_aggregate_post" }, "Body_import_snapshot_api_v1_api_v1_snapshots_import_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File" } }, "type": "object", "required": [ "file" ], "title": "Body_import_snapshot_api_v1_api_v1_snapshots_import_post" }, "Body_upload_memory_attachment_api_v1_memories__memory_id__attachments_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File" } }, "type": "object", "required": [ "file" ], "title": "Body_upload_memory_attachment_api_v1_memories__memory_id__attachments_post" }, "CalibrationProfileOut": { "properties": { "organization_id": { "type": "string", "title": "Organization Id" }, "promotion_threshold": { "type": "number", "title": "Promotion Threshold" }, "conflict_escalation_threshold": { "type": "number", "title": "Conflict Escalation Threshold" }, "drift_threshold": { "type": "number", "title": "Drift Threshold" }, "signal_weights": { "additionalProperties": { "type": "number" }, "type": "object", "title": "Signal Weights" }, "learning_rate": { "type": "number", "title": "Learning Rate" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "organization_id", "promotion_threshold", "conflict_escalation_threshold", "drift_threshold", "learning_rate", "updated_at" ], "title": "CalibrationProfileOut" }, "CalibrationProfileUpdateIn": { "properties": { "signal_weights": { "anyOf": [ { "additionalProperties": { "type": "number" }, "type": "object" }, { "type": "null" } ], "title": "Signal Weights" }, "learning_rate": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Learning Rate" }, "promotion_threshold": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Promotion Threshold" }, "conflict_escalation_threshold": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Conflict Escalation Threshold" }, "drift_threshold": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Drift Threshold" } }, "type": "object", "title": "CalibrationProfileUpdateIn" }, "CapabilityDiscoveryRecord": { "properties": { "discovery_type": { "type": "string", "title": "Discovery Type" }, "tool_or_capability": { "type": "string", "title": "Tool Or Capability" }, "description": { "type": "string", "title": "Description" }, "potential_value": { "type": "number", "title": "Potential Value", "default": 0.5 } }, "type": "object", "required": [ "discovery_type", "tool_or_capability", "description" ], "title": "CapabilityDiscoveryRecord", "description": "Request to record capability discovery." }, "CapabilityDiscoveryResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "discovery_type": { "type": "string", "title": "Discovery Type" }, "tool_or_capability": { "type": "string", "title": "Tool Or Capability" }, "potential_value": { "type": "number", "title": "Potential Value" } }, "type": "object", "required": [ "id", "discovery_type", "tool_or_capability", "potential_value" ], "title": "CapabilityDiscoveryResponse", "description": "Response after recording discovery." }, "CapabilityTokenCreateRequest": { "properties": { "name": { "type": "string", "title": "Name", "description": "Token name, e.g., 'agent_search_token'" }, "scopes": { "items": { "type": "string" }, "type": "array", "title": "Scopes", "description": "List of scopes: read, append, search, upsert, consolidate, promote" }, "session_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Session Id", "description": "Tie to agent session" }, "agent_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Name", "description": "Agent this token is for" }, "issued_to_user_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Issued To User Id", "description": "User this token is issued to" }, "ttl_seconds": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Ttl Seconds", "description": "Time to live in seconds (default 24h)", "default": 86400 }, "max_tokens_per_month": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Tokens Per Month", "description": "Monthly token quota" }, "max_storage_bytes": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Storage Bytes", "description": "Storage quota in bytes" }, "max_requests_per_minute": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Requests Per Minute", "description": "Rate limit requests/minute" } }, "type": "object", "required": [ "name", "scopes" ], "title": "CapabilityTokenCreateRequest", "description": "Request to issue a new capability token." }, "CapabilityTokenResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "token": { "type": "string", "title": "Token" }, "name": { "type": "string", "title": "Name" }, "scopes": { "type": "string", "title": "Scopes" }, "agent_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Name" }, "expires_at": { "type": "string", "title": "Expires At" }, "created_at": { "type": "string", "title": "Created At" }, "tokens_used": { "type": "integer", "title": "Tokens Used" }, "storage_used_bytes": { "type": "integer", "title": "Storage Used Bytes" }, "revoked_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Revoked At" } }, "type": "object", "required": [ "id", "token", "name", "scopes", "agent_name", "expires_at", "created_at", "tokens_used", "storage_used_bytes" ], "title": "CapabilityTokenResponse", "description": "Response with capability token details." }, "CausalEdgeResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "cause_entity_id": { "type": "string", "title": "Cause Entity Id" }, "cause_entity_type": { "type": "string", "title": "Cause Entity Type" }, "effect_entity_id": { "type": "string", "title": "Effect Entity Id" }, "effect_entity_type": { "type": "string", "title": "Effect Entity Type" }, "mechanism": { "type": "string", "title": "Mechanism" }, "strength": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Strength" }, "latency_hours": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Latency Hours" }, "evidence_memory_ids": { "items": { "type": "string" }, "type": "array", "title": "Evidence Memory Ids" }, "discovered_at": { "type": "string", "format": "date-time", "title": "Discovered At" }, "validation_count": { "type": "integer", "title": "Validation Count", "default": 0 }, "invalidation_count": { "type": "integer", "title": "Invalidation Count", "default": 0 }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "organization_id", "cause_entity_id", "cause_entity_type", "effect_entity_id", "effect_entity_type", "mechanism", "strength", "discovered_at", "created_at" ], "title": "CausalEdgeResponse", "description": "Response model for a causal edge." }, "CausalHypothesisRefreshRequest": { "properties": { "org_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org Id", "description": "Defaults to caller org (system_admin may override)" }, "min_edge_weight": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Min Edge Weight", "default": 0.25 }, "limit": { "type": "integer", "maximum": 2000.0, "minimum": 1.0, "title": "Limit", "default": 200 } }, "type": "object", "title": "CausalHypothesisRefreshRequest" }, "CausalHypothesisRefreshResponse": { "properties": { "ok": { "type": "boolean", "title": "Ok" }, "enqueued": { "type": "boolean", "title": "Enqueued" }, "task_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Task Id" }, "org_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org Id" }, "reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reason" } }, "type": "object", "required": [ "ok", "enqueued" ], "title": "CausalHypothesisRefreshResponse" }, "CausalHypothesisSchema": { "properties": { "id": { "type": "string", "title": "Id", "description": "UUID of hypothesis" }, "organization_id": { "type": "string", "title": "Organization Id", "description": "Organization UUID" }, "episode_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Episode Id", "description": "Optional episode UUID" }, "from_event_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "From Event Id", "description": "Optional from-event UUID" }, "to_event_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "To Event Id", "description": "Optional to-event UUID" }, "relation": { "allOf": [ { "$ref": "#/components/schemas/RelationTypeEnum" } ], "description": "Type of causal relationship" }, "confidence": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Confidence", "description": "Confidence in hypothesis" }, "evidence_memory_ids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Evidence Memory Ids", "description": "Supporting memory UUIDs" }, "status": { "allOf": [ { "$ref": "#/components/schemas/HypothesisStatusEnum" } ], "description": "Hypothesis lifecycle state" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At", "description": "When hypothesis created" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At", "description": "When hypothesis last updated" } }, "type": "object", "required": [ "id", "organization_id", "relation", "confidence", "status", "created_at", "updated_at" ], "title": "CausalHypothesisSchema", "description": "Response model for causal hypothesis." }, "ChangeItem": { "properties": { "entity": { "type": "string", "title": "Entity" }, "change_type": { "type": "string", "title": "Change Type" }, "description": { "type": "string", "title": "Description" }, "memory_id": { "type": "string", "title": "Memory Id" } }, "type": "object", "required": [ "entity", "change_type", "description", "memory_id" ], "title": "ChangeItem" }, "ChangesResponse": { "properties": { "entity": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Entity" }, "changes": { "items": { "$ref": "#/components/schemas/ChangeItem" }, "type": "array", "title": "Changes" }, "total": { "type": "integer", "title": "Total" }, "retrieved_at": { "type": "string", "format": "date-time", "title": "Retrieved At" } }, "type": "object", "required": [ "entity", "changes", "total", "retrieved_at" ], "title": "ChangesResponse" }, "CheckpointSnapshot": { "properties": { "id": { "type": "string", "title": "Id" }, "step_index": { "type": "integer", "title": "Step Index" }, "input_snapshot": { "type": "object", "title": "Input Snapshot" }, "retrieval_snapshot": { "type": "object", "title": "Retrieval Snapshot" }, "model_snapshot": { "type": "object", "title": "Model Snapshot" }, "output_snapshot": { "type": "object", "title": "Output Snapshot" }, "created_at": { "type": "string", "title": "Created At" } }, "type": "object", "required": [ "id", "step_index", "created_at" ], "title": "CheckpointSnapshot", "description": "Single checkpoint snapshot for replay." }, "CircuitBreakerReset": { "properties": { "request_type": { "type": "string", "title": "Request Type", "description": "Request type to reset" } }, "type": "object", "required": [ "request_type" ], "title": "CircuitBreakerReset", "description": "Request to reset circuit breaker." }, "ClaimRequest": { "properties": { "memory_id": { "type": "string", "title": "Memory Id" } }, "type": "object", "required": [ "memory_id" ], "title": "ClaimRequest" }, "ClaimResponse": { "properties": { "memory_id": { "type": "string", "title": "Memory Id" }, "priority": { "type": "string", "title": "Priority" }, "review_reasons": { "items": { "type": "string" }, "type": "array", "title": "Review Reasons" }, "review_context": { "type": "object", "title": "Review Context" }, "claimed_at": { "type": "string", "format": "date-time", "title": "Claimed At" } }, "type": "object", "required": [ "memory_id", "priority", "review_reasons", "review_context", "claimed_at" ], "title": "ClaimResponse" }, "Classification": { "type": "string", "enum": [ "public", "internal", "confidential", "restricted" ], "title": "Classification", "description": "Security classification levels." }, "CoactivatedNeighborDetailSchema": { "properties": { "edge_weight": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Edge Weight", "description": "Co-activation edge weight" }, "coactivation_count": { "type": "integer", "minimum": 0.0, "title": "Coactivation Count", "description": "Times co-activated" }, "memory": { "allOf": [ { "$ref": "#/components/schemas/MemoryResponse" } ], "description": "Neighbor memory metadata" } }, "type": "object", "required": [ "edge_weight", "coactivation_count", "memory" ], "title": "CoactivatedNeighborDetailSchema", "description": "Neighbor in co-activation graph with memory metadata." }, "CoactivatedNeighborSchema": { "properties": { "memory_id": { "type": "string", "title": "Memory Id", "description": "Neighbor memory UUID" }, "edge_weight": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Edge Weight", "description": "Co-activation edge weight" }, "coactivation_count": { "type": "integer", "minimum": 0.0, "title": "Coactivation Count", "description": "Times co-activated" } }, "type": "object", "required": [ "memory_id", "edge_weight", "coactivation_count" ], "title": "CoactivatedNeighborSchema", "description": "Neighbor in co-activation graph." }, "CoactivationEdgeSchema": { "properties": { "id": { "type": "string", "title": "Id", "description": "UUID of edge record" }, "organization_id": { "type": "string", "title": "Organization Id", "description": "Organization UUID" }, "memory_id_a": { "type": "string", "title": "Memory Id A", "description": "First memory UUID" }, "memory_id_b": { "type": "string", "title": "Memory Id B", "description": "Second memory UUID" }, "coactivation_count": { "type": "integer", "minimum": 0.0, "title": "Coactivation Count", "description": "Times co-activated together" }, "edge_weight": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Edge Weight", "description": "Weight (1 - exp(-\u03bb*count))" }, "last_coactivated_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Coactivated At", "description": "Most recent co-activation" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At", "description": "When edge created" } }, "type": "object", "required": [ "id", "organization_id", "memory_id_a", "memory_id_b", "coactivation_count", "edge_weight", "created_at" ], "title": "CoactivationEdgeSchema", "description": "Response model for co-activation edge." }, "CognitiveAutonomyConfig": { "properties": { "enabled": { "type": "boolean", "title": "Enabled", "default": true }, "reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reason" } }, "type": "object", "title": "CognitiveAutonomyConfig" }, "CognitiveAutonomyConfigResponse": { "properties": { "org_id": { "type": "string", "title": "Org Id" }, "global_config": { "$ref": "#/components/schemas/CognitiveAutonomyConfig" }, "org_config": { "anyOf": [ { "$ref": "#/components/schemas/CognitiveAutonomyConfig" }, { "type": "null" } ] }, "effective": { "$ref": "#/components/schemas/CognitiveAutonomyConfig" } }, "type": "object", "required": [ "org_id", "global_config", "effective" ], "title": "CognitiveAutonomyConfigResponse" }, "CognitiveAutonomyConfigUpdate": { "properties": { "enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Enabled" }, "reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reason" }, "global_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Global Enabled" }, "global_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Global Reason" } }, "type": "object", "title": "CognitiveAutonomyConfigUpdate" }, "CognitiveIterationResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "session_id": { "type": "string", "title": "Session Id" }, "iteration_num": { "type": "integer", "title": "Iteration Num" }, "plan_json": { "type": "object", "title": "Plan Json" }, "execution_json": { "type": "object", "title": "Execution Json" }, "critique_json": { "type": "object", "title": "Critique Json" }, "evaluation": { "type": "string", "enum": [ "pass", "fail", "retry", "needs_evidence" ], "title": "Evaluation" }, "started_at": { "type": "string", "format": "date-time", "title": "Started At" }, "finished_at": { "type": "string", "format": "date-time", "title": "Finished At" }, "metrics": { "type": "object", "title": "Metrics" } }, "type": "object", "required": [ "id", "session_id", "iteration_num", "plan_json", "execution_json", "critique_json", "evaluation", "started_at", "finished_at", "metrics" ], "title": "CognitiveIterationResponse" }, "CognitiveSessionCreateRequest": { "properties": { "goal": { "type": "string", "title": "Goal" }, "goal_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Goal Id" }, "agent_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Id" }, "mode": { "type": "string", "enum": [ "interactive", "batch" ], "title": "Mode", "default": "interactive" }, "context_snapshot": { "type": "object", "title": "Context Snapshot" } }, "type": "object", "required": [ "goal" ], "title": "CognitiveSessionCreateRequest" }, "CognitiveSessionResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "user_id": { "type": "string", "title": "User Id" }, "agent_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Id" }, "status": { "type": "string", "enum": [ "running", "succeeded", "failed", "aborted" ], "title": "Status" }, "goal": { "type": "string", "title": "Goal" }, "goal_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Goal Id" }, "context_snapshot": { "type": "object", "title": "Context Snapshot" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "trace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trace Id" } }, "type": "object", "required": [ "id", "organization_id", "user_id", "status", "goal", "context_snapshot", "created_at", "updated_at" ], "title": "CognitiveSessionResponse" }, "CompleteJsonRequest": { "properties": { "prompt": { "type": "string", "maxLength": 100000, "minLength": 1, "title": "Prompt" }, "schema_hint": { "type": "object", "title": "Schema Hint" } }, "type": "object", "required": [ "prompt" ], "title": "CompleteJsonRequest" }, "CompleteJsonResponse": { "properties": { "data": { "type": "object", "title": "Data" } }, "type": "object", "title": "CompleteJsonResponse" }, "ComplexityResponse": { "properties": { "query": { "type": "string", "title": "Query" }, "complexity_score": { "type": "number", "title": "Complexity Score" } }, "type": "object", "required": [ "query", "complexity_score" ], "title": "ComplexityResponse", "description": "Complexity estimation response." }, "ComposeProceduresRequest": { "properties": { "abstract_procedures": { "items": { "type": "object" }, "type": "array", "title": "Abstract Procedures" }, "glue_logic": { "type": "string", "title": "Glue Logic", "default": "" } }, "type": "object", "required": [ "abstract_procedures" ], "title": "ComposeProceduresRequest" }, "ComputeBenchmarksRequest": { "properties": { "metrics": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Metrics", "description": "Specific metrics to compute (None = all)" } }, "type": "object", "title": "ComputeBenchmarksRequest", "description": "Request to compute organization benchmarks." }, "ConfidenceCalibrationResponse": { "properties": { "confidence_calibration": { "type": "number", "title": "Confidence Calibration" }, "surprise_frequency": { "type": "number", "title": "Surprise Frequency" }, "well_calibrated": { "type": "boolean", "title": "Well Calibrated" } }, "type": "object", "required": [ "confidence_calibration", "surprise_frequency", "well_calibrated" ], "title": "ConfidenceCalibrationResponse", "description": "Confidence calibration status response." }, "ConsentCreate": { "properties": { "consent_type": { "type": "string", "pattern": "^(data_processing|analytics|marketing)$", "title": "Consent Type" }, "granted": { "type": "boolean", "title": "Granted" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" } }, "type": "object", "required": [ "consent_type", "granted" ], "title": "ConsentCreate" }, "ConsentResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "user_id": { "type": "string", "title": "User Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "consent_type": { "type": "string", "title": "Consent Type" }, "granted": { "type": "boolean", "title": "Granted" }, "granted_at": { "type": "string", "format": "date-time", "title": "Granted At" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" }, "revoked_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Revoked At" } }, "type": "object", "required": [ "id", "user_id", "organization_id", "consent_type", "granted", "granted_at" ], "title": "ConsentResponse" }, "ConsolidationCandidate": { "properties": { "primary_id": { "type": "string", "title": "Primary Id" }, "duplicate_ids": { "items": { "type": "string" }, "type": "array", "title": "Duplicate Ids" }, "similarity_scores": { "items": { "type": "number" }, "type": "array", "title": "Similarity Scores" } }, "type": "object", "required": [ "primary_id", "duplicate_ids", "similarity_scores" ], "title": "ConsolidationCandidate", "description": "Candidate group for consolidation." }, "ConsolidationRecordResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "user_id": { "type": "string", "title": "User Id" }, "consolidated_memory_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Consolidated Memory Id" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "summary": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Summary" }, "source_memory_ids": { "items": { "type": "string" }, "type": "array", "title": "Source Memory Ids" }, "created_by": { "type": "string", "title": "Created By" }, "status": { "type": "string", "title": "Status" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "organization_id", "user_id", "consolidated_memory_id", "title", "summary", "source_memory_ids", "created_by", "status", "error_message", "created_at" ], "title": "ConsolidationRecordResponse" }, "ConsolidationSessionResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "session_type": { "type": "string", "title": "Session Type" }, "started_at": { "type": "string", "format": "date-time", "title": "Started At" }, "completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Completed At" }, "duration_seconds": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Duration Seconds" }, "status": { "type": "string", "title": "Status" }, "operations": { "type": "object", "title": "Operations" }, "memory_quality_before": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Memory Quality Before" }, "memory_quality_after": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Memory Quality After" } }, "type": "object", "required": [ "id", "session_type", "started_at", "status" ], "title": "ConsolidationSessionResponse" }, "ConsolidationSessionsResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/ConsolidationSessionResponse" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": [ "items", "total" ], "title": "ConsolidationSessionsResponse" }, "ConsolidationStartRequest": { "properties": { "session_type": { "type": "string", "pattern": "^(nightly|weekly|triggered)$", "title": "Session Type", "default": "triggered" } }, "type": "object", "title": "ConsolidationStartRequest" }, "ConsolidationStatus": { "properties": { "memory_id": { "type": "string", "title": "Memory Id" }, "is_consolidated": { "type": "boolean", "title": "Is Consolidated" }, "tags": { "items": { "type": "string" }, "type": "array", "title": "Tags" }, "entities_count": { "type": "integer", "title": "Entities Count" }, "relationships_count": { "type": "integer", "title": "Relationships Count" } }, "type": "object", "required": [ "memory_id", "is_consolidated", "tags", "entities_count", "relationships_count" ], "title": "ConsolidationStatus", "description": "Consolidation status of a memory." }, "ContributePatternRequest": { "properties": { "domain": { "type": "string", "title": "Domain", "description": "Knowledge domain" }, "min_contributors": { "type": "integer", "minimum": 1.0, "title": "Min Contributors", "description": "Minimum orgs needed for aggregate", "default": 3 } }, "type": "object", "required": [ "domain" ], "title": "ContributePatternRequest", "description": "Request to contribute organization patterns to federation." }, "ContributePlaybookRequest": { "properties": { "playbook_id": { "type": "string", "title": "Playbook Id", "description": "ID of playbook to contribute" }, "publicity_level": { "allOf": [ { "$ref": "#/components/schemas/PublicityLevel" } ], "default": "peer_group" }, "domain": { "type": "string", "title": "Domain", "description": "Playbook domain", "default": "general" } }, "type": "object", "required": [ "playbook_id" ], "title": "ContributePlaybookRequest", "description": "Request to share a playbook with federation." }, "ContributePlaybookResponse": { "properties": { "success": { "type": "boolean", "title": "Success" }, "federated_knowledge_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Federated Knowledge Id" }, "message": { "type": "string", "title": "Message" } }, "type": "object", "required": [ "success", "message" ], "title": "ContributePlaybookResponse", "description": "Response after contributing playbook." }, "ContributionStatsResponse": { "properties": { "total_contributions": { "type": "integer", "title": "Total Contributions" }, "by_type": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "By Type" }, "average_impact_score": { "type": "number", "title": "Average Impact Score" }, "first_contribution": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "First Contribution" }, "last_contribution": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Contribution" } }, "type": "object", "required": [ "total_contributions", "by_type", "average_impact_score", "first_contribution", "last_contribution" ], "title": "ContributionStatsResponse", "description": "Response with contribution statistics." }, "CounterfactualRequest": { "properties": { "condition": { "type": "string", "title": "Condition", "description": "If condition X, what about Y?" }, "query": { "type": "object", "title": "Query" } }, "type": "object", "required": [ "condition" ], "title": "CounterfactualRequest", "description": "Counterfactual query request." }, "CounterfactualResponse": { "properties": { "scenario_id": { "type": "string", "title": "Scenario Id" }, "condition": { "type": "string", "title": "Condition" }, "status": { "type": "string", "title": "Status", "default": "pending" } }, "type": "object", "required": [ "scenario_id", "condition" ], "title": "CounterfactualResponse", "description": "Counterfactual scenario result." }, "CreateBackupRequest": { "properties": { "backup_type": { "type": "string", "title": "Backup Type", "description": "Type of backup: full or incremental", "default": "full" } }, "type": "object", "title": "CreateBackupRequest", "description": "Request to create a backup" }, "CreateBackupResponse": { "properties": { "backup_id": { "type": "string", "format": "uuid", "title": "Backup Id" }, "status": { "type": "string", "title": "Status" }, "message": { "type": "string", "title": "Message" } }, "type": "object", "required": [ "backup_id", "status", "message" ], "title": "CreateBackupResponse", "description": "Response after creating backup" }, "CreateConsolidationRequest": { "properties": { "memory_ids": { "items": { "type": "string" }, "type": "array", "minItems": 2, "title": "Memory Ids", "description": "Source memory IDs" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title", "description": "Optional title for consolidated memory" }, "created_by": { "type": "string", "title": "Created By", "description": "'manual' or 'system'", "default": "manual" } }, "type": "object", "required": [ "memory_ids" ], "title": "CreateConsolidationRequest", "description": "Create a consolidation record + consolidated summary memory." }, "DLQStatsResponse": { "properties": { "total_failed_tasks": { "type": "integer", "title": "Total Failed Tasks" }, "total_retrying": { "type": "integer", "title": "Total Retrying" }, "by_task": { "type": "object", "title": "By Task" }, "oldest_task_age_hours": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Oldest Task Age Hours" } }, "type": "object", "required": [ "total_failed_tasks", "total_retrying", "by_task" ], "title": "DLQStatsResponse", "description": "DLQ statistics response." }, "DLQTaskResponse": { "properties": { "task_id": { "type": "string", "title": "Task Id" }, "task_name": { "type": "string", "title": "Task Name" }, "retry_count": { "type": "integer", "title": "Retry Count" }, "max_retries": { "type": "integer", "title": "Max Retries" }, "exception": { "type": "string", "title": "Exception" }, "created_at": { "type": "string", "title": "Created At" }, "next_retry_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Retry At" } }, "type": "object", "required": [ "task_id", "task_name", "retry_count", "max_retries", "exception", "created_at" ], "title": "DLQTaskResponse", "description": "DLQ task response." }, "DashboardActivityResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "admin_id": { "type": "string", "title": "Admin Id" }, "action": { "type": "string", "title": "Action" }, "resource_type": { "type": "string", "title": "Resource Type" }, "resource_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resource Id" }, "timestamp": { "type": "string", "format": "date-time", "title": "Timestamp" }, "description": { "type": "string", "title": "Description" }, "status": { "type": "string", "title": "Status" } }, "type": "object", "required": [ "id", "admin_id", "action", "resource_type", "timestamp", "description", "status" ], "title": "DashboardActivityResponse", "description": "Recent admin activity" }, "DashboardKPIResponse": { "properties": { "label": { "type": "string", "title": "Label" }, "value": { "type": "string", "title": "Value" }, "unit": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Unit" }, "trend": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trend", "description": "up, down, or stable" }, "change_percent": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Change Percent" } }, "type": "object", "required": [ "label", "value" ], "title": "DashboardKPIResponse", "description": "Dashboard KPI metric" }, "DashboardKPIsResponse": { "properties": { "users": { "items": { "$ref": "#/components/schemas/DashboardKPIResponse" }, "type": "array", "title": "Users" }, "memories": { "items": { "$ref": "#/components/schemas/DashboardKPIResponse" }, "type": "array", "title": "Memories" }, "system": { "items": { "$ref": "#/components/schemas/DashboardKPIResponse" }, "type": "array", "title": "System" } }, "type": "object", "required": [ "users", "memories", "system" ], "title": "DashboardKPIsResponse", "description": "All KPIs grouped by category" }, "DashboardResponse": { "properties": { "timestamp": { "type": "string", "format": "date-time", "title": "Timestamp" }, "kpis": { "$ref": "#/components/schemas/DashboardKPIsResponse" }, "services": { "items": { "$ref": "#/components/schemas/ServiceHealthResponse" }, "type": "array", "title": "Services" }, "recent_activities": { "items": { "$ref": "#/components/schemas/DashboardActivityResponse" }, "type": "array", "title": "Recent Activities" }, "alerts": { "items": { "type": "object" }, "type": "array", "title": "Alerts", "default": [] } }, "type": "object", "required": [ "timestamp", "kpis", "services", "recent_activities" ], "title": "DashboardResponse", "description": "Complete dashboard data" }, "DeadLetterQueueStats": { "properties": { "total_unresolved": { "type": "integer", "title": "Total Unresolved" }, "by_failure_reason": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "By Failure Reason" }, "by_task_type": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "By Task Type" }, "high_priority_count": { "type": "integer", "title": "High Priority Count" } }, "type": "object", "required": [ "total_unresolved", "by_failure_reason", "by_task_type", "high_priority_count" ], "title": "DeadLetterQueueStats", "description": "Dead Letter Queue statistics." }, "DeadLetterTaskDiscard": { "properties": { "notes": { "type": "string", "maxLength": 500, "title": "Notes", "description": "Required notes on why task is being discarded" } }, "type": "object", "required": [ "notes" ], "title": "DeadLetterTaskDiscard", "description": "Request to discard a DLQ task." }, "DeadLetterTaskRequeue": { "properties": { "notes": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Notes", "description": "Notes on why task is being requeued" } }, "type": "object", "title": "DeadLetterTaskRequeue", "description": "Request to requeue a DLQ task." }, "DeadLetterTaskResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "original_task_id": { "type": "string", "format": "uuid", "title": "Original Task Id" }, "task_type": { "type": "string", "title": "Task Type" }, "failure_reason": { "type": "string", "title": "Failure Reason" }, "total_attempts": { "type": "integer", "title": "Total Attempts" }, "last_error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Error" }, "error_pattern": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Pattern" }, "task_payload": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Task Payload" }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Metadata" }, "quarantined_at": { "type": "string", "format": "date-time", "title": "Quarantined At" }, "reviewed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Reviewed At" }, "reviewed_by": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Reviewed By" }, "resolution": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resolution" }, "resolution_notes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resolution Notes" }, "is_resolved": { "type": "boolean", "title": "Is Resolved" }, "review_priority": { "type": "integer", "title": "Review Priority" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "original_task_id", "task_type", "failure_reason", "total_attempts", "quarantined_at", "is_resolved", "review_priority", "created_at", "updated_at" ], "title": "DeadLetterTaskResponse", "description": "Dead Letter Queue task response." }, "DeletionRequestCreate": { "properties": { "user_id": { "type": "string", "title": "User Id" }, "reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reason" }, "deletion_scope": { "type": "string", "pattern": "^(account|org_data|all)$", "title": "Deletion Scope", "default": "account" } }, "type": "object", "required": [ "user_id" ], "title": "DeletionRequestCreate" }, "DeletionRequestResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "user_id": { "type": "string", "title": "User Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "deletion_scope": { "type": "string", "title": "Deletion Scope" }, "status": { "type": "string", "title": "Status" }, "reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reason" }, "deleted_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Deleted At" }, "error_detail": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Detail" }, "created_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Created At" } }, "type": "object", "required": [ "id", "user_id", "organization_id", "deletion_scope", "status" ], "title": "DeletionRequestResponse" }, "DigestReportResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "run_date": { "type": "string", "format": "date", "title": "Run Date" }, "digest_type": { "type": "string", "title": "Digest Type" }, "memories_total": { "type": "integer", "title": "Memories Total" }, "memories_flagged": { "type": "integer", "title": "Memories Flagged" }, "anomalies_count": { "type": "integer", "title": "Anomalies Count" }, "goals_active": { "type": "integer", "title": "Goals Active" }, "goals_completed": { "type": "integer", "title": "Goals Completed" }, "top_insights": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "null" } ], "title": "Top Insights" }, "quality_trend": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Quality Trend" }, "narrative": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Narrative" }, "delivered_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Delivered At" }, "completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Completed At" } }, "type": "object", "required": [ "id", "organization_id", "run_date", "digest_type", "memories_total", "memories_flagged", "anomalies_count", "goals_active", "goals_completed" ], "title": "DigestReportResponse" }, "DiscoverCausalEdgesRequest": { "properties": { "episode_id": { "type": "string", "title": "Episode Id" }, "auto_save": { "type": "boolean", "title": "Auto Save", "description": "Save discovered edges to database", "default": true } }, "type": "object", "required": [ "episode_id" ], "title": "DiscoverCausalEdgesRequest", "description": "Request to discover causal edges from an episode." }, "DiscoverCausalEdgesResponse": { "properties": { "episode_id": { "type": "string", "title": "Episode Id" }, "edges_discovered": { "type": "integer", "title": "Edges Discovered" }, "edges": { "items": { "$ref": "#/components/schemas/CausalEdgeResponse" }, "type": "array", "title": "Edges" } }, "type": "object", "required": [ "episode_id", "edges_discovered" ], "title": "DiscoverCausalEdgesResponse", "description": "Response with discovered edges." }, "DistributionItem": { "properties": { "label": { "type": "string", "title": "Label" }, "count": { "type": "integer", "title": "Count" } }, "type": "object", "required": [ "label", "count" ], "title": "DistributionItem" }, "DoCalculusResponse": { "properties": { "treatment": { "type": "string", "title": "Treatment" }, "outcome": { "type": "string", "title": "Outcome" }, "causal_effect": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Causal Effect" }, "num_paths": { "type": "integer", "title": "Num Paths", "default": 0 } }, "type": "object", "required": [ "treatment", "outcome", "causal_effect" ], "title": "DoCalculusResponse", "description": "Causal effect estimation." }, "DriftReportResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "baseline_run_id": { "type": "string", "title": "Baseline Run Id" }, "current_run_id": { "type": "string", "title": "Current Run Id" }, "delta": { "type": "object", "title": "Delta" }, "severity": { "type": "string", "title": "Severity" }, "flagged_issues": { "items": { "type": "string" }, "type": "array", "title": "Flagged Issues" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "organization_id", "baseline_run_id", "current_run_id", "delta", "severity", "flagged_issues", "created_at" ], "title": "DriftReportResponse", "description": "Schema for drift report response." }, "DriftReportTrigger": { "properties": { "baseline_run_id": { "type": "string", "title": "Baseline Run Id" }, "current_run_id": { "type": "string", "title": "Current Run Id" } }, "type": "object", "required": [ "baseline_run_id", "current_run_id" ], "title": "DriftReportTrigger", "description": "Schema for triggering drift computation." }, "EmotionalMeasurement": { "properties": { "timestamp": { "type": "string", "title": "Timestamp", "description": "ISO format timestamp" }, "valence": { "type": "number", "title": "Valence" }, "arousal": { "type": "number", "title": "Arousal" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "type": "object", "required": [ "timestamp", "valence", "arousal" ], "title": "EmotionalMeasurement", "description": "Single point in time for emotional state." }, "EmotionalTrajectoryResponse": { "properties": { "user_id": { "type": "string", "title": "User Id" }, "measurements": { "items": { "$ref": "#/components/schemas/EmotionalMeasurement" }, "type": "array", "title": "Measurements" }, "trend": { "type": "string", "title": "Trend", "description": "improving | stable | deteriorating" }, "current_state": { "type": "object", "title": "Current State", "description": "Latest emotional snapshot" }, "escalation_risk": { "type": "number", "title": "Escalation Risk", "description": "Probability of escalation: 0-1" }, "de_escalation_strategies": { "items": { "type": "string" }, "type": "array", "title": "De Escalation Strategies", "description": "Recommended de-escalation approaches" }, "is_at_risk": { "type": "boolean", "title": "Is At Risk", "description": "Is user at immediate escalation risk?" } }, "type": "object", "required": [ "user_id", "measurements", "trend", "current_state", "escalation_risk", "de_escalation_strategies", "is_at_risk" ], "title": "EmotionalTrajectoryResponse", "description": "Trajectory of emotional state over time." }, "EmpatheticResponseRequest": { "properties": { "response_content": { "type": "string", "title": "Response Content", "description": "Original response to adjust" }, "user_valence": { "type": "number", "title": "User Valence", "description": "User's emotional valence: -1 to +1" }, "user_arousal": { "type": "number", "title": "User Arousal", "description": "User's emotional arousal: 0-1" }, "user_emotional_tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "User Emotional Tags", "description": "Emotional tags for user state" } }, "type": "object", "required": [ "response_content", "user_valence", "user_arousal" ], "title": "EmpatheticResponseRequest", "description": "Request to adjust tone empathetically." }, "EmpatheticResponseResponse": { "properties": { "original_response": { "type": "string", "title": "Original Response" }, "adjusted_response": { "type": "string", "title": "Adjusted Response" }, "tone_adjustments": { "items": { "type": "string" }, "type": "array", "title": "Tone Adjustments", "description": "What adjustments were made?" } }, "type": "object", "required": [ "original_response", "adjusted_response", "tone_adjustments" ], "title": "EmpatheticResponseResponse", "description": "Adjusted response with empathetic tone." }, "EnrichmentResponse": { "properties": { "memory_id": { "type": "string", "title": "Memory Id" }, "enrichment": { "type": "object", "title": "Enrichment" }, "agent_count": { "type": "integer", "title": "Agent Count" }, "retrieved_at": { "type": "string", "format": "date-time", "title": "Retrieved At" } }, "type": "object", "required": [ "memory_id", "enrichment", "agent_count", "retrieved_at" ], "title": "EnrichmentResponse" }, "EntityPathResponse": { "properties": { "from_entity": { "type": "string", "title": "From Entity" }, "to_entity": { "type": "string", "title": "To Entity" }, "path": { "items": { "type": "string" }, "type": "array", "title": "Path" }, "hop_count": { "type": "integer", "title": "Hop Count" }, "found": { "type": "boolean", "title": "Found" }, "retrieved_at": { "type": "string", "format": "date-time", "title": "Retrieved At" } }, "type": "object", "required": [ "from_entity", "to_entity", "path", "hop_count", "found", "retrieved_at" ], "title": "EntityPathResponse" }, "EnvSetting": { "properties": { "key": { "type": "string", "title": "Key" }, "value": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Value" }, "is_sensitive": { "type": "boolean", "title": "Is Sensitive", "default": false }, "requires_restart": { "type": "boolean", "title": "Requires Restart", "default": true } }, "type": "object", "required": [ "key" ], "title": "EnvSetting" }, "EnvSettingsResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/EnvSetting" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "EnvSettingsResponse" }, "EpisodeCreate": { "properties": { "scope_type": { "type": "string", "title": "Scope Type", "description": "Visibility scope: personal, team, department, division, organization", "default": "personal" }, "scope_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope Id", "description": "ID of team/department/division if scoped" }, "owner_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Owner User Id", "description": "User who owns/initiated this episode" }, "episode_type": { "anyOf": [ { "type": "string", "maxLength": 100 }, { "type": "null" } ], "title": "Episode Type", "description": "Type: support_case, research_thread, legal_case, customer_incident, etc." }, "title": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Title", "description": "Episode title/subject" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags", "description": "Tags for categorization/filtering" }, "entities": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Entities", "description": "Extracted entities (customer_id, device_id, account_number, etc.)" } }, "type": "object", "title": "EpisodeCreate", "description": "Request schema for creating an episode." }, "EpisodeEventCreate": { "properties": { "episode_id": { "type": "string", "title": "Episode Id", "description": "Parent episode ID" }, "memory_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Memory Id", "description": "Associated memory ID (if event originated from memory write)" }, "event_type": { "type": "string", "title": "Event Type", "description": "Type: user_report, agent_action, tool_result, resolution, followup, note" }, "event_ts": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Event Ts", "description": "When the event occurred (defaults to now)" }, "actor_type": { "type": "string", "title": "Actor Type", "description": "Who/what created this event: user, agent, system", "default": "user" }, "actor_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Actor Id", "description": "User/agent ID if applicable" }, "content": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Content", "description": "Human-readable event description/message" }, "payload": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Payload", "description": "Structured event data (tool results, metadata, etc.)" } }, "type": "object", "required": [ "episode_id", "event_type" ], "title": "EpisodeEventCreate", "description": "Request schema for creating an episode event." }, "EpisodeEventListResponse": { "properties": { "events": { "items": { "$ref": "#/components/schemas/EpisodeEventResponse" }, "type": "array", "title": "Events" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": [ "events", "total" ], "title": "EpisodeEventListResponse", "description": "Response schema for listing episode events." }, "EpisodeEventResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "episode_id": { "type": "string", "title": "Episode Id" }, "memory_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Memory Id" }, "event_type": { "type": "string", "title": "Event Type" }, "event_ts": { "type": "string", "format": "date-time", "title": "Event Ts" }, "actor_type": { "type": "string", "title": "Actor Type" }, "actor_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Actor Id" }, "content": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Content" }, "payload": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Payload" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "episode_id", "memory_id", "event_type", "event_ts", "actor_type", "actor_id", "content", "payload", "created_at", "updated_at" ], "title": "EpisodeEventResponse", "description": "Response schema for a single episode event." }, "EpisodeLinkCreate": { "properties": { "from_episode_id": { "type": "string", "title": "From Episode Id", "description": "Source episode ID" }, "to_episode_id": { "type": "string", "title": "To Episode Id", "description": "Target episode ID" }, "relation": { "type": "string", "title": "Relation", "description": "Type: duplicate, causal_hypothesis, follow_on, same_account, same_device" }, "confidence": { "anyOf": [ { "type": "number", "maximum": 1.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Confidence", "description": "Confidence score [0.0, 1.0]" }, "evidence": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Evidence", "description": "Evidence supporting the relationship" } }, "type": "object", "required": [ "from_episode_id", "to_episode_id", "relation" ], "title": "EpisodeLinkCreate", "description": "Request schema for creating an episode link." }, "EpisodeLinkListResponse": { "properties": { "links": { "items": { "$ref": "#/components/schemas/EpisodeLinkResponse" }, "type": "array", "title": "Links" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": [ "links", "total" ], "title": "EpisodeLinkListResponse", "description": "Response schema for listing episode links." }, "EpisodeLinkResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "from_episode_id": { "type": "string", "title": "From Episode Id" }, "to_episode_id": { "type": "string", "title": "To Episode Id" }, "relation": { "type": "string", "title": "Relation" }, "confidence": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Confidence" }, "evidence": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Evidence" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "from_episode_id", "to_episode_id", "relation", "confidence", "evidence", "created_at", "updated_at" ], "title": "EpisodeLinkResponse", "description": "Response schema for a single episode link." }, "EpisodeListResponse": { "properties": { "episodes": { "items": { "$ref": "#/components/schemas/EpisodeResponse" }, "type": "array", "title": "Episodes" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" } }, "type": "object", "required": [ "episodes", "total", "page", "page_size" ], "title": "EpisodeListResponse", "description": "Response schema for listing episodes." }, "EpisodeResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "scope_type": { "type": "string", "title": "Scope Type" }, "scope_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope Id" }, "owner_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Owner User Id" }, "episode_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Episode Type" }, "status": { "type": "string", "title": "Status" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "summary": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Summary" }, "started_at": { "type": "string", "format": "date-time", "title": "Started At" }, "last_event_at": { "type": "string", "format": "date-time", "title": "Last Event At" }, "resolved_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Resolved At" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "entities": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Entities" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "scope_type", "scope_id", "owner_user_id", "episode_type", "status", "title", "summary", "started_at", "last_event_at", "resolved_at", "tags", "entities", "created_at", "updated_at" ], "title": "EpisodeResponse", "description": "Response schema for a single episode." }, "EpisodeUpdate": { "properties": { "scope_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope Type" }, "scope_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope Id" }, "owner_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Owner User Id" }, "episode_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Episode Type" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "summary": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Summary" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "entities": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Entities" }, "resolved_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Resolved At" } }, "type": "object", "title": "EpisodeUpdate", "description": "Request schema for updating an episode." }, "EpistemicStateResponse": { "properties": { "timestamp": { "type": "string", "title": "Timestamp" }, "known_domains": { "items": { "type": "string" }, "type": "array", "title": "Known Domains" }, "uncertain_domains": { "items": { "type": "string" }, "type": "array", "title": "Uncertain Domains" }, "unknown_domains": { "items": { "type": "string" }, "type": "array", "title": "Unknown Domains" }, "confidence_calibration": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Confidence Calibration" }, "surprise_frequency": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Surprise Frequency" } }, "type": "object", "required": [ "timestamp", "known_domains", "uncertain_domains", "unknown_domains" ], "title": "EpistemicStateResponse", "description": "Current epistemic state response." }, "EscalationRiskResponse": { "properties": { "user_id": { "type": "string", "title": "User Id" }, "escalation_risk": { "type": "number", "title": "Escalation Risk", "description": "Risk score: 0-1" }, "should_escalate_to_human": { "type": "boolean", "title": "Should Escalate To Human", "description": "Should human agent take over?" }, "recommended_strategy": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Recommended Strategy", "description": "Suggested de-escalation strategy" } }, "type": "object", "required": [ "user_id", "escalation_risk", "should_escalate_to_human" ], "title": "EscalationRiskResponse", "description": "Escalation risk assessment." }, "EvalRunResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "suite_id": { "type": "string", "title": "Suite Id" }, "started_at": { "type": "string", "format": "date-time", "title": "Started At" }, "finished_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Finished At" }, "config": { "type": "object", "title": "Config" }, "metrics": { "type": "object", "title": "Metrics" }, "status": { "type": "string", "title": "Status" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "organization_id", "suite_id", "started_at", "finished_at", "config", "metrics", "status", "error_message", "created_at" ], "title": "EvalRunResponse", "description": "Schema for eval run response." }, "EvalRunTrigger": { "properties": { "suite_id": { "type": "string", "title": "Suite Id" }, "config": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Config", "description": "Optional config overrides (k_values, thresholds, etc.)" } }, "type": "object", "required": [ "suite_id" ], "title": "EvalRunTrigger", "description": "Schema for manually triggering an eval run." }, "EvalSuiteCreate": { "properties": { "name": { "type": "string", "maxLength": 500, "minLength": 1, "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "queries": { "items": { "type": "object" }, "type": "array", "title": "Queries" }, "expected": { "type": "object", "title": "Expected" }, "is_active": { "type": "boolean", "title": "Is Active", "default": true } }, "type": "object", "required": [ "name" ], "title": "EvalSuiteCreate", "description": "Schema for creating an eval suite." }, "EvalSuiteResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "queries": { "items": { "type": "object" }, "type": "array", "title": "Queries" }, "expected": { "type": "object", "title": "Expected" }, "is_active": { "type": "boolean", "title": "Is Active" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "name", "description", "queries", "expected", "is_active", "created_at", "updated_at" ], "title": "EvalSuiteResponse", "description": "Schema for eval suite response." }, "EvalSuiteUpdate": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "queries": { "anyOf": [ { "items": { "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Queries" }, "expected": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Expected" }, "is_active": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Active" } }, "type": "object", "title": "EvalSuiteUpdate", "description": "Schema for updating an eval suite." }, "EvaluationReportResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "session_id": { "type": "string", "title": "Session Id" }, "report": { "type": "object", "title": "Report" }, "final_decision": { "type": "string", "enum": [ "pass", "fail", "needs_evidence", "contested" ], "title": "Final Decision" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "session_id", "report", "final_decision", "created_at" ], "title": "EvaluationReportResponse" }, "EventListResponse": { "properties": { "events": { "items": { "$ref": "#/components/schemas/EventResponse" }, "type": "array", "title": "Events" }, "total": { "type": "integer", "title": "Total" }, "limit": { "type": "integer", "title": "Limit" }, "offset": { "type": "integer", "title": "Offset" } }, "type": "object", "required": [ "events", "total", "limit", "offset" ], "title": "EventListResponse", "description": "List of events." }, "EventResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "event_type": { "type": "string", "title": "Event Type" }, "event_version": { "type": "integer", "title": "Event Version" }, "organization_id": { "type": "string", "title": "Organization Id" }, "resource_type": { "type": "string", "title": "Resource Type" }, "resource_id": { "type": "string", "title": "Resource Id" }, "payload": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Payload" }, "actor_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Actor User Id" }, "actor_agent_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Actor Agent Id" }, "trace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trace Id" }, "request_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Request Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "processed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Processed At" } }, "type": "object", "required": [ "id", "event_type", "event_version", "organization_id", "resource_type", "resource_id", "created_at" ], "title": "EventResponse", "description": "Event response schema." }, "ExplainResponse": { "properties": { "effect_id": { "type": "string", "title": "Effect Id" }, "root_causes": { "items": { "type": "object" }, "type": "array", "title": "Root Causes" } }, "type": "object", "required": [ "effect_id" ], "title": "ExplainResponse", "description": "Causal explanation result." }, "ExportJobDownloadTokenResponse": { "properties": { "job_id": { "type": "string", "title": "Job Id" }, "expires_at": { "type": "string", "format": "date-time", "title": "Expires At" }, "token": { "type": "string", "title": "Token" }, "download_url": { "type": "string", "title": "Download Url" } }, "type": "object", "required": [ "job_id", "expires_at", "token", "download_url" ], "title": "ExportJobDownloadTokenResponse" }, "ExportJobResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "job_type": { "type": "string", "title": "Job Type" }, "status": { "type": "string", "title": "Status" }, "created_by_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created By User Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Started At" }, "finished_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Finished At" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" }, "file_bytes": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "File Bytes" }, "file_sha256": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "File Sha256" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" } }, "type": "object", "required": [ "id", "organization_id", "job_type", "status", "created_at", "updated_at" ], "title": "ExportJobResponse" }, "ExtractAbstractProcedureRequest": { "properties": { "playbook_id": { "type": "string", "title": "Playbook Id" }, "title": { "type": "string", "title": "Title" }, "description": { "type": "string", "title": "Description", "default": "" }, "steps": { "items": { "type": "string" }, "type": "array", "title": "Steps" }, "target_abstraction_level": { "type": "integer", "maximum": 3.0, "minimum": 0.0, "title": "Target Abstraction Level", "default": 1 } }, "type": "object", "required": [ "playbook_id", "title" ], "title": "ExtractAbstractProcedureRequest" }, "FeatureFlags": { "properties": { "admin_operations": { "type": "boolean", "title": "Admin Operations" }, "drift_detection": { "type": "boolean", "title": "Drift Detection" }, "auto_eval_benchmarks": { "type": "boolean", "title": "Auto Eval Benchmarks" }, "memory_observability": { "type": "boolean", "title": "Memory Observability" } }, "type": "object", "required": [ "admin_operations", "drift_detection", "auto_eval_benchmarks", "memory_observability" ], "title": "FeatureFlags", "description": "Available feature flags." }, "FederatedKnowledgeResponse": { "properties": { "summary_type": { "$ref": "#/components/schemas/SummaryType" }, "domain": { "type": "string", "title": "Domain" }, "content": { "type": "object", "title": "Content" }, "id": { "type": "string", "title": "Id" }, "count_contributing_orgs": { "type": "integer", "title": "Count Contributing Orgs" }, "quality_score": { "type": "number", "title": "Quality Score" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "summary_type", "domain", "content", "id", "count_contributing_orgs", "quality_score", "created_at", "updated_at" ], "title": "FederatedKnowledgeResponse", "description": "Response schema for federated knowledge." }, "FederationHealthResponse": { "properties": { "total_organizations": { "type": "integer", "title": "Total Organizations" }, "participating_orgs": { "type": "integer", "title": "Participating Orgs" }, "participation_rate": { "type": "number", "title": "Participation Rate" }, "total_federated_knowledge": { "type": "integer", "title": "Total Federated Knowledge" }, "by_type": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "By Type" }, "average_quality_score": { "type": "number", "title": "Average Quality Score" }, "total_benchmarks_computed": { "type": "integer", "title": "Total Benchmarks Computed" }, "privacy_compliance_rate": { "type": "number", "title": "Privacy Compliance Rate" } }, "type": "object", "required": [ "total_organizations", "participating_orgs", "participation_rate", "total_federated_knowledge", "by_type", "average_quality_score", "total_benchmarks_computed", "privacy_compliance_rate" ], "title": "FederationHealthResponse", "description": "Response with federation health metrics." }, "FeedbackLearningResponse": { "properties": { "updated_thresholds": { "type": "object", "title": "Updated Thresholds" }, "stopwords": { "items": {}, "type": "array", "title": "Stopwords" }, "heuristic_weights": { "type": "object", "title": "Heuristic Weights" }, "calibration_delta": { "type": "object", "title": "Calibration Delta" }, "last_agent_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Agent Version" }, "updated_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Updated At" } }, "type": "object", "required": [ "updated_thresholds", "stopwords", "heuristic_weights", "calibration_delta" ], "title": "FeedbackLearningResponse" }, "FeedbackRequest": { "properties": { "verdict": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Verdict", "description": "approve | reject | partial" }, "credibility_override": { "anyOf": [ { "type": "number", "maximum": 1.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Credibility Override", "description": "Explicit credibility score from reviewer" }, "resolution_confirmed": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Resolution Confirmed", "description": "True = all conflicts resolved, False = still open" }, "playbook_correct": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Playbook Correct", "description": "False = playbook match was wrong" }, "note": { "anyOf": [ { "type": "string", "maxLength": 2000 }, { "type": "null" } ], "title": "Note", "description": "Optional free-text note from reviewer" } }, "type": "object", "title": "FeedbackRequest" }, "FeedbackResponse": { "properties": { "feedback_id": { "type": "string", "title": "Feedback Id" }, "memory_id": { "type": "string", "title": "Memory Id" }, "verdict": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Verdict" }, "accepted_at": { "type": "string", "format": "date-time", "title": "Accepted At" } }, "type": "object", "required": [ "feedback_id", "memory_id", "verdict", "accepted_at" ], "title": "FeedbackResponse" }, "FindAnalogiesResponse": { "properties": { "analogies": { "items": { "type": "object" }, "type": "array", "title": "Analogies" } }, "type": "object", "required": [ "analogies" ], "title": "FindAnalogiesResponse" }, "FindCandidatesResponse": { "properties": { "candidates": { "items": { "$ref": "#/components/schemas/ConsolidationCandidate" }, "type": "array", "title": "Candidates" }, "total_candidates": { "type": "integer", "title": "Total Candidates" }, "summary": { "type": "object", "title": "Summary" } }, "type": "object", "required": [ "candidates", "total_candidates", "summary" ], "title": "FindCandidatesResponse", "description": "Find consolidation candidates response." }, "ForecastRequest": { "properties": { "entity_id": { "type": "string", "title": "Entity Id", "description": "Entity to forecast" }, "horizon_steps": { "type": "integer", "maximum": 52.0, "minimum": 1.0, "title": "Horizon Steps", "description": "How many periods ahead", "default": 7 }, "confidence_level": { "type": "number", "maximum": 0.99, "minimum": 0.8, "title": "Confidence Level", "description": "Desired confidence", "default": 0.95 } }, "type": "object", "required": [ "entity_id" ], "title": "ForecastRequest", "description": "Request to forecast future trajectory values." }, "GapAnalysis": { "properties": { "metric": { "type": "string", "title": "Metric" }, "current_percentile": { "type": "number", "title": "Current Percentile" }, "target_percentile": { "type": "number", "title": "Target Percentile" }, "gap": { "type": "number", "title": "Gap" }, "priority": { "type": "string", "title": "Priority" }, "recommendation": { "type": "string", "title": "Recommendation" } }, "type": "object", "required": [ "metric", "current_percentile", "target_percentile", "gap", "priority", "recommendation" ], "title": "GapAnalysis", "description": "Gap analysis for a single metric." }, "GatingInfoSchema": { "properties": { "allowed": { "type": "boolean", "title": "Allowed", "description": "Whether memory passed access control" }, "reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reason", "description": "Reason if denied (e.g., 'Policy X blocked')" } }, "type": "object", "required": [ "allowed" ], "title": "GatingInfoSchema", "description": "Information about access gating decision." }, "GenerateGoalsRequest": { "properties": { "include_curiosity": { "type": "boolean", "title": "Include Curiosity", "default": true }, "include_prediction": { "type": "boolean", "title": "Include Prediction", "default": true }, "include_self_improvement": { "type": "boolean", "title": "Include Self Improvement", "default": true }, "min_value_threshold": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Min Value Threshold", "default": 0.3 }, "max_active_goals": { "type": "integer", "maximum": 50.0, "minimum": 1.0, "title": "Max Active Goals", "default": 10 } }, "type": "object", "title": "GenerateGoalsRequest", "description": "Request to generate autonomous goals" }, "GenerateGoalsResponse": { "properties": { "proposed_goals": { "items": { "$ref": "#/components/schemas/AutonomousGoalResponse" }, "type": "array", "title": "Proposed Goals" }, "activated_goals": { "items": { "$ref": "#/components/schemas/AutonomousGoalResponse" }, "type": "array", "title": "Activated Goals" }, "metrics": { "$ref": "#/components/schemas/MotivationMetrics" } }, "type": "object", "required": [ "proposed_goals", "activated_goals", "metrics" ], "title": "GenerateGoalsResponse", "description": "Response from goal generation" }, "GoalActivityLogResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "goal_id": { "type": "string", "title": "Goal Id" }, "node_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Node Id" }, "actor_type": { "type": "string", "enum": [ "user", "agent", "system" ], "title": "Actor Type" }, "actor_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Actor Id" }, "action": { "type": "string", "title": "Action" }, "details": { "type": "object", "title": "Details" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "organization_id", "goal_id", "node_id", "actor_type", "actor_id", "action", "details", "created_at" ], "title": "GoalActivityLogResponse" }, "GoalBlockersResponse": { "properties": { "goal_id": { "type": "string", "title": "Goal Id" }, "blockers": { "items": { "$ref": "#/components/schemas/GoalNodeResponse" }, "type": "array", "title": "Blockers" } }, "type": "object", "required": [ "goal_id" ], "title": "GoalBlockersResponse" }, "GoalCreateRequest": { "properties": { "title": { "type": "string", "title": "Title" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "owner_type": { "type": "string", "enum": [ "user", "team", "department", "organization" ], "title": "Owner Type", "default": "user" }, "owner_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Owner Id" }, "goal_type": { "type": "string", "enum": [ "task", "project", "objective", "policy", "research" ], "title": "Goal Type", "default": "task" }, "status": { "type": "string", "enum": [ "proposed", "active", "blocked", "completed", "abandoned" ], "title": "Status", "default": "proposed" }, "priority": { "type": "integer", "maximum": 5.0, "minimum": 0.0, "title": "Priority", "default": 0 }, "due_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Due At" }, "confidence": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Confidence", "default": 0.5 }, "visibility_scope": { "type": "string", "enum": [ "personal", "team", "department", "division", "organization" ], "title": "Visibility Scope", "default": "personal" }, "scope_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope Id" }, "tags": { "items": { "type": "string" }, "type": "array", "title": "Tags" }, "metadata": { "type": "object", "title": "Metadata" } }, "type": "object", "required": [ "title" ], "title": "GoalCreateRequest" }, "GoalDetailResponse": { "properties": { "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "created_by_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created By User Id" }, "owner_type": { "type": "string", "enum": [ "user", "team", "department", "organization" ], "title": "Owner Type" }, "owner_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Owner Id" }, "title": { "type": "string", "title": "Title" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "goal_type": { "type": "string", "enum": [ "task", "project", "objective", "policy", "research" ], "title": "Goal Type" }, "status": { "type": "string", "enum": [ "proposed", "active", "blocked", "completed", "abandoned" ], "title": "Status" }, "priority": { "type": "integer", "title": "Priority" }, "due_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Due At" }, "completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Completed At" }, "confidence": { "type": "number", "title": "Confidence" }, "visibility_scope": { "type": "string", "enum": [ "personal", "team", "department", "division", "organization" ], "title": "Visibility Scope" }, "scope_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope Id" }, "tags": { "items": { "type": "string" }, "type": "array", "title": "Tags" }, "metadata": { "type": "object", "title": "Metadata" }, "nodes": { "items": { "$ref": "#/components/schemas/GoalNodeResponse" }, "type": "array", "title": "Nodes" }, "edges": { "items": { "$ref": "#/components/schemas/GoalEdgeResponse" }, "type": "array", "title": "Edges" }, "memory_links": { "items": { "$ref": "#/components/schemas/GoalMemoryLinkResponse" }, "type": "array", "title": "Memory Links" }, "progress": { "$ref": "#/components/schemas/GoalProgressSummary" } }, "type": "object", "required": [ "created_at", "updated_at", "id", "organization_id", "created_by_user_id", "owner_type", "owner_id", "title", "description", "goal_type", "status", "priority", "due_at", "completed_at", "confidence", "visibility_scope", "scope_id", "tags" ], "title": "GoalDetailResponse" }, "GoalEdgeCreateRequest": { "properties": { "from_node_id": { "type": "string", "title": "From Node Id" }, "to_node_id": { "type": "string", "title": "To Node Id" }, "edge_type": { "type": "string", "enum": [ "depends_on", "blocks", "related_to" ], "title": "Edge Type" } }, "type": "object", "required": [ "from_node_id", "to_node_id", "edge_type" ], "title": "GoalEdgeCreateRequest" }, "GoalEdgeResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "from_node_id": { "type": "string", "title": "From Node Id" }, "to_node_id": { "type": "string", "title": "To Node Id" }, "edge_type": { "type": "string", "enum": [ "depends_on", "blocks", "related_to" ], "title": "Edge Type" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "organization_id", "from_node_id", "to_node_id", "edge_type", "created_at" ], "title": "GoalEdgeResponse" }, "GoalInitiator": { "type": "string", "enum": [ "curiosity", "prediction", "self_improvement", "priority_rebalance" ], "title": "GoalInitiator", "description": "Source of goal generation" }, "GoalLinkSuggestion": { "properties": { "goal_id": { "type": "string", "title": "Goal Id" }, "node_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Node Id" }, "memory_id": { "type": "string", "title": "Memory Id" }, "link_type": { "type": "string", "enum": [ "evidence", "progress", "blocker", "reference" ], "title": "Link Type" }, "confidence": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Confidence", "default": 0.0 }, "reason": { "type": "string", "title": "Reason" } }, "type": "object", "required": [ "goal_id", "memory_id", "link_type", "reason" ], "title": "GoalLinkSuggestion" }, "GoalLinkSuggestionsRequest": { "properties": { "memory": { "type": "object", "title": "Memory" }, "active_goals": { "items": { "type": "object" }, "type": "array", "title": "Active Goals" } }, "type": "object", "title": "GoalLinkSuggestionsRequest" }, "GoalLinkingAgentOutput": { "properties": { "links": { "items": { "$ref": "#/components/schemas/GoalLinkSuggestion" }, "type": "array", "title": "Links" }, "confidence": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Confidence", "default": 0.0 } }, "type": "object", "title": "GoalLinkingAgentOutput" }, "GoalMemoryLinkCreateRequest": { "properties": { "memory_id": { "type": "string", "title": "Memory Id" }, "link_type": { "type": "string", "enum": [ "evidence", "progress", "blocker", "reference" ], "title": "Link Type" }, "confidence": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Confidence", "default": 0.5 }, "node_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Node Id" } }, "type": "object", "required": [ "memory_id", "link_type" ], "title": "GoalMemoryLinkCreateRequest" }, "GoalMemoryLinkResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "goal_id": { "type": "string", "title": "Goal Id" }, "node_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Node Id" }, "memory_id": { "type": "string", "title": "Memory Id" }, "link_type": { "type": "string", "enum": [ "evidence", "progress", "blocker", "reference" ], "title": "Link Type" }, "linked_by": { "type": "string", "enum": [ "auto", "user", "agent" ], "title": "Linked By" }, "confidence": { "type": "number", "title": "Confidence" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "organization_id", "goal_id", "node_id", "memory_id", "link_type", "linked_by", "confidence", "created_at" ], "title": "GoalMemoryLinkResponse" }, "GoalNodeCreateRequest": { "properties": { "parent_node_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Parent Node Id" }, "node_type": { "type": "string", "enum": [ "subgoal", "task", "milestone" ], "title": "Node Type" }, "title": { "type": "string", "title": "Title" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "status": { "type": "string", "enum": [ "todo", "in_progress", "blocked", "done", "cancelled" ], "title": "Status", "default": "todo" }, "priority": { "type": "integer", "maximum": 5.0, "minimum": 0.0, "title": "Priority", "default": 0 }, "assigned_to_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Assigned To User Id" }, "assigned_to_team_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Assigned To Team Id" }, "ordering": { "type": "integer", "title": "Ordering", "default": 0 }, "expected_outputs": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Expected Outputs" }, "success_criteria": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Success Criteria" }, "blockers": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Blockers" }, "confidence": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Confidence", "default": 0.5 } }, "type": "object", "required": [ "node_type", "title" ], "title": "GoalNodeCreateRequest" }, "GoalNodeResponse": { "properties": { "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "goal_id": { "type": "string", "title": "Goal Id" }, "parent_node_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Parent Node Id" }, "node_type": { "type": "string", "enum": [ "subgoal", "task", "milestone" ], "title": "Node Type" }, "title": { "type": "string", "title": "Title" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "status": { "type": "string", "enum": [ "todo", "in_progress", "blocked", "done", "cancelled" ], "title": "Status" }, "priority": { "type": "integer", "title": "Priority" }, "assigned_to_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Assigned To User Id" }, "assigned_to_team_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Assigned To Team Id" }, "completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Completed At" }, "confidence": { "type": "number", "title": "Confidence" }, "ordering": { "type": "integer", "title": "Ordering" }, "expected_outputs": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Expected Outputs" }, "success_criteria": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Success Criteria" }, "blockers": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Blockers" } }, "type": "object", "required": [ "created_at", "updated_at", "id", "organization_id", "goal_id", "parent_node_id", "node_type", "title", "description", "status", "priority", "assigned_to_user_id", "assigned_to_team_id", "completed_at", "confidence", "ordering", "expected_outputs", "success_criteria", "blockers" ], "title": "GoalNodeResponse" }, "GoalNodeUpdateRequest": { "properties": { "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "status": { "anyOf": [ { "type": "string", "enum": [ "todo", "in_progress", "blocked", "done", "cancelled" ] }, { "type": "null" } ], "title": "Status" }, "priority": { "anyOf": [ { "type": "integer", "maximum": 5.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Priority" }, "ordering": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Ordering" }, "assigned_to_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Assigned To User Id" }, "assigned_to_team_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Assigned To Team Id" }, "expected_outputs": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Expected Outputs" }, "success_criteria": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Success Criteria" }, "blockers": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Blockers" }, "confidence": { "anyOf": [ { "type": "number", "maximum": 1.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Confidence" } }, "type": "object", "title": "GoalNodeUpdateRequest" }, "GoalOutcomeCreate": { "properties": { "outcome_type": { "$ref": "#/components/schemas/OutcomeType" }, "impact_description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Impact Description" }, "feedback_from": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Feedback From", "default": "auto_detection" }, "was_user_expecting": { "type": "boolean", "title": "Was User Expecting", "default": false }, "goal_id": { "type": "string", "format": "uuid", "title": "Goal Id" } }, "type": "object", "required": [ "outcome_type", "goal_id" ], "title": "GoalOutcomeCreate", "description": "Create goal outcome" }, "GoalOutcomeResponse": { "properties": { "outcome_type": { "$ref": "#/components/schemas/OutcomeType" }, "impact_description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Impact Description" }, "feedback_from": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Feedback From", "default": "auto_detection" }, "was_user_expecting": { "type": "boolean", "title": "Was User Expecting", "default": false }, "id": { "type": "string", "format": "uuid", "title": "Id" }, "goal_id": { "type": "string", "format": "uuid", "title": "Goal Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "outcome_type", "id", "goal_id", "created_at" ], "title": "GoalOutcomeResponse", "description": "Goal outcome response from API" }, "GoalPlannerAgentOutput": { "properties": { "create_goal": { "type": "boolean", "title": "Create Goal", "default": false }, "goal": { "anyOf": [ { "$ref": "#/components/schemas/GoalPlannerGoal" }, { "type": "null" } ] }, "nodes": { "items": { "$ref": "#/components/schemas/GoalPlannerNode" }, "type": "array", "title": "Nodes" }, "edges": { "items": { "$ref": "#/components/schemas/GoalPlannerEdge" }, "type": "array", "title": "Edges" }, "confidence": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Confidence", "default": 0.0 }, "evidence_memory_ids": { "items": { "type": "string" }, "type": "array", "title": "Evidence Memory Ids" } }, "type": "object", "title": "GoalPlannerAgentOutput" }, "GoalPlannerEdge": { "properties": { "from_temp_id": { "type": "string", "title": "From Temp Id" }, "to_temp_id": { "type": "string", "title": "To Temp Id" }, "edge_type": { "type": "string", "enum": [ "depends_on", "blocks", "related_to" ], "title": "Edge Type" } }, "type": "object", "required": [ "from_temp_id", "to_temp_id", "edge_type" ], "title": "GoalPlannerEdge" }, "GoalPlannerGoal": { "properties": { "title": { "type": "string", "title": "Title" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "goal_type": { "type": "string", "enum": [ "task", "project", "objective", "policy", "research" ], "title": "Goal Type" }, "visibility_scope": { "type": "string", "enum": [ "personal", "team", "department", "division", "organization" ], "title": "Visibility Scope" }, "scope_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope Id" }, "priority": { "type": "integer", "maximum": 5.0, "minimum": 0.0, "title": "Priority", "default": 0 }, "due_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Due At" } }, "type": "object", "required": [ "title", "goal_type", "visibility_scope" ], "title": "GoalPlannerGoal" }, "GoalPlannerNode": { "properties": { "temp_id": { "type": "string", "title": "Temp Id" }, "parent_temp_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Parent Temp Id" }, "node_type": { "type": "string", "enum": [ "subgoal", "task", "milestone" ], "title": "Node Type" }, "title": { "type": "string", "title": "Title" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "success_criteria": { "items": { "type": "string" }, "type": "array", "title": "Success Criteria" }, "expected_outputs": { "type": "object", "title": "Expected Outputs" } }, "type": "object", "required": [ "temp_id", "node_type", "title" ], "title": "GoalPlannerNode" }, "GoalProgressSummary": { "properties": { "percent_complete": { "type": "number", "maximum": 100.0, "minimum": 0.0, "title": "Percent Complete", "default": 0.0 }, "completed_nodes": { "type": "integer", "title": "Completed Nodes", "default": 0 }, "total_nodes": { "type": "integer", "title": "Total Nodes", "default": 0 }, "confidence": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Confidence", "default": 0.5 } }, "type": "object", "title": "GoalProgressSummary" }, "GoalProposeRequest": { "properties": { "user_request": { "type": "string", "maxLength": 10000, "minLength": 1, "title": "User Request" }, "session_context": { "type": "object", "title": "Session Context" }, "existing_goals": { "items": { "type": "object" }, "type": "array", "title": "Existing Goals" } }, "type": "object", "required": [ "user_request" ], "title": "GoalProposeRequest" }, "GoalResponse": { "properties": { "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "created_by_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created By User Id" }, "owner_type": { "type": "string", "enum": [ "user", "team", "department", "organization" ], "title": "Owner Type" }, "owner_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Owner Id" }, "title": { "type": "string", "title": "Title" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "goal_type": { "type": "string", "enum": [ "task", "project", "objective", "policy", "research" ], "title": "Goal Type" }, "status": { "type": "string", "enum": [ "proposed", "active", "blocked", "completed", "abandoned" ], "title": "Status" }, "priority": { "type": "integer", "title": "Priority" }, "due_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Due At" }, "completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Completed At" }, "confidence": { "type": "number", "title": "Confidence" }, "visibility_scope": { "type": "string", "enum": [ "personal", "team", "department", "division", "organization" ], "title": "Visibility Scope" }, "scope_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope Id" }, "tags": { "items": { "type": "string" }, "type": "array", "title": "Tags" }, "metadata": { "type": "object", "title": "Metadata" } }, "type": "object", "required": [ "created_at", "updated_at", "id", "organization_id", "created_by_user_id", "owner_type", "owner_id", "title", "description", "goal_type", "status", "priority", "due_at", "completed_at", "confidence", "visibility_scope", "scope_id", "tags" ], "title": "GoalResponse" }, "GoalStatus": { "type": "string", "enum": [ "proposed", "active", "completed", "abandoned" ], "title": "GoalStatus", "description": "Goal lifecycle status" }, "GoalTreeResponse": { "properties": { "goal_id": { "type": "string", "title": "Goal Id" }, "nodes": { "items": { "$ref": "#/components/schemas/GoalNodeResponse" }, "type": "array", "title": "Nodes" }, "edges": { "items": { "$ref": "#/components/schemas/GoalEdgeResponse" }, "type": "array", "title": "Edges" } }, "type": "object", "required": [ "goal_id" ], "title": "GoalTreeResponse" }, "GoalUpdateRequest": { "properties": { "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "status": { "anyOf": [ { "type": "string", "enum": [ "proposed", "active", "blocked", "completed", "abandoned" ] }, { "type": "null" } ], "title": "Status" }, "priority": { "anyOf": [ { "type": "integer", "maximum": 5.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Priority" }, "due_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Due At" }, "confidence": { "anyOf": [ { "type": "number", "maximum": 1.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Confidence" }, "visibility_scope": { "anyOf": [ { "type": "string", "enum": [ "personal", "team", "department", "division", "organization" ] }, { "type": "null" } ], "title": "Visibility Scope" }, "scope_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope Id" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Metadata" } }, "type": "object", "title": "GoalUpdateRequest" }, "GraphDegreeResponse": { "properties": { "node_id": { "type": "string", "title": "Node Id" }, "in": { "type": "integer", "title": "In" }, "out": { "type": "integer", "title": "Out" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": [ "node_id", "in", "out", "total" ], "title": "GraphDegreeResponse", "description": "Node degree (connection count)." }, "GraphEdge": { "properties": { "source": { "type": "string", "title": "Source" }, "target": { "type": "string", "title": "Target" }, "type": { "type": "string", "title": "Type" }, "data": { "type": "object", "title": "Data" } }, "type": "object", "required": [ "source", "target", "type" ], "title": "GraphEdge" }, "GraphNode": { "properties": { "id": { "type": "string", "title": "Id" }, "type": { "type": "string", "title": "Type" }, "label": { "type": "string", "title": "Label" }, "data": { "type": "object", "title": "Data" } }, "type": "object", "required": [ "id", "type", "label" ], "title": "GraphNode" }, "GraphPathResponse": { "properties": { "length": { "type": "integer", "title": "Length" }, "nodes": { "items": { "type": "object" }, "type": "array", "title": "Nodes" }, "relationships": { "items": { "type": "object" }, "type": "array", "title": "Relationships" } }, "type": "object", "required": [ "length", "nodes", "relationships" ], "title": "GraphPathResponse", "description": "Graph path between nodes." }, "GraphStatsResponse": { "properties": { "enabled": { "type": "boolean", "title": "Enabled" }, "total_nodes": { "type": "integer", "title": "Total Nodes" }, "total_relationships": { "type": "integer", "title": "Total Relationships" }, "label_types": { "type": "integer", "title": "Label Types", "default": 0 } }, "type": "object", "required": [ "enabled", "total_nodes", "total_relationships" ], "title": "GraphStatsResponse", "description": "Graph statistics." }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "HierarchyNodeCreate": { "properties": { "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" }, "node_type": { "$ref": "#/components/schemas/HierarchyNodeType" }, "parent_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Parent Id" }, "settings": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Settings" } }, "type": "object", "required": [ "name", "node_type" ], "title": "HierarchyNodeCreate", "description": "Request schema for creating a hierarchy node." }, "HierarchyNodeResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "name": { "type": "string", "title": "Name" }, "node_type": { "type": "string", "title": "Node Type" }, "path": { "type": "string", "title": "Path" }, "parent_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Parent Id" }, "is_active": { "type": "boolean", "title": "Is Active" }, "settings": { "type": "object", "title": "Settings" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "children": { "anyOf": [ { "items": { "$ref": "#/components/schemas/HierarchyNodeResponse" }, "type": "array" }, { "type": "null" } ], "title": "Children" } }, "type": "object", "required": [ "id", "organization_id", "name", "node_type", "path", "parent_id", "is_active", "settings", "created_at", "updated_at" ], "title": "HierarchyNodeResponse", "description": "Response schema for hierarchy node data." }, "HierarchyNodeType": { "type": "string", "enum": [ "division", "department", "team" ], "title": "HierarchyNodeType", "description": "Valid hierarchy node types." }, "HierarchyTreeResponse": { "properties": { "organization_id": { "type": "string", "title": "Organization Id" }, "organization_name": { "type": "string", "title": "Organization Name" }, "nodes": { "items": { "$ref": "#/components/schemas/HierarchyNodeResponse" }, "type": "array", "title": "Nodes" } }, "type": "object", "required": [ "organization_id", "organization_name", "nodes" ], "title": "HierarchyTreeResponse", "description": "Response schema for full hierarchy tree." }, "HypothesisStatusEnum": { "type": "string", "enum": [ "proposed", "active", "contested", "rejected" ], "title": "HypothesisStatusEnum", "description": "Lifecycle states for causal hypotheses." }, "ImportResult": { "properties": { "imported": { "type": "integer", "title": "Imported" }, "skipped": { "type": "integer", "title": "Skipped" }, "total": { "type": "integer", "title": "Total" }, "errors": { "items": { "type": "string" }, "type": "array", "title": "Errors" } }, "type": "object", "required": [ "imported", "skipped", "total", "errors" ], "title": "ImportResult" }, "InsightsSummary": { "properties": { "org_id": { "type": "string", "title": "Org Id" }, "total_memories": { "type": "integer", "title": "Total Memories" }, "active_memories": { "type": "integer", "title": "Active Memories" }, "inactive_memories": { "type": "integer", "title": "Inactive Memories" }, "pending_review": { "type": "integer", "title": "Pending Review" }, "enriched_memories": { "type": "integer", "title": "Enriched Memories" }, "creation_trend": { "items": { "$ref": "#/components/schemas/TrendPoint" }, "type": "array", "title": "Creation Trend" }, "scope_distribution": { "items": { "$ref": "#/components/schemas/DistributionItem" }, "type": "array", "title": "Scope Distribution" }, "type_distribution": { "items": { "$ref": "#/components/schemas/DistributionItem" }, "type": "array", "title": "Type Distribution" }, "agent_coverage": { "items": { "$ref": "#/components/schemas/AgentCoverage" }, "type": "array", "title": "Agent Coverage" }, "retrieved_at": { "type": "string", "format": "date-time", "title": "Retrieved At" } }, "type": "object", "required": [ "org_id", "total_memories", "active_memories", "inactive_memories", "pending_review", "enriched_memories", "retrieved_at" ], "title": "InsightsSummary" }, "InstantiateAbstractProcedureRequest": { "properties": { "abstract_procedure": { "type": "object", "title": "Abstract Procedure" }, "parameters": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Parameters" } }, "type": "object", "required": [ "abstract_procedure" ], "title": "InstantiateAbstractProcedureRequest" }, "InteractionOutcomeRequest": { "properties": { "interaction_content": { "type": "string", "title": "Interaction Content" }, "initial_valence": { "type": "number", "title": "Initial Valence" }, "initial_arousal": { "type": "number", "title": "Initial Arousal" }, "final_valence": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Final Valence" }, "final_arousal": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Final Arousal" }, "agent_response_tone": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Response Tone" }, "de_escalation_applied": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "De Escalation Applied" }, "outcome": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Outcome", "description": "success | partial_success | failure | escalated" } }, "type": "object", "required": [ "interaction_content", "initial_valence", "initial_arousal" ], "title": "InteractionOutcomeRequest", "description": "Record outcome of an emotional interaction." }, "InteractionOutcomeResponse": { "properties": { "event_id": { "type": "string", "title": "Event Id" }, "user_id": { "type": "string", "title": "User Id" }, "was_escalation": { "type": "boolean", "title": "Was Escalation" }, "was_de_escalated": { "type": "boolean", "title": "Was De Escalated" }, "outcome": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Outcome" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "event_id", "user_id", "was_escalation", "was_de_escalated", "outcome", "created_at" ], "title": "InteractionOutcomeResponse", "description": "Confirmation of recorded interaction." }, "KnowledgeGapCreate": { "properties": { "gap_type": { "$ref": "#/components/schemas/KnowledgeGapType" }, "domain": { "type": "string", "title": "Domain" }, "description": { "type": "string", "title": "Description" }, "confidence_in_gap": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Confidence In Gap", "default": 0.7 }, "related_memories": { "items": { "type": "string" }, "type": "array", "title": "Related Memories", "default": [] }, "suggested_learning_approach": { "anyOf": [ { "$ref": "#/components/schemas/LearningApproach" }, { "type": "null" } ] }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Metadata", "default": {} } }, "type": "object", "required": [ "gap_type", "domain", "description" ], "title": "KnowledgeGapCreate", "description": "Create knowledge gap" }, "KnowledgeGapResponse": { "properties": { "gap_type": { "$ref": "#/components/schemas/KnowledgeGapType" }, "domain": { "type": "string", "title": "Domain" }, "description": { "type": "string", "title": "Description" }, "confidence_in_gap": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Confidence In Gap", "default": 0.7 }, "related_memories": { "items": { "type": "string" }, "type": "array", "title": "Related Memories", "default": [] }, "suggested_learning_approach": { "anyOf": [ { "$ref": "#/components/schemas/LearningApproach" }, { "type": "null" } ] }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Metadata", "default": {} }, "id": { "type": "string", "format": "uuid", "title": "Id" }, "discovered_at": { "type": "string", "format": "date-time", "title": "Discovered At" }, "resolved_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Resolved At" } }, "type": "object", "required": [ "gap_type", "domain", "description", "id", "discovered_at" ], "title": "KnowledgeGapResponse", "description": "Knowledge gap response from API" }, "KnowledgeGapType": { "type": "string", "enum": [ "missing_fact", "contradiction", "outdated", "low_confidence" ], "title": "KnowledgeGapType", "description": "Type of knowledge gap" }, "KnowledgeItemVersionResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "item_id": { "type": "string", "title": "Item Id" }, "version_number": { "type": "integer", "title": "Version Number" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "content": { "type": "string", "title": "Content" }, "extra_metadata": { "type": "object", "title": "Extra Metadata" }, "created_by_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created By User Id" }, "trace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trace Id" }, "provenance": { "items": { "type": "object" }, "type": "array", "title": "Provenance" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "item_id", "version_number", "title", "content", "extra_metadata", "created_by_user_id", "trace_id", "provenance", "created_at", "updated_at" ], "title": "KnowledgeItemVersionResponse" }, "KnowledgeItemVersionsResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/KnowledgeItemVersionResponse" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "KnowledgeItemVersionsResponse" }, "KnowledgeReviewDecision": { "properties": { "comment": { "anyOf": [ { "type": "string", "maxLength": 20000 }, { "type": "null" } ], "title": "Comment" }, "promote_to_memory": { "type": "boolean", "title": "Promote To Memory", "description": "If true, approval will also create a long-term memory record from the version content.", "default": false }, "tags": { "items": { "type": "string" }, "type": "array", "title": "Tags", "description": "Tags to attach to the created memory" }, "topics": { "items": { "type": "string" }, "type": "array", "title": "Topics", "description": "Topics (labels) to attach via topic memberships" }, "primary_topic": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ], "title": "Primary Topic", "description": "Primary topic label (defaults to first topic if omitted)" }, "topic_confidence": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Topic Confidence", "description": "Confidence/weight applied to topic memberships", "default": 0.8 }, "memory_scope": { "type": "string", "title": "Memory Scope", "description": "Scope for the promoted memory (personal/team/department/division/organization/global)", "default": "organization" }, "memory_type": { "type": "string", "title": "Memory Type", "description": "Memory type for the promoted memory (long_term/semantic/procedural)", "default": "procedural" }, "classification": { "type": "string", "title": "Classification", "description": "Classification for the promoted memory (public/internal/confidential/restricted)", "default": "internal" } }, "type": "object", "title": "KnowledgeReviewDecision" }, "KnowledgeReviewListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/KnowledgeReviewRequestResponse" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "KnowledgeReviewListResponse" }, "KnowledgeReviewRequestResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "item_id": { "type": "string", "title": "Item Id" }, "item_version_id": { "type": "string", "title": "Item Version Id" }, "status": { "type": "string", "title": "Status" }, "requested_by_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Requested By User Id" }, "reviewed_by_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reviewed By User Id" }, "reviewed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Reviewed At" }, "decision_comment": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Decision Comment" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "item_id", "item_version_id", "status", "requested_by_user_id", "reviewed_by_user_id", "reviewed_at", "decision_comment", "created_at", "updated_at" ], "title": "KnowledgeReviewRequestResponse" }, "KnowledgeRollbackRequest": { "properties": { "target_version_id": { "type": "string", "title": "Target Version Id" }, "comment": { "anyOf": [ { "type": "string", "maxLength": 20000 }, { "type": "null" } ], "title": "Comment" } }, "type": "object", "required": [ "target_version_id" ], "title": "KnowledgeRollbackRequest" }, "KnowledgeSubmissionCreate": { "properties": { "item_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Item Id", "description": "If set, submits a new version for an existing item. If omitted, a new item is created." }, "title": { "type": "string", "maxLength": 500, "minLength": 1, "title": "Title" }, "content": { "type": "string", "maxLength": 200000, "minLength": 1, "title": "Content" }, "key": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Key", "description": "Optional stable key for the item (unique per org). Only used when creating a new item." }, "extra_metadata": { "type": "object", "title": "Extra Metadata" }, "provenance": { "items": { "$ref": "#/components/schemas/ProvenanceSource" }, "type": "array", "title": "Provenance" } }, "type": "object", "required": [ "title", "content" ], "title": "KnowledgeSubmissionCreate", "description": "Create a knowledge submission for review." }, "KnowledgeSummaryResponse": { "properties": { "org_id": { "type": "string", "title": "Org Id" }, "top_topics": { "items": { "$ref": "#/components/schemas/TopTopic" }, "type": "array", "title": "Top Topics" }, "top_relationships": { "items": { "$ref": "#/components/schemas/TopRelationship" }, "type": "array", "title": "Top Relationships" }, "recent_memories": { "items": { "$ref": "#/components/schemas/RecentMemory" }, "type": "array", "title": "Recent Memories" } }, "type": "object", "required": [ "org_id" ], "title": "KnowledgeSummaryResponse" }, "LearningApproach": { "type": "string", "enum": [ "search", "ask_user", "experiment", "observation" ], "title": "LearningApproach", "description": "Suggested approach to fill gap" }, "LoadThresholdUpdate": { "properties": { "threshold": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Threshold", "description": "Load threshold (0-1)" } }, "type": "object", "required": [ "threshold" ], "title": "LoadThresholdUpdate", "description": "Request to update system load threshold." }, "LoginRequest": { "properties": { "email": { "type": "string", "format": "email", "title": "Email" }, "password": { "type": "string", "title": "Password" } }, "type": "object", "required": [ "email", "password" ], "title": "LoginRequest", "description": "Login request with email and password." }, "LoginResponse": { "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" }, "user": { "$ref": "#/components/schemas/UserResponse" }, "organization": { "anyOf": [ { "$ref": "#/components/schemas/OrganizationResponse" }, { "type": "null" } ] } }, "type": "object", "required": [ "access_token", "refresh_token", "expires_in", "user" ], "title": "LoginResponse", "description": "Login response with tokens and user info." }, "LogseqExportConfig": { "properties": { "export_base_dir": { "type": "string", "title": "Export Base Dir" }, "org_export_dir": { "type": "string", "title": "Org Export Dir" }, "last_nightly_export_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Nightly Export At" } }, "type": "object", "required": [ "export_base_dir", "org_export_dir" ], "title": "LogseqExportConfig" }, "LogseqExportConfigResponse": { "properties": { "effective": { "$ref": "#/components/schemas/LogseqExportConfig" }, "overrides": { "type": "object", "title": "Overrides" } }, "type": "object", "required": [ "effective" ], "title": "LogseqExportConfigResponse" }, "LogseqExportConfigUpdate": { "properties": { "export_base_dir": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Export Base Dir" } }, "type": "object", "title": "LogseqExportConfigUpdate", "description": "Patch-like update.\n\nConvention: null means \"inherit env/default\"." }, "LogseqExportRequest": { "properties": { "memory_ids": { "items": { "type": "string" }, "type": "array", "title": "Memory Ids", "description": "If provided, export only these memory IDs" }, "include_short_term": { "type": "boolean", "title": "Include Short Term", "description": "Include STM entries (Redis) when memory_ids are provided", "default": false }, "scope": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope", "description": "Optional scope filter for LTM listing" }, "limit": { "type": "integer", "maximum": 1000.0, "minimum": 0.0, "title": "Limit", "default": 100 }, "export_mode": { "anyOf": [ { "type": "string", "enum": [ "single_file", "vault_pages" ] }, { "type": "null" } ], "title": "Export Mode", "description": "Export mode for write-to-disk exports. single_file writes one .md file. vault_pages writes a Logseq vault structure with one page per memory. If omitted, server defaults apply." } }, "type": "object", "title": "LogseqExportRequest", "description": "Request options for Logseq export." }, "LogseqExportResponse": { "properties": { "markdown": { "type": "string", "title": "Markdown" }, "item_count": { "type": "integer", "title": "Item Count" } }, "type": "object", "required": [ "markdown", "item_count" ], "title": "LogseqExportResponse", "description": "Exported Markdown response." }, "LogseqGraphResponse": { "properties": { "nodes": { "items": { "$ref": "#/components/schemas/GraphNode" }, "type": "array", "title": "Nodes" }, "edges": { "items": { "$ref": "#/components/schemas/GraphEdge" }, "type": "array", "title": "Edges" } }, "type": "object", "required": [ "nodes", "edges" ], "title": "LogseqGraphResponse" }, "LogseqWriteExportResponse": { "properties": { "relative_path": { "type": "string", "title": "Relative Path" }, "bytes_written": { "type": "integer", "title": "Bytes Written" } }, "type": "object", "required": [ "relative_path", "bytes_written" ], "title": "LogseqWriteExportResponse", "description": "Response for admin-only write-to-disk export." }, "MFADeviceResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "device_type": { "type": "string", "title": "Device Type" }, "verified": { "type": "boolean", "title": "Verified" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "last_used_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Used At" } }, "type": "object", "required": [ "id", "device_type", "verified", "created_at" ], "title": "MFADeviceResponse", "description": "Response for MFA device info" }, "MFAStatusResponse": { "properties": { "totp_enabled": { "type": "boolean", "title": "Totp Enabled" }, "sms_enabled": { "type": "boolean", "title": "Sms Enabled" }, "webauthn_enabled": { "type": "boolean", "title": "Webauthn Enabled" }, "mfa_required": { "type": "boolean", "title": "Mfa Required" }, "grace_period_until": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Grace Period Until" }, "devices": { "items": { "$ref": "#/components/schemas/MFADeviceResponse" }, "type": "array", "title": "Devices" } }, "type": "object", "required": [ "totp_enabled", "sms_enabled", "webauthn_enabled", "mfa_required", "devices" ], "title": "MFAStatusResponse", "description": "Response for MFA status" }, "MemoryAppendRequest": { "properties": { "content": { "type": "string", "title": "Content", "description": "Knowledge content" }, "embedding": { "anyOf": [ { "items": { "type": "number" }, "type": "array" }, { "type": "null" } ], "title": "Embedding", "description": "Vector embedding" }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Metadata", "description": "Additional metadata" } }, "type": "object", "required": [ "content" ], "title": "MemoryAppendRequest", "description": "Request to append new knowledge." }, "MemoryArcResponse": { "properties": { "memory_id": { "type": "string", "title": "Memory Id" }, "measurements": { "items": { "type": "object" }, "type": "array", "title": "Measurements" }, "trend": { "type": "string", "title": "Trend" }, "trajectory_type": { "type": "string", "title": "Trajectory Type" }, "prediction_next_access": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Prediction Next Access" }, "last_computed_at": { "type": "string", "format": "date-time", "title": "Last Computed At" } }, "type": "object", "required": [ "memory_id", "measurements", "trend", "trajectory_type", "last_computed_at" ], "title": "MemoryArcResponse" }, "MemoryAttachmentListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/MemoryAttachmentResponse" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": [ "items", "total" ], "title": "MemoryAttachmentListResponse" }, "MemoryAttachmentResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "memory_id": { "type": "string", "title": "Memory Id" }, "uploaded_by": { "type": "string", "title": "Uploaded By" }, "file_name": { "type": "string", "title": "File Name" }, "content_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Content Type" }, "size_bytes": { "type": "integer", "minimum": 0.0, "title": "Size Bytes" }, "sha256": { "type": "string", "title": "Sha256" }, "indexed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Indexed At" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "memory_id", "uploaded_by", "file_name", "size_bytes", "sha256", "created_at", "updated_at" ], "title": "MemoryAttachmentResponse" }, "MemoryBackupCreateRequest": { "properties": { "name": { "type": "string", "title": "Name" }, "backup_type": { "type": "string", "title": "Backup Type", "default": "full" }, "retention_days": { "type": "integer", "title": "Retention Days", "default": 30 }, "tags": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Tags" } }, "type": "object", "required": [ "name" ], "title": "MemoryBackupCreateRequest", "description": "Create memory backup request." }, "MemoryBackupResponse": { "properties": { "backup_id": { "type": "string", "title": "Backup Id" }, "name": { "type": "string", "title": "Name" }, "type": { "type": "string", "title": "Type" }, "size_bytes": { "type": "integer", "title": "Size Bytes" }, "created_at": { "type": "string", "title": "Created At" }, "expires_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Expires At" }, "tags": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Tags" } }, "type": "object", "required": [ "backup_id", "name", "type", "size_bytes", "created_at" ], "title": "MemoryBackupResponse", "description": "Memory backup response." }, "MemoryBackupScheduleRequest": { "properties": { "name": { "type": "string", "title": "Name" }, "schedule": { "type": "string", "title": "Schedule" }, "backup_type": { "type": "string", "title": "Backup Type", "default": "full" }, "retention_days": { "type": "integer", "title": "Retention Days", "default": 30 }, "enabled": { "type": "boolean", "title": "Enabled", "default": true } }, "type": "object", "required": [ "name", "schedule" ], "title": "MemoryBackupScheduleRequest", "description": "Create memory backup schedule request." }, "MemoryBackupScheduleResponse": { "properties": { "schedule_id": { "type": "string", "title": "Schedule Id" }, "name": { "type": "string", "title": "Name" }, "schedule": { "type": "string", "title": "Schedule" }, "backup_type": { "type": "string", "title": "Backup Type" }, "retention_days": { "type": "integer", "title": "Retention Days" }, "enabled": { "type": "boolean", "title": "Enabled" }, "next_run": { "type": "string", "title": "Next Run" } }, "type": "object", "required": [ "schedule_id", "name", "schedule", "backup_type", "retention_days", "enabled", "next_run" ], "title": "MemoryBackupScheduleResponse", "description": "Memory backup schedule response." }, "MemoryBatchDeleteRequest": { "properties": { "memory_ids": { "items": { "type": "string" }, "type": "array", "maxItems": 500, "minItems": 1, "title": "Memory Ids" } }, "type": "object", "required": [ "memory_ids" ], "title": "MemoryBatchDeleteRequest" }, "MemoryBatchDeleteResponse": { "properties": { "trace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trace Id" }, "results": { "items": { "$ref": "#/components/schemas/MemoryBatchResult" }, "type": "array", "title": "Results" } }, "type": "object", "required": [ "results" ], "title": "MemoryBatchDeleteResponse" }, "MemoryBatchResult": { "properties": { "memory_id": { "type": "string", "title": "Memory Id" }, "success": { "type": "boolean", "title": "Success" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" } }, "type": "object", "required": [ "memory_id", "success" ], "title": "MemoryBatchResult" }, "MemoryBatchShareRequest": { "properties": { "memory_ids": { "items": { "type": "string" }, "type": "array", "maxItems": 500, "minItems": 1, "title": "Memory Ids" }, "share": { "$ref": "#/components/schemas/MemoryShareRequest" } }, "type": "object", "required": [ "memory_ids", "share" ], "title": "MemoryBatchShareRequest" }, "MemoryBatchShareResponse": { "properties": { "trace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trace Id" }, "results": { "items": { "$ref": "#/components/schemas/MemoryBatchShareResult" }, "type": "array", "title": "Results" } }, "type": "object", "required": [ "results" ], "title": "MemoryBatchShareResponse" }, "MemoryBatchShareResult": { "properties": { "memory_id": { "type": "string", "title": "Memory Id" }, "success": { "type": "boolean", "title": "Success" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" }, "share_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Share Id" } }, "type": "object", "required": [ "memory_id", "success" ], "title": "MemoryBatchShareResult" }, "MemoryBatchUpdateItem": { "properties": { "memory_id": { "type": "string", "title": "Memory Id" }, "update": { "$ref": "#/components/schemas/MemoryUpdate" } }, "type": "object", "required": [ "memory_id", "update" ], "title": "MemoryBatchUpdateItem" }, "MemoryBatchUpdateRequest": { "properties": { "items": { "items": { "$ref": "#/components/schemas/MemoryBatchUpdateItem" }, "type": "array", "maxItems": 200, "minItems": 1, "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "MemoryBatchUpdateRequest" }, "MemoryBatchUpdateResponse": { "properties": { "trace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trace Id" }, "results": { "items": { "$ref": "#/components/schemas/MemoryBatchUpdateResult" }, "type": "array", "title": "Results" } }, "type": "object", "required": [ "results" ], "title": "MemoryBatchUpdateResponse" }, "MemoryBatchUpdateResult": { "properties": { "memory_id": { "type": "string", "title": "Memory Id" }, "success": { "type": "boolean", "title": "Success" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" }, "memory": { "anyOf": [ { "$ref": "#/components/schemas/MemoryResponse" }, { "type": "null" } ] } }, "type": "object", "required": [ "memory_id", "success" ], "title": "MemoryBatchUpdateResult" }, "MemoryConsolidateRequest": { "properties": { "knowledge_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Knowledge Ids", "description": "Source knowledge IDs" }, "merged_content": { "type": "string", "title": "Merged Content", "description": "Merged content" }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Metadata", "description": "Metadata for merged item" } }, "type": "object", "required": [ "knowledge_ids", "merged_content" ], "title": "MemoryConsolidateRequest", "description": "Request to consolidate multiple knowledge items." }, "MemoryCreate": { "properties": { "content": { "type": "string", "maxLength": 100000, "minLength": 1, "title": "Content" }, "title": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Title" }, "scope": { "allOf": [ { "$ref": "#/components/schemas/MemoryScope" } ], "default": "personal" }, "scope_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope Id" }, "memory_type": { "allOf": [ { "$ref": "#/components/schemas/MemoryType" } ], "default": "long_term" }, "classification": { "allOf": [ { "$ref": "#/components/schemas/Classification" } ], "default": "internal" }, "required_clearance": { "anyOf": [ { "type": "integer", "maximum": 4.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Required Clearance" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "entities": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Entities" }, "extra_metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Extra Metadata" }, "source_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Type" }, "source_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Id" }, "retention_days": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Retention Days" }, "ttl": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Ttl", "description": "Short-term memory TTL in seconds (overrides default if set)" } }, "type": "object", "required": [ "content" ], "title": "MemoryCreate", "description": "Request schema for creating a memory." }, "MemoryFeedbackCreate": { "properties": { "feedback_type": { "type": "string", "enum": [ "tag_add", "tag_remove", "classification_override", "entity_add", "entity_remove", "note", "relevance" ], "title": "Feedback Type" }, "payload": { "type": "object", "title": "Payload", "default": {} }, "target_agent": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Target Agent" } }, "type": "object", "required": [ "feedback_type" ], "title": "MemoryFeedbackCreate" }, "MemoryFeedbackListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/MemoryFeedbackResponse" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": [ "items", "total" ], "title": "MemoryFeedbackListResponse" }, "MemoryFeedbackResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "memory_id": { "type": "string", "title": "Memory Id" }, "actor_id": { "type": "string", "title": "Actor Id" }, "feedback_type": { "type": "string", "title": "Feedback Type" }, "target_agent": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Target Agent" }, "payload": { "type": "object", "title": "Payload" }, "is_applied": { "type": "boolean", "title": "Is Applied" }, "applied_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Applied At" }, "applied_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Applied By" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "memory_id", "actor_id", "feedback_type", "payload", "is_applied", "created_at", "updated_at" ], "title": "MemoryFeedbackResponse" }, "MemoryListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/MemoryResponse" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "total", "page", "page_size", "has_more" ], "title": "MemoryListResponse", "description": "Response schema for memory list." }, "MemoryReadRequest": { "properties": { "knowledge_id": { "type": "string", "format": "uuid", "title": "Knowledge Id", "description": "Knowledge item ID" } }, "type": "object", "required": [ "knowledge_id" ], "title": "MemoryReadRequest", "description": "Request to read a knowledge item." }, "MemoryRelevanceFeedbackCreate": { "properties": { "relevant": { "type": "boolean", "title": "Relevant" }, "query": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Query" }, "hnms_mode": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Hnms Mode" }, "target_agent": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Target Agent" }, "trace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trace Id" } }, "type": "object", "required": [ "relevant" ], "title": "MemoryRelevanceFeedbackCreate" }, "MemoryResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "owner_id": { "type": "string", "title": "Owner Id" }, "scope": { "type": "string", "title": "Scope" }, "scope_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope Id" }, "memory_type": { "type": "string", "title": "Memory Type" }, "classification": { "type": "string", "title": "Classification" }, "required_clearance": { "type": "integer", "title": "Required Clearance" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "content_preview": { "type": "string", "title": "Content Preview" }, "tags": { "items": { "type": "string" }, "type": "array", "title": "Tags" }, "entities": { "type": "object", "title": "Entities" }, "extra_metadata": { "type": "object", "title": "Extra Metadata" }, "source_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Type" }, "source_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Id" }, "access_count": { "type": "integer", "title": "Access Count" }, "last_accessed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Accessed At" }, "is_promoted": { "type": "boolean", "title": "Is Promoted" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Score" }, "provenance": { "anyOf": [ { "items": { "$ref": "#/components/schemas/ProvenanceSource" }, "type": "array" }, { "type": "null" } ], "title": "Provenance" } }, "type": "object", "required": [ "id", "organization_id", "owner_id", "scope", "scope_id", "memory_type", "classification", "required_clearance", "title", "content_preview", "tags", "entities", "extra_metadata", "source_type", "source_id", "access_count", "last_accessed_at", "is_promoted", "created_at", "updated_at" ], "title": "MemoryResponse", "description": "Response schema for memory data." }, "MemoryRestoreRequest": { "properties": { "backup_id": { "type": "string", "title": "Backup Id" }, "overwrite": { "type": "boolean", "title": "Overwrite", "default": false }, "dry_run": { "type": "boolean", "title": "Dry Run", "default": false } }, "type": "object", "required": [ "backup_id" ], "title": "MemoryRestoreRequest", "description": "Restore memory backup request." }, "MemoryRestoreResultResponse": { "properties": { "backup_id": { "type": "string", "title": "Backup Id" }, "restored_at": { "type": "string", "title": "Restored At" }, "memories_restored": { "type": "integer", "title": "Memories Restored" }, "memories_skipped": { "type": "integer", "title": "Memories Skipped" }, "overwrite": { "type": "boolean", "title": "Overwrite" } }, "type": "object", "required": [ "backup_id", "restored_at", "memories_restored", "memories_skipped", "overwrite" ], "title": "MemoryRestoreResultResponse", "description": "Memory restore result response." }, "MemoryRetrievalExplanationSchema": { "properties": { "id": { "type": "string", "title": "Id", "description": "UUID of explanation log entry" }, "organization_id": { "type": "string", "title": "Organization Id", "description": "Organization UUID" }, "user_id": { "type": "string", "title": "User Id", "description": "User UUID who made the query" }, "query_hash": { "type": "string", "title": "Query Hash", "description": "Hash of the query (for grouping)" }, "retrieved_at": { "type": "string", "format": "date-time", "title": "Retrieved At", "description": "When retrieval happened" }, "top_k": { "type": "integer", "title": "Top K", "description": "Number of results requested" }, "results": { "items": { "$ref": "#/components/schemas/RetrievalResultSchema" }, "type": "array", "title": "Results", "description": "Scored results with explanations" } }, "type": "object", "required": [ "id", "organization_id", "user_id", "query_hash", "retrieved_at", "top_k", "results" ], "title": "MemoryRetrievalExplanationSchema", "description": "Response model for retrieval explanation log entry." }, "MemoryScope": { "type": "string", "enum": [ "personal", "team", "department", "division", "organization", "global" ], "title": "MemoryScope", "description": "Memory visibility scope." }, "MemorySearchRequest": { "properties": { "embedding": { "items": { "type": "number" }, "type": "array", "title": "Embedding", "description": "Query vector" }, "limit": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Limit", "description": "Max results", "default": 10 } }, "type": "object", "required": [ "embedding" ], "title": "MemorySearchRequest", "description": "Request to search knowledge via vector similarity." }, "MemorySearchResponse": { "properties": { "trace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trace Id" }, "query": { "type": "string", "title": "Query" }, "results": { "items": { "$ref": "#/components/schemas/MemoryResponse" }, "type": "array", "title": "Results" }, "total": { "type": "integer", "title": "Total" }, "took_ms": { "type": "number", "title": "Took Ms" }, "ranking_meta": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Ranking Meta" }, "facts_used": { "anyOf": [ { "items": { "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Facts Used" }, "disputed_facts": { "anyOf": [ { "items": { "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Disputed Facts" }, "playbooks": { "anyOf": [ { "items": { "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Playbooks" } }, "type": "object", "required": [ "query", "results", "total", "took_ms" ], "title": "MemorySearchResponse", "description": "Response schema for memory search." }, "MemoryShareRequest": { "properties": { "share_type": { "$ref": "#/components/schemas/ShareType" }, "target_id": { "type": "string", "title": "Target Id" }, "permission": { "allOf": [ { "$ref": "#/components/schemas/SharePermission" } ], "default": "read" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" }, "reason": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Reason" }, "notify": { "type": "boolean", "title": "Notify", "default": true } }, "type": "object", "required": [ "share_type", "target_id" ], "title": "MemoryShareRequest", "description": "Request schema for sharing a memory." }, "MemorySharingResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "memory_id": { "type": "string", "title": "Memory Id" }, "share_type": { "type": "string", "title": "Share Type" }, "target_id": { "type": "string", "title": "Target Id" }, "permission": { "type": "string", "title": "Permission" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" }, "shared_by": { "type": "string", "title": "Shared By" }, "share_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Share Reason" }, "is_active": { "type": "boolean", "title": "Is Active" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "memory_id", "share_type", "target_id", "permission", "expires_at", "shared_by", "share_reason", "is_active", "created_at" ], "title": "MemorySharingResponse", "description": "Response schema for memory sharing data." }, "MemoryType": { "type": "string", "enum": [ "short_term", "long_term", "semantic", "procedural" ], "title": "MemoryType", "description": "Memory type classification." }, "MemoryUpdate": { "properties": { "title": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Title" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "classification": { "anyOf": [ { "$ref": "#/components/schemas/Classification" }, { "type": "null" } ] }, "extra_metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Extra Metadata" }, "retention_days": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Retention Days" } }, "type": "object", "title": "MemoryUpdate", "description": "Request schema for updating a memory." }, "MemoryUpsertRequest": { "properties": { "knowledge_id": { "type": "string", "format": "uuid", "title": "Knowledge Id", "description": "Knowledge ID (create if doesn't exist)" }, "content": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Content", "description": "Updated content" }, "embedding": { "anyOf": [ { "items": { "type": "number" }, "type": "array" }, { "type": "null" } ], "title": "Embedding", "description": "Updated embedding" }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Metadata", "description": "Updated metadata" } }, "type": "object", "required": [ "knowledge_id" ], "title": "MemoryUpsertRequest", "description": "Request to update or insert knowledge." }, "MetaAgentRunOut": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "resource_type": { "type": "string", "enum": [ "memory", "cognitive_session" ], "title": "Resource Type" }, "resource_id": { "type": "string", "title": "Resource Id" }, "supervision_type": { "type": "string", "enum": [ "review", "arbitration", "calibration_update" ], "title": "Supervision Type" }, "status": { "type": "string", "enum": [ "accepted", "modified", "rejected", "contested", "escalated" ], "title": "Status" }, "final_confidence": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Final Confidence" }, "risk_score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Risk Score" }, "reasoning_summary": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reasoning Summary" }, "evidence": { "type": "object", "title": "Evidence" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "organization_id", "resource_type", "resource_id", "supervision_type", "status", "created_at" ], "title": "MetaAgentRunOut" }, "MetaConflictOut": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "resource_type": { "type": "string", "enum": [ "memory", "cognitive_session" ], "title": "Resource Type" }, "resource_id": { "type": "string", "title": "Resource Id" }, "conflict_type": { "type": "string", "enum": [ "classification", "topic", "entity", "promotion", "tool", "belief" ], "title": "Conflict Type" }, "candidates": { "type": "object", "title": "Candidates" }, "resolution": { "type": "object", "title": "Resolution" }, "resolved_by": { "anyOf": [ { "type": "string", "enum": [ "meta_auto", "human_admin" ] }, { "type": "null" } ], "title": "Resolved By" }, "status": { "type": "string", "enum": [ "open", "resolved", "ignored" ], "title": "Status" }, "resolved_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Resolved At" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "organization_id", "resource_type", "resource_id", "conflict_type", "status", "created_at" ], "title": "MetaConflictOut" }, "MonthlyImpactRequest": { "properties": { "month": { "type": "string", "title": "Month", "description": "Month label, e.g. 2026-03" }, "records": { "items": { "type": "object" }, "type": "array", "title": "Records" }, "baseline": { "additionalProperties": { "type": "number" }, "type": "object", "title": "Baseline" }, "labor_cost_per_hour": { "type": "number", "title": "Labor Cost Per Hour", "default": 120.0 }, "false_escalation_cost": { "type": "number", "title": "False Escalation Cost", "default": 250.0 }, "monthly_operating_cost": { "type": "number", "title": "Monthly Operating Cost", "default": 3000.0 } }, "type": "object", "required": [ "month" ], "title": "MonthlyImpactRequest" }, "MonthlyImpactResponse": { "properties": { "month": { "type": "string", "title": "Month" }, "tenant_id": { "type": "string", "title": "Tenant Id" }, "incidents_count": { "type": "integer", "title": "Incidents Count" }, "lead_time_saved_hours": { "type": "number", "title": "Lead Time Saved Hours" }, "mttr_saved_hours": { "type": "number", "title": "Mttr Saved Hours" }, "avoided_sla_penalty": { "type": "number", "title": "Avoided Sla Penalty" }, "estimated_savings": { "type": "number", "title": "Estimated Savings" }, "operating_cost": { "type": "number", "title": "Operating Cost" }, "net_impact": { "type": "number", "title": "Net Impact" }, "roi_pct": { "type": "number", "title": "Roi Pct" }, "reproducibility_hash": { "type": "string", "title": "Reproducibility Hash" } }, "type": "object", "required": [ "month", "tenant_id", "incidents_count", "lead_time_saved_hours", "mttr_saved_hours", "avoided_sla_penalty", "estimated_savings", "operating_cost", "net_impact", "roi_pct", "reproducibility_hash" ], "title": "MonthlyImpactResponse" }, "MotivationMetrics": { "properties": { "total_goals_generated": { "type": "integer", "title": "Total Goals Generated" }, "total_goals_completed": { "type": "integer", "title": "Total Goals Completed" }, "valuable_rate": { "type": "number", "title": "Valuable Rate" }, "user_expectation_alignment": { "type": "number", "title": "User Expectation Alignment" }, "avg_time_to_completion_days": { "type": "number", "title": "Avg Time To Completion Days" }, "top_valuable_initiators": { "additionalProperties": { "type": "number" }, "type": "object", "title": "Top Valuable Initiators" } }, "type": "object", "required": [ "total_goals_generated", "total_goals_completed", "valuable_rate", "user_expectation_alignment", "avg_time_to_completion_days", "top_valuable_initiators" ], "title": "MotivationMetrics", "description": "Metrics on autonomous goal generation quality" }, "NarrativeResponse": { "properties": { "memory_id": { "type": "string", "title": "Memory Id" }, "narrative_text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Narrative Text" }, "key_entities": { "items": { "type": "string" }, "type": "array", "title": "Key Entities" }, "timeline_summary": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Timeline Summary" }, "action_items": { "items": { "type": "string" }, "type": "array", "title": "Action Items" }, "tone": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tone" }, "confidence": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Confidence" }, "retrieved_at": { "type": "string", "format": "date-time", "title": "Retrieved At" } }, "type": "object", "required": [ "memory_id", "retrieved_at" ], "title": "NarrativeResponse" }, "NeighborItem": { "properties": { "entity": { "type": "string", "title": "Entity" }, "entity_type": { "type": "string", "title": "Entity Type" }, "domains": { "items": { "type": "string" }, "type": "array", "title": "Domains" }, "edge_count": { "type": "integer", "title": "Edge Count" }, "max_weight": { "type": "number", "title": "Max Weight" } }, "type": "object", "required": [ "entity", "entity_type", "edge_count", "max_weight" ], "title": "NeighborItem" }, "NeighborsResponse": { "properties": { "entity": { "type": "string", "title": "Entity" }, "neighbors": { "items": { "$ref": "#/components/schemas/NeighborItem" }, "type": "array", "title": "Neighbors" }, "total": { "type": "integer", "title": "Total" }, "retrieved_at": { "type": "string", "format": "date-time", "title": "Retrieved At" } }, "type": "object", "required": [ "entity", "neighbors", "total", "retrieved_at" ], "title": "NeighborsResponse" }, "NightlyDecayRefreshRequest": { "properties": { "org_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org Id", "description": "If omitted, runs for all active orgs" }, "prune_min_weight": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Prune Min Weight", "default": 0.01 }, "prune_older_than_days": { "type": "integer", "maximum": 3650.0, "minimum": 1.0, "title": "Prune Older Than Days", "default": 90 } }, "type": "object", "title": "NightlyDecayRefreshRequest" }, "NightlyDecayRefreshResponse": { "properties": { "ok": { "type": "boolean", "title": "Ok" }, "enqueued": { "type": "boolean", "title": "Enqueued" }, "task_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Task Id" }, "org_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org Id" }, "reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reason" } }, "type": "object", "required": [ "ok", "enqueued" ], "title": "NightlyDecayRefreshResponse" }, "OidcExchangeRequest": { "properties": { "id_token": { "type": "string", "title": "Id Token" } }, "type": "object", "required": [ "id_token" ], "title": "OidcExchangeRequest", "description": "Exchange an OIDC ID token for Ninai tokens." }, "OrgBenchmarkResponse": { "properties": { "metric_type": { "type": "string", "title": "Metric Type" }, "value": { "type": "number", "title": "Value" }, "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "percentile": { "type": "number", "title": "Percentile" }, "peer_count": { "type": "integer", "title": "Peer Count" }, "trend": { "$ref": "#/components/schemas/TrendType" }, "last_computed_at": { "type": "string", "format": "date-time", "title": "Last Computed At" } }, "type": "object", "required": [ "metric_type", "value", "id", "organization_id", "percentile", "peer_count", "trend", "last_computed_at" ], "title": "OrgBenchmarkResponse", "description": "Response schema for organization benchmark." }, "OrgSwitchRequest": { "properties": { "organization_id": { "type": "string", "title": "Organization Id" } }, "type": "object", "required": [ "organization_id" ], "title": "OrgSwitchRequest", "description": "Request to switch organization context." }, "OrganizationCreate": { "properties": { "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" }, "slug": { "type": "string", "maxLength": 100, "minLength": 1, "pattern": "^[a-z0-9-]+$", "title": "Slug" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "settings": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Settings" }, "parent_org_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Parent Org Id" } }, "type": "object", "required": [ "name", "slug" ], "title": "OrganizationCreate", "description": "Request schema for creating an organization." }, "OrganizationResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "slug": { "type": "string", "title": "Slug" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "settings": { "type": "object", "title": "Settings" }, "is_active": { "type": "boolean", "title": "Is Active" }, "parent_org_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Parent Org Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "name", "slug", "description", "settings", "is_active", "parent_org_id", "created_at", "updated_at" ], "title": "OrganizationResponse", "description": "Response schema for organization data." }, "OrganizationUpdate": { "properties": { "name": { "anyOf": [ { "type": "string", "maxLength": 255, "minLength": 1 }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "settings": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Settings" }, "is_active": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Active" } }, "type": "object", "title": "OrganizationUpdate", "description": "Request schema for updating an organization." }, "OutcomeType": { "type": "string", "enum": [ "valuable", "not_valuable", "premature" ], "title": "OutcomeType", "description": "Outcome assessment" }, "PaginatedResponse": { "properties": { "items": { "items": {}, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" }, "pages": { "type": "integer", "title": "Pages" } }, "type": "object", "required": [ "items", "total", "page", "page_size", "pages" ], "title": "PaginatedResponse", "description": "Generic paginated response wrapper.\n\nAttributes:\n items: List of items for this page\n total: Total number of items\n page: Current page number (1-indexed)\n page_size: Number of items per page\n pages: Total number of pages" }, "PaginatedResponse_GoalResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/GoalResponse" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" }, "pages": { "type": "integer", "title": "Pages" } }, "type": "object", "required": [ "items", "total", "page", "page_size", "pages" ], "title": "PaginatedResponse[GoalResponse]" }, "PaginatedResponse_UserAdminListItemResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/UserAdminListItemResponse" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" }, "pages": { "type": "integer", "title": "Pages" } }, "type": "object", "required": [ "items", "total", "page", "page_size", "pages" ], "title": "PaginatedResponse[UserAdminListItemResponse]" }, "PermissionInfo": { "properties": { "permission": { "type": "string", "title": "Permission", "description": "Permission code (e.g., 'users:read')" }, "description": { "type": "string", "title": "Description" }, "category": { "type": "string", "title": "Category" } }, "type": "object", "required": [ "permission", "description", "category" ], "title": "PermissionInfo", "description": "Permission information" }, "PermissionsResponse": { "properties": { "permissions": { "items": { "$ref": "#/components/schemas/PermissionInfo" }, "type": "array", "title": "Permissions" } }, "type": "object", "required": [ "permissions" ], "title": "PermissionsResponse", "description": "List of available permissions" }, "PinMemoryResponse": { "properties": { "memory_id": { "type": "string", "title": "Memory Id" }, "pinned": { "type": "boolean", "title": "Pinned" }, "message": { "type": "string", "title": "Message" } }, "type": "object", "required": [ "memory_id", "pinned", "message" ], "title": "PinMemoryResponse" }, "PipelineStatsResponse": { "properties": { "total_tasks": { "type": "integer", "title": "Total Tasks", "default": 0 }, "queued_tasks": { "type": "integer", "title": "Queued Tasks", "default": 0 }, "running_tasks": { "type": "integer", "title": "Running Tasks", "default": 0 }, "blocked_tasks": { "type": "integer", "title": "Blocked Tasks", "default": 0 }, "succeeded_tasks_last_hour": { "type": "integer", "title": "Succeeded Tasks Last Hour", "default": 0 }, "failed_tasks_last_hour": { "type": "integer", "title": "Failed Tasks Last Hour", "default": 0 }, "sla_breached_count": { "type": "integer", "title": "Sla Breached Count", "default": 0 }, "sla_compliance_rate": { "type": "number", "title": "Sla Compliance Rate", "default": 0.0 }, "avg_queue_time_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Avg Queue Time Ms" }, "avg_execution_time_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Avg Execution Time Ms" }, "total_tokens_consumed_last_hour": { "type": "integer", "title": "Total Tokens Consumed Last Hour", "default": 0 }, "avg_tokens_per_task": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Avg Tokens Per Task" }, "queue_depth_by_type": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "Queue Depth By Type", "default": {} }, "sla_breach_by_category": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "Sla Breach By Category", "default": {} } }, "type": "object", "title": "PipelineStatsResponse", "description": "Response schema for pipeline queue statistics." }, "PipelineTaskCreate": { "properties": { "task_type": { "type": "string", "title": "Task Type", "description": "Task type: consolidation, critique, evaluation, feedback_loop, embedding_refresh" }, "priority": { "type": "integer", "maximum": 10.0, "minimum": 1.0, "title": "Priority", "description": "Priority 1-10 (10=highest)", "default": 5 }, "sla_category": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Sla Category", "description": "SLA category: critical, high, medium, low" }, "sla_deadline_minutes": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Sla Deadline Minutes", "description": "Minutes until SLA deadline" }, "estimated_tokens": { "anyOf": [ { "type": "integer", "minimum": 0.0 }, { "type": "null" } ], "title": "Estimated Tokens", "description": "Estimated token consumption" }, "estimated_latency_ms": { "anyOf": [ { "type": "integer", "minimum": 0.0 }, { "type": "null" } ], "title": "Estimated Latency Ms", "description": "Estimated latency in ms" }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Metadata" }, "blocks_on_task_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Blocks On Task Id", "description": "Task ID this depends on" } }, "type": "object", "required": [ "task_type" ], "title": "PipelineTaskCreate", "description": "Request schema for creating a pipeline task." }, "PipelineTaskResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "task_type": { "type": "string", "title": "Task Type" }, "status": { "type": "string", "title": "Status" }, "priority": { "type": "integer", "title": "Priority" }, "sla_deadline": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Sla Deadline" }, "sla_category": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Sla Category" }, "sla_remaining_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Sla Remaining Ms" }, "sla_breached": { "type": "boolean", "title": "Sla Breached", "default": false }, "estimated_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Estimated Tokens" }, "actual_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Actual Tokens" }, "estimated_latency_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Estimated Latency Ms" }, "duration_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Duration Ms" }, "blocks_on_task_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Blocks On Task Id" }, "blocked_by_quota": { "type": "boolean", "title": "Blocked By Quota", "default": false }, "attempts": { "type": "integer", "title": "Attempts", "default": 0 }, "max_attempts": { "type": "integer", "title": "Max Attempts", "default": 3 }, "last_error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Error" }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Metadata" }, "trace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trace Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Started At" }, "completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Completed At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "task_type", "status", "priority", "created_at", "updated_at" ], "title": "PipelineTaskResponse", "description": "Response schema for a single pipeline task." }, "PipelineTaskUpdatePriority": { "properties": { "priority": { "type": "integer", "maximum": 10.0, "minimum": 1.0, "title": "Priority", "description": "New priority 1-10 (10=highest)" }, "reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reason", "description": "Reason for priority change" } }, "type": "object", "required": [ "priority" ], "title": "PipelineTaskUpdatePriority", "description": "Request schema for updating task priority." }, "PolicyActivateRequest": { "properties": { "policy_id": { "type": "string", "title": "Policy Id" }, "rollout_percentage": { "type": "integer", "title": "Rollout Percentage", "default": 100 } }, "type": "object", "required": [ "policy_id" ], "title": "PolicyActivateRequest", "description": "Activate policy version request." }, "PolicyHistoryResponse": { "properties": { "event_type": { "type": "string", "title": "Event Type" }, "version": { "type": "integer", "title": "Version" }, "status": { "type": "string", "title": "Status" }, "created_at": { "type": "string", "title": "Created At" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created By" }, "rollout_percentage": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Rollout Percentage" } }, "type": "object", "required": [ "event_type", "version", "status", "created_at" ], "title": "PolicyHistoryResponse", "description": "Policy history entry." }, "PolicyRollbackRequest": { "properties": { "name": { "type": "string", "title": "Name" }, "policy_type": { "type": "string", "title": "Policy Type" }, "target_version": { "type": "integer", "title": "Target Version" } }, "type": "object", "required": [ "name", "policy_type", "target_version" ], "title": "PolicyRollbackRequest", "description": "Rollback policy to previous version." }, "PolicyVersionCreateRequest": { "properties": { "name": { "type": "string", "title": "Name" }, "policy_type": { "type": "string", "title": "Policy Type" }, "content": { "type": "object", "title": "Content" }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Metadata" } }, "type": "object", "required": [ "name", "policy_type", "content" ], "title": "PolicyVersionCreateRequest", "description": "Create policy version request." }, "PolicyVersionResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "version": { "type": "integer", "title": "Version" }, "policy_type": { "type": "string", "title": "Policy Type" }, "status": { "type": "string", "title": "Status" }, "rollout_percentage": { "type": "integer", "title": "Rollout Percentage" }, "created_at": { "type": "string", "title": "Created At" }, "created_by": { "type": "string", "title": "Created By" }, "activated_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Activated At" }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Metadata" } }, "type": "object", "required": [ "id", "name", "version", "policy_type", "status", "rollout_percentage", "created_at", "created_by" ], "title": "PolicyVersionResponse", "description": "Policy version response." }, "PredictionRequest": { "properties": { "cause_ids": { "items": { "type": "string" }, "type": "array", "title": "Cause Ids", "description": "Starting cause fact IDs" }, "target_id": { "type": "string", "title": "Target Id", "description": "Target fact ID to predict" }, "max_depth": { "type": "integer", "maximum": 10.0, "minimum": 1.0, "title": "Max Depth", "default": 3 } }, "type": "object", "required": [ "cause_ids", "target_id" ], "title": "PredictionRequest", "description": "Request for causal prediction." }, "PredictionResponse": { "properties": { "outcome_id": { "type": "string", "title": "Outcome Id" }, "probability": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Probability" }, "confidence": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Confidence" }, "causal_chain": { "items": { "type": "string" }, "type": "array", "title": "Causal Chain" } }, "type": "object", "required": [ "outcome_id", "probability", "confidence" ], "title": "PredictionResponse", "description": "Causal prediction result." }, "PrivacyPolicyCreate": { "properties": { "allow_pattern_sharing": { "type": "boolean", "title": "Allow Pattern Sharing", "default": false }, "allow_playbook_contribution": { "type": "boolean", "title": "Allow Playbook Contribution", "default": false }, "allow_benchmark_participation": { "type": "boolean", "title": "Allow Benchmark Participation", "default": false }, "minimum_anonymization_level": { "allOf": [ { "$ref": "#/components/schemas/AnonymizationLevel" } ], "default": "full" }, "excluded_domains": { "items": { "type": "string" }, "type": "array", "title": "Excluded Domains" } }, "type": "object", "title": "PrivacyPolicyCreate", "description": "Request to create or update privacy policy." }, "PrivacyPolicyResponse": { "properties": { "allow_pattern_sharing": { "type": "boolean", "title": "Allow Pattern Sharing", "default": false }, "allow_playbook_contribution": { "type": "boolean", "title": "Allow Playbook Contribution", "default": false }, "allow_benchmark_participation": { "type": "boolean", "title": "Allow Benchmark Participation", "default": false }, "minimum_anonymization_level": { "allOf": [ { "$ref": "#/components/schemas/AnonymizationLevel" } ], "default": "full" }, "excluded_domains": { "items": { "type": "string" }, "type": "array", "title": "Excluded Domains" }, "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "created_at", "updated_at" ], "title": "PrivacyPolicyResponse", "description": "Response schema for privacy policy." }, "PrivateAggregateRequest": { "properties": { "aggregation_type": { "type": "string", "title": "Aggregation Type", "description": "Type: mean, median, sum, count, variance", "default": "mean" }, "epsilon": { "anyOf": [ { "type": "number", "minimum": 0.0 }, { "type": "null" } ], "title": "Epsilon" } }, "type": "object", "title": "PrivateAggregateRequest", "description": "Request to compute private aggregate." }, "PrivateAggregateResponse": { "properties": { "result": { "type": "number", "title": "Result" }, "aggregation_type": { "type": "string", "title": "Aggregation Type" }, "epsilon_used": { "type": "number", "title": "Epsilon Used" }, "org_count": { "type": "integer", "title": "Org Count" } }, "type": "object", "required": [ "result", "aggregation_type", "epsilon_used", "org_count" ], "title": "PrivateAggregateResponse", "description": "Response with privatized aggregate." }, "ProofScorecardRequest": { "properties": { "records": { "items": { "type": "object" }, "type": "array", "title": "Records" }, "baseline": { "additionalProperties": { "type": "number" }, "type": "object", "title": "Baseline" } }, "type": "object", "title": "ProofScorecardRequest" }, "ProofScorecardResponse": { "properties": { "lead_time_gain_pct": { "type": "number", "title": "Lead Time Gain Pct" }, "sla_avoidance_rate": { "type": "number", "title": "Sla Avoidance Rate" }, "mttr_delta_pct": { "type": "number", "title": "Mttr Delta Pct" }, "false_escalation_reduction_pct": { "type": "number", "title": "False Escalation Reduction Pct" }, "incidents_count": { "type": "integer", "title": "Incidents Count" }, "score": { "type": "number", "title": "Score" }, "reproducibility_hash": { "type": "string", "title": "Reproducibility Hash" } }, "type": "object", "required": [ "lead_time_gain_pct", "sla_avoidance_rate", "mttr_delta_pct", "false_escalation_reduction_pct", "incidents_count", "score", "reproducibility_hash" ], "title": "ProofScorecardResponse" }, "ProvenanceSource": { "properties": { "kind": { "type": "string", "enum": [ "memory", "attachment", "document", "external" ], "title": "Kind", "default": "memory" }, "source_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Type" }, "source_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Id" }, "source_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Version" }, "content_hash": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Content Hash" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "excerpt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Excerpt" }, "uri": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Uri" }, "score": { "anyOf": [ { "type": "number", "minimum": 0.0 }, { "type": "null" } ], "title": "Score" }, "meta": { "type": "object", "title": "Meta" } }, "type": "object", "title": "ProvenanceSource", "description": "A single source used to produce an answer/result." }, "PublicityLevel": { "type": "string", "enum": [ "private", "org_only", "peer_group", "public" ], "title": "PublicityLevel", "description": "Playbook sharing scope." }, "PurgeOldRequest": { "properties": { "days": { "type": "integer", "title": "Days", "default": 30 } }, "type": "object", "title": "PurgeOldRequest", "description": "Request to purge old tasks." }, "PurgeTaskRequest": { "properties": { "task_id": { "type": "string", "title": "Task Id" } }, "type": "object", "required": [ "task_id" ], "title": "PurgeTaskRequest", "description": "Request to purge a task." }, "QueryIntelligenceResponse": { "properties": { "memory_id": { "type": "string", "title": "Memory Id" }, "query_intent": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Query Intent" }, "extracted_entities": { "items": { "type": "string" }, "type": "array", "title": "Extracted Entities" }, "dynamic_filters": { "type": "object", "title": "Dynamic Filters" }, "suggested_agents": { "items": { "type": "string" }, "type": "array", "title": "Suggested Agents" }, "confidence": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Confidence" }, "retrieved_at": { "type": "string", "format": "date-time", "title": "Retrieved At" } }, "type": "object", "required": [ "memory_id", "retrieved_at" ], "title": "QueryIntelligenceResponse" }, "QueueItem": { "properties": { "memory_id": { "type": "string", "title": "Memory Id" }, "priority": { "type": "string", "title": "Priority" }, "review_reasons": { "items": { "type": "string" }, "type": "array", "title": "Review Reasons" }, "review_context": { "type": "object", "title": "Review Context" }, "queue_entry_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Queue Entry Id" }, "queued_at": { "type": "string", "format": "date-time", "title": "Queued At" } }, "type": "object", "required": [ "memory_id", "priority", "queued_at" ], "title": "QueueItem" }, "QueueResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/QueueItem" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "retrieved_at": { "type": "string", "format": "date-time", "title": "Retrieved At" } }, "type": "object", "required": [ "items", "total", "retrieved_at" ], "title": "QueueResponse" }, "QuotaUpdateRequest": { "properties": { "user_id": { "type": "string", "format": "uuid", "title": "User Id", "description": "User ID" }, "request_type": { "type": "string", "title": "Request Type", "description": "Request type" }, "limit": { "type": "integer", "minimum": 0.0, "title": "Limit", "description": "Maximum requests allowed" }, "window_seconds": { "type": "integer", "minimum": 1.0, "title": "Window Seconds", "description": "Time window in seconds", "default": 3600 } }, "type": "object", "required": [ "user_id", "request_type", "limit" ], "title": "QuotaUpdateRequest", "description": "Request to update quota for a user." }, "ReadinessListResponse": { "properties": { "total": { "type": "integer", "title": "Total" }, "ready": { "type": "integer", "title": "Ready" }, "items": { "items": { "$ref": "#/components/schemas/AgentReadinessItem" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "total", "ready", "items" ], "title": "ReadinessListResponse" }, "RecentMemory": { "properties": { "memory_id": { "type": "string", "title": "Memory Id" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "content_preview": { "type": "string", "title": "Content Preview" }, "created_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created At" } }, "type": "object", "required": [ "memory_id", "content_preview" ], "title": "RecentMemory" }, "RefreshTokenRequest": { "properties": { "refresh_token": { "type": "string", "title": "Refresh Token" } }, "type": "object", "required": [ "refresh_token" ], "title": "RefreshTokenRequest", "description": "Request to refresh access token." }, "ReidentificationRiskRequest": { "properties": { "org_count": { "type": "integer", "minimum": 1.0, "title": "Org Count" }, "data_dimension": { "type": "integer", "minimum": 1.0, "title": "Data Dimension" }, "epsilon": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Epsilon" } }, "type": "object", "required": [ "org_count", "data_dimension" ], "title": "ReidentificationRiskRequest", "description": "Request to estimate re-identification risk." }, "ReidentificationRiskResponse": { "properties": { "risk_score": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Risk Score", "description": "Risk of re-identification" }, "org_count": { "type": "integer", "title": "Org Count" }, "data_dimension": { "type": "integer", "title": "Data Dimension" }, "epsilon": { "type": "number", "title": "Epsilon" }, "risk_level": { "type": "string", "title": "Risk Level" }, "recommendation": { "type": "string", "title": "Recommendation" } }, "type": "object", "required": [ "risk_score", "org_count", "data_dimension", "epsilon", "risk_level", "recommendation" ], "title": "ReidentificationRiskResponse", "description": "Response with risk assessment." }, "RelatedMemoriesResponse": { "properties": { "memory_id": { "type": "string", "title": "Memory Id" }, "related": { "items": { "type": "object" }, "type": "array", "title": "Related" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": [ "memory_id", "related", "total" ], "title": "RelatedMemoriesResponse", "description": "Related memories response." }, "RelationTypeEnum": { "type": "string", "enum": [ "causes", "leads_to", "blocks", "resolves", "correlates" ], "title": "RelationTypeEnum", "description": "Types of causal relationships." }, "ReplayResponse": { "properties": { "agent_run_id": { "type": "string", "title": "Agent Run Id" }, "checkpoints": { "items": { "$ref": "#/components/schemas/CheckpointSnapshot" }, "type": "array", "title": "Checkpoints" } }, "type": "object", "required": [ "agent_run_id" ], "title": "ReplayResponse", "description": "Full replay data for time-travel debugging." }, "ReproduceRequest": { "properties": { "step_index": { "type": "integer", "title": "Step Index" } }, "type": "object", "required": [ "step_index" ], "title": "ReproduceRequest", "description": "Request to reproduce a specific step." }, "ReproduceResponse": { "properties": { "step_index": { "type": "integer", "title": "Step Index" }, "input_snapshot": { "type": "object", "title": "Input Snapshot" }, "retrieval_snapshot": { "type": "object", "title": "Retrieval Snapshot" }, "model_snapshot": { "type": "object", "title": "Model Snapshot" }, "output_snapshot": { "type": "object", "title": "Output Snapshot" } }, "type": "object", "required": [ "step_index" ], "title": "ReproduceResponse", "description": "Result of step reproduction." }, "ResolveRequest": { "properties": { "memory_id": { "type": "string", "title": "Memory Id" }, "verdict": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Verdict", "description": "approve | reject | partial" }, "notes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Notes" }, "credibility_override": { "anyOf": [ { "type": "number", "maximum": 1.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Credibility Override" }, "resolution_confirmed": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Resolution Confirmed" }, "playbook_correct": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Playbook Correct" } }, "type": "object", "required": [ "memory_id" ], "title": "ResolveRequest" }, "ResolveResponse": { "properties": { "memory_id": { "type": "string", "title": "Memory Id" }, "verdict": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Verdict" }, "feedback_id": { "type": "string", "title": "Feedback Id" }, "resolved_at": { "type": "string", "format": "date-time", "title": "Resolved At" } }, "type": "object", "required": [ "memory_id", "verdict", "feedback_id", "resolved_at" ], "title": "ResolveResponse" }, "RestoreBackupRequest": { "properties": { "backup_id": { "type": "string", "format": "uuid", "title": "Backup Id", "description": "ID of backup to restore from" }, "confirm": { "type": "boolean", "title": "Confirm", "description": "Confirmation that database will be overwritten" } }, "type": "object", "required": [ "backup_id", "confirm" ], "title": "RestoreBackupRequest", "description": "Request to restore from backup" }, "RestoreBackupResponse": { "properties": { "restore_id": { "type": "string", "format": "uuid", "title": "Restore Id" }, "backup_id": { "type": "string", "format": "uuid", "title": "Backup Id" }, "status": { "type": "string", "title": "Status" }, "message": { "type": "string", "title": "Message" } }, "type": "object", "required": [ "restore_id", "backup_id", "status", "message" ], "title": "RestoreBackupResponse", "description": "Response after restore request" }, "RetentionPolicyResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "retention_days_memory": { "type": "integer", "title": "Retention Days Memory" }, "retention_days_audit": { "type": "integer", "title": "Retention Days Audit" }, "auto_archive_after_days": { "type": "integer", "title": "Auto Archive After Days" }, "is_active": { "type": "boolean", "title": "Is Active" }, "created_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Created At" } }, "type": "object", "required": [ "id", "organization_id", "retention_days_memory", "retention_days_audit", "auto_archive_after_days", "is_active" ], "title": "RetentionPolicyResponse" }, "RetentionPolicyUpdate": { "properties": { "retention_days_memory": { "type": "integer", "maximum": 3650.0, "minimum": 1.0, "title": "Retention Days Memory", "default": 365 }, "retention_days_audit": { "type": "integer", "maximum": 3650.0, "minimum": 1.0, "title": "Retention Days Audit", "default": 730 }, "auto_archive_after_days": { "type": "integer", "maximum": 1825.0, "minimum": 1.0, "title": "Auto Archive After Days", "default": 90 } }, "type": "object", "title": "RetentionPolicyUpdate" }, "RetrievalExplanation": { "properties": { "step_index": { "type": "integer", "title": "Step Index" }, "input_query": { "type": "string", "title": "Input Query" }, "input_filters": { "type": "object", "title": "Input Filters" }, "retrieved_ids": { "items": { "type": "string" }, "type": "array", "title": "Retrieved Ids" }, "retrieved_scores": { "items": { "type": "number" }, "type": "array", "title": "Retrieved Scores" }, "retrieval_filters": { "type": "object", "title": "Retrieval Filters" }, "retrieval_cutoff": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Retrieval Cutoff" }, "model_state": { "type": "object", "title": "Model State" }, "step_output_keys": { "items": { "type": "string" }, "type": "array", "title": "Step Output Keys" } }, "type": "object", "required": [ "step_index", "input_query" ], "title": "RetrievalExplanation", "description": "Detailed explanation of why specific memories were retrieved." }, "RetrievalResultSchema": { "properties": { "memory_id": { "type": "string", "title": "Memory Id", "description": "UUID of retrieved memory" }, "activation": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Activation", "description": "Final activation score" }, "components": { "allOf": [ { "$ref": "#/components/schemas/ActivationComponentsSchema" } ], "description": "Breakdown of all components" }, "gating": { "allOf": [ { "$ref": "#/components/schemas/GatingInfoSchema" } ], "description": "Access control decision" }, "rank": { "type": "integer", "minimum": 1.0, "title": "Rank", "description": "Rank in result set (1-based)" } }, "type": "object", "required": [ "memory_id", "activation", "components", "gating", "rank" ], "title": "RetrievalResultSchema", "description": "Single result in a retrieval explanation log." }, "RetryAllRequest": { "properties": { "task_filter": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Task Filter" } }, "type": "object", "title": "RetryAllRequest", "description": "Request to retry all failed tasks." }, "RetryTaskRequest": { "properties": { "task_id": { "type": "string", "title": "Task Id" } }, "type": "object", "required": [ "task_id" ], "title": "RetryTaskRequest", "description": "Request to retry a task." }, "RoleResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "permissions": { "items": { "type": "string" }, "type": "array", "title": "Permissions" }, "is_system_role": { "type": "boolean", "title": "Is System Role" } }, "type": "object", "required": [ "id", "name", "description", "permissions", "is_system_role" ], "title": "RoleResponse", "description": "Role details." }, "SMSOTPVerifyRequest": { "properties": { "otp": { "type": "string", "maxLength": 6, "minLength": 6, "title": "Otp", "description": "6-digit OTP from SMS" } }, "type": "object", "required": [ "otp" ], "title": "SMSOTPVerifyRequest", "description": "Request to verify SMS OTP" }, "SMSOTPVerifyResponse": { "properties": { "success": { "type": "boolean", "title": "Success" }, "message": { "type": "string", "title": "Message" } }, "type": "object", "required": [ "success", "message" ], "title": "SMSOTPVerifyResponse", "description": "Response for SMS OTP verification" }, "SMSSendOTPRequest": { "properties": {}, "type": "object", "title": "SMSSendOTPRequest", "description": "Request to send SMS OTP" }, "SMSSetupRequest": { "properties": { "phone_number": { "type": "string", "title": "Phone Number", "description": "Phone number for SMS OTP" } }, "type": "object", "required": [ "phone_number" ], "title": "SMSSetupRequest", "description": "Request to setup SMS OTP" }, "SMSSetupResponse": { "properties": { "success": { "type": "boolean", "title": "Success" }, "phone_number": { "type": "string", "title": "Phone Number" }, "message": { "type": "string", "title": "Message" } }, "type": "object", "required": [ "success", "phone_number", "message" ], "title": "SMSSetupResponse", "description": "Response for SMS setup" }, "SavedSearchCreate": { "properties": { "name": { "type": "string", "title": "Name" }, "query": { "type": "string", "title": "Query" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "type": "object", "required": [ "name", "query" ], "title": "SavedSearchCreate", "description": "Create saved search." }, "SavedSearchResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "query": { "type": "string", "title": "Query" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "result_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Result Count" } }, "type": "object", "required": [ "id", "name", "query", "created_at", "updated_at" ], "title": "SavedSearchResponse", "description": "Saved search response." }, "ScheduleBackupRequest": { "properties": { "frequency": { "type": "string", "title": "Frequency", "description": "Frequency: daily, weekly, or monthly", "default": "daily" }, "retention_days": { "type": "integer", "maximum": 365.0, "minimum": 1.0, "title": "Retention Days", "description": "Days to retain backups", "default": 30 }, "backup_time": { "type": "string", "title": "Backup Time", "description": "Time to run backup (HH:MM UTC)", "default": "02:00" }, "s3_bucket": { "type": "string", "title": "S3 Bucket", "description": "S3 bucket for backup storage" }, "max_backup_size_gb": { "type": "integer", "maximum": 1000.0, "minimum": 1.0, "title": "Max Backup Size Gb", "description": "Maximum backup size", "default": 10 }, "enable_incremental": { "type": "boolean", "title": "Enable Incremental", "description": "Enable incremental backups", "default": true } }, "type": "object", "required": [ "s3_bucket" ], "title": "ScheduleBackupRequest", "description": "Request to schedule backups" }, "ScheduleBackupResponse": { "properties": { "schedule_id": { "type": "string", "format": "uuid", "title": "Schedule Id" }, "status": { "type": "string", "title": "Status" }, "message": { "type": "string", "title": "Message" } }, "type": "object", "required": [ "schedule_id", "status", "message" ], "title": "ScheduleBackupResponse", "description": "Response after scheduling backup" }, "SearchHnmsMode": { "type": "string", "enum": [ "balanced", "performance", "research" ], "title": "SearchHnmsMode", "description": "HNMS-inspired ranking mode selector for search." }, "SelfModelBundleResponse": { "properties": { "profile": { "$ref": "#/components/schemas/SelfModelProfileResponse" }, "planner_summary": { "$ref": "#/components/schemas/SelfModelPlannerSummary" } }, "type": "object", "required": [ "profile", "planner_summary" ], "title": "SelfModelBundleResponse" }, "SelfModelPlannerSummary": { "properties": { "unreliable_tools": { "items": { "type": "string" }, "type": "array", "title": "Unreliable Tools" }, "low_confidence_domains": { "items": { "type": "string" }, "type": "array", "title": "Low Confidence Domains" }, "recommended_evidence_multiplier": { "type": "integer", "maximum": 5.0, "minimum": 1.0, "title": "Recommended Evidence Multiplier", "default": 1 } }, "type": "object", "title": "SelfModelPlannerSummary" }, "SelfModelProfileResponse": { "properties": { "organization_id": { "type": "string", "title": "Organization Id" }, "domain_confidence": { "additionalProperties": { "type": "number" }, "type": "object", "title": "Domain Confidence" }, "tool_reliability": { "type": "object", "title": "Tool Reliability" }, "agent_accuracy": { "type": "object", "title": "Agent Accuracy" }, "last_updated": { "type": "string", "format": "date-time", "title": "Last Updated" } }, "type": "object", "required": [ "organization_id", "last_updated" ], "title": "SelfModelProfileResponse" }, "ServiceHealthResponse": { "properties": { "name": { "type": "string", "title": "Name" }, "status": { "type": "string", "title": "Status", "description": "healthy, degraded, or unhealthy" }, "message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Message" }, "last_check": { "type": "string", "format": "date-time", "title": "Last Check" } }, "type": "object", "required": [ "name", "status", "last_check" ], "title": "ServiceHealthResponse", "description": "Service health status" }, "SharePermission": { "type": "string", "enum": [ "read", "comment", "edit" ], "title": "SharePermission", "description": "Permission levels for shared access." }, "ShareType": { "type": "string", "enum": [ "user", "team", "department", "division", "organization", "external" ], "title": "ShareType", "description": "Types of share targets." }, "SimulationReportResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "session_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Session Id" }, "memory_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Memory Id" }, "report": { "type": "object", "title": "Report" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "organization_id", "report", "created_at" ], "title": "SimulationReportResponse" }, "SnapshotExportRequest": { "properties": { "expires_in_seconds": { "type": "integer", "maximum": 604800.0, "minimum": 60.0, "title": "Expires In Seconds", "default": 86400 } }, "type": "object", "title": "SnapshotExportRequest", "description": "Create a snapshot export job." }, "SnapshotListResponse": { "properties": { "snapshots": { "items": { "$ref": "#/components/schemas/app__schemas__event_publishing__SnapshotResponse" }, "type": "array", "title": "Snapshots" }, "total": { "type": "integer", "title": "Total" }, "limit": { "type": "integer", "title": "Limit" }, "offset": { "type": "integer", "title": "Offset" } }, "type": "object", "required": [ "snapshots", "total", "limit", "offset" ], "title": "SnapshotListResponse", "description": "List of snapshots." }, "SnapshotStatus": { "type": "string", "enum": [ "pending", "in_progress", "completed", "failed", "expired" ], "title": "SnapshotStatus", "description": "Snapshot creation status." }, "SnapshotType": { "type": "string", "enum": [ "full", "incremental", "differential" ], "title": "SnapshotType", "description": "Type of snapshot." }, "StrategyAdaptationRecord": { "properties": { "goal_id": { "type": "string", "title": "Goal Id" }, "goal_type": { "type": "string", "title": "Goal Type" }, "previous_strategy": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Previous Strategy" }, "new_strategy": { "type": "string", "title": "New Strategy" }, "reason": { "type": "string", "title": "Reason" }, "confidence": { "type": "number", "title": "Confidence", "default": 0.5 } }, "type": "object", "required": [ "goal_id", "goal_type", "new_strategy", "reason" ], "title": "StrategyAdaptationRecord", "description": "Request to record strategy adaptation." }, "StrategyAdaptationResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "goal_id": { "type": "string", "title": "Goal Id" }, "from_strategy": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "From Strategy" }, "to_strategy": { "type": "string", "title": "To Strategy" } }, "type": "object", "required": [ "id", "goal_id", "from_strategy", "to_strategy" ], "title": "StrategyAdaptationResponse", "description": "Response after recording adaptation." }, "StrategyHistoryEntry": { "properties": { "id": { "type": "string", "title": "Id" }, "from_strategy": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "From Strategy" }, "to_strategy": { "type": "string", "title": "To Strategy" }, "reason": { "type": "string", "title": "Reason" }, "created_at": { "type": "string", "title": "Created At" } }, "type": "object", "required": [ "id", "from_strategy", "to_strategy", "reason", "created_at" ], "title": "StrategyHistoryEntry", "description": "Single entry in strategy history." }, "StrategyRequest": { "properties": { "query": { "type": "string", "minLength": 1, "title": "Query" }, "time_budget_seconds": { "type": "integer", "maximum": 3600.0, "minimum": 5.0, "title": "Time Budget Seconds", "default": 30 }, "confidence_threshold": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Confidence Threshold", "default": 0.7 } }, "type": "object", "required": [ "query" ], "title": "StrategyRequest", "description": "Request for selecting a cognitive strategy." }, "StrategyResponse": { "properties": { "query": { "type": "string", "title": "Query" }, "complexity_estimated": { "type": "number", "title": "Complexity Estimated" }, "strategy_selected": { "type": "string", "title": "Strategy Selected" }, "retrieval_budget": { "type": "integer", "title": "Retrieval Budget" }, "reasoning_depth": { "type": "integer", "title": "Reasoning Depth" }, "verification_required": { "type": "boolean", "title": "Verification Required" }, "confidence_threshold": { "type": "number", "title": "Confidence Threshold" }, "time_budget_seconds": { "type": "integer", "title": "Time Budget Seconds" }, "expected_answer_quality": { "type": "number", "title": "Expected Answer Quality" }, "created_at": { "type": "string", "title": "Created At" } }, "type": "object", "required": [ "query", "complexity_estimated", "strategy_selected", "retrieval_budget", "reasoning_depth", "verification_required", "confidence_threshold", "time_budget_seconds", "expected_answer_quality", "created_at" ], "title": "StrategyResponse", "description": "Selected strategy and resource allocation." }, "SummaryType": { "type": "string", "enum": [ "pattern", "playbook", "best_practice", "benchmark" ], "title": "SummaryType", "description": "Type of federated knowledge summary." }, "TOTPSetupRequest": { "properties": {}, "type": "object", "title": "TOTPSetupRequest", "description": "Request to setup TOTP" }, "TOTPSetupResponse": { "properties": { "secret": { "type": "string", "title": "Secret", "description": "Base32 encoded TOTP secret" }, "qr_code_url": { "type": "string", "title": "Qr Code Url", "description": "URL for QR code" }, "backup_codes": { "items": { "type": "string" }, "type": "array", "title": "Backup Codes", "description": "Backup recovery codes" } }, "type": "object", "required": [ "secret", "qr_code_url", "backup_codes" ], "title": "TOTPSetupResponse", "description": "Response for TOTP setup" }, "TOTPVerifyRequest": { "properties": { "token": { "type": "string", "maxLength": 6, "minLength": 6, "title": "Token", "description": "6-digit TOTP token" } }, "type": "object", "required": [ "token" ], "title": "TOTPVerifyRequest", "description": "Request to verify TOTP token" }, "TOTPVerifyResponse": { "properties": { "success": { "type": "boolean", "title": "Success" }, "message": { "type": "string", "title": "Message" } }, "type": "object", "required": [ "success", "message" ], "title": "TOTPVerifyResponse", "description": "Response for TOTP verification" }, "TargetComparisonRequest": { "properties": { "target_percentile": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Target Percentile", "default": 0.75 } }, "type": "object", "title": "TargetComparisonRequest", "description": "Request to compare against target percentile." }, "TargetComparisonResponse": { "properties": { "organization_id": { "type": "string", "title": "Organization Id" }, "target_percentile": { "type": "number", "title": "Target Percentile" }, "gaps": { "items": { "$ref": "#/components/schemas/GapAnalysis" }, "type": "array", "title": "Gaps" }, "met_target_count": { "type": "integer", "title": "Met Target Count" }, "total_metrics": { "type": "integer", "title": "Total Metrics" } }, "type": "object", "required": [ "organization_id", "target_percentile", "gaps", "met_target_count", "total_metrics" ], "title": "TargetComparisonResponse", "description": "Response with gap analysis vs target." }, "TeamCreate": { "properties": { "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" }, "slug": { "type": "string", "maxLength": 100, "minLength": 1, "pattern": "^[a-z0-9-]+$", "title": "Slug" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "hierarchy_node_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Hierarchy Node Id" }, "settings": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Settings" } }, "type": "object", "required": [ "name", "slug" ], "title": "TeamCreate", "description": "Request schema for creating a team." }, "TeamMemberAdd": { "properties": { "user_id": { "type": "string", "title": "User Id" }, "role": { "type": "string", "title": "Role", "default": "member" } }, "type": "object", "required": [ "user_id" ], "title": "TeamMemberAdd", "description": "Request schema for adding a team member." }, "TeamMemberResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "team_id": { "type": "string", "title": "Team Id" }, "user_id": { "type": "string", "title": "User Id" }, "role": { "type": "string", "title": "Role" }, "is_active": { "type": "boolean", "title": "Is Active" }, "joined_at": { "type": "string", "format": "date-time", "title": "Joined At" }, "left_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Left At" }, "user_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Name" }, "user_email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Email" } }, "type": "object", "required": [ "id", "team_id", "user_id", "role", "is_active", "joined_at", "left_at" ], "title": "TeamMemberResponse", "description": "Response schema for team member data." }, "TeamMembersResponse": { "properties": { "team": { "$ref": "#/components/schemas/TeamResponse" }, "members": { "items": { "$ref": "#/components/schemas/TeamMemberResponse" }, "type": "array", "title": "Members" } }, "type": "object", "required": [ "team", "members" ], "title": "TeamMembersResponse", "description": "Response with team and members list." }, "TeamResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "name": { "type": "string", "title": "Name" }, "slug": { "type": "string", "title": "Slug" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "hierarchy_node_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Hierarchy Node Id" }, "settings": { "type": "object", "title": "Settings" }, "is_active": { "type": "boolean", "title": "Is Active" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "member_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Member Count" } }, "type": "object", "required": [ "id", "organization_id", "name", "slug", "description", "hierarchy_node_id", "settings", "is_active", "created_at", "updated_at" ], "title": "TeamResponse", "description": "Response schema for team data." }, "TeamUpdate": { "properties": { "name": { "anyOf": [ { "type": "string", "maxLength": 255, "minLength": 1 }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "settings": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Settings" }, "is_active": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Active" } }, "type": "object", "title": "TeamUpdate", "description": "Request schema for updating a team." }, "TemporalFactRequest": { "properties": { "fact_id": { "type": "string", "title": "Fact Id", "description": "Unique identifier for the fact" }, "onset_timestamp": { "type": "string", "format": "date-time", "title": "Onset Timestamp", "description": "When the fact becomes true" }, "offset_timestamp": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Offset Timestamp", "description": "When the fact stops being true" }, "confidence": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Confidence", "description": "Confidence in this interval", "default": 0.8 }, "change_type": { "type": "string", "title": "Change Type", "description": "onset | offset | stable | transient", "default": "stable" } }, "type": "object", "required": [ "fact_id", "onset_timestamp" ], "title": "TemporalFactRequest", "description": "Request to tag a fact with temporal validity." }, "TemporalSequenceRequest": { "properties": { "entities": { "items": { "type": "string" }, "type": "array", "title": "Entities", "description": "Ordered list of entity IDs in sequence" }, "min_gap_seconds": { "type": "integer", "minimum": 0.0, "title": "Min Gap Seconds", "description": "Minimum gap between events", "default": 60 }, "max_gap_seconds": { "type": "integer", "minimum": 60.0, "title": "Max Gap Seconds", "description": "Maximum gap between events", "default": 300 }, "min_strength": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Min Strength", "description": "Minimum pattern strength", "default": 0.7 } }, "type": "object", "required": [ "entities" ], "title": "TemporalSequenceRequest", "description": "Request to detect recurring event sequences." }, "TokenResponse": { "properties": { "access_token": { "type": "string", "title": "Access Token" }, "token_type": { "type": "string", "title": "Token Type", "default": "bearer" }, "expires_in": { "type": "integer", "title": "Expires In" } }, "type": "object", "required": [ "access_token", "expires_in" ], "title": "TokenResponse", "description": "Token response for refresh." }, "ToolCallLogResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "session_id": { "type": "string", "title": "Session Id" }, "iteration_id": { "type": "string", "title": "Iteration Id" }, "tool_name": { "type": "string", "title": "Tool Name" }, "tool_input": { "type": "object", "title": "Tool Input" }, "tool_output_summary": { "type": "object", "title": "Tool Output Summary" }, "status": { "type": "string", "enum": [ "success", "denied", "failed" ], "title": "Status" }, "denial_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Denial Reason" }, "started_at": { "type": "string", "format": "date-time", "title": "Started At" }, "finished_at": { "type": "string", "format": "date-time", "title": "Finished At" } }, "type": "object", "required": [ "id", "session_id", "iteration_id", "tool_name", "tool_input", "tool_output_summary", "status", "started_at", "finished_at" ], "title": "ToolCallLogResponse" }, "ToolCapabilityCreate": { "properties": { "tool_name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Tool Name" }, "tool_type": { "type": "string", "title": "Tool Type" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "supported_goal_types": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Supported Goal Types" }, "supported_domains": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Supported Domains" }, "known_limitations": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Known Limitations" } }, "type": "object", "required": [ "tool_name", "tool_type" ], "title": "ToolCapabilityCreate", "description": "Request to register a new tool capability." }, "ToolCapabilityResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "tool_name": { "type": "string", "title": "Tool Name" }, "tool_type": { "type": "string", "title": "Tool Type" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "success_rate": { "type": "number", "title": "Success Rate" }, "reliability_score": { "type": "number", "title": "Reliability Score" }, "total_uses": { "type": "integer", "title": "Total Uses" }, "avg_execution_time": { "type": "number", "title": "Avg Execution Time" }, "supported_goal_types": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Supported Goal Types" }, "supported_domains": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Supported Domains" }, "known_limitations": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Known Limitations" }, "last_used": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Used" } }, "type": "object", "required": [ "id", "tool_name", "tool_type", "description", "success_rate", "reliability_score", "total_uses", "avg_execution_time", "supported_goal_types", "supported_domains", "known_limitations", "last_used" ], "title": "ToolCapabilityResponse", "description": "Response with tool capability details." }, "ToolInvocationResult": { "properties": { "status": { "type": "string", "title": "Status" }, "success": { "type": "boolean", "title": "Success" }, "tool_name": { "type": "string", "title": "Tool Name" }, "tool_call_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Call Id" }, "output": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Output" }, "denial_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Denial Reason" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" }, "warnings": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Warnings" } }, "type": "object", "required": [ "status", "success", "tool_name" ], "title": "ToolInvocationResult" }, "ToolInvokeRequest": { "properties": { "tool_name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Tool Name" }, "tool_input": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Tool Input" }, "session_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Session Id" }, "iteration_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Iteration Id" }, "scope": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope" }, "scope_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope Id" }, "classification": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Classification" }, "justification": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Justification" } }, "type": "object", "required": [ "tool_name" ], "title": "ToolInvokeRequest" }, "ToolInvokeResponse": { "properties": { "trace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trace Id" }, "result": { "$ref": "#/components/schemas/ToolInvocationResult" } }, "type": "object", "required": [ "result" ], "title": "ToolInvokeResponse" }, "ToolOutcomeSampleIn": { "properties": { "tool_name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Tool Name" }, "success": { "type": "boolean", "title": "Success" }, "duration_ms": { "anyOf": [ { "type": "number", "minimum": 0.0 }, { "type": "null" } ], "title": "Duration Ms" }, "session_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Session Id" }, "memory_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Memory Id" }, "notes": { "anyOf": [ { "type": "string", "maxLength": 2000 }, { "type": "null" } ], "title": "Notes" }, "extra": { "type": "object", "title": "Extra" } }, "type": "object", "required": [ "tool_name", "success" ], "title": "ToolOutcomeSampleIn" }, "ToolOutcomeSampleOut": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "event_type": { "type": "string", "title": "Event Type" }, "tool_name": { "type": "string", "title": "Tool Name" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "organization_id", "event_type", "tool_name", "created_at" ], "title": "ToolOutcomeSampleOut" }, "ToolRecommendationRequest": { "properties": { "goal_type": { "type": "string", "title": "Goal Type" }, "domain": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Domain" }, "exclude_tools": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Exclude Tools" } }, "type": "object", "required": [ "goal_type" ], "title": "ToolRecommendationRequest", "description": "Request for tool recommendation." }, "ToolRecommendationResponse": { "properties": { "recommended_tool": { "type": "string", "title": "Recommended Tool" }, "reasoning": { "type": "string", "title": "Reasoning" }, "details": { "type": "object", "title": "Details" } }, "type": "object", "required": [ "recommended_tool", "reasoning", "details" ], "title": "ToolRecommendationResponse", "description": "Tool recommendation response." }, "ToolRecommendationsListResponse": { "properties": { "tool_name": { "type": "string", "title": "Tool Name" }, "tool_type": { "type": "string", "title": "Tool Type" }, "score": { "type": "number", "title": "Score" }, "success_rate": { "type": "number", "title": "Success Rate" }, "total_uses": { "type": "integer", "title": "Total Uses" }, "supported_goal_types": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Supported Goal Types" }, "known_limitations": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Known Limitations" } }, "type": "object", "required": [ "tool_name", "tool_type", "score", "success_rate", "total_uses", "supported_goal_types", "known_limitations" ], "title": "ToolRecommendationsListResponse", "description": "List of tool recommendations." }, "ToolReliabilityResponse": { "properties": { "tool_name": { "type": "string", "title": "Tool Name" }, "stats": { "type": "object", "title": "Stats" } }, "type": "object", "required": [ "tool_name" ], "title": "ToolReliabilityResponse" }, "ToolSpecOut": { "properties": { "name": { "type": "string", "title": "Name" }, "version": { "type": "string", "title": "Version" }, "required_permissions": { "items": { "type": "string" }, "type": "array", "title": "Required Permissions" }, "allowed_scopes": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Allowed Scopes" }, "require_justification": { "type": "boolean", "title": "Require Justification", "default": false }, "min_clearance_level": { "type": "integer", "title": "Min Clearance Level", "default": 0 }, "sensitivity": { "type": "object", "title": "Sensitivity" } }, "type": "object", "required": [ "name", "version" ], "title": "ToolSpecOut" }, "ToolUsageRecord": { "properties": { "tool_name": { "type": "string", "title": "Tool Name" }, "goal_id": { "type": "string", "title": "Goal Id" }, "success": { "type": "boolean", "title": "Success" }, "execution_time": { "type": "number", "title": "Execution Time", "default": 0.0 }, "cost": { "type": "number", "title": "Cost", "default": 0.0 } }, "type": "object", "required": [ "tool_name", "goal_id", "success" ], "title": "ToolUsageRecord", "description": "Request to record tool usage." }, "ToolUsageResponse": { "properties": { "tool_name": { "type": "string", "title": "Tool Name" }, "success_rate": { "type": "number", "title": "Success Rate" }, "reliability_score": { "type": "number", "title": "Reliability Score" }, "total_uses": { "type": "integer", "title": "Total Uses" } }, "type": "object", "required": [ "tool_name", "success_rate", "reliability_score", "total_uses" ], "title": "ToolUsageResponse", "description": "Response after recording tool usage." }, "TopRelationship": { "properties": { "from_memory_id": { "type": "string", "title": "From Memory Id" }, "to_memory_id": { "type": "string", "title": "To Memory Id" }, "relationship_type": { "type": "string", "title": "Relationship Type" }, "similarity_score": { "type": "number", "title": "Similarity Score", "default": 0.0 }, "auto_created": { "type": "boolean", "title": "Auto Created", "default": false } }, "type": "object", "required": [ "from_memory_id", "to_memory_id", "relationship_type" ], "title": "TopRelationship" }, "TopTopic": { "properties": { "topic_id": { "type": "string", "title": "Topic Id" }, "label": { "type": "string", "title": "Label" }, "scope": { "type": "string", "title": "Scope" }, "scope_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope Id" }, "memory_count": { "type": "integer", "title": "Memory Count", "default": 0 } }, "type": "object", "required": [ "topic_id", "label", "scope" ], "title": "TopTopic" }, "TopicListResponse": { "properties": { "total": { "type": "integer", "title": "Total" }, "limit": { "type": "integer", "title": "Limit" }, "offset": { "type": "integer", "title": "Offset" }, "topics": { "items": { "$ref": "#/components/schemas/TopicResponse" }, "type": "array", "title": "Topics" } }, "type": "object", "required": [ "total", "limit", "offset", "topics" ], "title": "TopicListResponse" }, "TopicMemoriesResponse": { "properties": { "topic_id": { "type": "string", "title": "Topic Id" }, "total": { "type": "integer", "title": "Total" }, "limit": { "type": "integer", "title": "Limit" }, "offset": { "type": "integer", "title": "Offset" }, "memories": { "items": { "$ref": "#/components/schemas/TopicMemoryResponse" }, "type": "array", "title": "Memories" } }, "type": "object", "required": [ "topic_id", "total", "limit", "offset", "memories" ], "title": "TopicMemoriesResponse" }, "TopicMemoryResponse": { "properties": { "memory_id": { "type": "string", "title": "Memory Id" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "content_preview": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Content Preview" }, "is_primary": { "type": "boolean", "title": "Is Primary", "default": false }, "weight": { "type": "number", "title": "Weight", "default": 1.0 } }, "type": "object", "required": [ "memory_id" ], "title": "TopicMemoryResponse" }, "TopicReassignmentRatioResponse": { "properties": { "total_nodes": { "type": "integer", "title": "Total Nodes" }, "nodes_with_history": { "type": "integer", "title": "Nodes With History" }, "nodes_reassigned": { "type": "integer", "title": "Nodes Reassigned" }, "reassignment_ratio": { "type": "number", "title": "Reassignment Ratio" }, "initial_only_ratio": { "type": "number", "title": "Initial Only Ratio" } }, "type": "object", "required": [ "total_nodes", "nodes_with_history", "nodes_reassigned", "reassignment_ratio", "initial_only_ratio" ], "title": "TopicReassignmentRatioResponse" }, "TopicResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "scope": { "type": "string", "title": "Scope" }, "scope_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope Id" }, "label": { "type": "string", "title": "Label" }, "keywords": { "items": { "type": "string" }, "type": "array", "title": "Keywords" }, "created_by": { "type": "string", "title": "Created By" } }, "type": "object", "required": [ "id", "scope", "label", "created_by" ], "title": "TopicResponse" }, "TopicRestructureRequest": { "properties": { "org_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org Id", "description": "Defaults to caller org (system_admin may override)" }, "scope": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope" }, "scope_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope Id" } }, "type": "object", "title": "TopicRestructureRequest" }, "TopicRestructureResponse": { "properties": { "reassignments": { "type": "integer", "title": "Reassignments" }, "splits": { "type": "integer", "title": "Splits" }, "merges": { "type": "integer", "title": "Merges" }, "guidance_score_before": { "type": "number", "title": "Guidance Score Before" }, "guidance_score_after": { "type": "number", "title": "Guidance Score After" }, "reassignment_ratio": { "type": "number", "title": "Reassignment Ratio" } }, "type": "object", "required": [ "reassignments", "splits", "merges", "guidance_score_before", "guidance_score_after", "reassignment_ratio" ], "title": "TopicRestructureResponse" }, "TrajectoryRequest": { "properties": { "entity_id": { "type": "string", "title": "Entity Id", "description": "Entity being tracked" }, "quantity": { "type": "string", "title": "Quantity", "description": "Metric name (e.g., sentiment_score)" }, "measurements": { "items": { "type": "object" }, "type": "array", "title": "Measurements", "description": "List of {timestamp, value} measurements" } }, "type": "object", "required": [ "entity_id", "quantity", "measurements" ], "title": "TrajectoryRequest", "description": "Request to analyze trajectory of a quantity over time." }, "TransferSolutionRequest": { "properties": { "source_playbook": { "type": "object", "title": "Source Playbook" }, "source_domain": { "type": "string", "title": "Source Domain" }, "target_domain": { "type": "string", "title": "Target Domain" }, "problem_context": { "type": "object", "title": "Problem Context" } }, "type": "object", "required": [ "source_playbook", "source_domain", "target_domain" ], "title": "TransferSolutionRequest" }, "TrendPoint": { "properties": { "date": { "type": "string", "title": "Date" }, "count": { "type": "integer", "title": "Count" } }, "type": "object", "required": [ "date", "count" ], "title": "TrendPoint" }, "TrendType": { "type": "string", "enum": [ "improving", "stable", "declining" ], "title": "TrendType", "description": "Performance trend direction." }, "UncertaintyResponse": { "properties": { "memory_id": { "type": "string", "title": "Memory Id" }, "uncertainty_level": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Uncertainty Level" }, "unresolved_conflicts": { "items": { "type": "object" }, "type": "array", "title": "Unresolved Conflicts" }, "low_confidence_fields": { "items": { "type": "string" }, "type": "array", "title": "Low Confidence Fields" }, "review_recommended": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Review Recommended" }, "uncertainty_score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Uncertainty Score" }, "confidence": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Confidence" }, "retrieved_at": { "type": "string", "format": "date-time", "title": "Retrieved At" } }, "type": "object", "required": [ "memory_id", "retrieved_at" ], "title": "UncertaintyResponse" }, "UpdateConfigRequest": { "properties": { "enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Enabled", "description": "Override readiness: True forces agent active, False greys it out" }, "params": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Params", "description": "Param overrides merged on top of agent defaults" }, "notes": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Notes", "description": "Reason for the override (shown in admin UI)" } }, "type": "object", "title": "UpdateConfigRequest" }, "UpdateScheduleRequest": { "properties": { "frequency": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Frequency" }, "retention_days": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Retention Days" }, "backup_time": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Backup Time" }, "enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Enabled" }, "max_backup_size_gb": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Backup Size Gb" }, "enable_incremental": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Enable Incremental" } }, "type": "object", "title": "UpdateScheduleRequest", "description": "Request to update backup schedule" }, "UpdateScheduleResponse": { "properties": { "schedule_id": { "type": "string", "format": "uuid", "title": "Schedule Id" }, "message": { "type": "string", "title": "Message" } }, "type": "object", "required": [ "schedule_id", "message" ], "title": "UpdateScheduleResponse", "description": "Response after updating schedule" }, "UserAdminListItemResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "email": { "type": "string", "format": "email", "title": "Email" }, "display_name": { "type": "string", "title": "Display Name" }, "avatar_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Avatar Url" }, "is_active": { "type": "boolean", "title": "Is Active" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "role_names": { "items": { "type": "string" }, "type": "array", "title": "Role Names", "default": [] }, "role_assignment_ids": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Role Assignment Ids", "default": {} } }, "type": "object", "required": [ "id", "email", "display_name", "is_active", "created_at" ], "title": "UserAdminListItemResponse", "description": "Admin-facing user list item with role summary." }, "UserCreate": { "properties": { "email": { "type": "string", "format": "email", "title": "Email" }, "external_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "External Id" }, "display_name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Display Name" }, "default_organization_id": { "type": "string", "title": "Default Organization Id" } }, "type": "object", "required": [ "email", "display_name", "default_organization_id" ], "title": "UserCreate", "description": "Create a new user." }, "UserListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/app__schemas__admin__UserAdminResponse" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" } }, "type": "object", "required": [ "items", "total", "page", "page_size" ], "title": "UserListResponse", "description": "List of users" }, "UserResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "email": { "type": "string", "title": "Email" }, "full_name": { "type": "string", "title": "Full Name" }, "avatar_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Avatar Url" }, "is_active": { "type": "boolean", "title": "Is Active" }, "clearance_level": { "type": "integer", "title": "Clearance Level" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "last_login_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Login At" }, "preferences": { "type": "object", "title": "Preferences", "default": {} }, "organization_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Organization Id" }, "organization_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Organization Name" }, "roles": { "items": { "type": "string" }, "type": "array", "title": "Roles", "default": [] } }, "type": "object", "required": [ "id", "email", "full_name", "is_active", "clearance_level", "created_at" ], "title": "UserResponse", "description": "User information response." }, "UserRoleAssign": { "properties": { "role_id": { "type": "string", "title": "Role Id" }, "scope_type": { "type": "string", "pattern": "^(global|organization|department|team)$", "title": "Scope Type" }, "scope_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope Id" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" }, "granted_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Granted Reason" } }, "type": "object", "required": [ "role_id", "scope_type" ], "title": "UserRoleAssign", "description": "Assign a role to a user." }, "UserRoleResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "user_id": { "type": "string", "title": "User Id" }, "role_id": { "type": "string", "title": "Role Id" }, "role_name": { "type": "string", "title": "Role Name" }, "scope_type": { "type": "string", "title": "Scope Type" }, "scope_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope Id" }, "granted_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Granted By" }, "granted_at": { "type": "string", "format": "date-time", "title": "Granted At" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" }, "is_active": { "type": "boolean", "title": "Is Active" } }, "type": "object", "required": [ "id", "user_id", "role_id", "role_name", "scope_type", "scope_id", "granted_by", "granted_at", "expires_at", "is_active" ], "title": "UserRoleResponse", "description": "User role response." }, "UserWithRolesResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "email": { "type": "string", "format": "email", "title": "Email" }, "display_name": { "type": "string", "title": "Display Name" }, "avatar_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Avatar Url" }, "is_active": { "type": "boolean", "title": "Is Active" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "roles": { "items": { "$ref": "#/components/schemas/UserRoleResponse" }, "type": "array", "title": "Roles", "default": [] } }, "type": "object", "required": [ "id", "email", "display_name", "is_active", "created_at" ], "title": "UserWithRolesResponse", "description": "Admin-facing user with role assignments." }, "ValidateEdgeRequest": { "properties": { "edge_id": { "type": "string", "title": "Edge Id" }, "success": { "type": "boolean", "title": "Success", "description": "Did the causal prediction hold?" }, "strength_adjustment": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Strength Adjustment", "description": "How much to adjust strength", "default": 0.1 } }, "type": "object", "required": [ "edge_id", "success" ], "title": "ValidateEdgeRequest", "description": "Request to validate a causal edge." }, "ValidateEdgeResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "strength": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Strength" }, "validation_count": { "type": "integer", "title": "Validation Count" }, "invalidation_count": { "type": "integer", "title": "Invalidation Count" }, "last_validated_at": { "type": "string", "format": "date-time", "title": "Last Validated At" } }, "type": "object", "required": [ "id", "strength", "validation_count", "invalidation_count", "last_validated_at" ], "title": "ValidateEdgeResponse", "description": "Updated edge after validation." }, "ValidateFederatedKnowledgeRequest": { "properties": { "knowledge_id": { "type": "string", "title": "Knowledge Id" }, "is_helpful": { "type": "boolean", "title": "Is Helpful" }, "feedback": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Feedback" } }, "type": "object", "required": [ "knowledge_id", "is_helpful" ], "title": "ValidateFederatedKnowledgeRequest", "description": "Request to validate federated knowledge." }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "WebhookDeliveryHistoryResponse": { "properties": { "deliveries": { "items": { "$ref": "#/components/schemas/WebhookDeliveryResponse" }, "type": "array", "title": "Deliveries" }, "total": { "type": "integer", "title": "Total" }, "pending_count": { "type": "integer", "title": "Pending Count" }, "failed_count": { "type": "integer", "title": "Failed Count" } }, "type": "object", "required": [ "deliveries", "total", "pending_count", "failed_count" ], "title": "WebhookDeliveryHistoryResponse" }, "WebhookDeliveryResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "subscription_id": { "type": "string", "title": "Subscription Id" }, "event_type": { "type": "string", "title": "Event Type" }, "status": { "type": "string", "title": "Status" }, "attempts": { "type": "integer", "title": "Attempts" }, "next_attempt_at": { "type": "string", "format": "date-time", "title": "Next Attempt At" }, "delivered_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Delivered At" }, "last_http_status": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Last Http Status" }, "last_error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Error" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "subscription_id", "event_type", "status", "attempts", "next_attempt_at", "created_at" ], "title": "WebhookDeliveryResponse" }, "WebhookSubscriptionCreate": { "properties": { "url": { "type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Url", "description": "Webhook endpoint URL (must be HTTPS)" }, "event_types": { "type": "string", "title": "Event Types", "description": "CSV or '*' for all", "default": "*" }, "resource_types": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resource Types", "description": "CSV of resource types" }, "secret": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Secret", "description": "Secret for signing (auto-generated if not provided)" }, "max_retries": { "type": "integer", "maximum": 10.0, "minimum": 0.0, "title": "Max Retries", "default": 5 }, "retry_delay_seconds": { "type": "integer", "minimum": 10.0, "title": "Retry Delay Seconds", "default": 60 }, "rate_limit_per_minute": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Rate Limit Per Minute" }, "description": { "anyOf": [ { "type": "string", "maxLength": 512 }, { "type": "null" } ], "title": "Description" }, "custom_headers": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Custom Headers" } }, "type": "object", "required": [ "url" ], "title": "WebhookSubscriptionCreate", "description": "Create webhook subscription request." }, "WebhookSubscriptionCreateRequest": { "properties": { "url": { "type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Url" }, "event_types": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Event Types" }, "description": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Description" } }, "type": "object", "required": [ "url" ], "title": "WebhookSubscriptionCreateRequest" }, "WebhookSubscriptionCreateResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "url": { "type": "string", "title": "Url" }, "is_active": { "type": "boolean", "title": "Is Active" }, "event_types": { "items": { "type": "string" }, "type": "array", "title": "Event Types" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "secret": { "type": "string", "title": "Secret" } }, "type": "object", "required": [ "id", "url", "is_active", "event_types", "created_at", "secret" ], "title": "WebhookSubscriptionCreateResponse" }, "WebhookSubscriptionListResponse": { "properties": { "subscriptions": { "items": { "$ref": "#/components/schemas/app__schemas__event_publishing__WebhookSubscriptionResponse" }, "type": "array", "title": "Subscriptions" }, "total": { "type": "integer", "title": "Total" }, "limit": { "type": "integer", "title": "Limit" }, "offset": { "type": "integer", "title": "Offset" } }, "type": "object", "required": [ "subscriptions", "total", "limit", "offset" ], "title": "WebhookSubscriptionListResponse", "description": "List of webhook subscriptions." }, "WebhookSubscriptionUpdate": { "properties": { "url": { "anyOf": [ { "type": "string", "maxLength": 2083, "minLength": 1, "format": "uri" }, { "type": "null" } ], "title": "Url" }, "event_types": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Event Types" }, "resource_types": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resource Types" }, "active": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Active" }, "paused_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Paused Reason" }, "max_retries": { "anyOf": [ { "type": "integer", "maximum": 10.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Max Retries" }, "rate_limit_per_minute": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Rate Limit Per Minute" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "custom_headers": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Custom Headers" } }, "type": "object", "title": "WebhookSubscriptionUpdate", "description": "Update webhook subscription request." }, "app__api__v1__endpoints__snapshots__SnapshotCreateRequest": { "properties": { "name": { "type": "string", "title": "Name", "description": "Snapshot name" }, "snapshot_type": { "allOf": [ { "$ref": "#/components/schemas/SnapshotType" } ], "description": "Snapshot type", "default": "full" }, "memory_ids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Memory Ids", "description": "Specific memory IDs (optional)" }, "filters": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Filters", "description": "Filters for selecting memories" }, "format": { "type": "string", "title": "Format", "description": "Export format (json/markdown/zip)", "default": "json" }, "retention_days": { "type": "integer", "title": "Retention Days", "description": "Days to retain snapshot", "default": 30 } }, "type": "object", "required": [ "name" ], "title": "SnapshotCreateRequest" }, "app__api__v1__endpoints__snapshots__SnapshotResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "snapshot_type": { "type": "string", "title": "Snapshot Type" }, "status": { "type": "string", "title": "Status" }, "format": { "type": "string", "title": "Format" }, "memory_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Memory Count" }, "content_size_bytes": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Content Size Bytes" }, "file_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "File Path" }, "created_at": { "type": "string", "title": "Created At" }, "started_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Started At" }, "completed_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Completed At" }, "expires_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Expires At" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" } }, "type": "object", "required": [ "id", "name", "snapshot_type", "status", "format", "created_at" ], "title": "SnapshotResponse" }, "app__api__v1__endpoints__users__UserAdminResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "email": { "type": "string", "format": "email", "title": "Email" }, "display_name": { "type": "string", "title": "Display Name" }, "avatar_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Avatar Url" }, "is_active": { "type": "boolean", "title": "Is Active" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "email", "display_name", "is_active", "created_at" ], "title": "UserAdminResponse", "description": "Admin-facing user response." }, "app__api__v1__endpoints__users__UserUpdate": { "properties": { "display_name": { "anyOf": [ { "type": "string", "maxLength": 255, "minLength": 1 }, { "type": "null" } ], "title": "Display Name" }, "avatar_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Avatar Url" }, "preferences": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Preferences" }, "is_active": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Active" } }, "type": "object", "title": "UserUpdate", "description": "Update user fields." }, "app__schemas__admin__UserAdminResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "email": { "type": "string", "title": "Email" }, "full_name": { "type": "string", "title": "Full Name" }, "is_active": { "type": "boolean", "title": "Is Active" }, "is_admin": { "type": "boolean", "title": "Is Admin" }, "admin_role_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Admin Role Id" }, "admin_notes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Admin Notes" }, "last_login": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Login" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "last_admin_action_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Admin Action At" }, "last_admin_action_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Admin Action By" } }, "type": "object", "required": [ "id", "email", "full_name", "is_active", "is_admin", "admin_role_id", "admin_notes", "last_login", "created_at", "updated_at", "last_admin_action_at", "last_admin_action_by" ], "title": "UserAdminResponse", "description": "User response for admin" }, "app__schemas__auth__UserUpdate": { "properties": { "full_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Full Name" }, "avatar_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Avatar Url" }, "preferences": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Preferences" } }, "type": "object", "title": "UserUpdate", "description": "User update request." }, "app__schemas__event_publishing__SnapshotCreateRequest": { "properties": { "resource_type": { "type": "string", "pattern": "^(memory|knowledge)$", "title": "Resource Type" }, "format": { "type": "string", "pattern": "^(json|csv|jsonl|pdf|parquet)$", "title": "Format", "default": "json" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "filters": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Filters" }, "include_deleted": { "type": "boolean", "title": "Include Deleted", "default": false }, "include_unpublished": { "type": "boolean", "title": "Include Unpublished", "default": false }, "expires_in_days": { "type": "integer", "maximum": 365.0, "minimum": 1.0, "title": "Expires In Days", "default": 30 } }, "type": "object", "required": [ "resource_type" ], "title": "SnapshotCreateRequest", "description": "Create a snapshot/export." }, "app__schemas__event_publishing__SnapshotResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "format": { "type": "string", "title": "Format" }, "resource_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resource Type" }, "filters": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Filters" }, "storage_path": { "type": "string", "title": "Storage Path" }, "size_bytes": { "type": "integer", "title": "Size Bytes" }, "item_count": { "type": "integer", "title": "Item Count" }, "status": { "type": "string", "title": "Status" }, "progress_percent": { "type": "integer", "title": "Progress Percent" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "is_public": { "type": "boolean", "title": "Is Public" }, "download_token": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Download Token" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" }, "is_archived": { "type": "boolean", "title": "Is Archived" }, "checksum": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Checksum" }, "created_by_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created By User Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Completed At" } }, "type": "object", "required": [ "id", "organization_id", "name", "description", "format", "resource_type", "filters", "storage_path", "size_bytes", "item_count", "status", "progress_percent", "error_message", "is_public", "download_token", "expires_at", "is_archived", "checksum", "created_by_user_id", "created_at", "completed_at" ], "title": "SnapshotResponse", "description": "Snapshot/export response." }, "app__schemas__event_publishing__WebhookSubscriptionResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "organization_id": { "type": "string", "title": "Organization Id" }, "url": { "type": "string", "title": "Url" }, "event_types": { "type": "string", "title": "Event Types" }, "resource_types": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resource Types" }, "active": { "type": "boolean", "title": "Active" }, "paused_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Paused At" }, "paused_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Paused Reason" }, "max_retries": { "type": "integer", "title": "Max Retries" }, "retry_delay_seconds": { "type": "integer", "title": "Retry Delay Seconds" }, "rate_limit_per_minute": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Rate Limit Per Minute" }, "delivered_count": { "type": "integer", "title": "Delivered Count" }, "failed_count": { "type": "integer", "title": "Failed Count" }, "last_delivery_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Delivery At" }, "last_error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Error" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "custom_headers": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Custom Headers" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "created_by_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created By User Id" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "url", "event_types", "resource_types", "active", "paused_at", "paused_reason", "max_retries", "retry_delay_seconds", "rate_limit_per_minute", "delivered_count", "failed_count", "last_delivery_at", "last_error", "description", "custom_headers", "created_at", "created_by_user_id", "updated_at" ], "title": "WebhookSubscriptionResponse", "description": "Webhook subscription response." }, "app__schemas__webhook__WebhookSubscriptionResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "url": { "type": "string", "title": "Url" }, "is_active": { "type": "boolean", "title": "Is Active" }, "event_types": { "items": { "type": "string" }, "type": "array", "title": "Event Types" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "url", "is_active", "event_types", "created_at" ], "title": "WebhookSubscriptionResponse" } }, "securitySchemes": { "HTTPBearer": { "type": "http", "scheme": "bearer" } } } }