{"openapi":"3.1.0","info":{"title":"MemoryAI","description":"Persistent AI memory as a service","version":"2.3.0"},"paths":{"/v1/store":{"post":{"tags":["Memory"],"summary":"Store","operationId":"store_v1_store_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/delete/{chunk_id}":{"delete":{"tags":["Memory"],"summary":"Delete Chunk","description":"Brain forgets a specific memory. Soft-delete with audit trail.\n\nProtected chunks (pinned, critical zone, preference/decision/identity) require\nexplicit confirmation via ?force=true query parameter.","operationId":"delete_chunk_v1_delete__chunk_id__delete","parameters":[{"name":"chunk_id","in":"path","required":true,"schema":{"type":"integer","title":"Chunk Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chunks":{"get":{"tags":["Memory"],"summary":"List Chunks","description":"List all memories for the authenticated tenant (GDPR Art. 15 — Right of Access).\n\nCursor-based pagination. Returns chunks ordered by created_at DESC.","operationId":"list_chunks_v1_chunks_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"memory_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chunks/{chunk_id}":{"delete":{"tags":["Memory"],"summary":"Delete Chunk V2","description":"Delete a specific memory (GDPR Art. 17 — Right to Erasure). Alias for /v1/delete/{chunk_id}.","operationId":"delete_chunk_v2_v1_chunks__chunk_id__delete","parameters":[{"name":"chunk_id","in":"path","required":true,"schema":{"type":"integer","title":"Chunk Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/recall":{"post":{"tags":["Memory"],"summary":"Recall","operationId":"recall_v1_recall_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecallRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/stats":{"get":{"tags":["Memory"],"summary":"Stats","operationId":"stats_v1_stats_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/stats/health":{"get":{"tags":["Memory"],"summary":"Memory Health","description":"GOD: Memory health metrics — confidence distribution, contradiction count, recall performance.","operationId":"memory_health_v1_stats_health_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/compact":{"post":{"tags":["Memory"],"summary":"Compact","description":"Smart compact: split text into chunks with strategy, preserve_tags, and optional snapshot.","operationId":"compact_v1_compact_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompactRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/snapshots/create":{"post":{"tags":["Memory"],"summary":"Snapshot Create","description":"Create a manual snapshot of all current chunks.","operationId":"snapshot_create_v1_snapshots_create_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/snapshots":{"get":{"tags":["Memory"],"summary":"Snapshot List","description":"List all snapshots for this tenant.","operationId":"snapshot_list_v1_snapshots_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"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"}}}}}}},"/v1/snapshots/{snapshot_id}/restore":{"post":{"tags":["Memory"],"summary":"Snapshot Restore","description":"Restore chunks from a snapshot. Soft-deletes current chunks, then re-imports.","operationId":"snapshot_restore_v1_snapshots__snapshot_id__restore_post","parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/context/compact":{"post":{"tags":["Context"],"summary":"Context Compact","description":"Compact a session transcript into chunks, return INDEX.\nRoutes to IDE adapter when content_type='code'.","operationId":"context_compact_v1_context_compact_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextCompactRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextCompactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/context/restore":{"post":{"tags":["Context"],"summary":"Context Restore","description":"Restore context by recalling relevant chunks for a task.","operationId":"context_restore_v1_context_restore_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextRestoreRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextRestoreResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/context/check":{"post":{"tags":["Context"],"summary":"Context Check","description":"Check estimated tokens and urgency level (conversation chunks).","operationId":"context_check_v1_context_check_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/context/check-code":{"post":{"tags":["Context"],"summary":"Context Check Code","description":"Check estimated tokens and urgency level (code chunks).","operationId":"context_check_code_v1_context_check_code_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/context/monitor":{"post":{"tags":["Context"],"summary":"Context Monitor","description":"Monitor context window usage — unified with guard_check.","operationId":"context_monitor_v1_context_monitor_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextMonitorRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextMonitorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/context/index-project":{"post":{"tags":["Context"],"summary":"Context Index Project","description":"IDE only: index a project's file tree and key files.","operationId":"context_index_project_v1_context_index_project_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexProjectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/context/snapshot":{"post":{"tags":["Context"],"summary":"Context Snapshot","description":"Generate a local fallback snapshot from recent memories.","operationId":"context_snapshot_v1_context_snapshot_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/context/wal":{"post":{"tags":["Context"],"summary":"Context Wal","description":"Write-ahead log management for compact operations.","operationId":"context_wal_v1_context_wal_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WALRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WALResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/context/health":{"get":{"tags":["Context"],"summary":"Context Health Endpoint","description":"Comprehensive health check for context management.","operationId":"context_health_endpoint_v1_context_health_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextHealthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/context/guard/check":{"post":{"tags":["Context"],"summary":"Guard Check Endpoint","description":"Universal context guard check — works with any IDE/agent.\n\nAgent reports its own token count → memOS analyzes → returns recommendation.\nNo IDE-specific code. No file reading. No session spawning.","operationId":"guard_check_endpoint_v1_context_guard_check_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardCheckRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/context/guard/compact":{"post":{"tags":["Context"],"summary":"Guard Compact Endpoint","description":"Compact session context — non-blocking (background) or blocking mode.\n\n- Non-blocking (default): returns task_id immediately, runs in background.\n  Poll /v1/context/guard/status/{task_id} for result.\n- Blocking: waits for completion before returning.","operationId":"guard_compact_endpoint_v1_context_guard_compact_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardCompactRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardCompactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/context/guard/status/{task_id}":{"get":{"tags":["Context"],"summary":"Guard Compact Status","description":"Poll status of a background compact task.","operationId":"guard_compact_status_v1_context_guard_status__task_id__get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardCompactStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/context/guard/bootstrap":{"post":{"tags":["Context"],"summary":"Guard Bootstrap Endpoint","description":"Bootstrap a new session with relevant memories from previous sessions.\n\nThis is the ZERO-GAP HANDOFF endpoint — new session automatically\nreceives context from the previous session.","operationId":"guard_bootstrap_endpoint_v1_context_guard_bootstrap_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardBootstrapRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardBootstrapResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/context/guard/settings":{"get":{"tags":["Context"],"summary":"Guard Get Settings","description":"Get current Context Guard settings for this tenant.\n\nReturns the effective thresholds (user overrides merged with plan defaults).","operationId":"guard_get_settings_v1_context_guard_settings_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Context"],"summary":"Guard Update Settings","description":"Update Context Guard settings for this tenant.\n\nConfigurable (token-based, single source of truth):\n  compact_at_tokens:  >= 1000  — soft warning, server starts piggybacking\n                                 compact directives at this token count.\n  critical_at_tokens: > compact_at_tokens — server forces compact here.\n\nExample: compact at 180K, force at 200K (default behaviour):\n  {\"compact_at_tokens\": 180000, \"critical_at_tokens\": 200000}\n\nThe same thresholds apply to ALL models — Claude 200K, Gemini 1M, GPT-4o\n128K — regardless of host context window. Smart retrieval keeps the\ncost predictable. Tiny models (32K, 16K) auto-cap at window − 1K so\nCRITICAL still fires before truncation.\n\nBackwards compat: legacy `compact_pct` / `critical_pct` payloads are\naccepted and silently dropped — they have no effect under the new\nserver-owned token policy.","operationId":"guard_update_settings_v1_context_guard_settings_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ide/guard/check":{"post":{"tags":["IDE Context Guard"],"summary":"Ide Guard Check","description":"IDE context guard check — reports token usage, returns recommendation.","operationId":"ide_guard_check_v1_ide_guard_check_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardCheckRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ide/guard/turn-check":{"post":{"tags":["IDE Context Guard"],"summary":"Ide Guard Turn Check","description":"Server-authoritative context-pressure check.\n\nThe agent (Kiro/Cursor/Claude Code) cannot reliably read its own context\nwindow from inside an MCP tool, so it just reports turn_count and the\nserver does the math:\n\n    estimated_tokens = turn_count × avg_tokens_per_turn\n    thresholds = ContextGuard(max_tokens, plan_tier_defaults, user_overrides)\n\nReturns the same recommendation as /v1/ide/guard/check plus a ready-to-use\naction_prompt the agent can copy verbatim. Below `skip_below_turns` the\nresponse is `skipped=true` and recommendation=safe — no DB churn for short\nconversations.","operationId":"ide_guard_turn_check_v1_ide_guard_turn_check_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IDETurnCheckRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IDETurnCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ide/guard/compact":{"post":{"tags":["IDE Context Guard"],"summary":"Ide Guard Compact","description":"IDE compact — stores context with session buffer fallback.\n\nIf content is too short or useless, server uses accumulated recall\nqueries as fallback. IDE doesn't need to send perfect summaries.","operationId":"ide_guard_compact_v1_ide_guard_compact_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardCompactRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardCompactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ide/guard/status/{task_id}":{"get":{"tags":["IDE Context Guard"],"summary":"Ide Guard Compact Status","description":"Poll status of a background compact task.","operationId":"ide_guard_compact_status_v1_ide_guard_status__task_id__get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardCompactStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ide/guard/bootstrap":{"post":{"tags":["IDE Context Guard"],"summary":"Ide Guard Bootstrap","description":"IDE bootstrap — load context for new session.\n\nReturns DNA memories + recent activity + task-relevant context, plus\noptional brain identity (name, age, last dream) so clients can greet\nthe brain by name instead of treating it as a faceless service.","operationId":"ide_guard_bootstrap_v1_ide_guard_bootstrap_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardBootstrapRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardBootstrapResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ide/anchors/verify":{"post":{"tags":["IDE Context Guard"],"summary":"Ide Anchors Verify","description":"Code Anchors P1: apply client-computed hashes to detect staleness.\n\nThe wrapper read each anchor's line-range from disk and computed a sha256.\nWe compare to the stored baseline → fresh|stale|orphaned, or set the\nbaseline for a first-time ('pending') anchor. Flag-gated; no-op when off.","operationId":"ide_anchors_verify_v1_ide_anchors_verify_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnchorVerifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnchorVerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bot/guard/check":{"post":{"tags":["Bot Context Guard"],"summary":"Bot Guard Check","description":"Bot context guard check — includes spawn signal for session management.\n\nWhen should_spawn_new_session=true, bot should:\n1. Spawn a new session\n2. Continue working in new session\n3. When new session reaches 20K tokens → call /v1/bot/session/compress for old session","operationId":"bot_guard_check_v1_bot_guard_check_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotGuardCheckRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotGuardCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bot/guard/bootstrap":{"post":{"tags":["Bot Context Guard"],"summary":"Bot Guard Bootstrap","description":"Bot bootstrap — DNA + recent L2 session summaries.\n\nModes:\n- default: DNA memories + L2 summaries (~5.5K tokens)\n- deep: DNA + summaries + top relevant L2 chunk (~25K tokens)","operationId":"bot_guard_bootstrap_v1_bot_guard_bootstrap_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotBootstrapRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotBootstrapResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bot/session/compress":{"post":{"tags":["Bot Session Compress"],"summary":"Bot Session Compress","description":"Compress a full session (150K) into L2 chunks (7×20K).\n\nCall this when:\n1. Context Guard signals should_spawn_new_session\n2. You've spawned a new session\n3. New session has reached 20K tokens (ready)\n4. Now compress the OLD session with this endpoint\n\nThe server will:\n- Check idempotency (skip if already compressed)\n- Batch compress messages into 7 dense chunks\n- Extract DNA (preferences/decisions) → store permanently in L1\n- Store chunks in L2 with freshness boost\n- Return summaries for immediate use","operationId":"bot_session_compress_v1_bot_session_compress_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionCompressRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionCompressResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bot/session/status/{compress_id}":{"get":{"tags":["Bot Session Compress"],"summary":"Bot Session Status","description":"Poll compression status (for async mode — future use).","operationId":"bot_session_status_v1_bot_session_status__compress_id__get","parameters":[{"name":"compress_id","in":"path","required":true,"schema":{"type":"string","title":"Compress Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bot/session/message":{"post":{"tags":["Bot Session Compress"],"summary":"Bot Session Message","description":"Track a message in the rolling session. Returns rotate signal when session hits limit.\n\nCall this on EVERY message (user + assistant). When rotate=true:\n1. A new session has started automatically\n2. prev_session_id contains the old session that should be compressed\n3. Call /v1/bot/session/auto-cycle with the old session's messages\n   (or the lower-level /v1/bot/session/compress)\n\nRotation triggers (whichever fires first):\n  - message_count >= rotation_size  (the legacy \"rolling 3 × 20\" rule)\n  - accumulated_tokens >= token_rotation_threshold  (cost-aware rule)","operationId":"bot_session_message_v1_bot_session_message_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RollingMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RollingMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bot/session/reset":{"post":{"tags":["Bot Session Compress"],"summary":"Bot Session Reset","description":"Force reset rolling session state. Use when user explicitly starts a new conversation.","operationId":"bot_session_reset_v1_bot_session_reset_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RollingResetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bot/session/auto-cycle":{"post":{"tags":["Bot Session Compress"],"summary":"Bot Session Auto Cycle","description":"One-call session rollover: compress old session → bootstrap new session.\n\nIdempotent on old_session_id (won't double-compress). Failure-safe: if\ncompress fails the bootstrap still runs so the bot doesn't end up with an\nempty new session.\n\nReplaces what used to be a 3-step bot-side dance:\n  OLD:  guard/check (spawn=true) → session/compress → guard/bootstrap\n  NEW:  guard/check (spawn=true) → session/auto-cycle","operationId":"bot_session_auto_cycle_v1_bot_session_auto_cycle_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionAutoCycleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionAutoCycleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bot/session/sync":{"post":{"tags":["Bot Session Sync"],"summary":"Bot Session Sync Deprecated","description":"DEPRECATED — silently no-ops with a deprecation hint.\n\nThe DB-backed phase machine (process_sync) was retired in favour of the\nin-memory 2-session rolling driven by `/v1/bot/session/message`. Bots\nshould call `/v1/bot/session/message` per message and\n`/v1/bot/session/auto-cycle` when the guard signals a spawn.\n\nReturns 200 (not 410) so embedded MCP clients that still poll on a\nfixed cadence don't surface a transient error to their host every\n5 minutes. The deprecation WARNING fires at most once per hour\nper tenant. Removal scheduled for v2.4.0.","operationId":"bot_session_sync_deprecated_v1_bot_session_sync_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecatedSyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bot/session/context":{"get":{"tags":["Bot Session Sync"],"summary":"Bot Session Context","description":"Get rolling session context for bootstrap.\n\nReturns current state: which sessions are in the window,\nmessage counts, and last rotation time.","operationId":"bot_session_context_v1_bot_session_context_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RollingContextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bot/recall":{"post":{"tags":["Bot Recall"],"summary":"Bot Recall","description":"4-layer merged recall for bots.\n\nSearches all memory layers and merges results:\n- L1-DNA: preferences, decisions, identity (score ×1.5)\n- L2: recent session chunks with freshness boost (score ×1.2)\n- L1-regular: facts, goals, episodic (score ×1.0)\n- L3: archived session summaries (score ×0.8)\n\nResults are deduped (word overlap > 70%) and sorted by final score.","operationId":"bot_recall_v1_bot_recall_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotRecallRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotRecallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bot/pitfall/check":{"post":{"tags":["Bot Upgrade"],"summary":"Bot Pitfall Check","description":"Check if an intended action has known pitfalls.\n\nCall this BEFORE executing risky actions. Returns matching pitfalls\n(failure memories) so the bot can avoid repeating mistakes.\n\nPitfalls are DNA-protected — they never decay or get deleted.","operationId":"bot_pitfall_check_v1_bot_pitfall_check_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PitfallCheckRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PitfallCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bot/procedure/check":{"post":{"tags":["Bot Upgrade"],"summary":"Bot Procedure Check","description":"Check if there are learned procedures for an intended action.\n\nCall this BEFORE executing multi-step actions. Returns matching procedures\n(learned workflows) so the bot follows proven steps.\n\nProcedures are DNA-protected — they never decay or get deleted.\nThey evolve during sleep cycles when failures are detected.","operationId":"bot_procedure_check_v1_bot_procedure_check_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcedureCheckRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcedureCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bot/feedback":{"post":{"tags":["Bot Upgrade"],"summary":"Bot Feedback","description":"Report recall quality — feeds neuroplasticity for self-improvement.\n\nCall after using recall results:\n- helpful=true + action_succeeded=true → boost those chunks + strengthen edges\n- helpful=false → demote chunks, adjust fusion weights for this tenant\n\nOver time, the brain learns what works for YOUR specific use patterns.","operationId":"bot_feedback_v1_bot_feedback_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/server__routes__bot_upgrade__FeedbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bot/state/save":{"post":{"tags":["Bot Upgrade"],"summary":"Bot State Save","description":"Save bot state for later resumption.\n\nStore arbitrary state (plan steps, cursor position, active goals,\nlast action, pending hypotheses) so the bot can resume exactly\nwhere it left off in a new session.\n\nUpserts: one state per (tenant_id, session_id).","operationId":"bot_state_save_v1_bot_state_save_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StateSaveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StateSaveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bot/state/restore":{"get":{"tags":["Bot Upgrade"],"summary":"Bot State Restore","description":"Restore bot state from a previous session.\n\nReturns the last saved state for this tenant+session_id.\nUse at session start to resume where you left off.","operationId":"bot_state_restore_v1_bot_state_restore_get","parameters":[{"name":"session_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"Session Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StateRestoreResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bot/predict":{"post":{"tags":["Bot Upgrade"],"summary":"Bot Predict","description":"Predictive recall — push intent, get predicted memories.\n\nSend what the bot/user is about to do. Server returns memories\nthat are likely to be needed, based on:\n- Semantic similarity to intent\n- Neuroplasticity profile (what this tenant usually needs)\n- Proactive push service (cross-references memory + wiki)\n\nCall this BEFORE the user finishes their question to pre-cache context.","operationId":"bot_predict_v1_bot_predict_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PredictRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PredictResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ide/symbols/index":{"post":{"tags":["IDE Upgrade"],"summary":"Ide Symbols Index","description":"Index project symbols for code-aware memory.\n\nCall after file save or git commit. Stores function/class signatures\nso the brain can recall code by intent (not just by name).","operationId":"ide_symbols_index_v1_ide_symbols_index_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SymbolIndexRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SymbolIndexResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ide/symbols/search":{"post":{"tags":["IDE Upgrade"],"summary":"Ide Symbols Search","description":"Search symbols by intent — 'function that handles bot session compress'.\n\nUses vector similarity on symbol signatures + names.","operationId":"ide_symbols_search_v1_ide_symbols_search_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SymbolSearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SymbolSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ide/symbols/recent":{"get":{"tags":["IDE Upgrade"],"summary":"Ide Symbols Recent","description":"Get recently modified symbols — useful for understanding current work context.","operationId":"ide_symbols_recent_v1_ide_symbols_recent_get","parameters":[{"name":"project_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"Project Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SymbolSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ide/style/detect":{"post":{"tags":["IDE Upgrade"],"summary":"Ide Style Detect","description":"Auto-detect project coding style from sample files.\n\nAnalyzes indent, naming conventions, comment style, error handling patterns.\nStores as DNA preference (never decays) so agent maintains consistency.","operationId":"ide_style_detect_v1_ide_style_detect_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StyleDetectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StyleDetectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ide/style/get":{"get":{"tags":["IDE Upgrade"],"summary":"Ide Style Get","description":"Get stored style preferences for a project.","operationId":"ide_style_get_v1_ide_style_get_get","parameters":[{"name":"project_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"Project Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StyleGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/changelog":{"post":{"tags":["Memory Changelog"],"summary":"Memory Changelog","description":"Get memory changes since a timestamp.\n\nReturns what's new, updated, invalidated, or consolidated since your last session.\nUseful for understanding what the brain learned while you were away.","operationId":"memory_changelog_v1_memory_changelog_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangelogRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangelogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/l2/store":{"post":{"tags":["Deep Reasoning"],"summary":"L2 Store","operationId":"l2_store_v1_l2_store_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/L2StoreRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/L2StoreResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/l2/recall":{"post":{"tags":["Deep Reasoning"],"summary":"L2 Recall","operationId":"l2_recall_v1_l2_recall_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/L2RecallRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/L2RecallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/l2/compress":{"post":{"tags":["Deep Reasoning"],"summary":"L2 Compress","operationId":"l2_compress_v1_l2_compress_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/L2CompressRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/L2CompressResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/l2/stats":{"get":{"tags":["Deep Reasoning"],"summary":"L2 Stats","operationId":"l2_stats_v1_l2_stats_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/L2StatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/l2/insights":{"get":{"tags":["Deep Reasoning"],"summary":"L2 Insights","description":"Get proactive insights — what the brain figured out during sleep.","operationId":"l2_insights_v1_l2_insights_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/L2InsightsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/l2/reason":{"post":{"tags":["Deep Reasoning"],"summary":"L2 Reason","description":"Multi-step reasoning: extract → connect → synthesize. DNA-safe.","operationId":"l2_reason_v1_l2_reason_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/L2ReasonRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/L2ReasonResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/l2/feedback":{"post":{"tags":["Deep Reasoning"],"summary":"L2 Feedback","description":"Feedback on recall quality. Boosts useful chunks, weakens useless (DNA-safe).","operationId":"l2_feedback_v1_l2_feedback_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/L2FeedbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/L2FeedbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/task/save":{"post":{"tags":["Task Continuity"],"summary":"Task Save","description":"Save or update the active task for this tenant (upsert, 1 per tenant).","operationId":"task_save_v1_task_save_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskSaveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskSaveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/task/current":{"get":{"tags":["Task Continuity"],"summary":"Task Current","description":"Get the current active task for this tenant.","operationId":"task_current_v1_task_current_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCurrentResponse"}}}}}}},"/v1/task/clear":{"delete":{"tags":["Task Continuity"],"summary":"Task Clear","description":"Clear the active task (mark as done).","operationId":"task_clear_v1_task_clear_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskClearResponse"}}}}}}},"/v1/admin/tenants":{"get":{"tags":["Admin"],"summary":"List Tenants","description":"List all tenants with usage stats.","operationId":"list_tenants_v1_admin_tenants_get","parameters":[{"name":"x-admin-secret","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/tenants/{tenant_id}":{"patch":{"tags":["Admin"],"summary":"Update Tenant","description":"Update tenant plan or settings.","operationId":"update_tenant_v1_admin_tenants__tenant_id__patch","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"x-admin-secret","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/tenants/{tenant_id}/keys":{"get":{"tags":["Admin"],"summary":"List Keys","description":"List API keys for a tenant.","operationId":"list_keys_v1_admin_tenants__tenant_id__keys_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"x-admin-secret","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin"],"summary":"Create Key","description":"Create a new API key for a tenant.","operationId":"create_key_v1_admin_tenants__tenant_id__keys_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"x-admin-secret","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/keys/{key_id}":{"delete":{"tags":["Admin"],"summary":"Revoke Key","description":"Revoke an API key.","operationId":"revoke_key_v1_admin_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}},{"name":"x-admin-secret","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/usage":{"get":{"tags":["Admin"],"summary":"Global Usage","description":"Global usage stats.","operationId":"global_usage_v1_admin_usage_get","parameters":[{"name":"x-admin-secret","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/provision":{"post":{"tags":["Admin"],"summary":"Provision Tenant","description":"Create a new tenant + API key (public sign-up).\n\nCommercial launch (2026-06-09): closed beta is OFF. Every public sign-up\ngets a `free` tier key with no expiry. Paid plans are granted post-hoc\nvia `/v1/admin/upgrade` (operator-only) or the future billing flow.","operationId":"provision_tenant_v1_admin_provision_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/beta-status":{"get":{"tags":["Admin"],"summary":"Beta Status","description":"Backwards-compatible probe — closed beta is OFF (commercial launch).\n\nOld clients still hit this endpoint to gate sign-up UI. We always answer\n`beta_full=false` so they unblock; the field is kept for compatibility\nonly. Use `/v1/admin/signup-info` for the modern shape.","operationId":"beta_status_v1_admin_beta_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/signup-info":{"get":{"tags":["Admin"],"summary":"Signup Info","description":"Public sign-up metadata for the landing page / web app.","operationId":"signup_info_v1_admin_signup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/auto-provision":{"post":{"tags":["Admin"],"summary":"Auto Provision","description":"Create a new tenant + API key programmatically. ADMIN-ONLY.\n\nUsed by bots to auto-provision a MemoryAI key for each new user.\nUnlike /v1/admin/provision (public, IP-limited), this requires admin auth.\n\nBody:\n    name: str — tenant identifier (e.g., \"user-abc\" or \"telegram-12345\")\n    plan: str — \"free\" | \"starter\" | \"pro\" | \"team\" | \"enterprise\" (default: \"free\")\n    metadata: dict — optional metadata (source bot, user info, etc.)\n    scopes: list — optional custom scopes (default: full access)\n\nReturns:\n    api_key: str — raw key (SAVE IT — not shown again)\n    tenant_id: str — MemoryAI tenant UUID\n    plan: str — assigned plan\n    quota: dict — rate limits for this plan","operationId":"auto_provision_v1_admin_auto_provision_post","parameters":[{"name":"x-admin-secret","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/deprovision/{tenant_id}":{"delete":{"tags":["Admin"],"summary":"Deprovision Tenant","description":"Delete a tenant and revoke all its keys. ADMIN-ONLY.\n\nThis is a SOFT delete — data is retained for 30 days before permanent deletion.\nKeys are immediately revoked (no more API access).","operationId":"deprovision_tenant_v1_admin_deprovision__tenant_id__delete","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"x-admin-secret","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/update-plan/{tenant_id}":{"post":{"tags":["Admin"],"summary":"Update Tenant Plan","description":"Change a tenant's plan (upgrade/downgrade). ADMIN-ONLY.\n\nBody:\n    plan: str — new plan name","operationId":"update_tenant_plan_v1_admin_update_plan__tenant_id__post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"x-admin-secret","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/rotate-key/{tenant_id}":{"post":{"tags":["Admin"],"summary":"Rotate Key","description":"Revoke old key and create a new one for a tenant. ADMIN-ONLY.\n\nUse when a key is compromised or needs refresh.","operationId":"rotate_key_v1_admin_rotate_key__tenant_id__post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"x-admin-secret","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/import":{"post":{"tags":["Admin"],"summary":"Import Data","description":"Import chunks from JSON array. Max 1000 chunks per request. Requires store scope.","operationId":"import_data_v1_import_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/server__models__ImportResponse"}}}}}}},"/v1/data":{"delete":{"tags":["Admin"],"summary":"Delete Data","description":"Hard delete all tenant data. GDPR compliance. Requires admin scope.","operationId":"delete_data_v1_data_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/rotate-key":{"post":{"tags":["Admin"],"summary":"Rotate Key","description":"Rotate API key: generate new key, revoke current one.\n\nRate limit: 1 rotation per hour per tenant.\nThe old key is immediately invalidated.","operationId":"rotate_key_v1_admin_rotate_key_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health/ready":{"get":{"tags":["Admin"],"summary":"Health Ready","description":"Readiness probe — returns 200 only if DB is connected and responsive.","operationId":"health_ready_health_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/health/detailed":{"get":{"tags":["Observability","Observability"],"summary":"Health Detailed","description":"Detailed health check with worker status and DB connectivity.","operationId":"health_detailed_v1_health_detailed_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/brain/tenants":{"get":{"tags":["Admin"],"summary":"List Brain Tenants","description":"List all tenants with their brain tier and plan.","operationId":"list_brain_tenants_admin_brain_tenants_get","parameters":[{"name":"x-admin-secret","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/brain/set-tier":{"post":{"tags":["Admin"],"summary":"Set Brain Tier","description":"Set brain tier for a tenant. Body: {\"tenant_id\": \"...\", \"brain_tier\": \"god\"}","operationId":"set_brain_tier_admin_brain_set_tier_post","parameters":[{"name":"x-admin-secret","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/brain/set-plan":{"post":{"tags":["Admin"],"summary":"Set Plan","description":"Set plan for a tenant. Body: {\"tenant_id\": \"...\", \"plan\": \"god\"}","operationId":"set_plan_admin_brain_set_plan_post","parameters":[{"name":"x-admin-secret","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/facets/backfill":{"post":{"tags":["Admin"],"summary":"Facets Backfill","description":"Backfill Plan E facet tags for the caller's tenant.\n\nIdempotent. Per-tenant — admin-scoped key only writes to its own\ntenant. A pg advisory lock prevents two concurrent runs of the same\ntenant from racing.","operationId":"facets_backfill_v1_admin_facets_backfill_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/facets/backfill-all":{"post":{"tags":["Admin"],"summary":"Facets Backfill All","description":"Backfill facet tags for every tenant. Operator-only.\n\nGated on the X-Admin-Secret header (verify_admin), NOT on per-tenant\nadmin scope — this endpoint walks all tenants, so a per-tenant key\nmust not be allowed to trigger it.","operationId":"facets_backfill_all_v1_admin_facets_backfill_all_post","parameters":[{"name":"x-admin-secret","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/entities":{"get":{"tags":["Entities"],"summary":"List Entities","description":"List entities for the current tenant.","operationId":"list_entities_v1_entities_get","parameters":[{"name":"entity_type","in":"query","required":false,"schema":{"type":"string","description":"Filter by entity type","title":"Entity Type"},"description":"Filter by entity type"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/entities/stats":{"get":{"tags":["Entities"],"summary":"Entity Stats","description":"Get entity statistics for the current tenant.","operationId":"entity_stats_v1_entities_stats_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/entities/{name}/chunks":{"get":{"tags":["Entities"],"summary":"Entity Chunks","description":"Get chunk IDs linked to a named entity.","operationId":"entity_chunks_v1_entities__name__chunks_get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityChunksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/entities/{name}/profile":{"get":{"tags":["Entities"],"summary":"Entity Profile","description":"Get complete entity profile — everything the brain knows about this entity.\n\nReturns: stats (frequency, recency), linked memories (top 10), and\nrelationships (from knowledge graph). This is the entity's neural activation map.","operationId":"entity_profile_v1_entities__name__profile_get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/entities/search":{"post":{"tags":["Entities"],"summary":"Search Entities","description":"Search entities by name (ILIKE pattern matching).\n\nUse for: \"find the person I work with\", \"which project entities exist?\"","operationId":"search_entities_v1_entities_search_post","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","description":"Search query for entity names","default":"","title":"Q"},"description":"Search query for entity names"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/learn":{"post":{"tags":["Learning"],"summary":"Learn","description":"Store an action + result + lesson as a memory chunk with entity extraction.","operationId":"learn_v1_learn_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LearnRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LearnResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/session/recover":{"post":{"tags":["Session Recovery"],"summary":"Session Recover","description":"Recover session context from recent memory chunks.\n\nRebuilds active context, pending actions, timeline, and key references\nfrom chunks stored in the last N hours.","operationId":"session_recover_v1_session_recover_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionRecoverRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionRecoverResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graph/link":{"post":{"tags":["Graph"],"summary":"Link Memories","description":"Explicitly link two memories — strongest Hebbian signal (user_link trigger).\n\nBody: {\"chunk_a\": int, \"chunk_b\": int}\nCreates/strengthens a hebbian edge with 0.05 increment.","operationId":"link_memories_v1_graph_link_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graph/neighbors/{chunk_id}":{"get":{"tags":["Graph"],"summary":"Graph Neighbors","description":"Find memories connected to a chunk via the neural graph.","operationId":"graph_neighbors_v1_graph_neighbors__chunk_id__get","parameters":[{"name":"chunk_id","in":"path","required":true,"schema":{"type":"integer","title":"Chunk Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphNeighborsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graph/clusters":{"get":{"tags":["Graph"],"summary":"Graph Clusters","description":"Get memory clusters grouped by most-connected neurons.","operationId":"graph_clusters_v1_graph_clusters_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphClustersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/bootstrap":{"post":{"tags":["Bootstrap"],"summary":"Memory Bootstrap","description":"Proactive context injection — returns a ready-to-use context block\ncombining preferences, recent activity, project context, and entities.\nDesigned to be called at session start without the agent needing to\nknow what to search for.\n\nPass mode=\"efficient\" for 3-tier wake-up (Identity→Context→Details)\nwith token_budget (default 800). Much more compact than full bootstrap.","operationId":"memory_bootstrap_v1_memory_bootstrap_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BootstrapRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BootstrapResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brain/wake":{"post":{"tags":["Bootstrap"],"summary":"Brain Wake Endpoint","description":"Brain wakes up knowing who it is.\n\nReturns the brain's identity: preferences, decisions, identity memories,\nneural graph stats, and most accessed memories. One call to restore\nfull consciousness at session start.\n\nDNA: This is the brain recognizing itself — not a search, not a recall.","operationId":"brain_wake_endpoint_v1_brain_wake_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"tags":["Health"],"summary":"Health","description":"Basic health check — verifies DB connectivity. Supports GET + HEAD.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"tags":["Health"],"summary":"Health","description":"Basic health check — verifies DB connectivity. Supports GET + HEAD.","operationId":"health_health_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/health":{"get":{"tags":["Health"],"summary":"Health V1","description":"Alias for /health under /v1 prefix (matches spec docs + Dockerfile HEALTHCHECK).","operationId":"health_v1_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"tags":["Health"],"summary":"Health V1","description":"Alias for /health under /v1 prefix (matches spec docs + Dockerfile HEALTHCHECK).","operationId":"health_v1_v1_health_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/reflect":{"post":{"tags":["Reflection"],"summary":"Auto Reflect","description":"Scan recent chunks, find patterns, generate insight chunks.","operationId":"auto_reflect_v1_reflect_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReflectionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReflectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/shield/budget":{"get":{"tags":["Shield"],"summary":"Shield Budget","description":"Get today's Shield LLM budget usage.","operationId":"shield_budget_shield_budget_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/shield/pending":{"get":{"tags":["Shield"],"summary":"Shield Pending","description":"Get chunks in pending_review status.","operationId":"shield_pending_shield_pending_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/shield/anomalies":{"get":{"tags":["Shield"],"summary":"Shield Anomalies","description":"Get recent behavioral anomalies detected by the analyzer.","operationId":"shield_anomalies_shield_anomalies_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/shield/review/{chunk_id}":{"post":{"tags":["Shield"],"summary":"Shield Review","description":"Manually review a pending chunk — approve (set active) or keep pending.","operationId":"shield_review_shield_review__chunk_id__post","parameters":[{"name":"chunk_id","in":"path","required":true,"schema":{"type":"integer","title":"Chunk Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/session/handoff/start":{"post":{"tags":["Session Handoff"],"summary":"Api Handoff Start","description":"Start a session handoff: store old session conversation for new session.\n\nCall this when context is too high and you need to switch sessions.\nSend the last N conversation turns so the new session can read them.","operationId":"api_handoff_start_v1_session_handoff_start_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffStartRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffStartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/session/handoff/restore":{"post":{"tags":["Session Handoff"],"summary":"Api Handoff Restore","description":"Restore old session conversation + memories for new session.\n\nCall this from the new session to get full context from the old session.\nReturns both the raw conversation and related MemoryAI memories.","operationId":"api_handoff_restore_v1_session_handoff_restore_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffRestoreRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffRestoreResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/session/handoff/complete":{"post":{"tags":["Session Handoff"],"summary":"Api Handoff Complete","description":"Complete handoff: archive old session into long-term MemoryAI storage.\n\nCall this when the new session has enough context (e.g., 25K tokens).\nOld conversation will be chunked and stored as MemoryAI memories.","operationId":"api_handoff_complete_v1_session_handoff_complete_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffCompleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffCompleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/session/handoff/status":{"get":{"tags":["Session Handoff"],"summary":"Api Handoff Status","description":"Check current handoff status.\n\nReturns whether there's an active handoff and its state.","operationId":"api_handoff_status_v1_session_handoff_status_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/brain/stats":{"get":{"tags":["Brain"],"summary":"Brain Stats","description":"Return brain architecture stats for the tenant.","operationId":"brain_stats_brain_stats_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/brain/maintenance":{"post":{"tags":["Brain"],"summary":"Run Maintenance","description":"Run full brain maintenance cycle (v2: 7-phase pipeline).","operationId":"run_maintenance_brain_maintenance_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/brain/reflect":{"post":{"tags":["Brain"],"summary":"Run Reflect","description":"Run brain reflect — cross-pattern insight discovery.","operationId":"run_reflect_brain_reflect_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/brain/maintenance/all":{"post":{"tags":["Brain"],"summary":"Run Maintenance All","description":"Run maintenance for ALL tenants (internal mode API key only).","operationId":"run_maintenance_all_brain_maintenance_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/brain/reflect/all":{"post":{"tags":["Brain"],"summary":"Run Reflect All","description":"Run reflect for ALL tenants (internal mode API key only).","operationId":"run_reflect_all_brain_reflect_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/brain/bootstrap":{"post":{"tags":["Brain"],"summary":"Run Bootstrap","description":"One-time bootstrap: create edges for existing chunks.","operationId":"run_bootstrap_brain_bootstrap_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/brain/explain":{"get":{"tags":["Brain"],"summary":"Explain Chunk","description":"Explain a chunk's connections and status (GOD tier only).","operationId":"explain_chunk_brain_explain_get","parameters":[{"name":"chunk_id","in":"query","required":true,"schema":{"type":"integer","title":"Chunk Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/brain/metrics":{"get":{"tags":["Brain"],"summary":"Brain Metrics History","description":"Return brain metrics history for the last N days.","operationId":"brain_metrics_history_brain_metrics_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"default":7,"title":"Days"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brain/thoughts":{"get":{"tags":["Self-Thinking","thinking"],"summary":"Get Thoughts","description":"Get current active thoughts.","operationId":"get_thoughts_v1_brain_thoughts_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brain/thoughts/{thought_id}":{"get":{"tags":["Self-Thinking","thinking"],"summary":"Get Thought Chain","description":"Get a thought and its full debate chain (tenant-isolated).","operationId":"get_thought_chain_v1_brain_thoughts__thought_id__get","parameters":[{"name":"thought_id","in":"path","required":true,"schema":{"type":"integer","title":"Thought Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brain/thoughts/feedback":{"post":{"tags":["Self-Thinking","thinking"],"summary":"Thought Feedback","description":"Rate a thought as useful or not (feeds meta-cognition).","operationId":"thought_feedback_v1_brain_thoughts_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/server__routes__thinking__FeedbackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brain/hypotheses":{"get":{"tags":["Self-Thinking","thinking"],"summary":"Get Hypotheses","description":"Get active hypotheses being tested.","operationId":"get_hypotheses_v1_brain_hypotheses_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brain/think-about":{"post":{"tags":["Self-Thinking","thinking"],"summary":"Think About","description":"Request the brain to think about a specific topic.","operationId":"think_about_v1_brain_think_about_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThinkAboutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brain/thinking-stats":{"get":{"tags":["Self-Thinking","thinking"],"summary":"Thinking Stats","description":"Get thinking system statistics (budget, efficiency, queue).","operationId":"thinking_stats_v1_brain_thinking_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/context/offload":{"post":{"tags":["Context Offload","Context Offload"],"summary":"Offload Endpoint","description":"Compress verbose content into a Mermaid graph with drill-down nodes.\n\nInput: long content (tool logs, code output, build results, etc.)\nOutput: compact Mermaid graph + node_id references for drill-down\n\nSaves 60%+ tokens while preserving full traceability.","operationId":"offload_endpoint_v1_context_offload_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OffloadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/context/drilldown/{ref_id}":{"get":{"tags":["Context Offload","Context Offload"],"summary":"Drilldown Endpoint","description":"Retrieve full content for an offloaded node.\n\nUse when the agent needs detail beyond what the graph shows.","operationId":"drilldown_endpoint_v1_context_drilldown__ref_id__get","parameters":[{"name":"ref_id","in":"path","required":true,"schema":{"type":"string","title":"Ref Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/metrics":{"get":{"tags":["Observability","Observability"],"summary":"Get Metrics","description":"JSON metrics summary (in-memory, last process lifetime).","operationId":"get_metrics_v1_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/metrics/prometheus":{"get":{"tags":["Observability","Observability"],"summary":"Prometheus Metrics","description":"Prometheus-compatible text format for scraping.","operationId":"prometheus_metrics_v1_metrics_prometheus_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/memory/auto-extract":{"post":{"tags":["Extraction"],"summary":"Auto Extract","description":"Extract facts from conversation and optionally store them.\n\nPipeline: LLM extract → embed → dedup check → store/skip/update.","operationId":"auto_extract_v1_memory_auto_extract_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/blocks":{"post":{"tags":["Shared Blocks","Shared Blocks"],"summary":"Api Create Block","operationId":"api_create_block_v1_blocks_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBlockBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Shared Blocks","Shared Blocks"],"summary":"Api List Blocks","operationId":"api_list_blocks_v1_blocks_get","parameters":[{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/blocks/{block_name}":{"get":{"tags":["Shared Blocks","Shared Blocks"],"summary":"Api Read Block","operationId":"api_read_block_v1_blocks__block_name__get","parameters":[{"name":"block_name","in":"path","required":true,"schema":{"type":"string","title":"Block Name"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Shared Blocks","Shared Blocks"],"summary":"Api Write Block","operationId":"api_write_block_v1_blocks__block_name__put","parameters":[{"name":"block_name","in":"path","required":true,"schema":{"type":"string","title":"Block Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteBlockBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/blocks/{block_name}/append":{"post":{"tags":["Shared Blocks","Shared Blocks"],"summary":"Api Append Block","operationId":"api_append_block_v1_blocks__block_name__append_post","parameters":[{"name":"block_name","in":"path","required":true,"schema":{"type":"string","title":"Block Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppendBlockBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/blocks/{block_name}/grant":{"post":{"tags":["Shared Blocks","Shared Blocks"],"summary":"Api Grant Access","operationId":"api_grant_access_v1_blocks__block_name__grant_post","parameters":[{"name":"block_name","in":"path","required":true,"schema":{"type":"string","title":"Block Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/blocks/{block_name}/revoke":{"delete":{"tags":["Shared Blocks","Shared Blocks"],"summary":"Api Revoke Access","operationId":"api_revoke_access_v1_blocks__block_name__revoke_delete","parameters":[{"name":"block_name","in":"path","required":true,"schema":{"type":"string","title":"Block Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/versions/{chunk_id}":{"get":{"tags":["Versions","Versions"],"summary":"Get Chunk Versions","description":"Get version history for a chunk.","operationId":"get_chunk_versions_v1_memory_versions__chunk_id__get","parameters":[{"name":"chunk_id","in":"path","required":true,"schema":{"type":"integer","title":"Chunk Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/rollback/{chunk_id}":{"post":{"tags":["Versions","Versions"],"summary":"Rollback Chunk","description":"Rollback a chunk to a previous version.","operationId":"rollback_chunk_v1_memory_rollback__chunk_id__post","parameters":[{"name":"chunk_id","in":"path","required":true,"schema":{"type":"integer","title":"Chunk Id"}},{"name":"version_num","in":"query","required":true,"schema":{"type":"integer","description":"Version number to rollback to","title":"Version Num"},"description":"Version number to rollback to"},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/contradictions":{"get":{"tags":["Versions","Versions"],"summary":"List Contradictions Endpoint","description":"List chunks with CONTRADICTED confidence, unresolved.","operationId":"list_contradictions_endpoint_v1_memory_contradictions_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/narrative":{"get":{"tags":["Narrative","Narrative"],"summary":"Get Narrative Endpoint","description":"Generate a timeline narrative of memory evolution.","operationId":"get_narrative_endpoint_v1_memory_narrative_get","parameters":[{"name":"topic","in":"query","required":false,"schema":{"type":"string","description":"Filter by topic/tag","title":"Topic"},"description":"Filter by topic/tag"},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"How many days back","default":90,"title":"Days"},"description":"How many days back"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/temporal/version-chain":{"post":{"tags":["Temporal Reasoning","Temporal Reasoning"],"summary":"Version Chain","description":"Get the full version history of a fact — how it evolved over time.","operationId":"version_chain_v1_temporal_version_chain_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionChainRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/temporal/recall":{"post":{"tags":["Temporal Reasoning","Temporal Reasoning"],"summary":"Temporal Recall Endpoint","description":"Bi-temporal recall — what was true AND/OR what did the agent know at a given time.","operationId":"temporal_recall_endpoint_v1_temporal_recall_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemporalRecallRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/info":{"get":{"tags":["Info"],"summary":"System Info","operationId":"system_info_v1_info_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/export":{"get":{"tags":["Export"],"summary":"Export Data","description":"Export all tenant chunks + versions as NDJSON stream.","operationId":"export_data_v1_export_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":3650,"minimum":1,"default":365,"title":"Days"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/conversations":{"post":{"tags":["Conversations"],"summary":"Start Conversation","description":"Start a new conversation session.\n\nCall this when user begins interacting with AI agent.\nThe conversation_id returned should be used for all subsequent messages.\n\n## Example\n```python\nresponse = await client.post(\"/v1/conversations\", json={\n    \"metadata\": {\"agent\": \"claude\", \"project\": \"my-app\"}\n})\nconversation_id = response[\"conversation_id\"]\n```","operationId":"start_conversation_v1_conversations_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartConversationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartConversationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Conversations"],"summary":"List Conversations","description":"List conversations for the tenant.\n\nQuery params:\n- `limit`: Max results (default 20, max 100)\n- `offset`: Pagination offset\n- `status`: Filter by status (active/ended)","operationId":"list_conversations_v1_conversations_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListConversationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/conversations/{conversation_id}/messages":{"post":{"tags":["Conversations"],"summary":"Add Message","description":"Add a message to the conversation.\n\nCall this for each user/assistant/system message exchange.\nMessages are stored in order and used for auto-extraction.\n\n## Roles\n- `user`: Messages from the user\n- `assistant`: Responses from the AI agent\n- `system`: System prompts or context","operationId":"add_message_v1_conversations__conversation_id__messages_post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/conversations/{conversation_id}/end":{"post":{"tags":["Conversations"],"summary":"End Conversation","description":"End a conversation session.\n\nThis automatically triggers the auto-extract worker which will:\n1. Analyze the conversation transcript\n2. Extract durable memories (user info, feedback, project context)\n3. Store them in the memory system\n4. Detect and flag contradictions\n\nThe extraction runs asynchronously - use GET /{id}/status to check progress.","operationId":"end_conversation_v1_conversations__conversation_id__end_post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndConversationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/conversations/{conversation_id}/status":{"get":{"tags":["Conversations"],"summary":"Get Conversation Status","description":"Get conversation status and extraction state.\n\nReturns:\n- Conversation metadata (message count, timestamps)\n- Extraction status (pending/running/completed/failed)\n- Extraction results if completed","operationId":"get_conversation_status_v1_conversations__conversation_id__status_get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/conversations/{conversation_id}":{"delete":{"tags":["Conversations"],"summary":"Delete Conversation","description":"Delete a conversation and all its messages.\n\nThis is permanent and cannot be undone.\nOnly works on conversations that have already ended.","operationId":"delete_conversation_v1_conversations__conversation_id__delete","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/forget":{"post":{"tags":["Forgetting"],"summary":"Forget Memories","description":"Forget memories matching the query.\n\n## Scopes\n\n**partial**: Hide from recall queries, but keep in database.\n- Sets `forgotten_at` timestamp\n- Excluded from normal recall (health_status filter)\n- Can be restored via rollback\n\n**full**: Soft delete - mark as deleted.\n- Sets `deleted_at` timestamp\n- Completely hidden from all queries\n- Can be restored via rollback within retention period\n\n**temporary**: Hide for a specified duration.\n- Sets `forget_until` timestamp\n- Automatically becomes visible again after expiry\n- Can be restored early via rollback\n\n## Examples\n\n```python\n# Partial forget (hide from recall)\nPOST /v1/forget\n{\"query\": \"database mocking\", \"scope\": \"partial\"}\n\n# Temporary forget (hide for 24 hours)\nPOST /v1/forget\n{\"query\": \"API credentials\", \"scope\": \"temporary\", \"duration\": 24}\n\n# Full forget with reason\nPOST /v1/forget\n{\"query\": \"old architecture\", \"scope\": \"full\", \"reason\": \"outdated after refactor\"}\n```","operationId":"forget_memories_v1_forget_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgetRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/forget/{chunk_id}/rollback":{"post":{"tags":["Forgetting"],"summary":"Rollback Forget","description":"Rollback a forget action and restore a chunk.\n\nRestores the chunk to active status:\n- Clears forgotten_at, forget_until, forget_reason\n- Resets health_status to 'active'\n- Clears deleted_at if it was set\n\n## Example\n```python\nPOST /v1/forget/123/rollback\n```","operationId":"rollback_forget_v1_forget__chunk_id__rollback_post","parameters":[{"name":"chunk_id","in":"path","required":true,"schema":{"type":"integer","title":"Chunk Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RollbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/forget/list":{"get":{"tags":["Forgetting"],"summary":"List Forgotten","description":"List all forgotten/deleted memories.\n\nQuery params:\n- `limit`: Max results (default 50, max 200)\n- `offset`: Pagination offset","operationId":"list_forgotten_v1_forget_list_get","parameters":[{"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":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListForgottenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/forget/bulk-delete":{"post":{"tags":["Forgetting"],"summary":"Bulk Delete Forgotten","description":"Permanently delete forgotten chunks.\n\nThis is IRREVERSIBLE - use with caution.\nOnly chunks that are already forgotten/deleted can be permanently deleted.\n\n## Warning\nThis action cannot be undone. The data will be permanently removed.","operationId":"bulk_delete_forgotten_v1_forget_bulk_delete_post","requestBody":{"content":{"application/json":{"schema":{"items":{"type":"integer"},"type":"array","title":"Chunk Ids"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/forget/me/chunk/{chunk_id}":{"delete":{"tags":["Forgetting"],"summary":"Hard Delete One","description":"Hard-delete a single chunk and its full per-tenant cascade.\n\nIrreversible. Returns the cascade summary (counts only, no content)\nfor the audit trail.\n\nDiffers from `/v1/forget/bulk-delete` in that it does not require the\nchunk to already be soft-deleted — DNA invariants do NOT block this\npath because right-to-be-forgotten is unconditional under MSA-2029.","operationId":"hard_delete_one_v1_forget_me_chunk__chunk_id__delete","parameters":[{"name":"chunk_id","in":"path","required":true,"schema":{"type":"integer","title":"Chunk Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/forget/me":{"delete":{"tags":["Forgetting"],"summary":"Hard Delete Self","description":"Right-to-be-forgotten: erase the entire tenant.\n\nCascades through every per-tenant table that holds derivative data.\nReturns the aggregate count + truncated content hashes so an MSA-2029\nauditor can reconcile the erasure ledger.\n\nRequires `?confirm=I_UNDERSTAND_THIS_IS_IRREVERSIBLE` to fire — this is\nnot soft-deletable, not rollback-able. There is intentionally no shorter\nconfirmation token.","operationId":"hard_delete_self_v1_forget_me_delete","parameters":[{"name":"confirm","in":"query","required":false,"schema":{"type":"string","default":"","title":"Confirm"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/context/recall":{"post":{"tags":["Context Injection"],"summary":"Recall Context","description":"Get memories formatted for context injection.\n\nThis endpoint searches for relevant memories and formats them\nfor immediate injection into an AI agent's system prompt.","operationId":"recall_context_v1_context_recall_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextRecallRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextRecallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/context/recall/batch":{"post":{"tags":["Context Injection"],"summary":"Batch Recall Context","description":"Get context for multiple queries in one request.\n\nUseful for loading different context categories:\n- User preferences\n- Project context\n- Technical decisions","operationId":"batch_recall_context_v1_context_recall_batch_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchContextRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchContextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/context/types":{"get":{"tags":["Context Injection"],"summary":"List Memory Types","description":"List available memory types and their counts.\n\nUseful for UI filters and analytics.","operationId":"list_memory_types_v1_context_types_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/context/inject":{"post":{"tags":["Context Injection"],"summary":"Inject Context","description":"Inject context directly into a conversation.\n\nThis endpoint loads relevant memories and attaches them\nto the conversation metadata for automatic inclusion.","operationId":"inject_context_v1_context_inject_post","parameters":[{"name":"conversation_id","in":"query","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"max_memories","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Max Memories"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Memory Types"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/emotion":{"get":{"tags":["Emotion"],"summary":"Get Emotion State","description":"Get current emotional state + adaptive response config + mood layer.","operationId":"get_emotion_state_v1_emotion_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/emotion/history":{"get":{"tags":["Emotion"],"summary":"Get Emotion History","description":"Get emotion transition history.","operationId":"get_emotion_history_v1_emotion_history_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/emotion/signal":{"post":{"tags":["Emotion"],"summary":"Report Emotion Signal","description":"Report an emotion signal (agent-detected or manual).","operationId":"report_emotion_signal_v1_emotion_signal_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/emotion/patterns":{"get":{"tags":["Emotion"],"summary":"Get Emotion Patterns","description":"Get detected recurring emotion patterns.","operationId":"get_emotion_patterns_v1_emotion_patterns_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/delta":{"post":{"tags":["Delta Tracking"],"summary":"Apply Delta","description":"Apply a delta update to a memory chunk.\n\nRecords the change with full audit trail.","operationId":"apply_delta_v1_memory_delta_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeltaApplyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeltaApplyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/{chunk_id}/history":{"get":{"tags":["Delta Tracking"],"summary":"Get History","description":"Get the full change history for a memory chunk.","operationId":"get_history_v1_memory__chunk_id__history_get","parameters":[{"name":"chunk_id","in":"path","required":true,"schema":{"type":"integer","title":"Chunk 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":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeltaHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/delta/{delta_id}/rollback":{"post":{"tags":["Delta Tracking"],"summary":"Rollback","description":"Rollback a specific delta — restore the previous value.","operationId":"rollback_v1_memory_delta__delta_id__rollback_post","parameters":[{"name":"delta_id","in":"path","required":true,"schema":{"type":"integer","title":"Delta Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeltaRollbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeltaRollbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/delta/stats":{"get":{"tags":["Delta Tracking"],"summary":"Delta Stats","description":"Get delta statistics for the tenant.","operationId":"delta_stats_v1_memory_delta_stats_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeltaStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/change-proposals":{"post":{"tags":["Change Proposals"],"summary":"Create Proposal","description":"Create a new change proposal.","operationId":"create_proposal_v1_change_proposals_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Change Proposals"],"summary":"List Proposals","description":"List change proposals.","operationId":"list_proposals_v1_change_proposals_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"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":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/change-proposals/{proposal_id}":{"get":{"tags":["Change Proposals"],"summary":"Get Proposal","description":"Get proposal details.","operationId":"get_proposal_v1_change_proposals__proposal_id__get","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"integer","title":"Proposal Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/change-proposals/{proposal_id}/approve":{"post":{"tags":["Change Proposals"],"summary":"Approve","description":"Approve a pending proposal.","operationId":"approve_v1_change_proposals__proposal_id__approve_post","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"integer","title":"Proposal Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/change-proposals/{proposal_id}/reject":{"post":{"tags":["Change Proposals"],"summary":"Reject","description":"Reject a pending proposal.","operationId":"reject_v1_change_proposals__proposal_id__reject_post","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"integer","title":"Proposal Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/change-proposals/{proposal_id}/execute":{"post":{"tags":["Change Proposals"],"summary":"Execute","description":"Execute an approved proposal.\n\nFor bulk operations, this will:\n1. Archive affected memories (if delete/archive proposal)\n2. Create deltas for each change\n3. Apply the changes","operationId":"execute_v1_change_proposals__proposal_id__execute_post","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"integer","title":"Proposal Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/archive":{"post":{"tags":["Archives"],"summary":"Archive","description":"Archive a memory with full context preservation.","operationId":"archive_v1_memory_archive_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/archive/bulk":{"post":{"tags":["Archives"],"summary":"Bulk Archive","description":"Archive multiple memories at once.","operationId":"bulk_archive_v1_memory_archive_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkArchiveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkArchiveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/archives":{"get":{"tags":["Archives"],"summary":"List Archives","description":"List archived memories.","operationId":"list_archives_v1_memory_archives_get","parameters":[{"name":"reason","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},{"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":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/archive/{archive_id}":{"get":{"tags":["Archives"],"summary":"Get Archive Detail","description":"Get full archive details.","operationId":"get_archive_detail_v1_memory_archive__archive_id__get","parameters":[{"name":"archive_id","in":"path","required":true,"schema":{"type":"integer","title":"Archive Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/archive/{archive_id}/restore":{"post":{"tags":["Archives"],"summary":"Restore","description":"Restore a memory from archive.","operationId":"restore_v1_memory_archive__archive_id__restore_post","parameters":[{"name":"archive_id","in":"path","required":true,"schema":{"type":"integer","title":"Archive Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/archive/{archive_id}/context":{"get":{"tags":["Archives"],"summary":"Get Context","description":"Get full archive context — for GDPR audit.","operationId":"get_context_v1_memory_archive__archive_id__context_get","parameters":[{"name":"archive_id","in":"path","required":true,"schema":{"type":"integer","title":"Archive Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveContextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/archives/expiring":{"get":{"tags":["Archives"],"summary":"Expiring Archives","description":"Get archives expiring within N days.","operationId":"expiring_archives_v1_memory_archives_expiring_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/artifacts/state":{"get":{"tags":["Worker Coordination"],"summary":"Get States","description":"Get all artifact states for the tenant.","operationId":"get_states_v1_artifacts_state_get","parameters":[{"name":"run_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/artifacts/ready":{"get":{"tags":["Worker Coordination"],"summary":"Get Ready","description":"Get artifacts that are pending and ready to start.","operationId":"get_ready_v1_artifacts_ready_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadyArtifactsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/artifacts/{artifact_type}/complete":{"post":{"tags":["Worker Coordination"],"summary":"Mark Complete","description":"Mark an artifact as completed.","operationId":"mark_complete_v1_artifacts__artifact_type__complete_post","parameters":[{"name":"artifact_type","in":"path","required":true,"schema":{"type":"string","title":"Artifact Type"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/artifacts/{worker_type}/start":{"post":{"tags":["Worker Coordination"],"summary":"Start Worker","description":"Check dependencies and start a worker if ready.","operationId":"start_worker_v1_artifacts__worker_type__start_post","parameters":[{"name":"worker_type","in":"path","required":true,"schema":{"type":"string","title":"Worker Type"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartWorkerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartWorkerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/artifacts/{worker_type}/dependencies":{"get":{"tags":["Worker Coordination"],"summary":"Check Deps","description":"Check if a worker's dependencies are satisfied.","operationId":"check_deps_v1_artifacts__worker_type__dependencies_get","parameters":[{"name":"worker_type","in":"path","required":true,"schema":{"type":"string","title":"Worker Type"}},{"name":"run_id","in":"query","required":false,"schema":{"type":"string","default":"latest","title":"Run Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DependencyCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/artifacts/log":{"get":{"tags":["Worker Coordination"],"summary":"Worker Log","description":"Get recent worker execution log.","operationId":"worker_log_v1_artifacts_log_get","parameters":[{"name":"worker_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worker Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/middleware/recall":{"post":{"tags":["Auto-Recall Middleware"],"summary":"Auto Recall Endpoint","description":"Auto-recall: given user message, return relevant memories to inject.","operationId":"auto_recall_endpoint_v1_middleware_recall_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/middleware/auto-store":{"post":{"tags":["Auto-Recall Middleware"],"summary":"Auto Store Endpoint","description":"Auto-store: analyze content and store if it contains important memory signal.","operationId":"auto_store_endpoint_v1_middleware_auto_store_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/middleware/chat":{"post":{"tags":["Auto-Recall Middleware"],"summary":"Middleware Chat","description":"Full middleware: auto-recall + detect store signals.\n\nReturns inject_text to prepend to system prompt, and detected memory types.\nClient is responsible for sending to LLM — this endpoint only enriches context.","operationId":"middleware_chat_v1_middleware_chat_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/middleware/feedback":{"post":{"tags":["Auto-Recall Middleware"],"summary":"Middleware Feedback","description":"Feedback loop: report whether injected context was useful.\n\nCall this after the LLM responds. Helps MemoryAI learn which memories\nare actually useful for recall, strengthening good memories and\nweakening irrelevant ones.\n\nBody:\n    memory_ids: list[int] — IDs of memories that were injected\n    useful: bool — whether the user's follow-up was related to injected context\n    query: str — the original query (for pattern tracking)","operationId":"middleware_feedback_v1_middleware_feedback_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/proxy/chat/completions":{"post":{"tags":["OpenAI Proxy"],"summary":"Proxy Chat Completions","description":"OpenAI-compatible chat completions with auto-memory.\n\nAccepts standard OpenAI request format. Adds memory context automatically.\nForwards to configured LLM endpoint. Returns standard OpenAI response format.","operationId":"proxy_chat_completions_v1_proxy_chat_completions_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/events/stream":{"get":{"tags":["Events/SSE"],"summary":"Event Stream","operationId":"event_stream_v1_events_stream_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/events/webhooks":{"get":{"tags":["Events/SSE"],"summary":"List Webhooks","operationId":"list_webhooks_v1_events_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Events/SSE"],"summary":"Register Webhook","operationId":"register_webhook_v1_events_webhooks_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"delete":{"tags":["Events/SSE"],"summary":"Delete Webhook","operationId":"delete_webhook_v1_events_webhooks_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/personality":{"get":{"tags":["Personality","Personality"],"summary":"Api Get Personality","description":"Get PersonalityProfile for current user.\n\nLazy synthesis: if profile is missing or stale, triggers synthesize_personality()\nautomatically before returning. Returns 404-style empty if insufficient DNA memories.","operationId":"api_get_personality_v1_personality_get","parameters":[{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","description":"Force re-synthesis even if not stale","default":false,"title":"Refresh"},"description":"Force re-synthesis even if not stale"},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/personality/confirm":{"post":{"tags":["Personality","Personality"],"summary":"Api Confirm Trait","description":"Confirm or deny a personality trait.\n\nConfirmed traits get +0.2 confidence boost.\nDenied traits get -0.5 confidence penalty (removed if below threshold).\nProfile is marked stale — next GET /v1/personality will re-synthesize.","operationId":"api_confirm_trait_v1_personality_confirm_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/personality/history":{"get":{"tags":["Personality","Personality"],"summary":"Api Get History","description":"Return trait change history — sorted newest first.","operationId":"api_get_history_v1_personality_history_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HistoryItem"},"title":"Response Api Get History V1 Personality History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/personality/synthesize":{"post":{"tags":["Personality","Personality"],"summary":"Api Synthesize","description":"Force re-synthesis of PersonalityProfile. Pro+ only.\n\nCosts LLM tokens. Recommended to let Auto-Dream handle this automatically.\nUse for testing or after bulk-importing DNA memories.\nRate limited to prevent token abuse.","operationId":"api_synthesize_v1_personality_synthesize_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/personality/persona":{"get":{"tags":["Personality","Personality"],"summary":"Api Get Persona","description":"Get a readable persona paragraph (3-5 sentences) describing the user.\n\nUnlike /personality (JSON traits), this returns a human-readable paragraph\nthat bots can inject directly into system prompts.\n\nCached for 1 hour. Use refresh=true to force regeneration.","operationId":"api_get_persona_v1_personality_persona_get","parameters":[{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","description":"Force regenerate persona","default":false,"title":"Refresh"},"description":"Force regenerate persona"},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/personality/cognitive-profile":{"get":{"tags":["Personality","Personality"],"summary":"Api Get Cognitive Profile","description":"Get complete cognitive profile — the brain's model of itself.\n\nReturns: persona + mood + active goals + top entities + procedures + recent topics.\nNo LLM call — pure aggregation from existing data. Fast (~50ms).\n\nUse this for complete context awareness: who the user is, what they're working on,\nhow they're feeling, what workflows they've learned, and who/what they interact with.","operationId":"api_get_cognitive_profile_v1_personality_cognitive_profile_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/goals":{"post":{"tags":["Goals","goals"],"summary":"Create Goal","description":"Create a new goal. Automatically set to active with progress 0.","operationId":"create_goal_v1_goals_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGoalRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Goals","goals"],"summary":"List Goals","description":"List goals. Filter by status: active, achieved, abandoned.","operationId":"list_goals_v1_goals_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/goals/{goal_id}":{"get":{"tags":["Goals","goals"],"summary":"Get Goal","description":"Get goal detail with progress history.","operationId":"get_goal_v1_goals__goal_id__get","parameters":[{"name":"goal_id","in":"path","required":true,"schema":{"type":"integer","title":"Goal Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/goals/{goal_id}/achieve":{"post":{"tags":["Goals","goals"],"summary":"Achieve Goal","description":"Mark goal as achieved. Progress set to 1.0. DNA protection removed.","operationId":"achieve_goal_v1_goals__goal_id__achieve_post","parameters":[{"name":"goal_id","in":"path","required":true,"schema":{"type":"integer","title":"Goal Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AchieveRequest","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/goals/{goal_id}/abandon":{"post":{"tags":["Goals","goals"],"summary":"Abandon Goal","description":"Mark goal as abandoned. Will decay after 14 days.","operationId":"abandon_goal_v1_goals__goal_id__abandon_post","parameters":[{"name":"goal_id","in":"path","required":true,"schema":{"type":"integer","title":"Goal Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AbandonRequest","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/goals/{goal_id}/progress":{"post":{"tags":["Goals","goals"],"summary":"Update Progress","description":"Manual progress update (0.0-1.0). Only for active goals.","operationId":"update_progress_v1_goals__goal_id__progress_post","parameters":[{"name":"goal_id","in":"path","required":true,"schema":{"type":"integer","title":"Goal Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProgressRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/goals/{goal_id}/timeline":{"get":{"tags":["Goals","goals"],"summary":"Get Timeline","description":"Get progress history timeline for a goal.","operationId":"get_timeline_v1_goals__goal_id__timeline_get","parameters":[{"name":"goal_id","in":"path","required":true,"schema":{"type":"integer","title":"Goal Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/wiki/pages":{"post":{"tags":["Wiki","Wiki"],"summary":"Create Page","description":"Create a new wiki page.","operationId":"create_page_v1_wiki_pages_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Wiki","Wiki"],"summary":"List Pages","description":"List wiki pages with pagination.","operationId":"list_pages_v1_wiki_pages_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag"}},{"name":"source_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/wiki/pages/{page_id}":{"get":{"tags":["Wiki","Wiki"],"summary":"Get Page","description":"Get a wiki page by ID.","operationId":"get_page_v1_wiki_pages__page_id__get","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"integer","title":"Page Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Wiki","Wiki"],"summary":"Update Page","description":"Update a wiki page.","operationId":"update_page_v1_wiki_pages__page_id__put","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"integer","title":"Page Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Wiki","Wiki"],"summary":"Delete Page","description":"Soft-delete a wiki page.","operationId":"delete_page_v1_wiki_pages__page_id__delete","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"integer","title":"Page Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/wiki/search":{"post":{"tags":["Wiki","Wiki"],"summary":"Search Wiki","description":"Search wiki pages (hybrid, FTS, or vector mode).","operationId":"search_wiki_v1_wiki_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/wiki/ingest/url":{"post":{"tags":["Wiki","Wiki"],"summary":"Ingest Url","description":"Ingest a URL as a wiki page (with SSRF protection).","operationId":"ingest_url_v1_wiki_ingest_url_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiIngestURLRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/wiki/ingest/markdown":{"post":{"tags":["Wiki","Wiki"],"summary":"Ingest Markdown","description":"Ingest raw markdown as a wiki page.","operationId":"ingest_markdown_v1_wiki_ingest_markdown_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiIngestMarkdownRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/wiki/ingest/pdf":{"post":{"tags":["Wiki","Wiki"],"summary":"Ingest Pdf","description":"Ingest a PDF file as a wiki page. Extracts text using pdfplumber.","operationId":"ingest_pdf_v1_wiki_ingest_pdf_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_ingest_pdf_v1_wiki_ingest_pdf_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/wiki/pages/{page_id}/links":{"get":{"tags":["Wiki","Wiki"],"summary":"Get Links","description":"Get outgoing and incoming links for a page.","operationId":"get_links_v1_wiki_pages__page_id__links_get","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"integer","title":"Page Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/wiki/pages/{page_id}/suggested-links":{"get":{"tags":["Wiki","Wiki"],"summary":"Get Suggested Links","description":"Get suggested pages to link to based on semantic similarity.","operationId":"get_suggested_links_v1_wiki_pages__page_id__suggested_links_get","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"integer","title":"Page Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/wiki/links":{"post":{"tags":["Wiki","Wiki"],"summary":"Create Link","description":"Create a link between two wiki pages.","operationId":"create_link_v1_wiki_links_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiLinkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/wiki/pages/{page_id}/citations":{"get":{"tags":["Wiki","Wiki"],"summary":"Get Page Citations","description":"Get citation history for a wiki page — which queries used this page.","operationId":"get_page_citations_v1_wiki_pages__page_id__citations_get","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"integer","title":"Page Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/wiki/citations/top":{"get":{"tags":["Wiki","Wiki"],"summary":"Get Top Cited Pages","description":"Get most-cited wiki pages in the last N days.","operationId":"get_top_cited_pages_v1_wiki_citations_top_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":7,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/wiki/export":{"get":{"tags":["Wiki","Wiki"],"summary":"Export Wiki","description":"Export all wiki pages as a ZIP of markdown files or JSON.","operationId":"export_wiki_v1_wiki_export_get","parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(zip|json)$","default":"zip","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brain/query":{"post":{"tags":["Brain","Brain"],"summary":"Brain Query","description":"Unified brain query — routes to memory, wiki, or both based on query classification.","operationId":"brain_query_v1_brain_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brain/push":{"post":{"tags":["Brain","Brain"],"summary":"Proactive Push","description":"Proactive push — send current context, get relevant knowledge pushed back.\n\nThe brain analyzes your current context and surfaces relevant memories/wiki\nthat you might need, WITHOUT you having to ask a specific question.\n\nUse this for:\n- IDE integration: send current file content → get relevant decisions/docs\n- Conversation monitoring: send last few messages → get relevant context\n- Task context: send task description → get related knowledge","operationId":"proactive_push_v1_brain_push_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProactivePushRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brain/gaps":{"get":{"tags":["Brain","Brain"],"summary":"Get Knowledge Gaps","description":"Danh sách knowledge gaps — những gì brain biết mình KHÔNG biết.","operationId":"get_knowledge_gaps_v1_brain_gaps_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brain/gaps/{gap_id}/resolve":{"post":{"tags":["Brain","Brain"],"summary":"Resolve Knowledge Gap","description":"Đánh dấu gap đã được giải quyết.","operationId":"resolve_knowledge_gap_v1_brain_gaps__gap_id__resolve_post","parameters":[{"name":"gap_id","in":"path","required":true,"schema":{"type":"integer","title":"Gap Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brain/gaps/{gap_id}/dismiss":{"post":{"tags":["Brain","Brain"],"summary":"Dismiss Knowledge Gap","description":"Bỏ qua gap (không quan tâm).","operationId":"dismiss_knowledge_gap_v1_brain_gaps__gap_id__dismiss_post","parameters":[{"name":"gap_id","in":"path","required":true,"schema":{"type":"integer","title":"Gap Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brain/heal":{"post":{"tags":["Brain","Brain"],"summary":"Trigger Heal","description":"Trigger self-heal cycle manually. Scans for contradictions and proposes fixes.","operationId":"trigger_heal_v1_brain_heal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/brain/heal/history":{"get":{"tags":["Brain","Brain"],"summary":"Get Heal History","description":"Lịch sử self-heal — audit trail.","operationId":"get_heal_history_v1_brain_heal_history_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brain/heal/pending":{"get":{"tags":["Brain","Brain"],"summary":"Get Pending Proposals","description":"Proposals đang chờ approval/timeout.","operationId":"get_pending_proposals_v1_brain_heal_pending_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brain/heal/proposals/{proposal_id}/approve":{"post":{"tags":["Brain","Brain"],"summary":"Approve Proposal","description":"Approve a pending proposal (applies immediately).","operationId":"approve_proposal_v1_brain_heal_proposals__proposal_id__approve_post","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"integer","title":"Proposal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brain/heal/proposals/{proposal_id}/reject":{"post":{"tags":["Brain","Brain"],"summary":"Reject Proposal","description":"Reject a pending proposal (never applies).","operationId":"reject_proposal_v1_brain_heal_proposals__proposal_id__reject_post","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"integer","title":"Proposal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brain/heal/proposals/{proposal_id}/undo":{"post":{"tags":["Brain","Brain"],"summary":"Undo Proposal","description":"Undo an applied proposal (revert to original). 7-day window.","operationId":"undo_proposal_v1_brain_heal_proposals__proposal_id__undo_post","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"integer","title":"Proposal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brain/health":{"get":{"tags":["Brain","Brain"],"summary":"Brain Health","description":"Brain health dashboard — gaps, contradictions, heal rate.","operationId":"brain_health_v1_brain_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/brain/working-memory":{"get":{"tags":["Brain","Brain"],"summary":"Get Working Memory","description":"Working memory state — what the brain is currently focused on.","operationId":"get_working_memory_v1_brain_working_memory_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"delete":{"tags":["Brain","Brain"],"summary":"Clear Working Memory","description":"Clear working memory — reset brain's short-term focus.","operationId":"clear_working_memory_v1_brain_working_memory_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/brain/episodes":{"get":{"tags":["Brain","Brain"],"summary":"List Episodes","description":"List episodic memories — past experiences/stories.","operationId":"list_episodes_v1_brain_episodes_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"outcome","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brain/episodes/recall":{"post":{"tags":["Brain","Brain"],"summary":"Recall Episodes","description":"Recall similar past episodes for current situation.","operationId":"recall_episodes_v1_brain_episodes_recall_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/brain/consciousness":{"get":{"tags":["Brain","Brain"],"summary":"Get Consciousness","description":"Brain's inner monologue — what it's currently thinking about.","operationId":"get_consciousness_v1_brain_consciousness_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/brain/consciousness/think":{"post":{"tags":["Brain","Brain"],"summary":"Trigger Think","description":"Force a thinking cycle (normally runs every 5 min).","operationId":"trigger_think_v1_brain_consciousness_think_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/brain/consciousness/notifications":{"get":{"tags":["Brain","Brain"],"summary":"Get Notifications","description":"Get pending notifications — things the brain wants to tell you.","operationId":"get_notifications_v1_brain_consciousness_notifications_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/wiki/spaces":{"get":{"tags":["Wiki Spaces","Wiki Spaces"],"summary":"List Spaces","description":"List spaces you have access to (owned + member + public).","operationId":"list_spaces_v1_wiki_spaces_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Wiki Spaces","Wiki Spaces"],"summary":"Create Space","description":"Create a new collaborative wiki space.","operationId":"create_space_v1_wiki_spaces_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/wiki/spaces/{space_id}":{"get":{"tags":["Wiki Spaces","Wiki Spaces"],"summary":"Get Space","description":"Get space details.","operationId":"get_space_v1_wiki_spaces__space_id__get","parameters":[{"name":"space_id","in":"path","required":true,"schema":{"type":"integer","title":"Space Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Wiki Spaces","Wiki Spaces"],"summary":"Delete Space","description":"Delete a space. Only owner can delete.","operationId":"delete_space_v1_wiki_spaces__space_id__delete","parameters":[{"name":"space_id","in":"path","required":true,"schema":{"type":"integer","title":"Space Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/wiki/spaces/{space_id}/members":{"get":{"tags":["Wiki Spaces","Wiki Spaces"],"summary":"List Members","description":"List space members.","operationId":"list_members_v1_wiki_spaces__space_id__members_get","parameters":[{"name":"space_id","in":"path","required":true,"schema":{"type":"integer","title":"Space Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Wiki Spaces","Wiki Spaces"],"summary":"Add Member","description":"Add a member to the space. Requires admin role.","operationId":"add_member_v1_wiki_spaces__space_id__members_post","parameters":[{"name":"space_id","in":"path","required":true,"schema":{"type":"integer","title":"Space Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceMemberRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/wiki/spaces/{space_id}/members/{target_tenant_id}":{"delete":{"tags":["Wiki Spaces","Wiki Spaces"],"summary":"Remove Member","description":"Remove a member from the space. Requires admin role.","operationId":"remove_member_v1_wiki_spaces__space_id__members__target_tenant_id__delete","parameters":[{"name":"space_id","in":"path","required":true,"schema":{"type":"integer","title":"Space Id"}},{"name":"target_tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Target Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/wiki/spaces/{space_id}/pages":{"get":{"tags":["Wiki Spaces","Wiki Spaces"],"summary":"Get Space Pages","description":"List pages in a space.","operationId":"get_space_pages_v1_wiki_spaces__space_id__pages_get","parameters":[{"name":"space_id","in":"path","required":true,"schema":{"type":"integer","title":"Space Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Wiki Spaces","Wiki Spaces"],"summary":"Share Page To Space","description":"Share a wiki page to a space. Requires write access.","operationId":"share_page_to_space_v1_wiki_spaces__space_id__pages_post","parameters":[{"name":"space_id","in":"path","required":true,"schema":{"type":"integer","title":"Space Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharePageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/wiki/spaces/{space_id}/pages/{page_id}":{"delete":{"tags":["Wiki Spaces","Wiki Spaces"],"summary":"Unshare Page","description":"Remove a page from a space (make private again).","operationId":"unshare_page_v1_wiki_spaces__space_id__pages__page_id__delete","parameters":[{"name":"space_id","in":"path","required":true,"schema":{"type":"integer","title":"Space Id"}},{"name":"page_id","in":"path","required":true,"schema":{"type":"integer","title":"Page Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/timeline":{"get":{"tags":["Timeline","Timeline"],"summary":"Api Get Timeline","description":"Get all causal chains — the user's decision evolution history.\n\nEach chain = a topic + pattern + prediction built from a sequence of decisions.\nSynthesized by Auto-Dream Phase 6 nightly.","operationId":"api_get_timeline_v1_timeline_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChainSummary"},"title":"Response Api Get Timeline V1 Timeline Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/timeline/{topic}":{"get":{"tags":["Timeline","Timeline"],"summary":"Api Get Chain","description":"Get full causal chain for a specific topic.\n\nReturns ordered decision history with context (why, alternatives, outcome)\nplus the extracted behavioral pattern and prediction.","operationId":"api_get_chain_v1_timeline__topic__get","parameters":[{"name":"topic","in":"path","required":true,"schema":{"type":"string","title":"Topic"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChainDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/timeline/whatif":{"post":{"tags":["Timeline","Timeline"],"summary":"Api Whatif","description":"Predict outcome of a hypothetical scenario based on causal history.\n\nUses the user's behavioral patterns to estimate what would happen.\nExample: \"if I switch to Rust instead of Python\"\n→ Based on pattern \"user returns to Python after friction with new languages\"\n→ Prediction: \"High chance of returning to Python within 2-3 months\"","operationId":"api_whatif_v1_timeline_whatif_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatIfRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatIfResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents":{"post":{"tags":["Agent Mesh","Agent Mesh"],"summary":"Api Register Agent","description":"Register a new agent in the mesh. God/godfather tier only.","operationId":"api_register_agent_v1_agents_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterAgentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Agent Mesh","Agent Mesh"],"summary":"Api List Agents","description":"List all active agents in the mesh.","operationId":"api_list_agents_v1_agents_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}":{"get":{"tags":["Agent Mesh","Agent Mesh"],"summary":"Api Get Agent","description":"Get agent profile with personality summary.","operationId":"api_get_agent_v1_agents__agent_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Agent Mesh","Agent Mesh"],"summary":"Api Deactivate Agent","description":"Deactivate agent. DNA memories preserved.","operationId":"api_deactivate_agent_v1_agents__agent_id__delete","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/connect":{"post":{"tags":["Agent Mesh","Agent Mesh"],"summary":"Api Connect Agents","description":"Create mesh edge from agent_id → target_agent_id.","operationId":"api_connect_agents_v1_agents__agent_id__connect_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{source_id}/disconnect/{target_id}":{"delete":{"tags":["Agent Mesh","Agent Mesh"],"summary":"Api Disconnect Agents","description":"Remove mesh edge.","operationId":"api_disconnect_agents_v1_agents__source_id__disconnect__target_id__delete","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}},{"name":"target_id","in":"path","required":true,"schema":{"type":"string","title":"Target Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/mesh/topology":{"get":{"tags":["Agent Mesh","Agent Mesh"],"summary":"Api Mesh Topology","description":"Get full mesh topology: nodes (agents) + edges.","operationId":"api_mesh_topology_v1_mesh_topology_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/mesh/health":{"get":{"tags":["Agent Mesh","Agent Mesh"],"summary":"Api Mesh Health","description":"Mesh sync health: agent count, pending propagations, open conflicts.","operationId":"api_mesh_health_v1_mesh_health_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/mesh/handoff":{"post":{"tags":["Agent Mesh","Agent Mesh"],"summary":"Api Initiate Handoff","description":"Initiate context handoff from calling agent to target.\n\nDNA memories are automatically excluded from the handoff snapshot.","operationId":"api_initiate_handoff_v1_mesh_handoff_post","parameters":[{"name":"agent_id","in":"query","required":true,"schema":{"type":"string","description":"Calling agent ID","title":"Agent Id"},"description":"Calling agent ID"},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/mesh/handoff/{handoff_id}/ack":{"post":{"tags":["Agent Mesh","Agent Mesh"],"summary":"Api Acknowledge Handoff","description":"Target agent acknowledges receipt of handoff.","operationId":"api_acknowledge_handoff_v1_mesh_handoff__handoff_id__ack_post","parameters":[{"name":"handoff_id","in":"path","required":true,"schema":{"type":"integer","title":"Handoff Id"}},{"name":"agent_id","in":"query","required":true,"schema":{"type":"string","description":"Acknowledging agent ID","title":"Agent Id"},"description":"Acknowledging agent ID"},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/mesh/handoffs/pending":{"get":{"tags":["Agent Mesh","Agent Mesh"],"summary":"Api Pending Handoffs","description":"List unacknowledged handoffs waiting for this agent.","operationId":"api_pending_handoffs_v1_mesh_handoffs_pending_get","parameters":[{"name":"agent_id","in":"query","required":true,"schema":{"type":"string","description":"Agent ID to check","title":"Agent Id"},"description":"Agent ID to check"},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/mesh/handoff/{handoff_id}/context":{"get":{"tags":["Agent Mesh","Agent Mesh"],"summary":"Api Handoff Context","description":"Get context chunks from a handoff (target agent only).","operationId":"api_handoff_context_v1_mesh_handoff__handoff_id__context_get","parameters":[{"name":"handoff_id","in":"path","required":true,"schema":{"type":"integer","title":"Handoff Id"}},{"name":"agent_id","in":"query","required":true,"schema":{"type":"string","description":"Requesting agent ID","title":"Agent Id"},"description":"Requesting agent ID"},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/mesh/conflicts":{"get":{"tags":["Agent Mesh","Agent Mesh"],"summary":"Api List Conflicts","description":"List mesh conflicts between agents.","operationId":"api_list_conflicts_v1_mesh_conflicts_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","description":"open|reviewing|resolved|all","default":"open","title":"Status"},"description":"open|reviewing|resolved|all"},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/mesh/conflicts/{conflict_id}/resolve":{"post":{"tags":["Agent Mesh","Agent Mesh"],"summary":"Api Resolve Conflict","description":"Resolve a mesh conflict.\n\nLosing chunk is marked as contradicted.\nWinning chunk is propagated to the mesh.","operationId":"api_resolve_conflict_v1_mesh_conflicts__conflict_id__resolve_post","parameters":[{"name":"conflict_id","in":"path","required":true,"schema":{"type":"integer","title":"Conflict Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveConflictRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/personality":{"get":{"tags":["Agent Mesh","Agent Mesh"],"summary":"Api Agent Personality","description":"Get personality profile for a specific agent.\n\nEach agent has its own DNA memories and personality — separate from\ntenant-level personality (/v1/personality).","operationId":"api_agent_personality_v1_agents__agent_id__personality_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Refresh"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brain/export":{"post":{"tags":["Brain Portability","Brain Portability"],"summary":"Export Brain","description":"Export the entire brain as a single MemoryAI Bundle JSON document.\n\nUse for small/medium brains. For huge brains (10K+ chunks),\nuse /v1/brain/export/stream instead.","operationId":"export_brain_v1_brain_export_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRequest","default":{"scope":"full"}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brain/export/stream":{"post":{"tags":["Brain Portability","Brain Portability"],"summary":"Export Brain Stream","description":"Export the brain as NDJSON: one record per line.\n\nFormat:\n  {\"section\": \"header\",   \"record\": {format, version, ...}}\n  {\"section\": \"chunks\",   \"record\": {...}}\n  {\"section\": \"edges\",    \"record\": {...}}\n  ...\n  {\"section\": \"manifest\", \"record\": {counts, checksum}}\n\nThe manifest line comes LAST so the importer can validate the full body.","operationId":"export_brain_stream_v1_brain_export_stream_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRequest","default":{"scope":"full"}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brain/import":{"post":{"tags":["Brain Portability","Brain Portability"],"summary":"Import Brain","description":"Import a MemoryAI Bundle into the calling tenant.\n\nIdempotent: existing chunks (by content_hash) are skipped, edges/entities\nare upserted. The bundle's tenant_id is informational only — data is\nwritten to the calling tenant.\n\nReturns an ImportReport with counts of inserted / skipped / warnings.","operationId":"import_brain_v1_brain_import_post","parameters":[{"name":"keep_embeddings","in":"query","required":false,"schema":{"type":"boolean","description":"Reuse bundle embeddings if model matches","default":true,"title":"Keep Embeddings"},"description":"Reuse bundle embeddings if model matches"},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Bundle"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/server__routes__brain_export__ImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brain/import/file":{"post":{"tags":["Brain Portability","Brain Portability"],"summary":"Import Brain File","description":"Same as /import but accepts a multipart upload (memoryai-brain.json).","operationId":"import_brain_file_v1_brain_import_file_post","parameters":[{"name":"keep_embeddings","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Keep Embeddings"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_brain_file_v1_brain_import_file_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/server__routes__brain_export__ImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/benchmark/recall-vs-fullcontext":{"post":{"tags":["Public Benchmark","Public Benchmark"],"summary":"Recall Vs Fullcontext","description":"Run one benchmark: full-feed vs smart recall on the calling brain.\n\nAvailable on every tier — this is a marketing/transparency feature.\nReturns per-mode tokens, cost, latency, coverage, signal density,\nplus headline deltas (e.g., \"200× cheaper, 60× faster\").","operationId":"recall_vs_fullcontext_v1_benchmark_recall_vs_fullcontext_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BenchmarkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/benchmark/showcase":{"post":{"tags":["Public Benchmark","Public Benchmark"],"summary":"Showcase","description":"Run a series of queries and aggregate the comparison.\n\nUseful for landing-page live demos — sends one POST, gets a slate of\nconcrete numbers (\"avg 217× cheaper across 3 representative queries\").","operationId":"showcase_v1_benchmark_showcase_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowcaseRequest","default":{"queries":["What does the user prefer?","What decisions has this brain made?","What pitfalls should we avoid before deploy?"],"model":"claude-opus-4-6","naive_budget_tokens":200000,"smart_top_k":8}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/benchmark/pricing":{"get":{"tags":["Public Benchmark","Public Benchmark"],"summary":"Pricing","description":"Return the assumed $ per 1M input tokens for each model.\n\nPublic, no auth required — these are list prices, not customer-specific.\nUpdated periodically as vendors adjust pricing.","operationId":"pricing_v1_benchmark_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/trust/agents":{"get":{"tags":["Trust Graph","Trust Graph"],"summary":"List Agents Reputation","description":"Reputation leaderboard. Sorted by score desc.\n\nRequires team+ plan (trust_graph_enabled flag).","operationId":"list_agents_reputation_v1_trust_agents_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/trust/agents/{agent_id}":{"get":{"tags":["Trust Graph","Trust Graph"],"summary":"Get Single Agent Reputation","description":"Reputation for one agent. Computed live (no DB write).\n\nAvailable on every paid tier — your own agents, your own data.","operationId":"get_single_agent_reputation_v1_trust_agents__agent_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100,"title":"Agent Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/trust/agents/{agent_id}/recompute":{"post":{"tags":["Trust Graph","Trust Graph"],"summary":"Recompute Single","description":"Force a fresh recompute + persist snapshot. Useful after bulk feedback.\n\nAvailable on every paid tier.","operationId":"recompute_single_v1_trust_agents__agent_id__recompute_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100,"title":"Agent Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/trust/recompute-all":{"post":{"tags":["Trust Graph","Trust Graph"],"summary":"Recompute All","description":"Recompute reputation for every active agent in this tenant.\n\nRequires team+ plan. Idempotent — safe to call repeatedly.","operationId":"recompute_all_v1_trust_recompute_all_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/trust/chunks/{chunk_id}":{"get":{"tags":["Trust Graph","Trust Graph"],"summary":"Chunk Trust Score","description":"Trust info for a single chunk (source agent + reputation + helpful counts).\n\nAvailable on every paid tier.","operationId":"chunk_trust_score_v1_trust_chunks__chunk_id__get","parameters":[{"name":"chunk_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Chunk Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/twin/respond":{"post":{"tags":["Cognitive Twin","Cognitive Twin"],"summary":"Respond","description":"Simulate the user's response to a free-form query.\n\nReturns the predicted response, a confidence score, and the chunk IDs\nthat informed the simulation (provenance trail). If the brain doesn't\nhave enough signal yet, returns a low-confidence stub instead of\nhallucinating.","operationId":"respond_v1_twin_respond_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwinRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/twin/decide":{"post":{"tags":["Cognitive Twin","Cognitive Twin"],"summary":"Decide","description":"Simulate the user's choice when given options.\n\nThe query should describe the options (e.g., \"PostgreSQL, MongoDB, or\nDynamoDB for a chat app?\"). The twin picks one and explains *why* using\nthe user's past preferences/decisions.","operationId":"decide_v1_twin_decide_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwinRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/twin/status":{"get":{"tags":["Cognitive Twin","Cognitive Twin"],"summary":"Status","description":"Cheap readiness check — no LLM call.\n\nReturns the brain context summary and whether the twin is ready to fire.\nUseful for clients to show a \"Cognitive Twin: ready\" badge without\nincurring LLM cost.","operationId":"status_v1_twin_status_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/spec/":{"get":{"tags":["Protocol","Protocol"],"summary":"Get Spec","description":"Return the MemoryAI Protocol v1 spec as Markdown.\n\nPublic endpoint — no auth required. Anyone can read and implement\nthe protocol; the spec itself is published under CC BY 4.0.","operationId":"get_spec_v1_spec__get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/v1/spec/info":{"get":{"tags":["Protocol","Protocol"],"summary":"Spec Info","description":"Machine-readable summary of the protocol spec.\n\nUseful for clients to detect what protocol version a server supports\nwithout parsing the full Markdown document.","operationId":"spec_info_v1_spec_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/inheritance/heirs":{"post":{"tags":["Inheritance","Inheritance"],"summary":"Post Heir","operationId":"post_heir_v1_inheritance_heirs_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeirRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Inheritance","Inheritance"],"summary":"Get Heirs","operationId":"get_heirs_v1_inheritance_heirs_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/inheritance/heirs/{heir_tenant_id}":{"delete":{"tags":["Inheritance","Inheritance"],"summary":"Delete Heir","operationId":"delete_heir_v1_inheritance_heirs__heir_tenant_id__delete","parameters":[{"name":"heir_tenant_id","in":"path","required":true,"schema":{"type":"string","minLength":8,"maxLength":64,"title":"Heir Tenant Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/inheritance/trigger":{"post":{"tags":["Inheritance","Inheritance"],"summary":"Post Trigger","description":"Manually trigger brain inheritance to all assigned heirs.\n\nMVP: only the brain owner may trigger their own. Trustee-triggered\ninheritance (e.g. legal POA) is on the P2.3.full roadmap.","operationId":"post_trigger_v1_inheritance_trigger_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/federation/grants":{"post":{"tags":["Federation","Federation"],"summary":"Post Grant","operationId":"post_grant_v1_federation_grants_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Federation","Federation"],"summary":"Get Outgoing Grants","operationId":"get_outgoing_grants_v1_federation_grants_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/federation/grants/{grant_id}":{"delete":{"tags":["Federation","Federation"],"summary":"Delete Grant","operationId":"delete_grant_v1_federation_grants__grant_id__delete","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Grant Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/federation/inbox":{"get":{"tags":["Federation","Federation"],"summary":"Get Incoming Grants","description":"List federation grants this tenant has received (active only).","operationId":"get_incoming_grants_v1_federation_inbox_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/federation/recall":{"post":{"tags":["Federation","Federation"],"summary":"Post Federated Recall","description":"Recall against the grantor's brain via an active grant.\n\nServer-side enforcement of tag_filter, DNA exclusion, and expires_at.\nEvery recall is audited so the grantor can review queries.","operationId":"post_federated_recall_v1_federation_recall_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FederatedRecallRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/l2/inject":{"post":{"tags":["L2 Inject","L2 Inject"],"summary":"L2 Inject","description":"Compose a context block within token budget — DNA #2.\n\nPipeline: L4 cache → DNA chunks → pre-reasoned L2 → L3 recall →\nmerge + section + compress within budget.\n\nLatency target: p95 < 200ms (cache hit), < 800ms (miss).","operationId":"l2_inject_v1_l2_inject_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/L2InjectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/L2InjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/l2/status":{"get":{"tags":["L2 Inject","L2 Inject"],"summary":"L2 Status","description":"Return L2 cache status: live cached entries, pre-reasoned chunks, DNA chunks.","operationId":"l2_status_v1_l2_status_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/L2StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/l2/invalidate":{"post":{"tags":["L2 Inject","L2 Inject"],"summary":"L2 Invalidate","description":"Drop all cached L4 entries for this tenant. Use after large DNA changes.","operationId":"l2_invalidate_v1_l2_invalidate_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal-stats":{"get":{"tags":["Internal Stats"],"summary":"Internal Stats","description":"Public: latest stats snapshot of the internal MemoryAI brain.","operationId":"internal_stats_v1_internal_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/audit/me":{"get":{"tags":["Audit"],"summary":"My Audit Export","description":"Tenant's own audit log as NDJSON.\n\nSelf-service GDPR data subject request. Privacy-preserving by design —\nPII (IP, UA, query) was hashed at insert time, raw values never existed\nin the database.","operationId":"my_audit_export_v1_audit_me_get","parameters":[{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO datetime","title":"Since"},"description":"ISO datetime"},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO datetime","title":"Until"},"description":"ISO datetime"},{"name":"event_types","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"comma-separated","title":"Event Types"},"description":"comma-separated"},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/audit/export":{"post":{"tags":["Audit"],"summary":"Admin Audit Export","description":"Admin-only audit export for any tenant. Used for DSR + compliance audits.\n\nBody: {tenant_id, since?, until?, event_types?}","operationId":"admin_audit_export_v1_admin_audit_export_post","parameters":[{"name":"x-admin-secret","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audit/me/count":{"get":{"tags":["Audit"],"summary":"My Audit Count","description":"Lightweight counter — how many audit rows the tenant has retained.","operationId":"my_audit_count_v1_audit_me_count_get","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/payment/vn/pricing":{"get":{"tags":["VN Payment","VN Payment"],"summary":"Vn Pricing","description":"Public pricing in VND for landing + checkout flow. No auth.","operationId":"vn_pricing_v1_payment_vn_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/payment/vn/healthcheck":{"get":{"tags":["VN Payment","VN Payment"],"summary":"Vn Healthcheck","description":"Provider config status (no secrets).","operationId":"vn_healthcheck_v1_payment_vn_healthcheck_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/payment/vn/create":{"post":{"tags":["VN Payment","VN Payment"],"summary":"Vn Create","description":"Start a VN payment.\n\nBody:\n    plan: \"personal\" | \"pro\" | \"promax\" | \"team\"\n    months: 1-60 (annual discount applied at 12+)\n    provider: \"vnpay\" | \"momo\"\n    return_url: where the user lands after payment\n    customer_email: optional\n    customer_phone: optional\n\nReturns: { redirect_url, order_ref, amount_vnd, plan, months }","operationId":"vn_create_v1_payment_vn_create_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/payment/vn/webhook/{provider}":{"post":{"tags":["VN Payment","VN Payment"],"summary":"Vn Webhook","description":"Provider IPN callback. Idempotent on (provider, provider_txn_id).\n\nNo auth — webhook validity is established via cryptographic signature\nin the payload. All providers verify HMAC inside the service layer.","operationId":"vn_webhook_v1_payment_vn_webhook__provider__post","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/payment/vn/status/{order_ref}":{"get":{"tags":["VN Payment","VN Payment"],"summary":"Vn Status","description":"Poll a transaction by our internal order_ref.","operationId":"vn_status_v1_payment_vn_status__order_ref__get","parameters":[{"name":"order_ref","in":"path","required":true,"schema":{"type":"string","title":"Order Ref"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/debug/memory/{chunk_id}/lifecycle":{"get":{"tags":["Debug","Debug"],"summary":"Memory Lifecycle","description":"Get the full lifecycle of a memory chunk — every event that shaped it.\n\nCombines: memory_events + chunk_deltas + recall_log for a complete picture.\nAnswers: \"what happened to this memory and why?\"","operationId":"memory_lifecycle_v1_debug_memory__chunk_id__lifecycle_get","parameters":[{"name":"chunk_id","in":"path","required":true,"schema":{"type":"integer","title":"Chunk Id"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/debug/tenant/events":{"get":{"tags":["Debug","Debug"],"summary":"Tenant Events","description":"Get recent memory events for the tenant (for debugging/monitoring).","operationId":"tenant_events_v1_debug_tenant_events_get","parameters":[{"name":"event_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/hooks/claude/session-start":{"post":{"tags":["Claude Code Hooks","Claude Code Hooks"],"summary":"Claude Session Start","description":"SessionStart hook → inject DNA + recent activity as opening context.\n\nMirrors memory_bootstrap but returns the Claude-Code hook envelope so the\ncontext lands automatically at the start of the conversation.","operationId":"claude_session_start_v1_hooks_claude_session_start_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/hooks/claude/user-prompt":{"post":{"tags":["Claude Code Hooks","Claude Code Hooks"],"summary":"Claude User Prompt","description":"UserPromptSubmit hook → recall relevant memory for the submitted prompt.\n\nReuses the auto-recall middleware's signal detection + budgeted recall, so\ntrivial prompts skip recall and only meaningful ones pull context. Never\nblocks the prompt.","operationId":"claude_user_prompt_v1_hooks_claude_user_prompt_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/hooks/claude/stop":{"post":{"tags":["Claude Code Hooks","Claude Code Hooks"],"summary":"Claude Stop","description":"Stop hook → auto-store memory-worthy content from the finished turn.\n\nReads last_assistant_message (provided by Claude Code on the Stop event) and\nruns the same signal detection the proxy/middleware use. Stores at most one\nmemory per turn. Always returns allow (never blocks the turn from ending).","operationId":"claude_stop_v1_hooks_claude_stop_post","parameters":[{"name":"required_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Root","description":"Serve landing page based on Host header.","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Root","description":"Serve landing page based on Host header.","operationId":"root__head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/docs.html":{"get":{"summary":"Docs Page","operationId":"docs_page_docs_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Docs Page","operationId":"docs_page_docs_html_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/setup.html":{"get":{"summary":"Setup Page","operationId":"setup_page_setup_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Setup Page","operationId":"setup_page_setup_html_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/privacy.html":{"get":{"summary":"Privacy Page","operationId":"privacy_page_privacy_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Privacy Page","operationId":"privacy_page_privacy_html_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/privacy-vn.html":{"get":{"summary":"Privacy Vn Page","operationId":"privacy_vn_page_privacy_vn_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Privacy Vn Page","operationId":"privacy_vn_page_privacy_vn_html_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/terms.html":{"get":{"summary":"Terms Page","operationId":"terms_page_terms_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Terms Page","operationId":"terms_page_terms_html_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/terms-vn.html":{"get":{"summary":"Terms Vn Page","operationId":"terms_vn_page_terms_vn_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Terms Vn Page","operationId":"terms_vn_page_terms_vn_html_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/payment.html":{"get":{"summary":"Payment Page","operationId":"payment_page_payment_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Payment Page","operationId":"payment_page_payment_html_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/payment-vn.html":{"get":{"summary":"Payment Vn Page","operationId":"payment_vn_page_payment_vn_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Payment Vn Page","operationId":"payment_vn_page_payment_vn_html_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/shipping.html":{"get":{"summary":"Shipping Page","operationId":"shipping_page_shipping_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Shipping Page","operationId":"shipping_page_shipping_html_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/shipping-vn.html":{"get":{"summary":"Shipping Vn Page","operationId":"shipping_vn_page_shipping_vn_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Shipping Vn Page","operationId":"shipping_vn_page_shipping_vn_html_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/inspection.html":{"get":{"summary":"Inspection Page","operationId":"inspection_page_inspection_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Inspection Page","operationId":"inspection_page_inspection_html_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/inspection-vn.html":{"get":{"summary":"Inspection Vn Page","operationId":"inspection_vn_page_inspection_vn_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Inspection Vn Page","operationId":"inspection_vn_page_inspection_vn_html_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/returns.html":{"get":{"summary":"Returns Page","operationId":"returns_page_returns_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Returns Page","operationId":"returns_page_returns_html_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/returns-vn.html":{"get":{"summary":"Returns Vn Page","operationId":"returns_vn_page_returns_vn_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Returns Vn Page","operationId":"returns_vn_page_returns_vn_html_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/payment":{"get":{"summary":"Payment Pretty","operationId":"payment_pretty_payment_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/shipping":{"get":{"summary":"Shipping Pretty","operationId":"shipping_pretty_shipping_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/inspection":{"get":{"summary":"Inspection Pretty","operationId":"inspection_pretty_inspection_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/returns":{"get":{"summary":"Returns Pretty","operationId":"returns_pretty_returns_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/index-vn.html":{"get":{"summary":"Index Vn Page","operationId":"index_vn_page_index_vn_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Index Vn Page","operationId":"index_vn_page_index_vn_html_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/pricing-vn.html":{"get":{"summary":"Pricing Vn Page","operationId":"pricing_vn_page_pricing_vn_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Pricing Vn Page","operationId":"pricing_vn_page_pricing_vn_html_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/docs-vn.html":{"get":{"summary":"Docs Vn Page","operationId":"docs_vn_page_docs_vn_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Docs Vn Page","operationId":"docs_vn_page_docs_vn_html_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/security-vn.html":{"get":{"summary":"Security Vn Page","operationId":"security_vn_page_security_vn_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Security Vn Page","operationId":"security_vn_page_security_vn_html_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/changelog-vn.html":{"get":{"summary":"Changelog Vn Page","operationId":"changelog_vn_page_changelog_vn_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Changelog Vn Page","operationId":"changelog_vn_page_changelog_vn_html_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/customers-vn.html":{"get":{"summary":"Customers Vn Page","operationId":"customers_vn_page_customers_vn_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Customers Vn Page","operationId":"customers_vn_page_customers_vn_html_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/demo.html":{"get":{"summary":"Demo Page","operationId":"demo_page_demo_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Demo Page","operationId":"demo_page_demo_html_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/demo-vn.html":{"get":{"summary":"Demo Vn Page","operationId":"demo_vn_page_demo_vn_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Demo Vn Page","operationId":"demo_vn_page_demo_vn_html_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/security":{"get":{"summary":"Security Alias","operationId":"security_alias_security_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Security Alias","operationId":"security_alias_security_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/changelog":{"get":{"summary":"Changelog Alias","operationId":"changelog_alias_changelog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Changelog Alias","operationId":"changelog_alias_changelog_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/customers":{"get":{"summary":"Customers Alias","operationId":"customers_alias_customers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Customers Alias","operationId":"customers_alias_customers_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/pricing":{"get":{"summary":"Pricing Alias","operationId":"pricing_alias_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Pricing Alias","operationId":"pricing_alias_pricing_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin":{"get":{"summary":"Admin Panel","operationId":"admin_panel_admin_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/install.ps1":{"get":{"summary":"Install Ps1","operationId":"install_ps1_install_ps1_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/install.sh":{"get":{"summary":"Install Sh","operationId":"install_sh_install_sh_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/install/{path}":{"get":{"summary":"Install File","description":"Serve whitelisted installer assets.\n\nPublic + unauthenticated. Bound to ~60 requests/IP/min via an in-memory\nleaky bucket so a single client can't be used as a DoS amplifier\n(BUG-71). Multi-worker deployments inherit BUG-11's \"N× quota\" caveat\nuntil the rate-limit moves to a shared store.","operationId":"install_file_install__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AbandonRequest":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason"}},"type":"object","title":"AbandonRequest"},"AchieveRequest":{"properties":{"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"}},"type":"object","title":"AchieveRequest"},"ActionResponse":{"properties":{"status":{"type":"string","title":"Status"},"proposal_id":{"type":"integer","title":"Proposal Id"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result"}},"type":"object","required":["status","proposal_id"],"title":"ActionResponse"},"AddMessageRequest":{"properties":{"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["role","content"],"title":"AddMessageRequest","description":"Request to add a message to a conversation."},"AddMessageResponse":{"properties":{"status":{"type":"string","title":"Status"},"message_id":{"type":"integer","title":"Message Id"},"message":{"type":"string","title":"Message","default":"Message added successfully"}},"type":"object","required":["status","message_id"],"title":"AddMessageResponse","description":"Response from adding a message."},"AgentResponse":{"properties":{"id":{"type":"integer","title":"Id"},"agent_id":{"type":"string","title":"Agent Id"},"role":{"type":"string","title":"Role"},"scope":{"type":"string","title":"Scope"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","agent_id","role","scope","created_at"],"title":"AgentResponse"},"AnchorVerifyRequest":{"properties":{"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"results":{"items":{"$ref":"#/components/schemas/AnchorVerifyResult"},"type":"array","maxItems":500,"title":"Results"}},"type":"object","title":"AnchorVerifyRequest"},"AnchorVerifyResponse":{"properties":{"fresh":{"type":"integer","title":"Fresh","default":0},"stale":{"type":"integer","title":"Stale","default":0},"orphaned":{"type":"integer","title":"Orphaned","default":0},"baselined":{"type":"integer","title":"Baselined","default":0}},"type":"object","title":"AnchorVerifyResponse"},"AnchorVerifyResult":{"properties":{"id":{"type":"integer","title":"Id"},"current_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Hash"},"exists":{"type":"boolean","title":"Exists","default":true},"symbol_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol Name"},"symbol_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol Kind"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"}},"type":"object","required":["id"],"title":"AnchorVerifyResult","description":"One per-anchor verification result computed client-side."},"AppendBlockBody":{"properties":{"content":{"type":"string","title":"Content"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},"type":"object","required":["content"],"title":"AppendBlockBody"},"ApproveRequest":{"properties":{"approved_by":{"type":"string","title":"Approved By"}},"type":"object","required":["approved_by"],"title":"ApproveRequest"},"ArchiveContextResponse":{"properties":{"archive":{"additionalProperties":true,"type":"object","title":"Archive"},"original_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Content"},"original_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Original Metadata"},"delta_history":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Delta History"},"archive_reason":{"type":"string","title":"Archive Reason"},"reason_detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason Detail"},"retention_until":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Retention Until"},"can_restore":{"type":"boolean","title":"Can Restore"},"restored_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Restored At"}},"type":"object","required":["archive","archive_reason","can_restore"],"title":"ArchiveContextResponse"},"ArchiveListResponse":{"properties":{"archives":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Archives"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["archives","total"],"title":"ArchiveListResponse"},"ArchiveRequest":{"properties":{"chunk_id":{"type":"integer","title":"Chunk Id"},"reason":{"type":"string","title":"Reason"},"reason_detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason Detail"},"retention_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retention Days"},"can_restore":{"type":"boolean","title":"Can Restore","default":true}},"type":"object","required":["chunk_id","reason"],"title":"ArchiveRequest"},"ArchiveResponse":{"properties":{"archive_id":{"type":"integer","title":"Archive Id"},"chunk_id":{"type":"integer","title":"Chunk Id"},"reason":{"type":"string","title":"Reason"},"status":{"type":"string","title":"Status","default":"archived"}},"type":"object","required":["archive_id","chunk_id","reason"],"title":"ArchiveResponse"},"ArtifactStateResponse":{"properties":{"artifacts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Artifacts"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["artifacts","total"],"title":"ArtifactStateResponse"},"BankInfo":{"properties":{"name":{"type":"string","title":"Name"},"entries":{"type":"integer","title":"Entries","default":0},"tokens":{"type":"integer","title":"Tokens","default":0},"digests":{"type":"integer","title":"Digests","default":0}},"type":"object","required":["name"],"title":"BankInfo"},"BatchContextRequest":{"properties":{"queries":{"items":{"type":"string"},"type":"array","title":"Queries","description":"List of queries to get context for"},"max_per_query":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Max Per Query","default":3},"memory_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Memory Types"}},"type":"object","required":["queries"],"title":"BatchContextRequest","description":"Request for batch context injection."},"BatchContextResponse":{"properties":{"results":{"additionalProperties":{"$ref":"#/components/schemas/ContextRecallResponse"},"type":"object","title":"Results"}},"type":"object","required":["results"],"title":"BatchContextResponse","description":"Batch context response."},"BenchmarkRequest":{"properties":{"query":{"type":"string","maxLength":2000,"minLength":1,"title":"Query"},"model":{"type":"string","title":"Model","description":"LLM whose pricing to apply","default":"claude-opus-4-6"},"naive_budget_tokens":{"type":"integer","maximum":10000000.0,"minimum":1000.0,"title":"Naive Budget Tokens","description":"Cap on full-context dump (default 200K = Claude window)","default":200000},"smart_top_k":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Smart Top K","default":8},"smart_depth":{"type":"string","title":"Smart Depth","description":"instant | fast | deep","default":"deep"}},"type":"object","required":["query"],"title":"BenchmarkRequest"},"Body_import_brain_file_v1_brain_import_file_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_import_brain_file_v1_brain_import_file_post"},"Body_ingest_pdf_v1_wiki_ingest_pdf_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"tags":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},"type":"object","required":["file"],"title":"Body_ingest_pdf_v1_wiki_ingest_pdf_post"},"BootstrapRequest":{"properties":{"task_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Description"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"max_tokens":{"type":"integer","title":"Max Tokens","default":4000},"include_entities":{"type":"boolean","title":"Include Entities","default":true},"include_recent":{"type":"boolean","title":"Include Recent","default":true},"include_preferences":{"type":"boolean","title":"Include Preferences","default":true},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode"},"token_budget":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Token Budget"}},"type":"object","title":"BootstrapRequest"},"BootstrapResponse":{"properties":{"context_block":{"type":"string","title":"Context Block"},"sections":{"additionalProperties":true,"type":"object","title":"Sections"},"tokens_used":{"type":"integer","title":"Tokens Used","default":0},"memories_included":{"type":"integer","title":"Memories Included","default":0}},"type":"object","required":["context_block","sections"],"title":"BootstrapResponse"},"BotBootstrapRequest":{"properties":{"task":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task"},"limit":{"type":"integer","title":"Limit","default":10},"mode":{"type":"string","title":"Mode","default":"default"}},"type":"object","title":"BotBootstrapRequest"},"BotBootstrapResponse":{"properties":{"context_block":{"type":"string","title":"Context Block"},"tokens_used":{"type":"integer","title":"Tokens Used"},"memories_included":{"type":"integer","title":"Memories Included"},"l2_sessions_included":{"type":"integer","title":"L2 Sessions Included","default":0}},"type":"object","required":["context_block","tokens_used","memories_included"],"title":"BotBootstrapResponse"},"BotGuardCheckRequest":{"properties":{"estimated_tokens":{"type":"integer","title":"Estimated Tokens"},"max_tokens":{"type":"integer","title":"Max Tokens","default":200000},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"compress_threshold":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Compress Threshold"},"compact_at_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Compact At Tokens"},"critical_at_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Critical At Tokens"},"compact_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Compact Pct"},"critical_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Critical Pct"}},"type":"object","required":["estimated_tokens"],"title":"BotGuardCheckRequest"},"BotGuardCheckResponse":{"properties":{"usage_percent":{"type":"number","title":"Usage Percent"},"recommendation":{"type":"string","title":"Recommendation"},"urgency":{"type":"string","title":"Urgency"},"should_compact":{"type":"boolean","title":"Should Compact"},"should_spawn_new_session":{"type":"boolean","title":"Should Spawn New Session"},"spawn_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Spawn Reason"},"compress_threshold":{"type":"integer","title":"Compress Threshold"},"compact_at_tokens":{"type":"integer","title":"Compact At Tokens"},"critical_at_tokens":{"type":"integer","title":"Critical At Tokens"},"dna_memories":{"type":"integer","title":"Dna Memories"},"bootstrap_ready":{"type":"boolean","title":"Bootstrap Ready"},"hard_cap_tokens":{"type":"integer","title":"Hard Cap Tokens","default":0},"plan":{"type":"string","title":"Plan","default":"free"}},"type":"object","required":["usage_percent","recommendation","urgency","should_compact","should_spawn_new_session","compress_threshold","compact_at_tokens","critical_at_tokens","dna_memories","bootstrap_ready"],"title":"BotGuardCheckResponse"},"BotRecallRequest":{"properties":{"query":{"type":"string","title":"Query"},"depth":{"type":"string","title":"Depth","default":"deep"},"limit":{"type":"integer","title":"Limit","default":10},"min_score":{"type":"number","title":"Min Score","default":0.0},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"since":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since"}},"type":"object","required":["query"],"title":"BotRecallRequest"},"BotRecallResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/BotRecallResult"},"type":"array","title":"Results"},"query_time_ms":{"type":"number","title":"Query Time Ms"},"layers_searched":{"items":{"type":"string"},"type":"array","title":"Layers Searched"},"total_before_dedup":{"type":"integer","title":"Total Before Dedup"}},"type":"object","required":["results","query_time_ms","layers_searched","total_before_dedup"],"title":"BotRecallResponse"},"BotRecallResult":{"properties":{"content":{"type":"string","title":"Content"},"score":{"type":"number","title":"Score"},"layer":{"type":"string","title":"Layer"},"memory_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory Type"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}},"type":"object","required":["content","score","layer"],"title":"BotRecallResult"},"BrainQueryRequest":{"properties":{"query":{"type":"string","minLength":1,"title":"Query"},"limit":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Limit","default":5},"wiki_limit":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Wiki Limit","default":3},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"mode":{"anyOf":[{"type":"string","pattern":"^(memory|wiki|hybrid|llm)$"},{"type":"null"}],"title":"Mode"}},"type":"object","required":["query"],"title":"BrainQueryRequest"},"BulkArchiveRequest":{"properties":{"chunk_ids":{"items":{"type":"integer"},"type":"array","title":"Chunk Ids"},"reason":{"type":"string","title":"Reason"},"reason_detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason Detail"},"retention_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retention Days"}},"type":"object","required":["chunk_ids","reason"],"title":"BulkArchiveRequest"},"BulkArchiveResponse":{"properties":{"archive_ids":{"items":{"type":"integer"},"type":"array","title":"Archive Ids"},"count":{"type":"integer","title":"Count"},"status":{"type":"string","title":"Status","default":"archived"}},"type":"object","required":["archive_ids","count"],"title":"BulkArchiveResponse"},"ChainDetail":{"properties":{"chain_id":{"type":"integer","title":"Chain Id"},"topic":{"type":"string","title":"Topic"},"pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pattern"},"prediction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prediction"},"confidence":{"type":"number","title":"Confidence"},"synthesized_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Synthesized At"},"decisions":{"items":{"$ref":"#/components/schemas/DecisionItem"},"type":"array","title":"Decisions"}},"type":"object","required":["chain_id","topic","confidence","decisions"],"title":"ChainDetail"},"ChainSummary":{"properties":{"topic":{"type":"string","title":"Topic"},"pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pattern"},"prediction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prediction"},"confidence":{"type":"number","title":"Confidence"},"decision_count":{"type":"integer","title":"Decision Count"},"synthesized_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Synthesized At"}},"type":"object","required":["topic","confidence","decision_count"],"title":"ChainSummary"},"ChangeEntry":{"properties":{"type":{"type":"string","title":"Type"},"content":{"type":"string","title":"Content"},"memory_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory Type"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"old_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Old Content"}},"type":"object","required":["type","content"],"title":"ChangeEntry"},"ChangelogRequest":{"properties":{"since":{"type":"string","title":"Since","description":"ISO datetime — show changes after this time"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"limit":{"type":"integer","title":"Limit","default":50}},"type":"object","required":["since"],"title":"ChangelogRequest"},"ChangelogResponse":{"properties":{"changes":{"items":{"$ref":"#/components/schemas/ChangeEntry"},"type":"array","title":"Changes"},"count":{"type":"integer","title":"Count"},"since":{"type":"string","title":"Since"},"message":{"type":"string","title":"Message","default":""}},"type":"object","required":["changes","count","since"],"title":"ChangelogResponse"},"CodeAnchorIn":{"properties":{"file_path":{"type":"string","maxLength":512,"minLength":1,"title":"File Path"},"line_start":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Line Start"},"line_end":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Line End"}},"type":"object","required":["file_path"],"title":"CodeAnchorIn","description":"Code Anchors P1: location the agent declares at store time.\n\nNo hash here — the agent (inside an MCP tool) cannot cheaply hash the\non-disk file at the right moment. The wrapper computes the baseline hash on\nthe next bootstrap. line_start/line_end are 1-based inclusive; omit both for\na whole-file anchor."},"CodeAnchorOut":{"properties":{"id":{"type":"integer","title":"Id"},"file_path":{"type":"string","title":"File Path"},"line_start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Line Start"},"line_end":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Line End"},"anchor_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anchor Hash"},"anchor_kind":{"type":"string","title":"Anchor Kind","default":"line"},"symbol_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol Name"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"}},"type":"object","required":["id","file_path"],"title":"CodeAnchorOut","description":"Code Anchors P1/P2: an anchor the client must hash + verify on bootstrap."},"CompactRequest":{"properties":{"content":{"type":"string","title":"Content"},"task_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Context"},"strategy":{"type":"string","title":"Strategy","default":"chronological"},"preserve_tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Preserve Tags"},"create_snapshot":{"type":"boolean","title":"Create Snapshot","default":false}},"type":"object","required":["content"],"title":"CompactRequest"},"CompactResponse":{"properties":{"chunks_created":{"type":"integer","title":"Chunks Created","default":0},"chunks_deduplicated":{"type":"integer","title":"Chunks Deduplicated","default":0},"snapshot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snapshot Id"},"tokens_saved":{"type":"integer","title":"Tokens Saved","default":0},"zones_compressed":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Zones Compressed"}},"type":"object","title":"CompactResponse"},"CompleteRequest":{"properties":{"artifact_id":{"type":"string","title":"Artifact Id"},"execution_time_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Execution Time Ms"}},"type":"object","required":["artifact_id"],"title":"CompleteRequest"},"CompleteResponse":{"properties":{"status":{"type":"string","title":"Status","default":"completed"},"artifact_type":{"type":"string","title":"Artifact Type"},"artifact_id":{"type":"string","title":"Artifact Id"}},"type":"object","required":["artifact_type","artifact_id"],"title":"CompleteResponse"},"ConfirmRequest":{"properties":{"trait_name":{"type":"string","title":"Trait Name","description":"Snake_case trait name to confirm/deny"},"confirmed":{"type":"boolean","title":"Confirmed","description":"True = yes this is me, False = no it's not"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional user note"}},"type":"object","required":["trait_name","confirmed"],"title":"ConfirmRequest"},"ConfirmResponse":{"properties":{"status":{"type":"string","title":"Status"},"trait":{"type":"string","title":"Trait"},"confirmed":{"type":"boolean","title":"Confirmed"}},"type":"object","required":["status","trait","confirmed"],"title":"ConfirmResponse"},"ConnectRequest":{"properties":{"target_agent_id":{"type":"string","title":"Target Agent Id"},"edge_type":{"type":"string","title":"Edge Type","description":"colleague|mentor|subordinate|specialist_for","default":"colleague"},"trust_weight":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Trust Weight","default":1.0},"bidirectional":{"type":"boolean","title":"Bidirectional","default":false}},"type":"object","required":["target_agent_id"],"title":"ConnectRequest"},"ContextCheckResponse":{"properties":{"total_tokens_est":{"type":"integer","title":"Total Tokens Est","default":0},"total_chars":{"type":"integer","title":"Total Chars","default":0},"chunk_count":{"type":"integer","title":"Chunk Count","default":0},"urgency":{"type":"string","title":"Urgency","default":"low"}},"type":"object","title":"ContextCheckResponse"},"ContextCompactRequest":{"properties":{"content":{"type":"string","title":"Content"},"task_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Context"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["content"],"title":"ContextCompactRequest"},"ContextCompactResponse":{"properties":{"chunks_created":{"type":"integer","title":"Chunks Created","default":0},"chunks_deduplicated":{"type":"integer","title":"Chunks Deduplicated","default":0},"index":{"items":{"$ref":"#/components/schemas/IndexEntry"},"type":"array","title":"Index"}},"type":"object","title":"ContextCompactResponse"},"ContextHealthResponse":{"properties":{"status":{"type":"string","title":"Status","default":"healthy"},"context_tokens_est":{"type":"integer","title":"Context Tokens Est","default":0},"urgency":{"type":"string","title":"Urgency","default":"low"},"wal_pending":{"type":"integer","title":"Wal Pending","default":0},"snapshot_age_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Snapshot Age Hours"},"stale_chunks":{"type":"integer","title":"Stale Chunks","default":0},"ghost_chunks":{"type":"integer","title":"Ghost Chunks","default":0},"dna_memories":{"type":"integer","title":"Dna Memories","default":0}},"type":"object","title":"ContextHealthResponse"},"ContextMonitorRequest":{"properties":{"current_tokens":{"type":"integer","title":"Current Tokens"},"max_tokens":{"type":"integer","title":"Max Tokens","default":200000},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}},"type":"object","required":["current_tokens"],"title":"ContextMonitorRequest"},"ContextMonitorResponse":{"properties":{"usage_percent":{"type":"number","title":"Usage Percent"},"should_compact":{"type":"boolean","title":"Should Compact"},"threshold":{"type":"integer","title":"Threshold","default":85},"estimated_tokens_remaining":{"type":"integer","title":"Estimated Tokens Remaining"},"recommendation":{"type":"string","title":"Recommendation"},"hot_memories_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hot Memories Count"},"stale_memories_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stale Memories Count"}},"type":"object","required":["usage_percent","should_compact","estimated_tokens_remaining","recommendation"],"title":"ContextMonitorResponse"},"ContextRecallRequest":{"properties":{"query":{"type":"string","title":"Query","description":"Search query to find relevant context"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id","description":"Current conversation ID"},"max_memories":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Max Memories","description":"Max memories to return","default":5},"memory_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Memory Types","description":"Filter by memory types: user/feedback/project/reference"},"inject_format":{"type":"string","enum":["system_prompt","xml_tags","json"],"title":"Inject Format","description":"Output format for injection","default":"system_prompt"},"min_confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Min Confidence","description":"Minimum confidence score","default":0.5}},"type":"object","required":["query"],"title":"ContextRecallRequest","description":"Request for context injection.\n\n## Formats\n- `system_prompt`: Markdown format for system prompts\n- `xml_tags`: XML-wrapped memories for structured context\n- `json`: JSON array for programmatic use"},"ContextRecallResponse":{"properties":{"memories":{"items":{"$ref":"#/components/schemas/MemoryItem"},"type":"array","title":"Memories"},"formatted_context":{"type":"string","title":"Formatted Context"},"token_count":{"type":"integer","title":"Token Count"},"injection_ready":{"type":"boolean","title":"Injection Ready"},"query_time_ms":{"type":"number","title":"Query Time Ms"}},"type":"object","required":["memories","formatted_context","token_count","injection_ready","query_time_ms"],"title":"ContextRecallResponse","description":"Response with formatted context.\n\nReady to inject into AI agent system prompt."},"ContextRestoreRequest":{"properties":{"task_description":{"type":"string","title":"Task Description"},"limit":{"type":"integer","title":"Limit","default":5},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"}},"type":"object","required":["task_description"],"title":"ContextRestoreRequest"},"ContextRestoreResponse":{"properties":{"chunks":{"items":{"$ref":"#/components/schemas/RestoredChunk"},"type":"array","title":"Chunks"},"total_tokens_est":{"type":"integer","title":"Total Tokens Est","default":0},"count":{"type":"integer","title":"Count","default":0}},"type":"object","title":"ContextRestoreResponse"},"ConversationStatusResponse":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"status":{"type":"string","title":"Status"},"message_count":{"type":"integer","title":"Message Count"},"started_at":{"type":"string","title":"Started At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"extraction":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extraction"}},"type":"object","required":["conversation_id","status","message_count","started_at","ended_at","metadata"],"title":"ConversationStatusResponse","description":"Conversation status response."},"ConversationTurn":{"properties":{"role":{"type":"string","title":"Role","default":"user"},"content":{"type":"string","title":"Content"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["content"],"title":"ConversationTurn"},"CreateBlockBody":{"properties":{"block_name":{"type":"string","title":"Block Name"},"content":{"type":"string","title":"Content","default":""},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},"type":"object","required":["block_name"],"title":"CreateBlockBody"},"CreateGoalRequest":{"properties":{"content":{"type":"string","maxLength":2000,"minLength":3,"title":"Content"},"target_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Target Date"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"importance":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Importance","default":0.7}},"type":"object","required":["content"],"title":"CreateGoalRequest"},"DecisionItem":{"properties":{"id":{"type":"integer","title":"Id"},"content":{"type":"string","title":"Content"},"why":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Why"},"alternatives":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Alternatives"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"At"},"still_valid":{"type":"boolean","title":"Still Valid","default":true}},"type":"object","required":["id","content"],"title":"DecisionItem"},"DeltaApplyRequest":{"properties":{"chunk_id":{"type":"integer","title":"Chunk Id"},"field_path":{"type":"string","title":"Field Path"},"new_value":{"title":"New Value"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"change_source":{"type":"string","title":"Change Source","default":"user_request"},"force":{"type":"boolean","title":"Force","default":false}},"type":"object","required":["chunk_id","field_path","new_value"],"title":"DeltaApplyRequest"},"DeltaApplyResponse":{"properties":{"delta_id":{"type":"integer","title":"Delta Id"},"chunk_id":{"type":"integer","title":"Chunk Id"},"field_path":{"type":"string","title":"Field Path"},"old_value":{"title":"Old Value"},"new_value":{"title":"New Value"},"action":{"type":"string","title":"Action","default":"modified"}},"type":"object","required":["delta_id","chunk_id","field_path"],"title":"DeltaApplyResponse"},"DeltaHistoryResponse":{"properties":{"chunk_id":{"type":"integer","title":"Chunk Id"},"deltas":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Deltas"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["chunk_id","deltas","total"],"title":"DeltaHistoryResponse"},"DeltaRollbackRequest":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"DeltaRollbackRequest"},"DeltaRollbackResponse":{"properties":{"status":{"type":"string","title":"Status"},"delta_id":{"type":"integer","title":"Delta Id"},"chunk_id":{"type":"integer","title":"Chunk Id"},"field":{"type":"string","title":"Field"},"restored_value":{"title":"Restored Value"}},"type":"object","required":["status","delta_id","chunk_id","field"],"title":"DeltaRollbackResponse"},"DeltaStatsResponse":{"properties":{"total_deltas":{"type":"integer","title":"Total Deltas"},"by_action":{"additionalProperties":true,"type":"object","title":"By Action"},"days":{"type":"integer","title":"Days"},"daily":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Daily"}},"type":"object","required":["total_deltas","by_action","days","daily"],"title":"DeltaStatsResponse"},"DependencyCheckResponse":{"properties":{"ready":{"type":"boolean","title":"Ready"},"blocked_by":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Blocked By"},"missing":{"items":{"type":"string"},"type":"array","title":"Missing"}},"type":"object","required":["ready","blocked_by","missing"],"title":"DependencyCheckResponse"},"DeprecatedSyncResponse":{"properties":{"status":{"type":"string","title":"Status","default":"deprecated"},"message":{"type":"string","title":"Message"},"replacement_endpoints":{"items":{"type":"string"},"type":"array","title":"Replacement Endpoints"},"removal_version":{"type":"string","title":"Removal Version","default":"2.4.0"}},"type":"object","required":["message","replacement_endpoints"],"title":"DeprecatedSyncResponse","description":"200-with-deprecation envelope returned by the legacy sync endpoint."},"DetailedHealthResponse":{"properties":{"status":{"type":"string","title":"Status","default":"healthy"},"memory_usage_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Memory Usage Percent"},"hot_chunks":{"type":"integer","title":"Hot Chunks","default":0},"warm_chunks":{"type":"integer","title":"Warm Chunks","default":0},"cold_chunks":{"type":"integer","title":"Cold Chunks","default":0},"stale_chunks":{"type":"integer","title":"Stale Chunks","default":0},"entities_count":{"type":"integer","title":"Entities Count","default":0},"total_chunks":{"type":"integer","title":"Total Chunks","default":0},"oldest_chunk_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Oldest Chunk Days"},"recommendations":{"items":{"type":"string"},"type":"array","title":"Recommendations"}},"type":"object","title":"DetailedHealthResponse"},"EndConversationResponse":{"properties":{"status":{"type":"string","title":"Status"},"extraction_scheduled":{"type":"boolean","title":"Extraction Scheduled"},"message":{"type":"string","title":"Message"},"conversation_id":{"type":"string","title":"Conversation Id"}},"type":"object","required":["status","extraction_scheduled","message","conversation_id"],"title":"EndConversationResponse","description":"Response from ending a conversation."},"EntityChunksResponse":{"properties":{"entity_name":{"type":"string","title":"Entity Name"},"chunk_ids":{"items":{"type":"integer"},"type":"array","title":"Chunk Ids"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["entity_name","chunk_ids","total"],"title":"EntityChunksResponse"},"EntityInfo":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"entity_type":{"type":"string","title":"Entity Type"},"mention_count":{"type":"integer","title":"Mention Count"},"first_seen":{"type":"string","title":"First Seen"},"last_seen":{"type":"string","title":"Last Seen"}},"type":"object","required":["id","name","entity_type","mention_count","first_seen","last_seen"],"title":"EntityInfo"},"EntityListResponse":{"properties":{"entities":{"items":{"$ref":"#/components/schemas/EntityInfo"},"type":"array","title":"Entities"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["entities","total"],"title":"EntityListResponse"},"ExportRequest":{"properties":{"scope":{"type":"string","title":"Scope","description":"full | dna_only | since","default":"full"},"since":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since","description":"ISO8601 datetime, only for scope=since"}},"type":"object","title":"ExportRequest"},"ExtractRequest":{"properties":{"conversation":{"type":"string","title":"Conversation"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","default":"auto-extract"},"store":{"type":"boolean","title":"Store","default":true}},"type":"object","required":["conversation"],"title":"ExtractRequest"},"ExtractResponse":{"properties":{"facts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Facts"},"added":{"type":"integer","title":"Added","default":0},"updated":{"type":"integer","title":"Updated","default":0},"skipped":{"type":"integer","title":"Skipped","default":0}},"type":"object","title":"ExtractResponse"},"FederatedRecallRequest":{"properties":{"grant_id":{"type":"integer","minimum":1.0,"title":"Grant Id"},"query":{"type":"string","maxLength":2000,"minLength":1,"title":"Query"},"limit":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Limit","default":5}},"type":"object","required":["grant_id","query"],"title":"FederatedRecallRequest"},"FeedbackResponse":{"properties":{"status":{"type":"string","title":"Status"},"chunks_boosted":{"type":"integer","title":"Chunks Boosted","default":0},"chunks_demoted":{"type":"integer","title":"Chunks Demoted","default":0},"message":{"type":"string","title":"Message","default":""}},"type":"object","required":["status"],"title":"FeedbackResponse"},"ForgetRequest":{"properties":{"query":{"type":"string","title":"Query","description":"Search query to find memories to forget"},"scope":{"type":"string","title":"Scope","description":"partial/full/temporary","default":"partial"},"duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration","description":"Hours for temporary forget"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Reason for audit trail"}},"type":"object","required":["query"],"title":"ForgetRequest","description":"Request to forget memories.\n\n## Scopes\n- `partial`: Hide from recall, keep in DB (reversible)\n- `full`: Soft delete (reversible with admin)\n- `temporary`: Hide for specified duration"},"ForgetResponse":{"properties":{"matched_chunks":{"type":"integer","title":"Matched Chunks"},"action":{"type":"string","title":"Action"},"chunk_ids":{"items":{"type":"integer"},"type":"array","title":"Chunk Ids"},"rollback_available":{"type":"boolean","title":"Rollback Available"},"message":{"type":"string","title":"Message"}},"type":"object","required":["matched_chunks","action","chunk_ids","rollback_available","message"],"title":"ForgetResponse","description":"Response from forget operation."},"GrantBody":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"permission":{"type":"string","title":"Permission","default":"readwrite"}},"type":"object","required":["agent_id"],"title":"GrantBody"},"GrantRequest":{"properties":{"grantee_tenant_id":{"type":"string","maxLength":64,"minLength":8,"title":"Grantee Tenant Id"},"permission":{"type":"string","pattern":"^(read|ask)$","title":"Permission","default":"read"},"tag_filter":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tag Filter"},"include_dna":{"type":"boolean","title":"Include Dna","default":false},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At","description":"ISO8601 datetime or null for permanent"},"price_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Price Cents"}},"type":"object","required":["grantee_tenant_id"],"title":"GrantRequest"},"GraphCluster":{"properties":{"cluster_id":{"type":"integer","title":"Cluster Id"},"label":{"type":"string","title":"Label"},"chunk_ids":{"items":{"type":"integer"},"type":"array","title":"Chunk Ids"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["cluster_id","label","chunk_ids","size"],"title":"GraphCluster"},"GraphClustersResponse":{"properties":{"clusters":{"items":{"$ref":"#/components/schemas/GraphCluster"},"type":"array","title":"Clusters"},"total_clusters":{"type":"integer","title":"Total Clusters"}},"type":"object","required":["clusters","total_clusters"],"title":"GraphClustersResponse"},"GraphNeighborResult":{"properties":{"chunk_id":{"type":"integer","title":"Chunk Id"},"content":{"type":"string","title":"Content"},"score":{"type":"number","title":"Score"},"relationship":{"type":"string","title":"Relationship","default":"associated"},"shared_neurons":{"items":{"type":"string"},"type":"array","title":"Shared Neurons"}},"type":"object","required":["chunk_id","content","score"],"title":"GraphNeighborResult"},"GraphNeighborsResponse":{"properties":{"anchor_id":{"type":"integer","title":"Anchor Id"},"neighbors":{"items":{"$ref":"#/components/schemas/GraphNeighborResult"},"type":"array","title":"Neighbors"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["anchor_id","neighbors","total"],"title":"GraphNeighborsResponse"},"GuardBootstrapRequest":{"properties":{"task":{"type":"string","title":"Task"},"limit":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Limit","default":10},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}},"type":"object","required":["task"],"title":"GuardBootstrapRequest"},"GuardBootstrapResponse":{"properties":{"context_block":{"type":"string","title":"Context Block"},"memories_restored":{"type":"integer","title":"Memories Restored","default":0},"tokens_used":{"type":"integer","title":"Tokens Used","default":0},"dna_memories":{"type":"integer","title":"Dna Memories","default":0},"brain_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brain Name"},"brain_age_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Brain Age Days"},"last_dream_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Dream At"},"code_anchors":{"items":{"$ref":"#/components/schemas/CodeAnchorOut"},"type":"array","title":"Code Anchors"}},"type":"object","required":["context_block"],"title":"GuardBootstrapResponse"},"GuardCheckRequest":{"properties":{"estimated_tokens":{"type":"integer","title":"Estimated Tokens"},"max_tokens":{"type":"integer","title":"Max Tokens","default":200000},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"task":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task"},"source":{"anyOf":[{"type":"string","pattern":"^(mcp|rest|heuristic)$"},{"type":"null"}],"title":"Source","default":"rest"},"compact_at_tokens":{"anyOf":[{"type":"integer","maximum":2000000.0,"minimum":1.0},{"type":"null"}],"title":"Compact At Tokens","description":"Absolute token threshold for compact_soon (e.g. 100000)."},"critical_at_tokens":{"anyOf":[{"type":"integer","maximum":2000000.0,"minimum":1.0},{"type":"null"}],"title":"Critical At Tokens","description":"Absolute token threshold for compact_now (e.g. 150000)."},"compact_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Compact Pct"},"critical_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Critical Pct"}},"type":"object","required":["estimated_tokens"],"title":"GuardCheckRequest"},"GuardCheckResponse":{"properties":{"usage_percent":{"type":"number","title":"Usage Percent"},"recommendation":{"type":"string","title":"Recommendation"},"urgency":{"type":"string","title":"Urgency"},"compact_at_tokens":{"type":"integer","title":"Compact At Tokens"},"critical_at_tokens":{"type":"integer","title":"Critical At Tokens"},"message":{"type":"string","title":"Message"},"should_compact":{"type":"boolean","title":"Should Compact"},"should_snapshot":{"type":"boolean","title":"Should Snapshot"},"bootstrap_ready":{"type":"boolean","title":"Bootstrap Ready"},"hot_memories":{"type":"integer","title":"Hot Memories","default":0},"stale_memories":{"type":"integer","title":"Stale Memories","default":0},"wal_pending":{"type":"integer","title":"Wal Pending","default":0},"dna_memories":{"type":"integer","title":"Dna Memories","default":0},"last_compact_minutes_ago":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Last Compact Minutes Ago"}},"type":"object","required":["usage_percent","recommendation","urgency","compact_at_tokens","critical_at_tokens","message","should_compact","should_snapshot","bootstrap_ready"],"title":"GuardCheckResponse"},"GuardCompactRequest":{"properties":{"content":{"type":"string","title":"Content"},"task_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Context"},"create_snapshot":{"type":"boolean","title":"Create Snapshot","default":true},"blocking":{"type":"boolean","title":"Blocking","default":false},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"tail_messages":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tail Messages"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"}},"type":"object","required":["content"],"title":"GuardCompactRequest"},"GuardCompactResponse":{"properties":{"status":{"type":"string","title":"Status"},"task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id"},"chunks_created":{"type":"integer","title":"Chunks Created","default":0},"chunks_deduplicated":{"type":"integer","title":"Chunks Deduplicated","default":0},"message":{"type":"string","title":"Message"}},"type":"object","required":["status","message"],"title":"GuardCompactResponse"},"GuardCompactStatusResponse":{"properties":{"task_id":{"type":"string","title":"Task Id"},"status":{"type":"string","title":"Status"},"chunks_created":{"type":"integer","title":"Chunks Created","default":0},"chunks_deduplicated":{"type":"integer","title":"Chunks Deduplicated","default":0},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["task_id","status"],"title":"GuardCompactStatusResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HandoffCompleteRequest":{"properties":{"handoff_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handoff Id","description":"Specific handoff ID, or None for latest pending"},"archive_to_memory":{"type":"boolean","title":"Archive To Memory","description":"Store old conversation as MemoryAI chunks","default":true}},"type":"object","title":"HandoffCompleteRequest"},"HandoffCompleteResponse":{"properties":{"handoff_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handoff Id"},"status":{"type":"string","title":"Status","default":"not_found"},"chunks_archived":{"type":"integer","title":"Chunks Archived","default":0}},"type":"object","title":"HandoffCompleteResponse"},"HandoffRequest":{"properties":{"to_agent_id":{"type":"string","title":"To Agent Id"},"handoff_type":{"type":"string","title":"Handoff Type","description":"task_transfer|context_sharing|delegation|escalation","default":"task_transfer"},"relevant_chunk_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Relevant Chunk Ids"},"causal_chain_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Causal Chain Ids"},"shared_block_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Shared Block Names"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"}},"type":"object","required":["to_agent_id"],"title":"HandoffRequest"},"HandoffRestoreRequest":{"properties":{"handoff_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handoff Id","description":"Specific handoff ID, or None for latest pending"},"include_memories":{"type":"boolean","title":"Include Memories","description":"Also include related MemoryAI memories","default":true},"memory_limit":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Memory Limit","description":"Max related memories to include","default":5}},"type":"object","title":"HandoffRestoreRequest"},"HandoffRestoreResponse":{"properties":{"handoff_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handoff Id"},"conversation":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Conversation"},"memories":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Memories"},"turns_count":{"type":"integer","title":"Turns Count","default":0},"tokens_snapshot":{"type":"integer","title":"Tokens Snapshot","default":0},"status":{"type":"string","title":"Status","default":"not_found"},"created_at":{"type":"string","title":"Created At","default":""}},"type":"object","title":"HandoffRestoreResponse"},"HandoffStartRequest":{"properties":{"conversation":{"items":{"$ref":"#/components/schemas/ConversationTurn"},"type":"array","maxItems":100,"minItems":1,"title":"Conversation","description":"Last N turns from old session"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Platform info: {platform, session_id, model, etc.}"}},"type":"object","required":["conversation"],"title":"HandoffStartRequest"},"HandoffStartResponse":{"properties":{"handoff_id":{"type":"string","title":"Handoff Id"},"turns_stored":{"type":"integer","title":"Turns Stored"},"status":{"type":"string","title":"Status","default":"pending"}},"type":"object","required":["handoff_id","turns_stored"],"title":"HandoffStartResponse"},"HandoffStatusResponse":{"properties":{"active":{"type":"boolean","title":"Active","default":false},"handoff_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handoff Id"},"status":{"type":"string","title":"Status","default":"none"},"turns_count":{"type":"integer","title":"Turns Count","default":0},"tokens_snapshot":{"type":"integer","title":"Tokens Snapshot","default":0},"created_at":{"type":"string","title":"Created At","default":""},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"archived_chunks":{"type":"integer","title":"Archived Chunks","default":0}},"type":"object","title":"HandoffStatusResponse"},"HeirRequest":{"properties":{"heir_tenant_id":{"type":"string","maxLength":64,"minLength":8,"title":"Heir Tenant Id"},"share":{"type":"number","maximum":1.0,"exclusiveMinimum":0.0,"title":"Share","default":1.0},"scope":{"type":"string","pattern":"^(full|dna_only|selected)$","title":"Scope","default":"full"},"message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Message"}},"type":"object","required":["heir_tenant_id"],"title":"HeirRequest"},"HistoryItem":{"properties":{"trait_name":{"type":"string","title":"Trait Name"},"old_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Old Confidence"},"new_confidence":{"type":"number","title":"New Confidence"},"old_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Old Description"},"new_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Description"},"trigger_type":{"type":"string","title":"Trigger Type"},"changed_at":{"type":"string","title":"Changed At"}},"type":"object","required":["trait_name","old_confidence","new_confidence","old_description","new_description","trigger_type","changed_at"],"title":"HistoryItem"},"IDETurnCheckRequest":{"properties":{"turn_count":{"type":"integer","maximum":10000.0,"minimum":0.0,"title":"Turn Count","description":"Number of assistant turns in this conversation."},"avg_tokens_per_turn":{"type":"integer","maximum":30000.0,"minimum":500.0,"title":"Avg Tokens Per Turn","description":"Calibration: typical tokens per turn for this client. Default 8000 covers code-review / agentic-dev workloads (chat-only is closer to 3000).","default":8000},"max_tokens":{"anyOf":[{"type":"integer","maximum":2000000.0,"minimum":10000.0},{"type":"null"}],"title":"Max Tokens","description":"Optional. The IDE's actual context window size. Omit to let the server resolve from model name OR from absolute thresholds (manual mode)."},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Optional model hint for window auto-detect when max_tokens not set explicitly."},"skip_below_turns":{"type":"integer","maximum":200.0,"minimum":0.0,"title":"Skip Below Turns","description":"Skip the check entirely until conversation reaches this many turns. Below = always SAFE.","default":10},"compact_at_tokens":{"anyOf":[{"type":"integer","maximum":2000000.0,"minimum":1.0},{"type":"null"}],"title":"Compact At Tokens","description":"Absolute compact_soon threshold in tokens (e.g. 100000). Wins over compact_pct when both supplied."},"critical_at_tokens":{"anyOf":[{"type":"integer","maximum":2000000.0,"minimum":1.0},{"type":"null"}],"title":"Critical At Tokens","description":"Absolute compact_now threshold in tokens (e.g. 150000). Wins over critical_pct when both supplied."},"compact_pct":{"anyOf":[{"type":"number","maximum":0.95,"minimum":0.05},{"type":"null"}],"title":"Compact Pct","description":"Override compact threshold as a fraction of max_tokens (e.g. 0.30 = warn at 30%)."},"critical_pct":{"anyOf":[{"type":"number","maximum":0.95,"minimum":0.05},{"type":"null"}],"title":"Critical Pct","description":"Override critical threshold as a fraction of max_tokens (e.g. 0.50 = compact at 50%)."}},"type":"object","required":["turn_count"],"title":"IDETurnCheckRequest","description":"Server-authoritative context-pressure check for IDE hooks."},"IDETurnCheckResponse":{"properties":{"skipped":{"type":"boolean","title":"Skipped","default":false},"estimated_tokens":{"type":"integer","title":"Estimated Tokens","default":0},"usage_percent":{"type":"number","title":"Usage Percent","default":0.0},"recommendation":{"type":"string","title":"Recommendation","default":"safe"},"urgency":{"type":"string","title":"Urgency","default":"low"},"compact_at_tokens":{"type":"integer","title":"Compact At Tokens","default":0},"critical_at_tokens":{"type":"integer","title":"Critical At Tokens","default":0},"should_compact":{"type":"boolean","title":"Should Compact","default":false},"action_prompt":{"type":"string","title":"Action Prompt","default":""},"dna_memories":{"type":"integer","title":"Dna Memories","default":0},"last_compact_minutes_ago":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Last Compact Minutes Ago"}},"type":"object","title":"IDETurnCheckResponse","description":"Same shape as GuardCheckResponse plus the action prompt the agent should follow."},"IndexEntry":{"properties":{"chunk_index":{"type":"integer","title":"Chunk Index"},"chunk_id":{"type":"integer","title":"Chunk Id"},"summary":{"type":"string","title":"Summary"},"tokens_est":{"type":"integer","title":"Tokens Est"},"file_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Path"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"symbol_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol Name"},"symbol_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol Type"}},"type":"object","required":["chunk_index","chunk_id","summary","tokens_est"],"title":"IndexEntry"},"IndexProjectRequest":{"properties":{"file_tree":{"items":{"type":"string"},"type":"array","title":"File Tree"},"key_files":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Key Files"},"git_info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Git Info"}},"type":"object","required":["file_tree"],"title":"IndexProjectRequest"},"IndexProjectResponse":{"properties":{"files_indexed":{"type":"integer","title":"Files Indexed","default":0},"chunks_stored":{"type":"integer","title":"Chunks Stored","default":0},"chunks_deduplicated":{"type":"integer","title":"Chunks Deduplicated","default":0},"tree_size":{"type":"integer","title":"Tree Size","default":0}},"type":"object","title":"IndexProjectResponse"},"L2CompressRequest":{"properties":{"bank_name":{"type":"string","title":"Bank Name"}},"type":"object","required":["bank_name"],"title":"L2CompressRequest"},"L2CompressResponse":{"properties":{"compressed":{"type":"boolean","title":"Compressed","default":false},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"entries_compressed":{"type":"integer","title":"Entries Compressed","default":0},"original_tokens":{"type":"integer","title":"Original Tokens","default":0},"digest_tokens":{"type":"integer","title":"Digest Tokens","default":0}},"type":"object","title":"L2CompressResponse"},"L2FeedbackRequest":{"properties":{"chunk_ids":{"items":{"type":"integer"},"type":"array","minItems":1,"title":"Chunk Ids"},"useful":{"type":"boolean","title":"Useful","default":true}},"type":"object","required":["chunk_ids"],"title":"L2FeedbackRequest"},"L2FeedbackResponse":{"properties":{"status":{"type":"string","title":"Status","default":"ok"},"chunks_updated":{"type":"integer","title":"Chunks Updated","default":0},"useful":{"type":"boolean","title":"Useful","default":true}},"type":"object","title":"L2FeedbackResponse"},"L2InjectRequest":{"properties":{"query":{"type":"string","maxLength":2000,"minLength":1,"title":"Query"},"context_budget_tokens":{"type":"integer","maximum":100000.0,"minimum":100.0,"title":"Context Budget Tokens","default":2000},"model_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Hint","description":"Optional model name for token-counting accuracy"},"freshness_priority":{"type":"string","pattern":"^(balanced|recent|deep)$","title":"Freshness Priority","default":"balanced"},"bypass_cache":{"type":"boolean","title":"Bypass Cache","default":false}},"type":"object","required":["query"],"title":"L2InjectRequest","description":"Request a composed context block for a query within a token budget."},"L2InjectResponse":{"properties":{"context_block":{"type":"string","title":"Context Block","default":""},"tokens_used":{"type":"integer","title":"Tokens Used","default":0},"tokens_budget":{"type":"integer","title":"Tokens Budget","default":0},"sources":{"items":{"$ref":"#/components/schemas/L2InjectSource"},"type":"array","title":"Sources"},"cache_hit":{"type":"boolean","title":"Cache Hit","default":false},"latency_ms":{"type":"integer","title":"Latency Ms","default":0}},"type":"object","title":"L2InjectResponse"},"L2InjectSource":{"properties":{"id":{"type":"integer","title":"Id"},"score":{"type":"number","title":"Score","default":0.0},"source_type":{"type":"string","title":"Source Type","default":"l3"},"memory_type":{"type":"string","title":"Memory Type","default":"fact"}},"type":"object","required":["id"],"title":"L2InjectSource"},"L2InsightsResponse":{"properties":{"insights":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Insights"}},"type":"object","title":"L2InsightsResponse"},"L2ReasonRequest":{"properties":{"content":{"type":"string","minLength":20,"title":"Content"},"source":{"type":"string","title":"Source","default":"api"},"store":{"type":"boolean","title":"Store","default":true}},"type":"object","required":["content"],"title":"L2ReasonRequest"},"L2ReasonResponse":{"properties":{"facts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Facts"},"connections":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Connections"},"insight":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Insight"},"prediction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prediction"},"tokens_used":{"type":"integer","title":"Tokens Used","default":0},"stored_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stored Id"}},"type":"object","title":"L2ReasonResponse"},"L2RecallRequest":{"properties":{"query":{"type":"string","title":"Query"},"bank_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Bank Names"}},"type":"object","required":["query"],"title":"L2RecallRequest"},"L2RecallResponse":{"properties":{"answer":{"type":"string","title":"Answer"},"tokens_used":{"type":"integer","title":"Tokens Used","default":0},"banks_searched":{"items":{"type":"string"},"type":"array","title":"Banks Searched"}},"type":"object","required":["answer"],"title":"L2RecallResponse"},"L2StatsResponse":{"properties":{"banks":{"items":{"$ref":"#/components/schemas/BankInfo"},"type":"array","title":"Banks"},"today_calls":{"type":"integer","title":"Today Calls","default":0},"today_tokens":{"type":"integer","title":"Today Tokens","default":0},"plan_limit":{"$ref":"#/components/schemas/PlanLimitInfo"}},"type":"object","title":"L2StatsResponse"},"L2StatusResponse":{"properties":{"cached_entries":{"type":"integer","title":"Cached Entries","default":0},"pre_reasoned_chunks":{"type":"integer","title":"Pre Reasoned Chunks","default":0},"dna_chunks":{"type":"integer","title":"Dna Chunks","default":0},"last_cache_hit_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Cache Hit At"}},"type":"object","title":"L2StatusResponse","description":"L2 cache status for a tenant."},"L2StoreRequest":{"properties":{"bank_name":{"type":"string","title":"Bank Name"},"content":{"type":"string","title":"Content"},"token_count":{"type":"integer","title":"Token Count","default":0}},"type":"object","required":["bank_name","content"],"title":"L2StoreRequest"},"L2StoreResponse":{"properties":{"id":{"type":"integer","title":"Id"},"bank_name":{"type":"string","title":"Bank Name"},"token_count":{"type":"integer","title":"Token Count","default":0},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["id","bank_name"],"title":"L2StoreResponse"},"LearnRequest":{"properties":{"action":{"type":"string","title":"Action"},"result":{"type":"string","title":"Result"},"outcome":{"type":"string","title":"Outcome","default":"success"},"lesson":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lesson"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"}},"type":"object","required":["action","result"],"title":"LearnRequest"},"LearnResponse":{"properties":{"chunk_id":{"type":"integer","title":"Chunk Id"},"entities_extracted":{"type":"integer","title":"Entities Extracted"},"stored":{"type":"boolean","title":"Stored","default":true}},"type":"object","required":["chunk_id","entities_extracted"],"title":"LearnResponse"},"ListConversationsResponse":{"properties":{"conversations":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Conversations"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["conversations","total","has_more"],"title":"ListConversationsResponse","description":"List conversations response."},"ListForgottenResponse":{"properties":{"chunks":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Chunks"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["chunks","total"],"title":"ListForgottenResponse","description":"List forgotten memories response."},"MemoryItem":{"properties":{"id":{"type":"integer","title":"Id"},"type":{"type":"string","title":"Type"},"scope":{"type":"string","title":"Scope"},"content":{"type":"string","title":"Content"},"importance":{"type":"number","title":"Importance"},"confidence":{"type":"number","title":"Confidence"},"source_type":{"type":"string","title":"Source Type"}},"type":"object","required":["id","type","scope","content","importance","confidence","source_type"],"title":"MemoryItem","description":"Single memory item."},"OffloadRequest":{"properties":{"content":{"type":"string","maxLength":500000,"minLength":10,"title":"Content"},"context_type":{"type":"string","title":"Context Type","description":"tool_output | code | conversation | general","default":"general"},"max_nodes":{"type":"integer","maximum":20.0,"minimum":2.0,"title":"Max Nodes","default":8}},"type":"object","required":["content"],"title":"OffloadRequest"},"PersonalityResponse":{"properties":{"traits":{"items":{"$ref":"#/components/schemas/TraitItem"},"type":"array","title":"Traits"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"confidence":{"type":"number","title":"Confidence"},"decay_score":{"type":"number","title":"Decay Score"},"dna_memory_count":{"type":"integer","title":"Dna Memory Count"},"synthesized_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Synthesized At"},"is_stale":{"type":"boolean","title":"Is Stale"}},"type":"object","required":["traits","confidence","decay_score","dna_memory_count","is_stale"],"title":"PersonalityResponse"},"PitfallCheckRequest":{"properties":{"intent":{"type":"string","title":"Intent","description":"What the bot is about to do"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"limit":{"type":"integer","title":"Limit","default":5}},"type":"object","required":["intent"],"title":"PitfallCheckRequest"},"PitfallCheckResponse":{"properties":{"has_pitfalls":{"type":"boolean","title":"Has Pitfalls"},"pitfalls":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Pitfalls"},"message":{"type":"string","title":"Message","default":""}},"type":"object","required":["has_pitfalls"],"title":"PitfallCheckResponse"},"PlanLimitInfo":{"properties":{"l2_max_tokens":{"type":"integer","title":"L2 Max Tokens","default":0},"l2_calls_per_day":{"type":"integer","title":"L2 Calls Per Day","default":0}},"type":"object","title":"PlanLimitInfo"},"PredictRequest":{"properties":{"intent":{"type":"string","title":"Intent","description":"What the bot/user is about to do"},"context":{"type":"string","title":"Context","description":"Current conversation context","default":""},"limit":{"type":"integer","title":"Limit","default":5}},"type":"object","required":["intent"],"title":"PredictRequest"},"PredictResponse":{"properties":{"predictions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Predictions"},"count":{"type":"integer","title":"Count","default":0},"message":{"type":"string","title":"Message","default":""}},"type":"object","title":"PredictResponse"},"ProactivePushRequest":{"properties":{"context":{"type":"string","maxLength":2000,"minLength":1,"title":"Context"},"context_type":{"type":"string","pattern":"^(general|file|conversation|task)$","title":"Context Type","default":"general"},"threshold":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Threshold","default":0.6}},"type":"object","required":["context"],"title":"ProactivePushRequest"},"ProcedureCheckRequest":{"properties":{"intent":{"type":"string","title":"Intent","description":"What the bot is about to do"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"limit":{"type":"integer","title":"Limit","default":5}},"type":"object","required":["intent"],"title":"ProcedureCheckRequest"},"ProcedureCheckResponse":{"properties":{"has_procedures":{"type":"boolean","title":"Has Procedures"},"procedures":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Procedures"},"message":{"type":"string","title":"Message","default":""}},"type":"object","required":["has_procedures"],"title":"ProcedureCheckResponse"},"ProposalCreateRequest":{"properties":{"title":{"type":"string","title":"Title"},"intent":{"type":"string","title":"Intent"},"affected_memories":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Affected Memories"},"scope_in":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope In"},"scope_out":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Out"},"approach":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approach"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["title","intent"],"title":"ProposalCreateRequest"},"ProposalDetailResponse":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"type":"string","title":"Title"},"intent":{"type":"string","title":"Intent"},"scope_in":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope In"},"scope_out":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Out"},"approach":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approach"},"affected_memories":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Affected Memories"},"status":{"type":"string","title":"Status"},"requires_approval":{"type":"boolean","title":"Requires Approval"},"approved_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approved By"},"approved_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approved At"},"rejection_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rejection Reason"},"executed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Executed At"},"execution_result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Execution Result"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","title","intent","status","requires_approval"],"title":"ProposalDetailResponse"},"ProposalListResponse":{"properties":{"proposals":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Proposals"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["proposals","total"],"title":"ProposalListResponse"},"ProposalResponse":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"type":"string","title":"Title"},"intent":{"type":"string","title":"Intent"},"status":{"type":"string","title":"Status"},"requires_approval":{"type":"boolean","title":"Requires Approval"},"affected_count":{"type":"integer","title":"Affected Count","default":0},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","title","intent","status","requires_approval"],"title":"ProposalResponse"},"ReadyArtifactsResponse":{"properties":{"ready":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Ready"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["ready","total"],"title":"ReadyArtifactsResponse"},"RecallRequest":{"properties":{"query":{"type":"string","maxLength":10000,"minLength":1,"title":"Query"},"depth":{"type":"string","title":"Depth","default":"deep"},"limit":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Limit","default":5},"min_score":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Min Score","default":0.0},"tags":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Tags"},"max_tokens":{"anyOf":[{"type":"integer","maximum":200000.0,"minimum":0.0},{"type":"null"}],"title":"Max Tokens"},"priority_min":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority Min"},"memory_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory Type"},"preview_only":{"type":"boolean","title":"Preview Only","default":false},"user_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"User Id"},"agent_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Agent Id"},"project_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Project Id"},"thread_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Thread Id"},"as_of":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"As Of"},"as_of_transaction":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"As Of Transaction"},"since":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Since"},"layers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Layers"},"disclosure_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disclosure Level"},"cross_project":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Cross Project"}},"type":"object","required":["query"],"title":"RecallRequest"},"RecallResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/RecallResult"},"type":"array","title":"Results"},"query_time_ms":{"type":"number","title":"Query Time Ms"},"depth_used":{"type":"string","title":"Depth Used"},"cache_hit":{"type":"boolean","title":"Cache Hit","default":false},"tokens_used":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tokens Used"},"tokens_budget":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tokens Budget"},"results_truncated":{"type":"integer","title":"Results Truncated","default":0},"content_hard_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Content Hard Limit"},"stable_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stable Context"},"dynamic_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dynamic Context"},"persona":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona"}},"type":"object","required":["results","query_time_ms","depth_used"],"title":"RecallResponse"},"RecallResult":{"properties":{"id":{"type":"integer","title":"Id"},"content":{"type":"string","title":"Content"},"content_preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Preview"},"score":{"type":"number","title":"Score"},"score_breakdown":{"anyOf":[{"$ref":"#/components/schemas/ScoreBreakdown"},{"type":"null"}]},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"created_at":{"type":"string","title":"Created At"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"confidence_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence Score"},"confidence_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confidence Label"},"match_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Match Type"},"contributor_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contributor Count"},"memory_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory Type"},"valid_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valid From"},"valid_until":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valid Until"},"warning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warning"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"}},"type":"object","required":["id","content","score","created_at"],"title":"RecallResult"},"ReflectionRequest":{"properties":{"hours_back":{"type":"integer","maximum":168.0,"minimum":1.0,"title":"Hours Back","default":24},"max_insights":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Max Insights","default":5}},"type":"object","title":"ReflectionRequest"},"ReflectionResponse":{"properties":{"insights_created":{"type":"integer","title":"Insights Created","default":0},"patterns_found":{"items":{"type":"string"},"type":"array","title":"Patterns Found"},"chunks_scanned":{"type":"integer","title":"Chunks Scanned","default":0}},"type":"object","title":"ReflectionResponse"},"RegisterAgentRequest":{"properties":{"agent_id":{"type":"string","title":"Agent Id","description":"Unique ID trong tenant (e.g. 'coder', 'reviewer')"},"agent_name":{"type":"string","title":"Agent Name","description":"Human-readable name"},"role":{"type":"string","title":"Role","description":"coder|reviewer|pm|qa|coordinator|general","default":"general"},"scope":{"type":"string","title":"Scope","description":"technical|business|quality|shared|all","default":"general"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"trust_level":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Trust Level","default":0.8},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["agent_id","agent_name"],"title":"RegisterAgentRequest"},"RejectRequest":{"properties":{"rejected_by":{"type":"string","title":"Rejected By"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["rejected_by"],"title":"RejectRequest"},"ResolveConflictRequest":{"properties":{"winning_chunk_id":{"type":"integer","title":"Winning Chunk Id"},"resolution_note":{"type":"string","title":"Resolution Note"}},"type":"object","required":["winning_chunk_id","resolution_note"],"title":"ResolveConflictRequest"},"RestoreResponse":{"properties":{"status":{"type":"string","title":"Status","default":"restored"},"archive_id":{"type":"integer","title":"Archive Id"},"chunk_id":{"type":"integer","title":"Chunk Id"}},"type":"object","required":["archive_id","chunk_id"],"title":"RestoreResponse"},"RestoredChunk":{"properties":{"chunk_id":{"type":"integer","title":"Chunk Id"},"content":{"type":"string","title":"Content"},"score":{"type":"number","title":"Score"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"tokens_est":{"type":"integer","title":"Tokens Est"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["chunk_id","content","score","tokens_est"],"title":"RestoredChunk"},"RevokeBody":{"properties":{"agent_id":{"type":"string","title":"Agent Id"}},"type":"object","required":["agent_id"],"title":"RevokeBody"},"RollbackResponse":{"properties":{"status":{"type":"string","title":"Status"},"chunk_id":{"type":"integer","title":"Chunk Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["status","chunk_id","message"],"title":"RollbackResponse","description":"Response from rollback operation."},"RollingContextResponse":{"properties":{"phase":{"type":"string","title":"Phase"},"current_session":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Session"},"message_count":{"type":"integer","title":"Message Count","default":0},"prev_sessions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Prev Sessions"},"window_size":{"type":"integer","title":"Window Size","default":3},"last_rotation_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Rotation At"}},"type":"object","required":["phase"],"title":"RollingContextResponse"},"RollingMessageRequest":{"properties":{"message":{"additionalProperties":true,"type":"object","title":"Message","description":"Message to track: {role: 'user'|'assistant', content: '...'}"},"rotation_size":{"type":"integer","maximum":50.0,"minimum":5.0,"title":"Rotation Size","description":"Messages per session before rotation (default: 20)","default":20},"estimated_tokens":{"type":"integer","minimum":0.0,"title":"Estimated Tokens","description":"Current token count of this single message (optional; bot can compute or skip)","default":0},"token_rotation_threshold":{"type":"integer","minimum":0.0,"title":"Token Rotation Threshold","description":"Force rotation when accumulated session tokens reach this. 0 = disabled. Recommended: hard_cap × 0.5","default":0}},"type":"object","required":["message"],"title":"RollingMessageRequest"},"RollingMessageResponse":{"properties":{"rotate":{"type":"boolean","title":"Rotate","description":"True when session just rotated"},"rotate_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rotate Reason","description":"'initial_fill' (S1→S2 at 150K) | 'rolling_cycle' (S2+ at 20K) | 'token_threshold' | 'message_limit'"},"session_id":{"type":"string","title":"Session Id","description":"Current session ID"},"message_count":{"type":"integer","title":"Message Count","description":"Messages in current session"},"session_tokens":{"type":"integer","title":"Session Tokens","description":"Estimated tokens in current session","default":0},"sessions_live":{"type":"integer","title":"Sessions Live","description":"How many sessions are currently in the LLM window (max 3)","default":0},"context_message_count":{"type":"integer","title":"Context Message Count","description":"Total raw messages across all live sessions","default":0},"context_tokens":{"type":"integer","title":"Context Tokens","description":"Total estimated tokens across all live sessions (the bot's true LLM cost driver)","default":0},"prev_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev Session Id","description":"Session that just ended (when rotate=true)"},"compress_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compress Session Id","description":"Oldest session evicted from window (when should_compress=true) — push it to /v1/bot/session/auto-cycle"},"should_compress":{"type":"boolean","title":"Should Compress","description":"True when the evicted session should be compressed to L2","default":false},"compress_message_count":{"type":"integer","title":"Compress Message Count","description":"Number of messages to compress","default":0},"compress_tokens":{"type":"integer","title":"Compress Tokens","description":"Estimated tokens of the session being compressed (S1 will be ~150K, S2+ ~20K)","default":0}},"type":"object","required":["rotate","session_id","message_count"],"title":"RollingMessageResponse"},"RollingResetResponse":{"properties":{"status":{"type":"string","title":"Status","default":"reset"},"message":{"type":"string","title":"Message","default":""}},"type":"object","title":"RollingResetResponse"},"ScoreBreakdown":{"properties":{"text_match":{"type":"number","title":"Text Match","default":0.0},"semantic":{"type":"number","title":"Semantic","default":0.0},"associative":{"type":"number","title":"Associative","default":0.0},"recency":{"type":"number","title":"Recency","default":0.0}},"type":"object","title":"ScoreBreakdown"},"SessionAutoCycleRequest":{"properties":{"old_session_id":{"type":"string","title":"Old Session Id","description":"The session being closed (gets compressed to L2)"},"old_messages":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Old Messages","description":"Full conversation messages of the old session"},"new_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Session Id","description":"Identifier the bot will use for the spawned session (server records lineage)"},"bootstrap_task":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bootstrap Task","description":"Task hint for bootstrap relevance ranking"},"bootstrap_mode":{"type":"string","pattern":"^(default|deep)$","title":"Bootstrap Mode","default":"default"},"bootstrap_token_budget":{"anyOf":[{"type":"integer","maximum":30000.0,"minimum":200.0},{"type":"null"}],"title":"Bootstrap Token Budget","description":"Override default 800 token budget for bootstrap (e.g. promax = 2000)"},"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings"}},"type":"object","required":["old_session_id","old_messages"],"title":"SessionAutoCycleRequest","description":"Single-call helper for the bot's session-rollover flow.\n\nReplaces the manual sequence:\n  1. /v1/bot/session/compress (old session)\n  2. /v1/bot/guard/bootstrap   (new session)\nBot only needs to call this one endpoint when guard.should_spawn_new_session\nflips true. Reduces bot-side code by ~90% and removes the race window where\na bot crashes between step 1 and step 2 leaving the new session unprimed."},"SessionAutoCycleResponse":{"properties":{"compress_status":{"type":"string","title":"Compress Status"},"compress_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compress Id"},"chunks_created":{"type":"integer","title":"Chunks Created","default":0},"dna_extracted":{"type":"integer","title":"Dna Extracted","default":0},"bootstrap_block":{"type":"string","title":"Bootstrap Block","default":""},"bootstrap_tokens":{"type":"integer","title":"Bootstrap Tokens","default":0},"new_session_id":{"type":"string","title":"New Session Id","default":""},"message":{"type":"string","title":"Message","default":""}},"type":"object","required":["compress_status"],"title":"SessionAutoCycleResponse","description":"Result of one auto-cycle call. Bot uses bootstrap_block as the seed\nof its new session and continues working — no further server calls needed."},"SessionCompressRequest":{"properties":{"session_id":{"type":"string","title":"Session Id"},"messages":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Messages","description":"Full conversation messages [{role, content}]"},"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings"}},"type":"object","required":["session_id","messages"],"title":"SessionCompressRequest"},"SessionCompressResponse":{"properties":{"status":{"type":"string","title":"Status"},"compress_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compress Id"},"chunks_created":{"type":"integer","title":"Chunks Created","default":0},"summaries":{"items":{"type":"string"},"type":"array","title":"Summaries"},"dna_extracted":{"type":"integer","title":"Dna Extracted","default":0},"message":{"type":"string","title":"Message","default":""}},"type":"object","required":["status"],"title":"SessionCompressResponse"},"SessionRecoverRequest":{"properties":{"task_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Context"},"time_range_hours":{"type":"integer","title":"Time Range Hours","default":24},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens","default":8000},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}},"type":"object","title":"SessionRecoverRequest"},"SessionRecoverResponse":{"properties":{"active_context":{"additionalProperties":true,"type":"object","title":"Active Context"},"pending_actions":{"items":{"type":"string"},"type":"array","title":"Pending Actions"},"recent_timeline":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Recent Timeline"},"key_references":{"additionalProperties":true,"type":"object","title":"Key References"},"confidence":{"type":"string","title":"Confidence"},"suggested_next":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Next"},"tokens_used":{"type":"integer","title":"Tokens Used","default":0}},"type":"object","required":["active_context","pending_actions","recent_timeline","key_references","confidence"],"title":"SessionRecoverResponse"},"SessionStatusResponse":{"properties":{"status":{"type":"string","title":"Status"},"compress_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compress Id"},"chunks_created":{"type":"integer","title":"Chunks Created","default":0},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["status"],"title":"SessionStatusResponse"},"SharePageRequest":{"properties":{"page_id":{"type":"integer","title":"Page Id"}},"type":"object","required":["page_id"],"title":"SharePageRequest"},"ShowcaseRequest":{"properties":{"queries":{"items":{"type":"string"},"type":"array","maxItems":10,"title":"Queries"},"model":{"type":"string","title":"Model","default":"claude-opus-4-6"},"naive_budget_tokens":{"type":"integer","title":"Naive Budget Tokens","default":200000},"smart_top_k":{"type":"integer","title":"Smart Top K","default":8}},"type":"object","title":"ShowcaseRequest"},"SnapshotInfo":{"properties":{"snapshot_id":{"type":"string","title":"Snapshot Id"},"created_at":{"type":"string","title":"Created At"},"chunks_count":{"type":"integer","title":"Chunks Count"},"size_bytes":{"type":"integer","title":"Size Bytes"}},"type":"object","required":["snapshot_id","created_at","chunks_count","size_bytes"],"title":"SnapshotInfo"},"SnapshotListResponse":{"properties":{"snapshots":{"items":{"$ref":"#/components/schemas/SnapshotInfo"},"type":"array","title":"Snapshots"}},"type":"object","required":["snapshots"],"title":"SnapshotListResponse"},"SnapshotRequest":{"properties":{"limit":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Limit","default":10},"include_task":{"type":"boolean","title":"Include Task","default":true}},"type":"object","title":"SnapshotRequest"},"SnapshotResponse":{"properties":{"snapshot":{"type":"string","title":"Snapshot"},"chunks_used":{"type":"integer","title":"Chunks Used","default":0},"generated_at":{"type":"string","title":"Generated At","default":""}},"type":"object","required":["snapshot"],"title":"SnapshotResponse"},"SpaceCreateRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"description":{"type":"string","maxLength":500,"title":"Description","default":""},"is_public":{"type":"boolean","title":"Is Public","default":false}},"type":"object","required":["name"],"title":"SpaceCreateRequest"},"SpaceMemberRequest":{"properties":{"tenant_id":{"type":"string","minLength":1,"title":"Tenant Id"},"role":{"type":"string","pattern":"^(read|write|admin)$","title":"Role","default":"read"}},"type":"object","required":["tenant_id"],"title":"SpaceMemberRequest"},"StartConversationRequest":{"properties":{"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}},"type":"object","title":"StartConversationRequest","description":"Request to start a new conversation."},"StartConversationResponse":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message","default":"Conversation started successfully"}},"type":"object","required":["conversation_id","status"],"title":"StartConversationResponse","description":"Response from starting a conversation."},"StartWorkerRequest":{"properties":{"run_id":{"type":"string","title":"Run Id"}},"type":"object","required":["run_id"],"title":"StartWorkerRequest"},"StartWorkerResponse":{"properties":{"started":{"type":"boolean","title":"Started"},"reason":{"type":"string","title":"Reason"},"blocked_by":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Blocked By"},"missing":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Missing"}},"type":"object","required":["started","reason"],"title":"StartWorkerResponse"},"StateRestoreResponse":{"properties":{"status":{"type":"string","title":"Status"},"session_id":{"type":"string","title":"Session Id","default":""},"state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"State"},"saved_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Saved At"}},"type":"object","required":["status"],"title":"StateRestoreResponse"},"StateSaveRequest":{"properties":{"session_id":{"type":"string","title":"Session Id","description":"Session identifier","default":"default"},"state":{"additionalProperties":true,"type":"object","title":"State","description":"Arbitrary bot state (plan, cursor, goals, context)"}},"type":"object","required":["state"],"title":"StateSaveRequest"},"StateSaveResponse":{"properties":{"status":{"type":"string","title":"Status"},"session_id":{"type":"string","title":"Session Id"},"message":{"type":"string","title":"Message","default":""}},"type":"object","required":["status","session_id"],"title":"StateSaveResponse"},"StatsResponse":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"plan":{"type":"string","title":"Plan","default":"free"},"chunks":{"type":"integer","title":"Chunks","default":0},"storage_mb":{"type":"number","title":"Storage Mb","default":0.0},"usage_this_month":{"$ref":"#/components/schemas/UsageStats"},"brain_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brain Name"},"brain_age_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Brain Age Days"},"last_dream_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Dream At"},"dna_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dna Count"}},"type":"object","required":["tenant_id"],"title":"StatsResponse"},"StoreRequest":{"properties":{"content":{"type":"string","maxLength":50000,"minLength":1,"title":"Content"},"source":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Source"},"tags":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Tags"},"priority":{"type":"string","title":"Priority","default":"warm"},"language":{"type":"string","title":"Language","default":"auto"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"zone":{"type":"string","title":"Zone","default":"standard"},"importance":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Importance","default":0.5},"memory_type":{"type":"string","title":"Memory Type","default":"fact"},"retention":{"type":"string","title":"Retention","default":"auto"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"thread_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thread Id"},"valid_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valid From"},"code_anchor":{"anyOf":[{"$ref":"#/components/schemas/CodeAnchorIn"},{"type":"null"}]}},"type":"object","required":["content"],"title":"StoreRequest"},"StoreResponse":{"properties":{"id":{"type":"integer","title":"Id","default":0},"layers":{"items":{"type":"string"},"type":"array","title":"Layers"},"deduplicated":{"type":"boolean","title":"Deduplicated","default":false},"similar_chunk_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Similar Chunk Id"},"similarity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Similarity"},"contradicts":{"items":{"type":"integer"},"type":"array","title":"Contradicts"},"contradiction_warning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contradiction Warning"},"memory_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory Type"},"retention":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Retention"},"skipped":{"type":"boolean","title":"Skipped","default":false},"skip_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skip Reason"}},"type":"object","title":"StoreResponse"},"StyleDetectRequest":{"properties":{"project_id":{"type":"string","title":"Project Id","default":"default"},"sample_files":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Sample Files","description":"[{path, content}] — 3-5 representative files"}},"type":"object","required":["sample_files"],"title":"StyleDetectRequest"},"StyleDetectResponse":{"properties":{"status":{"type":"string","title":"Status"},"style":{"additionalProperties":true,"type":"object","title":"Style"},"message":{"type":"string","title":"Message","default":""}},"type":"object","required":["status"],"title":"StyleDetectResponse"},"StyleGetResponse":{"properties":{"project_id":{"type":"string","title":"Project Id"},"style":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Style"},"message":{"type":"string","title":"Message","default":""}},"type":"object","required":["project_id"],"title":"StyleGetResponse"},"SymbolEntry":{"properties":{"file_path":{"type":"string","title":"File Path"},"symbol_name":{"type":"string","title":"Symbol Name"},"symbol_type":{"type":"string","title":"Symbol Type","default":"function"},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature"},"depends_on":{"items":{"type":"string"},"type":"array","title":"Depends On"}},"type":"object","required":["file_path","symbol_name"],"title":"SymbolEntry"},"SymbolIndexRequest":{"properties":{"project_id":{"type":"string","title":"Project Id","default":"default"},"symbols":{"items":{"$ref":"#/components/schemas/SymbolEntry"},"type":"array","title":"Symbols"}},"type":"object","required":["symbols"],"title":"SymbolIndexRequest"},"SymbolIndexResponse":{"properties":{"status":{"type":"string","title":"Status"},"indexed":{"type":"integer","title":"Indexed"},"updated":{"type":"integer","title":"Updated"},"message":{"type":"string","title":"Message","default":""}},"type":"object","required":["status","indexed","updated"],"title":"SymbolIndexResponse"},"SymbolSearchRequest":{"properties":{"query":{"type":"string","title":"Query","description":"What you're looking for (e.g. 'function that handles auth')"},"project_id":{"type":"string","title":"Project Id","default":"default"},"symbol_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol Type"},"limit":{"type":"integer","title":"Limit","default":10}},"type":"object","required":["query"],"title":"SymbolSearchRequest"},"SymbolSearchResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/SymbolSearchResult"},"type":"array","title":"Results"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["results","count"],"title":"SymbolSearchResponse"},"SymbolSearchResult":{"properties":{"file_path":{"type":"string","title":"File Path"},"symbol_name":{"type":"string","title":"Symbol Name"},"symbol_type":{"type":"string","title":"Symbol Type"},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature"},"score":{"type":"number","title":"Score","default":0.0}},"type":"object","required":["file_path","symbol_name","symbol_type"],"title":"SymbolSearchResult"},"SynthesizeResponse":{"properties":{"status":{"type":"string","title":"Status"},"traits_count":{"type":"integer","title":"Traits Count","default":0},"confidence":{"type":"number","title":"Confidence","default":0.0},"dna_count":{"type":"integer","title":"Dna Count","default":0},"tokens_used":{"type":"integer","title":"Tokens Used","default":0},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["status"],"title":"SynthesizeResponse"},"TaskClearResponse":{"properties":{"cleared":{"type":"boolean","title":"Cleared","default":false}},"type":"object","title":"TaskClearResponse"},"TaskCurrentResponse":{"properties":{"active":{"type":"boolean","title":"Active","default":false},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"context_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context Snapshot"},"step_current":{"type":"integer","title":"Step Current","default":0},"step_total":{"type":"integer","title":"Step Total","default":0},"files":{"items":{"type":"string"},"type":"array","title":"Files"},"status":{"type":"string","title":"Status","default":"none"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","title":"TaskCurrentResponse"},"TaskSaveRequest":{"properties":{"description":{"type":"string","title":"Description"},"context_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context Snapshot"},"step_current":{"type":"integer","title":"Step Current","default":0},"step_total":{"type":"integer","title":"Step Total","default":0},"files":{"items":{"type":"string"},"type":"array","title":"Files"},"status":{"type":"string","title":"Status","default":"in_progress"}},"type":"object","required":["description"],"title":"TaskSaveRequest"},"TaskSaveResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"status":{"type":"string","title":"Status"},"updated":{"type":"boolean","title":"Updated","default":false}},"type":"object","required":["id","tenant_id","status"],"title":"TaskSaveResponse"},"TemporalRecallRequest":{"properties":{"query":{"type":"string","title":"Query"},"as_of_valid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of Valid"},"as_of_transaction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of Transaction"},"limit":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Limit","default":10}},"type":"object","required":["query"],"title":"TemporalRecallRequest"},"ThinkAboutRequest":{"properties":{"topic":{"type":"string","maxLength":500,"minLength":2,"title":"Topic"}},"type":"object","required":["topic"],"title":"ThinkAboutRequest"},"TraitItem":{"properties":{"name":{"type":"string","title":"Name"},"confidence":{"type":"number","title":"Confidence"},"description":{"type":"string","title":"Description","default":""},"evidence_count":{"type":"integer","title":"Evidence Count","default":0}},"type":"object","required":["name","confidence"],"title":"TraitItem"},"TwinRequest":{"properties":{"query":{"type":"string","maxLength":2000,"minLength":3,"title":"Query"}},"type":"object","required":["query"],"title":"TwinRequest"},"UpdateProgressRequest":{"properties":{"progress":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Progress"},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"}},"type":"object","required":["progress"],"title":"UpdateProgressRequest"},"UsageStats":{"properties":{"stores":{"type":"integer","title":"Stores","default":0},"recalls":{"type":"integer","title":"Recalls","default":0}},"type":"object","title":"UsageStats"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VersionChainRequest":{"properties":{"chunk_id":{"type":"integer","title":"Chunk Id"},"direction":{"type":"string","title":"Direction","default":"both"}},"type":"object","required":["chunk_id"],"title":"VersionChainRequest"},"WALEntry":{"properties":{"task":{"type":"string","title":"Task","default":""},"action":{"type":"string","title":"Action","default":"compact"}},"type":"object","title":"WALEntry"},"WALRequest":{"properties":{"action":{"type":"string","pattern":"^(write|complete|check|retry)$","title":"Action"},"entry":{"anyOf":[{"$ref":"#/components/schemas/WALEntry"},{"type":"null"}]}},"type":"object","required":["action"],"title":"WALRequest"},"WALResponse":{"properties":{"status":{"type":"string","title":"Status","default":"ok"},"pending":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Pending"},"retried":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retried"}},"type":"object","title":"WALResponse"},"WhatIfRequest":{"properties":{"scenario":{"type":"string","title":"Scenario","description":"Scenario to evaluate, e.g. 'if I switch to Rust instead of Python'"},"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic","description":"Specific topic to check against (optional, auto-detected if not provided)"}},"type":"object","required":["scenario"],"title":"WhatIfRequest"},"WhatIfResponse":{"properties":{"scenario":{"type":"string","title":"Scenario"},"prediction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prediction"},"confidence":{"type":"number","title":"Confidence"},"relevant_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relevant Pattern"},"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"},"reasoning":{"type":"string","title":"Reasoning"}},"type":"object","required":["scenario","prediction","confidence","relevant_pattern","topic","reasoning"],"title":"WhatIfResponse"},"WikiCreateRequest":{"properties":{"title":{"type":"string","maxLength":500,"minLength":1,"title":"Title"},"content":{"type":"string","minLength":1,"title":"Content"},"source_type":{"type":"string","pattern":"^(manual|url|pdf|auto)$","title":"Source Type","default":"manual"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"generate_embedding":{"type":"boolean","title":"Generate Embedding","default":true}},"type":"object","required":["title","content"],"title":"WikiCreateRequest"},"WikiIngestMarkdownRequest":{"properties":{"title":{"type":"string","maxLength":500,"minLength":1,"title":"Title"},"content":{"type":"string","minLength":1,"title":"Content"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"}},"type":"object","required":["title","content"],"title":"WikiIngestMarkdownRequest"},"WikiIngestURLRequest":{"properties":{"url":{"type":"string","minLength":1,"title":"Url"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"}},"type":"object","required":["url"],"title":"WikiIngestURLRequest"},"WikiLinkRequest":{"properties":{"from_page_id":{"type":"integer","title":"From Page Id"},"to_page_id":{"type":"integer","title":"To Page Id"},"link_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link Text"}},"type":"object","required":["from_page_id","to_page_id"],"title":"WikiLinkRequest"},"WikiSearchRequest":{"properties":{"query":{"type":"string","minLength":1,"title":"Query"},"limit":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Limit","default":10},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"mode":{"type":"string","pattern":"^(hybrid|fts|vector)$","title":"Mode","default":"hybrid"}},"type":"object","required":["query"],"title":"WikiSearchRequest"},"WikiUpdateRequest":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Title"},"content":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Content"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"regenerate_embedding":{"type":"boolean","title":"Regenerate Embedding","default":true}},"type":"object","title":"WikiUpdateRequest"},"WorkerLogResponse":{"properties":{"entries":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Entries"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["entries","total"],"title":"WorkerLogResponse"},"WriteBlockBody":{"properties":{"content":{"type":"string","title":"Content"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},"type":"object","required":["content"],"title":"WriteBlockBody"},"server__models__ImportResponse":{"properties":{"imported":{"type":"integer","title":"Imported","default":0},"skipped_duplicates":{"type":"integer","title":"Skipped Duplicates","default":0}},"type":"object","title":"ImportResponse"},"server__routes__bot_upgrade__FeedbackRequest":{"properties":{"query":{"type":"string","title":"Query","description":"The recall query that was made"},"chunk_ids":{"items":{"type":"integer"},"type":"array","title":"Chunk Ids","description":"Chunk IDs that were returned"},"helpful":{"type":"boolean","title":"Helpful","description":"Were the results helpful?"},"action_succeeded":{"type":"boolean","title":"Action Succeeded","description":"Did the action using these memories succeed?","default":true},"per_chunk":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Per Chunk","description":"Per-chunk feedback: {chunk_id: 'helpful'|'unhelpful'|'irrelevant'}"}},"type":"object","required":["query","helpful"],"title":"FeedbackRequest"},"server__routes__brain_export__ImportResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"report":{"additionalProperties":true,"type":"object","title":"Report"}},"type":"object","required":["success","report"],"title":"ImportResponse"},"server__routes__thinking__FeedbackRequest":{"properties":{"thought_id":{"type":"integer","title":"Thought Id"},"useful":{"type":"boolean","title":"Useful"}},"type":"object","required":["thought_id","useful"],"title":"FeedbackRequest"}}}}