{"openapi":"3.1.0","info":{"title":"Nowledge Mem API","description":"REST API for Nowledge Mem Service","termsOfService":"https://nowledgemem.study/privacy","contact":{"name":"Nowledge Labs","url":"https://nowledgemem.study/","email":"hello@nowledgeMEM.study"},"version":"0.9.15"},"servers":[{"url":"http://127.0.0.1:14242","description":"Nowledge Mem API Server"}],"paths":{"/capabilities":{"get":{"tags":["health"],"summary":"Capabilities","description":"Server capabilities — unauthenticated, used by clients to adapt UI.\n\nReturns the server version and feature flags.  Clients (desktop remote,\nweb /app, mobile) use this to hide features the server cannot support\nor the operator has disabled.","operationId":"capabilities_capabilities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/checkpoint":{"post":{"tags":["health"],"summary":"Force Checkpoint","description":"Force a database checkpoint.\n\nFlushes pending writes before app updates.","operationId":"force_checkpoint_health_checkpoint_post","responses":{"200":{"description":"Checkpoint result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTransferCheckpointResponse"}}}},"500":{"description":"Checkpoint failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTransferErrorResponse"}}}}}}},"/health":{"get":{"tags":["health"],"summary":"Health Check","description":"Health check endpoint.","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/communities":{"get":{"tags":["analytics"],"summary":"List Communities","description":"List knowledge communities with AI summaries.","operationId":"list_communities_communities_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"}}}}}}},"/communities/{community_id}":{"get":{"tags":["analytics"],"summary":"Get Community Details","description":"Get community details including entities and sample memories.","operationId":"get_community_details_communities__community_id__get","parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}},{"name":"entity_limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Entity Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/library/wiki-index":{"get":{"tags":["library-wiki"],"summary":"Get Library Wiki Index","description":"Return Library topic cards for the All tab.\n\nThe response is deliberately flat: one row per community with its surfaced\nentities and crystals, so the client can render the index in one round-trip.","operationId":"get_library_wiki_index_library_wiki_index_get","parameters":[{"name":"community_limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":20,"title":"Community Limit"}},{"name":"top_per_community","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"default":5,"title":"Top Per Community"}},{"name":"include_top_memories","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":8,"minimum":0},{"type":"null"}],"title":"Include Top Memories"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/library/wiki-export-summary":{"get":{"tags":["library-wiki"],"summary":"Get Library Wiki Export Summary","description":"Return cheap export counts before building the ZIP.","operationId":"get_library_wiki_export_summary_library_wiki_export_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/library/wiki-export":{"get":{"tags":["library-wiki"],"summary":"Get Library Wiki Export","description":"Build the markdown wiki ZIP.","operationId":"get_library_wiki_export_library_wiki_export_get","parameters":[{"name":"entity_limit","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":1,"default":500,"title":"Entity Limit"}},{"name":"top_per_community","in":"query","required":false,"schema":{"type":"integer","maximum":30,"minimum":1,"default":12,"title":"Top Per Community"}},{"name":"max_mentions_per_entity","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":30,"title":"Max Mentions Per Entity"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/library/okf-export":{"get":{"tags":["library-wiki"],"summary":"Get Library Okf Export","description":"Build an Open Knowledge Format (OKF) bundle ZIP.\n\nCross-space (graph aggregation): reads the global graph regardless of\nthe active space lens, same as `/library/wiki-export`. Returns an\nOKF-conformant bundle (markdown + frontmatter, bundle-relative links,\nper-directory index.md). See `docs/design/OKF_INTEROP.md`.","operationId":"get_library_okf_export_library_okf_export_get","parameters":[{"name":"entity_limit","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":1,"default":500,"title":"Entity Limit"}},{"name":"top_per_community","in":"query","required":false,"schema":{"type":"integer","maximum":30,"minimum":1,"default":12,"title":"Top Per Community"}},{"name":"max_mentions_per_entity","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":30,"title":"Max Mentions Per Entity"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/library/community/{community_id}/subgraph":{"get":{"tags":["library-wiki"],"summary":"Get Community Subgraph","description":"Return the actual subgraph for a community.\n\nCross-space; reads the global graph regardless of active space lens\n(Louvain ids are global). Returns the entities in this community\nplus their RELATES_TO edges to each other, and optionally the\nhighest-mentioned memories that touch any of these entities, so\nthe Library wiki community panel can render the cluster's true\nshape — not a 30-node live-preview sample.\n\nOutput shape matches `GraphData` (`nodes` carry `node_type` and\n`metadata`; `edges` carry `edge_type`) so the same MiniGraph\ncomponent used in the Feed Timeline can render it without an\nextra adapter.","operationId":"get_community_subgraph_library_community__community_id__subgraph_get","parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"integer","title":"Community Id"}},{"name":"max_entities","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":10,"default":80,"title":"Max Entities"}},{"name":"include_top_memories","in":"query","required":false,"schema":{"type":"integer","maximum":40,"minimum":0,"default":12,"title":"Include Top Memories"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/library/community/{community_id}/recent-memories":{"get":{"tags":["library-wiki"],"summary":"Get Community Recent Memories","description":"Most recent memories mentioning any entity in this community.\n\nCross-space; reads the global graph regardless of active space lens\n(Louvain ids are global). Powers the \"Recent on this topic\" rail\non the Library wiki community panel — closes the loop between\n\"what this topic is\" (top entities + crystals) and \"what's\nhappening on it lately\" (recent memories that touch it).","operationId":"get_community_recent_memories_library_community__community_id__recent_memories_get","parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"integer","title":"Community Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":8,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/library/community/{community_id}/related":{"get":{"tags":["library-wiki"],"summary":"Get Related Communities","description":"Return other communities sharing entity-to-entity edges with this one.\n\nCross-space; reads the global graph regardless of active space lens.\nCommunities are computed by Louvain over the global Entity projection,\nso the related-communities lens is meaningless when scoped to a single\nspace. The \"shared edge count\" is how many RELATES_TO edges run\nbetween an entity in this community and an entity in the other\ncommunity: the strongest available signal that two topic clusters\ntouch each other in the user's mind.","operationId":"get_related_communities_library_community__community_id__related_get","parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"integer","title":"Community Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":6,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/library/crystal/{crystal_id}/source-memories":{"get":{"tags":["library-wiki"],"summary":"Get Crystal Source Memories","description":"Return the source memories a crystal was synthesized from.\n\nPowers the \"Built from N memories\" section on the Crystal page in the\nLibrary wiki. Follows the CRYSTALLIZED_FROM edge that CreateCrystal\nwrites during synthesis (one edge per source memory, with a\ncontribution_weight property). Sorted by weight descending so the\nmost-contributing memories surface first.","operationId":"get_crystal_source_memories_library_crystal__crystal_id__source_memories_get","parameters":[{"name":"crystal_id","in":"path","required":true,"schema":{"type":"string","title":"Crystal Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/library/wiki-page/entity/{id_or_name}":{"get":{"tags":["library-wiki"],"summary":"Get Wiki Page Entity","description":"Render a single entity's wiki page as markdown.\n\nCross-space (graph aggregation): looks up by id, with a case-insensitive\nname fallback. Pass either the entity UUID or its canonical name.","operationId":"get_wiki_page_entity_library_wiki_page_entity__id_or_name__get","parameters":[{"name":"id_or_name","in":"path","required":true,"schema":{"type":"string","title":"Id Or Name"}},{"name":"mention_limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":30,"title":"Mention Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/library/wiki-page/crystal/{crystal_id}":{"get":{"tags":["library-wiki"],"summary":"Get Wiki Page Crystal","description":"Render a single crystal's wiki page as markdown. By-id-direct.","operationId":"get_wiki_page_crystal_library_wiki_page_crystal__crystal_id__get","parameters":[{"name":"crystal_id","in":"path","required":true,"schema":{"type":"string","title":"Crystal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/library/wiki-page/topic/{community_id}":{"get":{"tags":["library-wiki"],"summary":"Get Wiki Page Topic","description":"Render a single topic (community) wiki page as markdown.\n\nCross-space (graph aggregation). The community id is the Louvain\ninteger assigned by community detection.","operationId":"get_wiki_page_topic_library_wiki_page_topic__community_id__get","parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"integer","title":"Community Id"}},{"name":"top_per_community","in":"query","required":false,"schema":{"type":"integer","maximum":30,"minimum":1,"default":12,"title":"Top Per Community"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labels":{"get":{"tags":["labels"],"summary":"List Labels","description":"List labels with usage counts.\n\nPaginate with ``offset`` to read past the first ``limit`` rows; the\nvocabulary can exceed a single page (the prior no-offset cap left labels\nbeyond 1000 unreachable).","operationId":"list_labels_labels_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","default":"name","title":"Order By"}},{"name":"order_desc","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Order Desc"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LabelResponse"},"title":"Response List Labels Labels Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["labels"],"summary":"Create Label","description":"Create a new label.","operationId":"create_label_labels_post","parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string","description":"Label name","title":"Name"},"description":"Label name"},{"name":"color","in":"query","required":false,"schema":{"type":"string","description":"Label color (hex)","default":"#3b82f6","title":"Color"},"description":"Label color (hex)"},{"name":"description","in":"query","required":false,"schema":{"type":"string","description":"Label description","default":"","title":"Description"},"description":"Label description"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labels/health":{"get":{"tags":["labels"],"summary":"Label Health","description":"Label vocabulary health report.\n\nCross-space (graph aggregation): reads the global label graph regardless of\nactive space lens. Quantifies size, labels-per-memory, coverage, singleton\nrate, and the exact-canonical fork backlog so consolidation progress is\nmeasurable.","operationId":"label_health_labels_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Label Health Labels Health Get"}}}}}}},"/labels/merge-candidates":{"get":{"tags":["labels"],"summary":"Label Merge Candidates","description":"Semantically-near label pairs (candidates for merge), read-only.\n\nCross-space (graph aggregation). Surfaces near-synonym and cross-language\npairs (the embedding model is multilingual) for human/agent review. A cosine\nscore is a candidate signal, not a verdict: nothing is merged here. Exact-\ncanonical forks are excluded (handled by /labels/consolidate). Apply a\nchosen merge via POST /labels/merge.","operationId":"label_merge_candidates_labels_merge_candidates_get","parameters":[{"name":"sim_floor","in":"query","required":false,"schema":{"type":"number","maximum":1,"minimum":0,"default":0.82,"title":"Sim Floor"}},{"name":"max_labels","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":2,"default":2000,"title":"Max Labels"}},{"name":"max_pairs","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Max Pairs"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Label Merge Candidates Labels Merge Candidates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labels/merge":{"post":{"tags":["labels"],"summary":"Merge Labels Endpoint","description":"Merge one label into another: re-point every HAS_LABEL edge from source\nto target, record the merge for reversal, delete the source.\n\nCross-space (graph aggregation): operates on the global label graph. Used by\nthe manual \"merge labels\" affordance and the agentic consolidation pass.","operationId":"merge_labels_endpoint_labels_merge_post","parameters":[{"name":"source_id","in":"query","required":true,"schema":{"type":"string","description":"Label id to merge away (deleted)","title":"Source Id"},"description":"Label id to merge away (deleted)"},{"name":"target_id","in":"query","required":true,"schema":{"type":"string","description":"Label id to keep (survivor)","title":"Target Id"},"description":"Label id to keep (survivor)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Merge Labels Endpoint Labels Merge Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labels/consolidate":{"post":{"tags":["labels"],"summary":"Consolidate Labels","description":"Consolidate exact-canonical label forks into their highest-usage survivor.\n\nCross-space (graph aggregation): operates on the global label graph.\nDeterministic and safe (same canonical token = same concept). Defaults to\n``dry_run=true`` so callers preview the plan before mutating. Semantic and\ncross-language consolidation is the separate agent-judged pass.","operationId":"consolidate_labels_labels_consolidate_post","parameters":[{"name":"dry_run","in":"query","required":false,"schema":{"type":"boolean","description":"Preview without merging","default":true,"title":"Dry Run"},"description":"Preview without merging"},{"name":"max_groups","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":1,"default":200,"title":"Max Groups"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Consolidate Labels Labels Consolidate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labels/consolidation-preview":{"post":{"tags":["labels"],"summary":"Preview Label Consolidation","description":"Preview the full label-consolidation task without applying merges.\n\nThis is the same dry-run path as the scheduled task: deterministic\ncanonical-fork planning plus model-judged semantic/cross-language pairs.\nIt can spend model tokens, but it never mutates graph state.","operationId":"preview_label_consolidation_labels_consolidation_preview_post","parameters":[{"name":"sim_floor","in":"query","required":false,"schema":{"type":"number","maximum":1,"minimum":0,"default":0.82,"title":"Sim Floor"}},{"name":"max_labels","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":2,"default":2000,"title":"Max Labels"}},{"name":"max_pairs","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":40,"title":"Max Pairs"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Preview Label Consolidation Labels Consolidation Preview Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labels/{label_id}":{"get":{"tags":["labels"],"summary":"Get Label","description":"Get a specific label by ID.","operationId":"get_label_labels__label_id__get","parameters":[{"name":"label_id","in":"path","required":true,"schema":{"type":"string","title":"Label Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["labels"],"summary":"Update Label","description":"Update an existing label.","operationId":"update_label_labels__label_id__put","parameters":[{"name":"label_id","in":"path","required":true,"schema":{"type":"string","title":"Label Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLabelRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["labels"],"summary":"Delete Label","description":"Delete a label and all its relationships.","operationId":"delete_label_labels__label_id__delete","parameters":[{"name":"label_id","in":"path","required":true,"schema":{"type":"string","title":"Label Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteLabelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/{memory_id}/labels":{"get":{"tags":["memories"],"summary":"Get Memory Labels","description":"Get labels assigned to a memory.","operationId":"get_memory_labels_memories__memory_id__labels_get","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/{memory_id}/labels/{label_id}":{"post":{"tags":["memories"],"summary":"Assign Label To Memory","description":"Assign a label to a memory.","operationId":"assign_label_to_memory_memories__memory_id__labels__label_id__post","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"label_id","in":"path","required":true,"schema":{"type":"string","title":"Label Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["memories"],"summary":"Remove Label From Memory","description":"Remove a label from a memory.","operationId":"remove_label_from_memory_memories__memory_id__labels__label_id__delete","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"label_id","in":"path","required":true,"schema":{"type":"string","title":"Label Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/{memory_id}/favorite":{"post":{"tags":["memories"],"summary":"Toggle Memory Favorite","description":"Toggle memory favorite status.","operationId":"toggle_memory_favorite_memories__memory_id__favorite_post","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"is_favorite","in":"query","required":true,"schema":{"type":"boolean","description":"Set favorite status","title":"Is Favorite"},"description":"Set favorite status"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/{thread_id}/favorite":{"post":{"tags":["memories"],"summary":"Toggle Thread Favorite","description":"Toggle favorite status for a thread.","operationId":"toggle_thread_favorite_threads__thread_id__favorite_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}},{"name":"is_favorite","in":"query","required":true,"schema":{"type":"boolean","description":"Set favorite status","title":"Is Favorite"},"description":"Set favorite status"},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional isolation space for disambiguating duplicate thread IDs","title":"Space Id"},"description":"Optional isolation space for disambiguating duplicate thread IDs"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/favorites/memories":{"get":{"tags":["memories"],"summary":"Get Favorite Memories","description":"Get all favorite memories.","operationId":"get_favorite_memories_favorites_memories_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MemoryPublic"},"title":"Response Get Favorite Memories Favorites Memories Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/favorites/threads":{"get":{"tags":["memories"],"summary":"Get Favorite Threads","description":"Get all favorite threads.","operationId":"get_favorite_threads_favorites_threads_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/nowledge_graph_server__models__memories_api__ThreadPublic"},"title":"Response Get Favorite Threads Favorites Threads Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/search":{"post":{"tags":["memories"],"summary":"Search Memories","description":"Memory search with filtering, metadata, and reasoning support.","operationId":"search_memories_memories_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemorySearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MemorySearchResult"},"type":"array","title":"Response Search Memories Memories Search Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/{memory_id}/deprecate":{"post":{"tags":["memories"],"summary":"Deprecate Memory","description":"Mark a memory as deprecated while preserving it for graph history.","operationId":"deprecate_memory_memories__memory_id__deprecate_post","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecateMemoryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Deprecate Memory Memories  Memory Id  Deprecate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/{memory_id}/archive":{"post":{"tags":["memories"],"summary":"Archive Memory","description":"Hide a memory from everyday recall while keeping it explicitly readable.","operationId":"archive_memory_memories__memory_id__archive_post","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryStateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Archive Memory Memories  Memory Id  Archive Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/{memory_id}/forget":{"post":{"tags":["memories"],"summary":"Forget Memory","description":"Remove a memory from recall and explicit by-id reads without hard-deleting graph rows.","operationId":"forget_memory_memories__memory_id__forget_post","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryStateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Forget Memory Memories  Memory Id  Forget Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/{memory_id}/supersede":{"post":{"tags":["memories"],"summary":"Supersede Memory","description":"Mark a memory as replaced by a newer memory.","operationId":"supersede_memory_memories__memory_id__supersede_post","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupersedeMemoryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Supersede Memory Memories  Memory Id  Supersede Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/{memory_id}/relations":{"post":{"tags":["memories"],"summary":"Create Memory Relation","description":"Create or update a semantic relation from one memory to another.","operationId":"create_memory_relation_memories__memory_id__relations_post","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryRelationCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryRelationPublic"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["memories"],"summary":"List Memory Relations","description":"List semantic relations around a memory.","operationId":"list_memory_relations_memories__memory_id__relations_get","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"direction","in":"query","required":false,"schema":{"enum":["out","in","both"],"type":"string","default":"both","title":"Direction"}},{"name":"types","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated relation_type filter","title":"Types"},"description":"Comma-separated relation_type filter"},{"name":"status","in":"query","required":false,"schema":{"type":"string","description":"Comma-separated status filter, default active","default":"active","title":"Status"},"description":"Comma-separated status filter, default active"},{"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":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryRelationListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/{memory_id}/relations/suggest":{"post":{"tags":["memories"],"summary":"Suggest Memory Relation","description":"Suggest a semantic relation for two memories without writing it.","operationId":"suggest_memory_relation_memories__memory_id__relations_suggest_post","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryRelationSuggestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryRelationSuggestionPublic"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/relations/{relation_id}":{"patch":{"tags":["memories"],"summary":"Update Memory Relation","description":"Update a semantic memory relation.","operationId":"update_memory_relation_memories_relations__relation_id__patch","parameters":[{"name":"relation_id","in":"path","required":true,"schema":{"type":"string","title":"Relation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryRelationUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryRelationPublic"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["memories"],"summary":"Delete Memory Relation","description":"Soft-delete a semantic memory relation.","operationId":"delete_memory_relation_memories_relations__relation_id__delete","parameters":[{"name":"relation_id","in":"path","required":true,"schema":{"type":"string","title":"Relation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryRelationPublic"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/bulk/move/preview":{"post":{"tags":["memories"],"summary":"Preview Bulk Move Memories","description":"Preview a bounded bulk memory move before mutating data.","operationId":"preview_bulk_move_memories_memories_bulk_move_preview_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkMoveMemoriesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkMovePreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/bulk/move":{"post":{"tags":["memories"],"summary":"Bulk Move Memories","description":"Move a bounded selection of memories into another space.","operationId":"bulk_move_memories_memories_bulk_move_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkMoveMemoriesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkMoveMemoriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/bulk/delete":{"post":{"tags":["memories"],"summary":"Bulk Delete Memories","description":"Delete a bounded memory selection inside one source space.","operationId":"bulk_delete_memories_memories_bulk_delete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteMemoriesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteMemoriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/{memory_id}/export":{"get":{"tags":["memories"],"summary":"Export Memory","description":"Export a memory in various formats.","operationId":"export_memory_memories__memory_id__export_get","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","description":"Export format: json, markdown, html","default":"json","title":"Format"},"description":"Export format: json, markdown, html"},{"name":"include_metadata","in":"query","required":false,"schema":{"type":"boolean","description":"Include memory metadata","default":true,"title":"Include Metadata"},"description":"Include memory metadata"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories":{"post":{"tags":["memories"],"summary":"Create Memory","description":"Create a new memory with automatic entity extraction.\n\nProvenance is recorded only when a caller supplies a real id it owns:\n``source_thread_id``/``source_message_id`` link the memory to its\noriginating thread/message (UI, launcher, distillation). We never infer\nprovenance, so absence is honest rather than a guess.","operationId":"create_memory_memories_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["memories"],"summary":"List Memories","description":"List memories with filtering and pagination.","operationId":"list_memories_memories_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","default":"active","title":"State"}},{"name":"importance_min","in":"query","required":false,"schema":{"type":"number","maximum":1,"minimum":0,"default":0,"title":"Importance Min"}},{"name":"space_id","in":"query","required":false,"schema":{"type":"string","description":"Isolation space to list","default":"default","title":"Space Id"},"description":"Isolation space to list"},{"name":"is_crystal","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by crystal flag: true for crystals only, false for non-crystal only, omit for both.","title":"Is Crystal"},"description":"Filter by crystal flag: true for crystals only, false for non-crystal only, omit for both."},{"name":"unit_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by memory unit type: fact, preference, decision, plan, procedure, learning, context, or event.","title":"Unit Type"},"description":"Filter by memory unit type: fact, preference, decision, plan, procedure, learning, context, or event."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/{memory_id}":{"get":{"tags":["memories"],"summary":"Get Memory","description":"Get a specific memory by ID with associated labels.","operationId":"get_memory_memories__memory_id__get","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional isolation space guard","title":"Space Id"},"description":"Optional isolation space guard"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryPublic"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["memories"],"summary":"Update Memory","description":"Update memory properties like importance, title, and content.","operationId":"update_memory_memories__memory_id__patch","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryPublic"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["memories"],"summary":"Delete Memory","description":"Delete a memory and optionally its relationships.","operationId":"delete_memory_memories__memory_id__delete","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"cascade_delete","in":"query","required":false,"schema":{"type":"boolean","description":"Delete related entities","default":true,"title":"Cascade Delete"},"description":"Delete related entities"},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional isolation space guard","title":"Space Id"},"description":"Optional isolation space guard"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteMemoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/{memory_id}/extract-kg/preview":{"post":{"tags":["memories"],"summary":"Preview Memory Kg Extraction","description":"Preview knowledge graph extraction for a memory.\n\nThis endpoint extracts entities and relationships from a memory's content\nusing the local LLM, providing a preview without saving to the database.","operationId":"preview_memory_kg_extraction_memories__memory_id__extract_kg_preview_post","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryKGExtractionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryKGExtractionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/extract-kg/preview-content":{"post":{"tags":["memories"],"summary":"Preview Memory Kg Extraction Content","description":"Preview KG extraction for explicit content without writing a Memory.","operationId":"preview_memory_kg_extraction_content_memories_extract_kg_preview_content_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryKGContentExtractionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryKGExtractionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/{memory_id}/extract-kg/apply":{"post":{"tags":["memories"],"summary":"Apply Memory Kg Extraction","description":"Apply knowledge graph extraction results to a memory.\n\nThis endpoint saves the extracted entities and relationships to the graph database\nand updates the memory's metadata to track the extraction. Exact mode isolates caller-owned entity identities from automatic alias and punctuation matching. Identity lookup/update is transactional per entity, but the batch is not atomic. On storage failure, success is false and some writes may have persisted; inspect resolved_entities before retrying. Entity replay reuses IDs; relationships retain append semantics. Existing aliases and historical graph contamination are not repaired automatically.","operationId":"apply_memory_kg_extraction_memories__memory_id__extract_kg_apply_post","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryKGApplyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryKGApplyResponse"}}}},"409":{"description":"Multiple stored entities have the same exact name and type; resolve the ambiguity before applying."},"422":{"description":"Invalid request, unsupported resolution value, or invalid exact batch; no graph mutation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"description":"Apply could not complete. Some writes may have persisted; inspect the graph before retrying."}}}},"/memories/reindex":{"post":{"tags":["memories"],"summary":"Reindex Memories Bulk","description":"Reindex multiple memories or all memories needing reindex.\n\nThis endpoint can work for both single and bulk reindexing:\n- If memory_ids is provided: reindex those specific memories\n- If memory_ids is None/empty: reindex all memories with reindex_needed=True","operationId":"reindex_memories_bulk_memories_reindex_post","parameters":[{"name":"batch_size","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"description":"Batch size for concurrent processing","default":3,"title":"Batch Size"},"description":"Batch size for concurrent processing"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryReindexRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReindexResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/reindex/status":{"get":{"tags":["memories"],"summary":"Get Reindex Status","description":"Get status of memories needing reindex.","operationId":"get_reindex_status_memories_reindex_status_get","parameters":[{"name":"include_ids","in":"query","required":false,"schema":{"type":"boolean","description":"Include all memory IDs needing reindex","default":false,"title":"Include Ids"},"description":"Include all memory IDs needing reindex"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReindexStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/search-index/status":{"get":{"tags":["memories"],"summary":"Get Search Index Status","description":"Get status of the search index (LanceDB + hybrid search).\n\nThe embedding model is platform-specific:\n- macOS Apple Silicon: Qwen3-Embedding via mlx-embeddings\n- non-Apple-Silicon (Windows/Linux/macOS Intel): BGE-M3 via FastEmbed/ONNX\n\nThis endpoint checks:\n- Whether the active search embedding backend is available\n- Whether the search index service is initialized","operationId":"get_search_index_status_search_index_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchIndexStatusResponse"}}}}}}},"/search-index/reindex":{"post":{"tags":["memories"],"summary":"Reindex Search Index","description":"Refresh the search projection from authoritative storage.\n\nMost calls perform a full semantic rebuild of:\n- All memories (with search embeddings)\n- All thread messages\n- All Library sources and source chunks\n- All communities\n- All entities\n\nIf the only pending marker is the 0.8.4 Content Store thread-message\nmigration and semantic index metadata already matches the active embedding\nbackend, this endpoint only copies/verifies messages, rebuilds the FTS-only\nmessages_index, and skips embedding initialization.\n\nThe embedding model is platform-specific:\n- macOS Apple Silicon: Qwen3-Embedding via mlx-embeddings\n- non-Apple-Silicon (Windows/Linux/macOS Intel): BGE-M3 via FastEmbed/ONNX\n\nThis is a heavy operation and should only be triggered:\n- After first downloading the search embedding model\n- After a data migration\n- When explicitly requested by the user","operationId":"reindex_search_index_search_index_reindex_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchIndexReindexResponse"}}}}}}},"/search-index/reindex/status":{"get":{"tags":["memories"],"summary":"Get Search Index Reindex Status","description":"Get the current or last-known full search rebuild runtime state.","operationId":"get_search_index_reindex_status_search_index_reindex_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchIndexReindexRuntimeStatusResponse"}}}}}}},"/storage/info":{"get":{"tags":["memories"],"summary":"Get Storage Info","description":"Return on-disk sizes for graph, message store, and search projection.","operationId":"get_storage_info_storage_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageInfoResponse"}}}}}}},"/storage/optimize":{"post":{"tags":["memories"],"summary":"Optimize Storage","description":"Compact search index and flush database changes.\n\nPrunes old LanceDB versions and runs a KuzuDB checkpoint.","operationId":"optimize_storage_storage_optimize_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptimizeStorageResponse"}}}}}}},"/threads/summaries":{"get":{"tags":["threads"],"summary":"Get Thread Summaries","description":"Get all thread titles/summaries.","operationId":"get_thread_summaries_threads_summaries_get","parameters":[{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional isolation space to list","title":"Space Id"},"description":"Optional isolation space to list"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadSummariesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/sources":{"get":{"tags":["threads"],"summary":"Get Thread Sources","description":"Get thread source filters across the full thread set.","operationId":"get_thread_sources_threads_sources_get","parameters":[{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional isolation space to inspect","title":"Space Id"},"description":"Optional isolation space to inspect"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadSourceListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/search":{"get":{"tags":["threads"],"summary":"Search Threads Full","description":"Full thread search with message matching.","operationId":"search_threads_full_threads_search_get","parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","description":"Search query","title":"Query"},"description":"Search query"},{"name":"mode","in":"query","required":false,"schema":{"type":"string","description":"Search mode: 'suggestions' or 'full'","default":"full","title":"Mode"},"description":"Search mode: 'suggestions' or 'full'"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":20,"title":"Limit"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source (e.g. 'openclaw', 'claude-code')","title":"Source"},"description":"Filter by source (e.g. 'openclaw', 'claude-code')"},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional isolation space to search","title":"Space Id"},"description":"Optional isolation space to search"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/sessions/save":{"post":{"tags":["threads"],"summary":"Save Session","description":"Save coding session(s) as conversation thread(s).\n\nAuto-detects sessions from project_path. Creates new thread or appends to existing\n(with deduplication). Supports Claude Code, Codex, and Gemini CLI.\n\nThis endpoint assumes the backend machine can read the session files\ndirectly, so it is a local-host import surface. Remote-safe capture should\nuse ``nmem t save --from ...`` from the client machine instead.\n\nArgs:\n    request: Session save request with client, project_path, and options\n\nReturns:\n    SessionSaveResponse with results for each processed session","operationId":"save_session_threads_sessions_save_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionSaveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionSaveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/import-config":{"get":{"tags":["threads"],"summary":"Get Import Config","description":"Get the current import configuration.","operationId":"get_import_config_threads_import_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportConfigModel"}}}}}},"put":{"tags":["threads"],"summary":"Update Import Config","description":"Update import configuration.","operationId":"update_import_config_threads_import_config_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportConfigUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportConfigModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/import-config/hide-project":{"post":{"tags":["threads"],"summary":"Hide Project","description":"Hide a project from the browse view.","operationId":"hide_project_threads_import_config_hide_project_post","parameters":[{"name":"project_encoded","in":"query","required":true,"schema":{"type":"string","description":"Encoded project path","title":"Project Encoded"},"description":"Encoded project path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Hide Project Threads Import Config Hide Project Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/import-config/unhide-project":{"post":{"tags":["threads"],"summary":"Unhide Project","description":"Unhide a project.","operationId":"unhide_project_threads_import_config_unhide_project_post","parameters":[{"name":"project_encoded","in":"query","required":true,"schema":{"type":"string","description":"Encoded project path","title":"Project Encoded"},"description":"Encoded project path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Unhide Project Threads Import Config Unhide Project Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/import-config/hide-session":{"post":{"tags":["threads"],"summary":"Hide Session","description":"Hide a session from the browse view.","operationId":"hide_session_threads_import_config_hide_session_post","parameters":[{"name":"session_id","in":"query","required":true,"schema":{"type":"string","description":"Session ID","title":"Session Id"},"description":"Session ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Hide Session Threads Import Config Hide Session Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/import-config/unhide-session":{"post":{"tags":["threads"],"summary":"Unhide Session","description":"Unhide a session.","operationId":"unhide_session_threads_import_config_unhide_session_post","parameters":[{"name":"session_id","in":"query","required":true,"schema":{"type":"string","description":"Session ID","title":"Session Id"},"description":"Session ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Unhide Session Threads Import Config Unhide Session Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/watcher/status":{"get":{"tags":["threads"],"summary":"Get Watcher Status","description":"Get the current status of the session watcher.","operationId":"get_watcher_status_threads_watcher_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatcherStatusModel"}}}}}}},"/threads/watcher/start":{"post":{"tags":["threads"],"summary":"Start Watcher","description":"Start the session watcher for auto-importing sessions.","operationId":"start_watcher_threads_watcher_start_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatcherStatusModel"}}}}}}},"/threads/watcher/stop":{"post":{"tags":["threads"],"summary":"Stop Watcher","description":"Stop the session watcher.","operationId":"stop_watcher_threads_watcher_stop_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatcherStatusModel"}}}}}}},"/threads/history-sync/completed":{"post":{"tags":["threads"],"summary":"Mark Thread History Sync Completed","description":"Record a single Timeline card for a completed CLI history sync.","operationId":"mark_thread_history_sync_completed_threads_history_sync_completed_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadHistorySyncCompletedRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Mark Thread History Sync Completed Threads History Sync Completed Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/import":{"post":{"tags":["threads"],"summary":"Import conversations idempotently","description":"Import one conversation with the flat request fields, or use `threads` for a batch. Each item accepts parsed `messages` or conversation `markdown_content`. Provider and frontmatter identities are preserved; otherwise a stable identity is derived from the immutable conversation prefix. Exact replays succeed as already up to date, while later exports append only missing messages. See the [Conversation Markdown format](https://github.com/nowledge-co/community/blob/main/examples/conversation-markdown.md) for portable `.md` files.","operationId":"import_threads_threads_import_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadImportRequest"}}},"required":true},"responses":{"200":{"description":"Per-conversation import results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadImportResponse"}}}},"400":{"description":"No import content supplied"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/conversations/discover":{"get":{"tags":["threads"],"summary":"Discover Conversations","description":"Discover conversation files from AI coding assistants.\n\nScans file system for conversation files from Claude Code, Codex, Cursor, and OpenCode.","operationId":"discover_conversations_threads_conversations_discover_get","parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source: claude, codex, cursor, opencode, or None for all","title":"Source"},"description":"Filter by source: claude, codex, cursor, opencode, or None for all"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationDiscoveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/conversations/import":{"post":{"tags":["threads"],"summary":"Import Conversation","description":"Import a conversation file into Nowledge Mem.\n\nConverts external conversation formats (Claude Code, Codex, Cursor, OpenCode) into threads.","operationId":"import_conversation_threads_conversations_import_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationImportRequestModel"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/conversations/export-raw":{"post":{"tags":["threads"],"summary":"Export Conversation Raw","description":"Export a raw conversation file as markdown or JSON without importing.\n\nParses the session file using the same parsers as import, but returns\nformatted content directly instead of creating a thread.","operationId":"export_conversation_raw_threads_conversations_export_raw_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationExportRawRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/conversations/preview":{"post":{"tags":["threads"],"summary":"Preview Conversation","description":"Load a richer preview for one selected discovered conversation.","operationId":"preview_conversation_threads_conversations_preview_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationPreviewRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/{thread_id}/export":{"get":{"tags":["threads"],"summary":"Export Thread","description":"Export a thread in various formats.","operationId":"export_thread_threads__thread_id__export_get","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","description":"Export format: json, markdown, html","default":"json","title":"Format"},"description":"Export format: json, markdown, html"},{"name":"include_metadata","in":"query","required":false,"schema":{"type":"boolean","description":"Include thread metadata","default":true,"title":"Include Metadata"},"description":"Include thread metadata"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads":{"post":{"tags":["threads"],"summary":"Create Thread","description":"Create a new thread with messages.","operationId":"create_thread_threads_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["threads"],"summary":"List Threads","description":"List threads with filtering and pagination.","operationId":"list_threads_threads_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional isolation space to list","title":"Space Id"},"description":"Optional isolation space to list"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/{thread_id}/append":{"post":{"tags":["threads"],"summary":"Append Messages To Thread","description":"Append messages to existing thread (for MCP integration).\n\nSupports two modes:\n1. Direct messages: `{\"messages\": [...]}`\n2. File-based: `{\"file_path\": \"...\", \"format\": \"auto\"}`\n\nOptional controls:\n- `deduplicate` (default: true)\n- `idempotency_key` (string; used to derive stable external_ids)\n- `space_id` (optional; guards appends to a specific Mem space)","operationId":"append_messages_to_thread_threads__thread_id__append_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppendMessagesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/{thread_id}/reconcile-tail":{"post":{"tags":["threads"],"summary":"Reconcile Thread Tail","description":"Safely replace the tail of a thread without changing append semantics.\n\nOptional request fields:\n- `matched_count` (required int): Number of leading messages that still match\n- `messages` (required array): Replacement tail messages\n- `expected_tail_ids` (optional string[]): Current remote tail message IDs for optimistic concurrency","operationId":"reconcile_thread_tail_threads__thread_id__reconcile_tail_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconcileTailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/{thread_id}":{"get":{"tags":["threads"],"summary":"Get Thread","description":"Get a thread with messages. Supports pagination via limit/offset.","operationId":"get_thread_threads__thread_id__get","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":500,"minimum":1},{"type":"null"}],"description":"Max messages to return","title":"Limit"},"description":"Max messages to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Skip first N messages","default":0,"title":"Offset"},"description":"Skip first N messages"},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional isolation space guard","title":"Space Id"},"description":"Optional isolation space guard"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadFetchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["threads"],"summary":"Delete Thread","description":"Delete a thread and optionally its extracted memories. App cascade commits are per Memory, not one transaction with the parent Thread. Errors may report prior committed Memory deletions and uncertain outcomes. Cloud currently reports zero extracted Memory deletions even when cascade was requested.","operationId":"delete_thread_threads__thread_id__delete","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}},{"name":"cascade_delete_memories","in":"query","required":false,"schema":{"type":"boolean","description":"Delete extracted memories","default":false,"title":"Cascade Delete Memories"},"description":"Delete extracted memories"},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional isolation space guard","title":"Space Id"},"description":"Optional isolation space guard"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteThreadResponse"}}}},"403":{"description":"Caller denied. Prior authorized Memory commits, if any, are not rolled back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadDeletionErrorResponse"}}}},"409":{"description":"App target identity, Space or source linkage changed before a graph write.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadDeletionErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"description":"Deletion could not fully complete. Inspect optional progress; an error does not prove rollback.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadDeletionErrorResponse"}}}}}}},"/threads/{thread_id}/coverage":{"get":{"tags":["threads"],"summary":"Get Thread Coverage","description":"Read-only coverage report for debugging progress issues.","operationId":"get_thread_coverage_threads__thread_id__coverage_get","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadCoverageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/bulk/move/preview":{"post":{"tags":["threads"],"summary":"Preview Bulk Move Threads","description":"Preview a bounded bulk thread move before mutating data.","operationId":"preview_bulk_move_threads_threads_bulk_move_preview_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkMoveThreadsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkMoveThreadsPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/bulk/move":{"post":{"tags":["threads"],"summary":"Bulk Move Threads","description":"Move a bounded selection of threads into another space.","operationId":"bulk_move_threads_threads_bulk_move_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkMoveThreadsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkMoveThreadsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/bulk":{"delete":{"tags":["threads"],"summary":"Bulk Delete Threads","description":"Delete multiple threads and optionally their extracted memories.","operationId":"bulk_delete_threads_threads_bulk_delete","parameters":[{"name":"cascade_delete_memories","in":"query","required":false,"schema":{"type":"boolean","description":"Delete extracted memories","default":false,"title":"Cascade Delete Memories"},"description":"Delete extracted memories"},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional isolation space guard","title":"Space Id"},"description":"Optional isolation space guard"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteThreadsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteThreadsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/bulk/delete":{"post":{"tags":["threads"],"summary":"Bulk Delete Threads By Selection","description":"Delete a bounded thread selection inside one source space.","operationId":"bulk_delete_threads_by_selection_threads_bulk_delete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteThreadsBySelectionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteThreadsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/entities":{"get":{"tags":["entities"],"summary":"List Entities","description":"List entities with optional filtering.\n\nWhen ``include_stats=true`` returns\n``[{\"entity\": EntityNode, \"mention_count\": int}, ...]`` sorted by\nmention_count DESC. Otherwise returns the legacy ``List[EntityNode]``\nsorted by created_at DESC, preserving backwards compatibility for\nolder callers (Tauri commands, MCP tools).","operationId":"list_entities_entities_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"}},{"name":"include_stats","in":"query","required":false,"schema":{"type":"boolean","description":"Return entities sorted by mention_count DESC and include the count alongside each entity. Powers the Library Entities tab's signal-first ranking. When false (default), the response shape is the legacy List[EntityNode].","default":false,"title":"Include Stats"},"description":"Return entities sorted by mention_count DESC and include the count alongside each entity. Powers the Library Entities tab's signal-first ranking. When false (default), the response shape is the legacy List[EntityNode]."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/entities/{entity_id}/relationships":{"get":{"tags":["entities"],"summary":"Get Entity Relationships","description":"Get relationships for a specific entity.\n\nReturns all connected entities and the memories where this entity is mentioned. Use `depth` to control how many hops to traverse.","operationId":"get_entity_relationships_entities__entity_id__relationships_get","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"depth","in":"query","required":false,"schema":{"type":"integer","maximum":3,"minimum":1,"description":"Traversal depth for relationships","default":1,"title":"Depth"},"description":"Traversal depth for relationships"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Maximum relationships to return","default":50,"title":"Limit"},"description":"Maximum relationships to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityRelationshipsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/distill/triage":{"post":{"tags":["distillation"],"summary":"Triage Conversation","description":"Quick check: is this conversation worth saving?","operationId":"triage_conversation_memories_distill_triage_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriageRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Triage Conversation Memories Distill Triage Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/distill/schedule":{"post":{"tags":["distillation"],"summary":"Schedule Distillation","description":"Schedule agent-backed thread distillation for a large or deferred thread.","operationId":"schedule_distillation_memories_distill_schedule_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistillationScheduleRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistillationScheduleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/distill":{"post":{"tags":["distillation"],"summary":"Distill Memories From Thread","description":"Create memories from a conversation thread.","operationId":"distill_memories_from_thread_memories_distill_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistillationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/parse":{"post":{"tags":["distillation"],"summary":"Parse Thread Content","description":"Parse thread content from various formats.","operationId":"parse_thread_content_threads_parse_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadParseRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadParseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/distill/batch-plan":{"post":{"tags":["distillation"],"summary":"Plan Thread Distillation Batch","description":"Build a bounded, read-only plan for bulk thread distillation.","operationId":"plan_thread_distillation_batch_memories_distill_batch_plan_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadDistillationBatchPlanRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadDistillationBatchPlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/graph/vis":{"get":{"tags":["graph-analysis"],"summary":"Graph Vis","description":"Embeddable interactive graph explorer.\n\nReturns a self-contained HTML page with an interactive knowledge graph\nvisualization. The page fetches data from the REST API on load, so it\nworks standalone in any browser or embedded in your application via an\niframe.\n\n**Modes** (pick one, or omit all for a random sample):\n\n- `?query=React` search for memories matching \"React\" and visualize their connections.\n- `?memory_ids=abc,def` explore the neighborhood around specific memories.\n- *(no params)* show a random sample of the graph.\n\n**Embedding:** set `search_bar=false` to hide the top search bar for\na cleaner look when embedding in an iframe or dashboard.","operationId":"graph_vis_graph_vis_get","parameters":[{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search query to filter memories and show their connections.","title":"Query"},"description":"Search query to filter memories and show their connections."},{"name":"memory_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated memory IDs to explore their neighborhood.","title":"Memory Ids"},"description":"Comma-separated memory IDs to explore their neighborhood."},{"name":"depth","in":"query","required":false,"schema":{"type":"integer","maximum":5,"minimum":1,"description":"How many hops to traverse from each seed node.","default":2,"title":"Depth"},"description":"How many hops to traverse from each seed node."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":300,"minimum":10,"description":"Maximum number of nodes to return.","default":50,"title":"Limit"},"description":"Maximum number of nodes to return."},{"name":"search_bar","in":"query","required":false,"schema":{"type":"boolean","description":"Show the search bar. Set to false for clean embedding (e.g. iframe).","default":true,"title":"Search Bar"},"description":"Show the search bar. Set to false for clean embedding (e.g. iframe)."}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/graph/search":{"get":{"tags":["graph-analysis"],"summary":"Search Graph","description":"Search the knowledge graph.\n\nFinds memories matching your query and returns them with their connections as visualization-ready graph data.","operationId":"search_graph_graph_search_get","parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","description":"Search query","title":"Query"},"description":"Search query"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":30,"title":"Limit"}},{"name":"depth","in":"query","required":false,"schema":{"type":"integer","maximum":5,"minimum":1,"description":"Traversal depth for graph search","default":2,"title":"Depth"},"description":"Traversal depth for graph search"},{"name":"node_types","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter by node types","title":"Node Types"},"description":"Filter by node types"},{"name":"edge_types","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter by edge types","title":"Edge Types"},"description":"Filter by edge types"},{"name":"include_metadata","in":"query","required":false,"schema":{"type":"boolean","description":"Include metadata in results","default":true,"title":"Include Metadata"},"description":"Include metadata in results"},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional memory space lens for the graph","title":"Space Id"},"description":"Optional memory space lens for the graph"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/graph/explore":{"get":{"tags":["graph-analysis"],"summary":"Explore Graph","description":"Build a visualization-ready graph neighborhood around one or more memory IDs.","operationId":"explore_graph_graph_explore_get","parameters":[{"name":"memory_ids","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Comma-separated memory IDs to explore as graph seeds","title":"Memory Ids"},"description":"Comma-separated memory IDs to explore as graph seeds"},{"name":"depth","in":"query","required":false,"schema":{"type":"integer","maximum":5,"minimum":1,"description":"Traversal depth for graph expansion around the seed memories","default":1,"title":"Depth"},"description":"Traversal depth for graph expansion around the seed memories"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":300,"minimum":1,"description":"Maximum path rows to inspect when building the graph neighborhood","default":100,"title":"Limit"},"description":"Maximum path rows to inspect when building the graph neighborhood"},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional memory space lens for the graph","title":"Space Id"},"description":"Optional memory space lens for the graph"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphDataResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/graph/sample":{"get":{"tags":["graph-analysis"],"summary":"Get Graph Data","description":"Get a sample of the knowledge graph.\n\nReturns a representative subset of nodes and edges for visualization. Useful for exploring the graph without a specific query.","operationId":"get_graph_data_graph_sample_get","parameters":[{"name":"filter_type","in":"query","required":false,"schema":{"type":"string","title":"Filter Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":10,"default":50,"title":"Limit"}},{"name":"depth","in":"query","required":false,"schema":{"type":"integer","maximum":5,"minimum":1,"description":"Traversal depth for relationships","default":1,"title":"Depth"},"description":"Traversal depth for relationships"},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional memory space lens for the graph","title":"Space Id"},"description":"Optional memory space lens for the graph"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphDataResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/graph/overview":{"get":{"tags":["graph-analysis"],"summary":"Get Graph Overview","description":"Lightweight full-graph endpoint for overview visualization.\n\nReturns all graph-overview node types (Entity, Memory, Source, Thread, Skill)\nwith minimal data (no content, no metadata, no messages) for fast full-graph\nrendering.","operationId":"get_graph_overview_graph_overview_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":10,"default":500,"title":"Limit"}},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional memory space lens for the graph","title":"Space Id"},"description":"Optional memory space lens for the graph"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/graph/shortest-path":{"get":{"tags":["graph-analysis"],"summary":"Get Shortest Path","description":"Find all shortest paths between two nodes using KuzuDB ALL SHORTEST.\n\nNote: KuzuDB does not support parameter binding in recursive relationship\nbounds, so max_depth is interpolated as a validated literal (ge=2, le=20).\n\nReturns all shortest paths (same hop count, different routes) so the\nfrontend can render every connection between the two nodes. The overview\ngraph may not contain all intermediate nodes, so paths are drawn between\nvisible positions.","operationId":"get_shortest_path_graph_shortest_path_get","parameters":[{"name":"from_id","in":"query","required":true,"schema":{"type":"string","description":"Source node ID","title":"From Id"},"description":"Source node ID"},{"name":"to_id","in":"query","required":true,"schema":{"type":"string","description":"Target node ID","title":"To Id"},"description":"Target node ID"},{"name":"max_depth","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":2,"default":10,"title":"Max Depth"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/graph/community-members/{community_id}":{"get":{"tags":["graph-analysis"],"summary":"Get Community Members","description":"Get all nodes belonging to a community.","operationId":"get_community_members_graph_community_members__community_id__get","parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/graph/node-details/{node_id}":{"get":{"tags":["graph-analysis"],"summary":"Get Node Details","description":"Lazy-load full node details (properties, neighbors).","operationId":"get_node_details_graph_node_details__node_id__get","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/graph/expand/{node_id}":{"get":{"tags":["graph-analysis"],"summary":"Expand Neighbors","description":"Expand neighbors of a specific node to get connected nodes and edges with depth-based traversal.","operationId":"expand_neighbors_graph_expand__node_id__get","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}},{"name":"depth","in":"query","required":false,"schema":{"type":"integer","maximum":5,"minimum":1,"description":"Expansion depth","default":1,"title":"Depth"},"description":"Expansion depth"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum neighbors to return","default":50,"title":"Limit"},"description":"Maximum neighbors to return"},{"name":"include_metadata","in":"query","required":false,"schema":{"type":"boolean","description":"Include metadata in results","default":true,"title":"Include Metadata"},"description":"Include metadata in results"},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional memory space lens for the graph","title":"Space Id"},"description":"Optional memory space lens for the graph"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpandNeighborsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/graph/live-preview":{"get":{"tags":["graph-analysis"],"summary":"Get Live Preview Graph","description":"Get a compact merged 1-hop graph for feed/live preview surfaces.","operationId":"get_live_preview_graph_graph_live_preview_get","parameters":[{"name":"node_ids","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Comma-separated memory IDs to preview as graph seeds","title":"Node Ids"},"description":"Comma-separated memory IDs to preview as graph seeds"},{"name":"limit_per_seed","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Maximum direct neighbors to include for each seed node","default":5,"title":"Limit Per Seed"},"description":"Maximum direct neighbors to include for each seed node"},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional memory space lens for the graph","title":"Space Id"},"description":"Optional memory space lens for the graph"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphDataResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/graph/live-preview/{node_id}":{"get":{"tags":["graph-analysis"],"summary":"Get Live Preview Neighbors","description":"Get a compact 1-hop neighborhood for feed/live preview surfaces.\n\nUnlike `expand_neighbors`, this path intentionally avoids path\nmaterialization and returns only direct neighbor rows plus connecting edges.","operationId":"get_live_preview_neighbors_graph_live_preview__node_id__get","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Maximum direct neighbors to return","default":20,"title":"Limit"},"description":"Maximum direct neighbors to return"},{"name":"include_metadata","in":"query","required":false,"schema":{"type":"boolean","description":"Include metadata in results","default":true,"title":"Include Metadata"},"description":"Include metadata in results"},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional memory space lens for the graph","title":"Space Id"},"description":"Optional memory space lens for the graph"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpandNeighborsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/graph/analysis":{"get":{"tags":["graph-analysis"],"summary":"Get Graph Analysis","description":"Get comprehensive graph analysis including community and centrality metrics.\n\nThis endpoint provides a complete overview of the graph structure, communities,\nand centrality measures without triggering new calculations.","operationId":"get_graph_analysis_graph_analysis_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphAnalysisResponseModel"}}}}}}},"/graph/health":{"get":{"tags":["graph-analysis"],"summary":"Graph Analysis Health","description":"Health check for graph analysis.\n\nReturns whether graph analysis features (community detection, importance scoring) are available.","operationId":"graph_analysis_health_graph_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphAnalysisHealthCheckModel"}}}}}}},"/graph/augmentation/state":{"get":{"tags":["graph-analysis"],"summary":"Get Augmentation State","description":"Get the current graph augmentation state.\n\nReturns information about which augmentations are currently applied,\ntheir parameters, and the last augmentation timestamp.","operationId":"get_augmentation_state_graph_augmentation_state_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AugmentationStateModel"}}}}}}},"/graph/augmentation/start":{"post":{"tags":["graph-analysis"],"summary":"Start Augmentation Job","description":"Start a background graph analysis job.\n\nSupported job types:\n- **community_detection** group related entities into topic clusters.\n- **community_summary_enrichment** write missing topic summaries without\n  rebuilding topic structure.\n- **pagerank_calculation** calculate entity importance scores.\n- **undo_community_detection** / **undo_pagerank_calculation** remove previous analysis results.","operationId":"start_augmentation_job_graph_augmentation_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AugmentationStartRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AugmentationJobStartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/graph/augmentation/status/{job_id}":{"get":{"tags":["graph-analysis"],"summary":"Get Job Status","description":"Get the status of a specific augmentation job.\n\nReturns job progress, status, and any error messages.","operationId":"get_job_status_graph_augmentation_status__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AugmentationJobStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/graph/augmentation/jobs":{"get":{"tags":["graph-analysis"],"summary":"List Augmentation Jobs","description":"List recent augmentation jobs.\n\nOptionally filter by status (pending, running, completed, failed).","operationId":"list_augmentation_jobs_graph_augmentation_jobs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":10,"title":"Limit"}},{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AugmentationJobListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/graph/orphans":{"get":{"tags":["graph-analysis"],"summary":"Find Orphaned Entities","description":"Find entities with no connections.\n\nLists entities that aren't linked to any memory or other entity. These are safe to clean up without losing meaningful knowledge.","operationId":"find_orphaned_entities_graph_orphans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrphanedEntitiesResponse"}}}}}},"delete":{"tags":["graph-analysis"],"summary":"Cleanup Orphaned Entities","description":"Remove all unconnected entities.\n\nDeletes entities that have no relationships to memories or other entities. Only affects isolated entities; your memories, labels, and communities are never touched.","operationId":"cleanup_orphaned_entities_graph_orphans_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CleanupOrphansResponse"}}}}}}},"/graph/augmentation/pagerank/plan":{"get":{"tags":["graph-analysis"],"summary":"Plan Pagerank Refresh","description":"Preview a PageRank refresh without scheduling graph augmentation work.","operationId":"plan_pagerank_refresh_graph_augmentation_pagerank_plan_get","parameters":[{"name":"force","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force"}},{"name":"min_nodes","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":2,"title":"Min Nodes"}},{"name":"min_edges","in":"query","required":false,"schema":{"type":"integer","maximum":1000000,"minimum":0,"default":1,"title":"Min Edges"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Plan Pagerank Refresh Graph Augmentation Pagerank Plan Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/trigger/{task_type}/context-plan":{"get":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Plan Scheduled Agent Context","description":"Preview the context injected into supported scheduled agent tasks.\n\nThis endpoint does not enqueue work, does not run the agent, and does not\nask an LLM to decide. It exposes the actual context prefix produced by the\nruntime injector so evals can audit the live input surface before any prompt\nor cadence changes are claimed as improvements.","operationId":"plan_scheduled_agent_context_agent_trigger__task_type__context_plan_get","parameters":[{"name":"task_type","in":"path","required":true,"schema":{"type":"string","title":"Task Type"}},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Plan Scheduled Agent Context Agent Trigger  Task Type  Context Plan Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/trigger/community-detection/plan":{"get":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Plan Community Detection","description":"Preview a community detection refresh without scheduling work.","operationId":"plan_community_detection_agent_trigger_community_detection_plan_get","parameters":[{"name":"resolution","in":"query","required":false,"schema":{"type":"number","maximum":5,"minimum":0.1,"default":1,"title":"Resolution"}},{"name":"generate_ai_summary","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Generate Ai Summary"}},{"name":"scan_limit","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":1,"default":500,"title":"Scan Limit"}},{"name":"summary_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":200,"minimum":1},{"type":"null"}],"title":"Summary Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Plan Community Detection Agent Trigger Community Detection Plan Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/trigger/rule-review/dry-run":{"get":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Dry Run Guidance Rule Review","description":"Preview learned Rule suggestions without writing draft Rules.\n\nThis may call the configured model to judge harvested evidence, but it does\nnot archive stale drafts, write new drafts, enqueue work, or mutate graph\nstate.","operationId":"dry_run_guidance_rule_review_agent_trigger_rule_review_dry_run_get","parameters":[{"name":"queries","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Queries"}},{"name":"memory_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory Id"}},{"name":"memory_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Memory Ids"}},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id"}},{"name":"max_evidence_results","in":"query","required":false,"schema":{"type":"integer","maximum":40,"minimum":2,"default":40,"title":"Max Evidence Results"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dry Run Guidance Rule Review Agent Trigger Rule Review Dry Run Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/trigger/kg-extraction/plan":{"get":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Plan Kg Extraction Backfill","description":"Preview a bounded KG backfill batch without scheduling work.","operationId":"plan_kg_extraction_backfill_agent_trigger_kg_extraction_plan_get","parameters":[{"name":"scan_limit","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":1,"default":500,"title":"Scan Limit"}},{"name":"batch_size","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"default":5,"title":"Batch Size"}},{"name":"repair_empty","in":"query","required":false,"schema":{"type":"boolean","description":"When true, preview a bounded repair wave for memories previously marked extracted but carrying no graph facts.","default":false,"title":"Repair Empty"},"description":"When true, preview a bounded repair wave for memories previously marked extracted but carrying no graph facts."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Plan Kg Extraction Backfill Agent Trigger Kg Extraction Plan Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/trigger/memory-created/plan":{"get":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Plan Memory Created Events","description":"Preview the next memory-created flush without mutating scheduler state.","operationId":"plan_memory_created_events_agent_trigger_memory_created_plan_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Plan Memory Created Events Agent Trigger Memory Created Plan Get"}}}}}}},"/agent/trigger/memory-compaction/plan":{"get":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Plan Memory Compaction","description":"Preview the exact compaction candidate context without queueing work.\n\nThis endpoint does not ask the agent to decide, does not create EVOLVES\nedges, does not create crystals, and does not enqueue the compaction task.\nIt exposes the same pre-computed candidate context the scheduled task would\ninject into the Knowledge Agent so evals can measure the real input surface.","operationId":"plan_memory_compaction_agent_trigger_memory_compaction_plan_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":30,"title":"Limit"}},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Plan Memory Compaction Agent Trigger Memory Compaction Plan Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/trigger/memory-cleanup/plan":{"get":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Plan Memory Cleanup","description":"Preview Memory cleanup lanes without queueing or mutating anything.","operationId":"plan_memory_cleanup_agent_trigger_memory_cleanup_plan_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":30,"title":"Limit"}},{"name":"scan_limit","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":1,"default":500,"title":"Scan Limit"}},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id"}},{"name":"emit_event","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Emit Event"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Plan Memory Cleanup Agent Trigger Memory Cleanup Plan Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/trigger/memory-cleanup/archive":{"post":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Archive Memory Cleanup Candidates","description":"Archive user-reviewed cleanup candidates after server-side revalidation.\n\nThe client only submits ids from the visible review. The server re-reads the\nsource-of-truth rows and re-runs the cleanup classifier so stale UI state can\nnever archive a memory that was visited, pinned, or otherwise protected after\nthe review was rendered.","operationId":"archive_memory_cleanup_candidates_agent_trigger_memory_cleanup_archive_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryCleanupArchiveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Archive Memory Cleanup Candidates Agent Trigger Memory Cleanup Archive Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/trigger/memory-cleanup/keep":{"post":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Keep Memory Cleanup Candidates","description":"Mark user-reviewed cleanup candidates as intentionally kept.\n\nThis is the negative-feedback side of cleanup governance. Dismissing a\nTimeline card should not make Mem ask about the same rows again next week;\nit should become an explicit retention signal on the Memory itself. The\nserver still revalidates each id so changed or hidden rows are skipped.","operationId":"keep_memory_cleanup_candidates_agent_trigger_memory_cleanup_keep_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryCleanupKeepRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Keep Memory Cleanup Candidates Agent Trigger Memory Cleanup Keep Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/trigger/memory-cleanup/compaction":{"post":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Queue Memory Cleanup Compaction","description":"Queue semantic compaction for user-reviewed cleanup candidates.\n\nThis is deliberately not an automatic merge.  It re-reads each submitted\nmemory id, re-runs the cleanup classifier, and only queues the bounded\nMemory Compaction task for rows still in the semantic-review lane.","operationId":"queue_memory_cleanup_compaction_agent_trigger_memory_cleanup_compaction_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryCleanupCompactionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Queue Memory Cleanup Compaction Agent Trigger Memory Cleanup Compaction Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/trigger/thread-synced/plan":{"get":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Plan Thread Synced Events","description":"Preview the next thread-sync flush without mutating scheduler state.","operationId":"plan_thread_synced_events_agent_trigger_thread_synced_plan_get","parameters":[{"name":"max_tasks","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":0},{"type":"null"}],"title":"Max Tasks"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Plan Thread Synced Events Agent Trigger Thread Synced Plan Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/trigger/wm-refresh":{"post":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Trigger Wm Refresh","description":"Queue a bounded Working Memory refresh.\n\nWith memory IDs, this reviews only those memories plus the current Working\nMemory. Without IDs, it is a cheap dispatch/proof run that records the\ncurrent direct path without opening a tool-using agent session.","operationId":"trigger_wm_refresh_agent_trigger_wm_refresh_post","parameters":[{"name":"memory_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional comma-separated memory IDs to consider.","title":"Memory Ids"},"description":"Optional comma-separated memory IDs to consider."},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Trigger Wm Refresh Agent Trigger Wm Refresh Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/models/bge-m3/status":{"get":{"tags":["models"],"summary":"Get Bge M3 Status","description":"Check the status of the search embedding model.\n\nThe embedding model powers hybrid search (combining keyword and semantic matching). The specific model is selected automatically based on your platform for best performance.","operationId":"get_bge_m3_status_models_bge_m3_status_get","parameters":[{"name":"full_verify","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Full Verify"}},{"name":"force_refresh","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force Refresh"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BGEM3StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/models/bge-m3/install":{"post":{"tags":["models"],"summary":"Install Bge M3","description":"Download and install the search embedding model.\n\nThe right model for your platform is selected automatically. When the\nresponse includes `reindex_required=true`, run `/search-index/reindex` to\nrefresh existing searchable content.","operationId":"install_bge_m3_models_bge_m3_install_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BGEM3InstallRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BGEM3InstallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/models/memory-status":{"get":{"tags":["models"],"summary":"Get Model Memory Status","description":"Return which local model weights are currently resident in RAM.","operationId":"get_model_memory_status_models_memory_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelMemoryStatusResponse"}}}}}}},"/models/unload/{model_type}":{"post":{"tags":["models"],"summary":"Unload Model","description":"Manually unload a model from memory.\n\nThe model will reload automatically on next use.","operationId":"unload_model_models_unload__model_type__post","parameters":[{"name":"model_type","in":"path","required":true,"schema":{"enum":["embedding","llm"],"type":"string","title":"Model Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelUnloadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/data/export":{"post":{"tags":["data-transfer"],"summary":"Export Data","description":"Export your data to a portable archive.\n\nCreates a .zip (or folder) containing memories, threads, entities, labels, sources, managed skills, and working memory. Use this for backups or migrating to another device.\n\nBy default this endpoint is synchronous for REST and CLI compatibility. Set `async` to `true` to start a background export job and poll `/data/export/status/{job_id}` until the job is completed or reports an error.","operationId":"export_data_data_export_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataExportRequest"}}},"required":true},"responses":{"200":{"description":"Export result or background job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataExportResponse"}}}},"409":{"description":"Another data transfer is already running","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTransferErrorResponse"}}}},"422":{"description":"collaboration_transfer_unsupported: retained collaboration history requires a complete authority backup; not retryable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTransferErrorResponse"}}}},"500":{"description":"Export could not be completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTransferErrorResponse"}}}},"503":{"description":"collaboration_storage_failure: collaboration history could not be checked; retryable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTransferErrorResponse"}}}}}}},"/data/export/status/{job_id}":{"get":{"tags":["data-transfer"],"summary":"Get Export Status","description":"Check the progress of a background data export job started with `POST /data/export` and `async: true`.","operationId":"get_export_status_data_export_status__job_id__get","parameters":[{"name":"job_id","in":"path","description":"Data transfer job id","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Export job status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataImportStatusResponse"}}}},"404":{"description":"Data transfer job not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTransferErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/data/import":{"post":{"tags":["data-transfer"],"summary":"Import Data","description":"Import data from a previous export.\n\nRuns in the background. Poll `/data/import/status/{job_id}` to check progress. Supports merge (combine with existing), skip (keep existing), or overwrite modes.","operationId":"import_data_data_import_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataImportRequest"}}},"required":true},"responses":{"200":{"description":"Import job started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataImportStartResponse"}}}},"409":{"description":"Another data transfer is already running","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTransferErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"description":"Import could not be started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTransferErrorResponse"}}}}}}},"/data/export/download":{"post":{"tags":["data-transfer"],"summary":"Export Data Download","description":"Export data as a downloadable zip file.\n\nStreams the zip archive directly to the client. Use this from remote or web clients that cannot write to the server filesystem.","operationId":"export_data_download_data_export_download_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataExportDownloadRequest"}}},"required":true},"responses":{"200":{"description":"Portable export archive","content":{"application/json":{"schema":{}},"application/zip":{"schema":{"type":"string"}}}},"422":{"description":"collaboration_transfer_unsupported: retained collaboration history requires a complete authority backup; not retryable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTransferErrorResponse"}}}},"500":{"description":"Export could not be completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTransferErrorResponse"}}}},"503":{"description":"collaboration_storage_failure: collaboration history could not be checked; retryable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTransferErrorResponse"}}}}}}},"/data/import/upload":{"post":{"tags":["data-transfer"],"summary":"Import Data Upload","description":"Import data from an uploaded zip file.\n\nAccepts a multipart file upload and runs the import in the background. Poll `/data/import/status/{job_id}` to check progress. Use this from remote or web clients that cannot access the server filesystem.","operationId":"import_data_upload_data_import_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","title":"Body_import_data_upload_data_import_upload_post","description":"Multipart body for POST /data/import/upload.","required":["file"],"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream"},"include_communities":{"type":"boolean","default":true},"include_edges":{"type":"boolean","default":true},"include_entities":{"type":"boolean","default":true},"include_feed_events":{"type":"boolean","description":"Include durable Timeline history from feed_events/*.jsonl.","default":true},"include_labels":{"type":"boolean","default":true},"include_memories":{"type":"boolean","default":true},"include_messages":{"type":"boolean","default":true},"include_skills":{"type":"boolean","default":true},"include_source_files":{"type":"boolean","default":true},"include_sources":{"type":"boolean","default":true},"include_threads":{"type":"boolean","default":true},"include_working_memory":{"type":"boolean","default":true},"include_working_memory_archive":{"type":"boolean","default":true},"mode":{"$ref":"#/components/schemas/DataImportMode"}}}}},"required":true},"responses":{"200":{"description":"Import job started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataImportStartResponse"}}}},"409":{"description":"Another data transfer is already running","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTransferErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"description":"Upload or import could not be started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTransferErrorResponse"}}}}}}},"/data/checkpoint":{"post":{"tags":["data-transfer"],"summary":"Checkpoint Data","description":"Flush pending changes to disk.\n\nEnsures all recent writes are safely persisted. Called automatically before app updates, but can be triggered manually.","operationId":"checkpoint_data_data_checkpoint_post","responses":{"200":{"description":"Checkpoint result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTransferCheckpointResponse"}}}},"500":{"description":"Checkpoint failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTransferErrorResponse"}}}}}}},"/data/import/status/{job_id}":{"get":{"tags":["data-transfer"],"summary":"Get Import Status","description":"Check the progress of a data import job.","operationId":"get_import_status_data_import_status__job_id__get","parameters":[{"name":"job_id","in":"path","description":"Data transfer job id","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Import job status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataImportStatusResponse"}}}},"404":{"description":"Data transfer job not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTransferErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/content-store/migration/status":{"get":{"tags":["content-store"],"summary":"Get Content Store Migration Status","description":"Return the truthful Content Store ownership and migration state.","operationId":"get_content_store_migration_status_content_store_migration_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Content Store Migration Status Content Store Migration Status Get"}}}}}}},"/content-store/thread-messages/copy-batch":{"post":{"tags":["content-store"],"summary":"Copy Thread Messages Batch","description":"Copy one bounded legacy Kuzu Message page into SQLite.","operationId":"copy_thread_messages_batch_content_store_thread_messages_copy_batch_post","parameters":[{"name":"batch_size","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":500,"title":"Batch Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Copy Thread Messages Batch Content Store Thread Messages Copy Batch Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/content-store/thread-messages/copy-all":{"post":{"tags":["content-store"],"summary":"Copy Thread Messages Until Finished","description":"Copy legacy messages in bounded batches without cutting over ownership.","operationId":"copy_thread_messages_until_finished_content_store_thread_messages_copy_all_post","parameters":[{"name":"batch_size","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":500,"title":"Batch Size"}},{"name":"max_batches","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"default":1000,"title":"Max Batches"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Copy Thread Messages Until Finished Content Store Thread Messages Copy All Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/content-store/thread-messages/verify":{"post":{"tags":["content-store"],"summary":"Verify Thread Message Copy","description":"Verify SQLite contains every legacy message and no orphan thread rows.","operationId":"verify_thread_message_copy_content_store_thread_messages_verify_post","parameters":[{"name":"batch_size","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":500,"title":"Batch Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Verify Thread Message Copy Content Store Thread Messages Verify Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/content-store/thread-messages/cutover":{"post":{"tags":["content-store"],"summary":"Cut Over Thread Messages","description":"Make SQLite the runtime owner after verification has marked it ready.","operationId":"cut_over_thread_messages_content_store_thread_messages_cutover_post","parameters":[{"name":"batch_size","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":500,"title":"Batch Size"}},{"name":"max_batches","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"default":1000,"title":"Max Batches"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cut Over Thread Messages Content Store Thread Messages Cutover Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/content-store/thread-messages/migrate-anchors":{"post":{"tags":["content-store"],"summary":"Migrate Thread Message Anchors","description":"Backfill legacy Memory->Message links into SQLite content anchors.","operationId":"migrate_thread_message_anchors_content_store_thread_messages_migrate_anchors_post","parameters":[{"name":"batch_size","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":500,"title":"Batch Size"}},{"name":"max_batches","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"default":1000,"title":"Max Batches"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Migrate Thread Message Anchors Content Store Thread Messages Migrate Anchors Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/content-store/thread-messages/migrate-through-cutover":{"post":{"tags":["content-store"],"summary":"Migrate Thread Messages Through Cutover","description":"Run copy, verification, anchor backfill, and non-destructive cutover.","operationId":"migrate_thread_messages_through_cutover_content_store_thread_messages_migrate_through_cutover_post","parameters":[{"name":"batch_size","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":500,"title":"Batch Size"}},{"name":"max_batches","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"default":1000,"title":"Max Batches"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Migrate Thread Messages Through Cutover Content Store Thread Messages Migrate Through Cutover Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/content-store/thread-messages/cleanup-legacy-graph":{"post":{"tags":["content-store"],"summary":"Cleanup Legacy Thread Message Graph","description":"Preview or run bounded deletion of legacy Kuzu Message graph rows.","operationId":"cleanup_legacy_thread_message_graph_content_store_thread_messages_cleanup_legacy_graph_post","parameters":[{"name":"batch_size","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":500,"title":"Batch Size"}},{"name":"max_batches","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"default":100,"title":"Max Batches"}},{"name":"dry_run","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Dry Run"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cleanup Legacy Thread Message Graph Content Store Thread Messages Cleanup Legacy Graph Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/status":{"get":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Get Agent Status","description":"Get the Knowledge Agent's current status.","operationId":"get_agent_status_agent_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Agent Status Agent Status Get"}}}}}}},"/agent/trigger/daily-briefing":{"post":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Trigger Daily Briefing","description":"Manually trigger a daily briefing.","operationId":"trigger_daily_briefing_agent_trigger_daily_briefing_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Trigger Daily Briefing Agent Trigger Daily Briefing Post"}}}}}}},"/agent/trigger/crystallization":{"post":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Trigger Crystallization","description":"Trigger a crystallization review.\n\nThe agent analyzes recent memories and synthesizes higher-level insights: patterns, recurring themes, and emerging conclusions.","operationId":"trigger_crystallization_agent_trigger_crystallization_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Trigger Crystallization Agent Trigger Crystallization Post"}}}}}}},"/agent/trigger/insight-detection":{"post":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Trigger Insight Detection","description":"Manually trigger proactive insight detection.","operationId":"trigger_insight_detection_agent_trigger_insight_detection_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Trigger Insight Detection Agent Trigger Insight Detection Post"}}}}}}},"/agent/trigger/skill-review":{"post":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Trigger Skill Review","description":"Manually trigger a skill target review.\n\nSurfaces reusable procedural capabilities from recurring EVOLVES chains as\nskill candidates. Detection only: proposes candidates, never compiles skills.","operationId":"trigger_skill_review_agent_trigger_skill_review_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Trigger Skill Review Agent Trigger Skill Review Post"}}}}}}},"/agent/trigger/rule-review":{"post":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Trigger Guidance Review","description":"Manually trigger learned rule candidate review.\n\nDetection only: suggests draft always-on rules from repeated memory\nevidence. Drafts are not injected into Context Bundle until the user enables\nthem.","operationId":"trigger_guidance_review_agent_trigger_rule_review_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Trigger Guidance Review Agent Trigger Rule Review Post"}}}}}}},"/agent/trigger/skill-compile":{"post":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Trigger Skill Compile","description":"Compile one promoted candidate into a draft skill.\n\nReads the candidate's evidence and writes a SKILL.md bundle, moving the\ncandidate to 'draft' for review. Triggered after the user promotes a candidate.","operationId":"trigger_skill_compile_agent_trigger_skill_compile_post","parameters":[{"name":"skill_id","in":"query","required":true,"schema":{"type":"string","title":"Skill Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Trigger Skill Compile Agent Trigger Skill Compile Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/trigger/decay-refresh":{"post":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Trigger Decay Refresh","description":"Recalculate memory relevance scores.\n\nRefreshes the time-based relevance ranking so frequently accessed and recently updated memories surface higher in search results.","operationId":"trigger_decay_refresh_agent_trigger_decay_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Trigger Decay Refresh Agent Trigger Decay Refresh Post"}}}}}}},"/agent/trigger/memory-compaction":{"post":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Trigger Memory Compaction","description":"Review and merge similar memories.\n\nThe agent scans for memories that cover the same topic and suggests merging duplicates or linking related ones.","operationId":"trigger_memory_compaction_agent_trigger_memory_compaction_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Trigger Memory Compaction Agent Trigger Memory Compaction Post"}}}}}}},"/agent/trigger/label-consolidation":{"post":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Trigger Label Consolidation","description":"Consolidate duplicate labels across the knowledge graph.\n\nEmbedding finds semantically-similar label pairs (including cross-language),\nan LLM judges which are the same concept, and confirmed duplicates are\nmerged into one (reversible). Pass dry_run=true to preview the LLM's\nproposed merges in the feed event without changing anything.","operationId":"trigger_label_consolidation_agent_trigger_label_consolidation_post","parameters":[{"name":"dry_run","in":"query","required":false,"schema":{"type":"boolean","description":"Preview proposed merges without applying them","default":false,"title":"Dry Run"},"description":"Preview proposed merges without applying them"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Trigger Label Consolidation Agent Trigger Label Consolidation Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/trigger/unit-type-reclassification":{"post":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Trigger Unit Type Reclassification","description":"Review weak Memory unit_type metadata.\n\nThis on-demand maintenance task never changes content or embeddings. Apply\nmode updates Kuzu metadata and patches LanceDB filter metadata in place.","operationId":"trigger_unit_type_reclassification_agent_trigger_unit_type_reclassification_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnitTypeReclassificationRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Trigger Unit Type Reclassification Agent Trigger Unit Type Reclassification Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/trigger/community-detection":{"post":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Trigger Community Detection","description":"Detect topic clusters in the knowledge graph.\n\nGroups related entities into communities and generates AI summaries for each cluster.","operationId":"trigger_community_detection_agent_trigger_community_detection_post","parameters":[{"name":"resolution","in":"query","required":false,"schema":{"type":"number","default":1,"title":"Resolution"}},{"name":"generate_ai_summary","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Generate Ai Summary"}},{"name":"summary_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":200,"minimum":1},{"type":"null"}],"title":"Summary Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Trigger Community Detection Agent Trigger Community Detection Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/trigger/kg-extraction":{"post":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Trigger Kg Extraction","description":"Extract entities and relationships from memories.\n\nBuilds the knowledge graph by analyzing memory content. Use `backfill=true`\nto queue the next bounded backfill wave for unprocessed memories, or pass\nspecific `memory_ids` to target individual ones.","operationId":"trigger_kg_extraction_agent_trigger_kg_extraction_post","parameters":[{"name":"backfill","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Backfill"}},{"name":"memory_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated memory IDs for scoped extraction","title":"Memory Ids"},"description":"Comma-separated memory IDs for scoped extraction"},{"name":"scan_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":2000,"minimum":1},{"type":"null"}],"title":"Scan Limit"}},{"name":"batch_size","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":10,"minimum":1},{"type":"null"}],"title":"Batch Size"}},{"name":"repair_empty","in":"query","required":false,"schema":{"type":"boolean","description":"When backfill=true, process a bounded repair wave for memories previously marked extracted but carrying no graph facts.","default":false,"title":"Repair Empty"},"description":"When backfill=true, process a bounded repair wave for memories previously marked extracted but carrying no graph facts."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Trigger Kg Extraction Agent Trigger Kg Extraction Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/knowledge-processing/status":{"get":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Get Knowledge Processing Status","description":"Get knowledge processing settings and status.\n\nReturns current configuration, task status history, and token budget usage.","operationId":"get_knowledge_processing_status_agent_knowledge_processing_status_get","parameters":[{"name":"include_settings","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Settings"}},{"name":"include_ledgers","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Ledgers"}},{"name":"include_dedup","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Dedup"}},{"name":"include_usage","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Usage"}},{"name":"include_history","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include History"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Knowledge Processing Status Agent Knowledge Processing Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/tasks/overview":{"get":{"tags":["knowledge-agent"],"summary":"Get In Flight Overview","description":"Read-only projection over the three background task mechanisms: the scheduler queue, one-shot reminders, and recurring AI automations.\n\nCreates no entity and stores nothing. Every row is derived at read time from a store that already exists. This surface shows and links; pausing or resuming a recurring task belongs to `/agent/ai-now/schedules/{schedule_id}/pause` and stopping a running task belongs to `/agent/knowledge-processing/tasks/cancel`.\n\nCross-space: background work is not space-scoped on this plane, so the projection reads the whole server.","operationId":"get_in_flight_overview_agent_tasks_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","required":["agent_running","generated_at","running","queued","scheduled_once","recurring"],"properties":{"agent_running":{"type":"boolean","description":"False means the server has no scheduler attached, so empty groups mean 'not observed', not 'nothing scheduled'."},"generated_at":{"type":"string"},"running":{"type":"array","items":{"type":"object","required":["kind","id","title","lane"],"properties":{"kind":{"type":"string","enum":["scheduler","reminder","recurring"],"description":"Which existing mechanism produced this row."},"id":{"type":"string","description":"Stable within its own mechanism."},"title":{"type":"string"},"lane":{"type":"string","description":"The lane / task type that owns this work."},"detail":{"type":"string","description":"Optional subject line: thread title, source name, or reminder note."},"started_at":{"type":"string","description":"RFC 3339; set when the row is executing."},"next_run_at":{"type":"string","description":"RFC 3339; set when the row has not run yet."},"status":{"type":"string","enum":["active","paused","draft"],"description":"Recurring rows only. A paused or unconfirmed automation stays visible, marked."},"last_result":{"type":"object","required":["status","at"],"properties":{"status":{"type":"string","description":"success | partial | skipped | failed | cancelled"},"at":{"type":"string"},"summary":{"type":"string"}},"description":"The last settled run, when the source store recorded one."}}}},"queued":{"type":"array","items":{"type":"object","required":["kind","id","title","lane"],"properties":{"kind":{"type":"string","enum":["scheduler","reminder","recurring"],"description":"Which existing mechanism produced this row."},"id":{"type":"string","description":"Stable within its own mechanism."},"title":{"type":"string"},"lane":{"type":"string","description":"The lane / task type that owns this work."},"detail":{"type":"string","description":"Optional subject line: thread title, source name, or reminder note."},"started_at":{"type":"string","description":"RFC 3339; set when the row is executing."},"next_run_at":{"type":"string","description":"RFC 3339; set when the row has not run yet."},"status":{"type":"string","enum":["active","paused","draft"],"description":"Recurring rows only. A paused or unconfirmed automation stays visible, marked."},"last_result":{"type":"object","required":["status","at"],"properties":{"status":{"type":"string","description":"success | partial | skipped | failed | cancelled"},"at":{"type":"string"},"summary":{"type":"string"}},"description":"The last settled run, when the source store recorded one."}}}},"scheduled_once":{"type":"array","items":{"type":"object","required":["kind","id","title","lane"],"properties":{"kind":{"type":"string","enum":["scheduler","reminder","recurring"],"description":"Which existing mechanism produced this row."},"id":{"type":"string","description":"Stable within its own mechanism."},"title":{"type":"string"},"lane":{"type":"string","description":"The lane / task type that owns this work."},"detail":{"type":"string","description":"Optional subject line: thread title, source name, or reminder note."},"started_at":{"type":"string","description":"RFC 3339; set when the row is executing."},"next_run_at":{"type":"string","description":"RFC 3339; set when the row has not run yet."},"status":{"type":"string","enum":["active","paused","draft"],"description":"Recurring rows only. A paused or unconfirmed automation stays visible, marked."},"last_result":{"type":"object","required":["status","at"],"properties":{"status":{"type":"string","description":"success | partial | skipped | failed | cancelled"},"at":{"type":"string"},"summary":{"type":"string"}},"description":"The last settled run, when the source store recorded one."}}}},"recurring":{"type":"array","items":{"type":"object","required":["kind","id","title","lane"],"properties":{"kind":{"type":"string","enum":["scheduler","reminder","recurring"],"description":"Which existing mechanism produced this row."},"id":{"type":"string","description":"Stable within its own mechanism."},"title":{"type":"string"},"lane":{"type":"string","description":"The lane / task type that owns this work."},"detail":{"type":"string","description":"Optional subject line: thread title, source name, or reminder note."},"started_at":{"type":"string","description":"RFC 3339; set when the row is executing."},"next_run_at":{"type":"string","description":"RFC 3339; set when the row has not run yet."},"status":{"type":"string","enum":["active","paused","draft"],"description":"Recurring rows only. A paused or unconfirmed automation stays visible, marked."},"last_result":{"type":"object","required":["status","at"],"properties":{"status":{"type":"string","description":"success | partial | skipped | failed | cancelled"},"at":{"type":"string"},"summary":{"type":"string"}},"description":"The last settled run, when the source store recorded one."}}}}},"title":"InFlightOverview"}}}}}}},"/agent/token-usage":{"get":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Get Token Usage Summary","description":"Return the local model-usage ledger for UI and enterprise integrations.","operationId":"get_token_usage_summary_agent_token_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Token Usage Summary Agent Token Usage Get"}}}}}}},"/agent/knowledge-processing/tasks/cancel":{"post":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Cancel Knowledge Processing Task","description":"Cancel a queued or running Knowledge Processing task.","operationId":"cancel_knowledge_processing_task_agent_knowledge_processing_tasks_cancel_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelKnowledgeProcessingTaskRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Cancel Knowledge Processing Task Agent Knowledge Processing Tasks Cancel Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/working-memory":{"get":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Get Working Memory","description":"Read the agent's working memory.\n\nReturns today's working memory by default. Pass a `date` (YYYY-MM-DD) to read an archived day instead.","operationId":"get_working_memory_agent_working_memory_get","parameters":[{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"YYYY-MM-DD for archived WM","title":"Date"},"description":"YYYY-MM-DD for archived WM"},{"name":"space_id","in":"query","required":false,"schema":{"type":"string","description":"Isolation space to read","default":"default","title":"Space Id"},"description":"Isolation space to read"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Working Memory Agent Working Memory Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Update Working Memory","description":"Save changes to the agent's working memory.\n\nContent must include at least a Focus Areas or Briefing section. Maximum 4 KB.","operationId":"update_working_memory_agent_working_memory_put","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkingMemoryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Working Memory Agent Working Memory Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/working-memory/history":{"get":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Get Working Memory History","description":"List dates with archived working memory.\n\nReturns available dates newest-first. Use a specific date with the GET endpoint to read that day's content.","operationId":"get_working_memory_history_agent_working_memory_history_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Limit"}},{"name":"space_id","in":"query","required":false,"schema":{"type":"string","description":"Isolation space to inspect","default":"default","title":"Space Id"},"description":"Isolation space to inspect"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Working Memory History Agent Working Memory History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/evolves":{"get":{"tags":["knowledge-agent","knowledge-agent"],"summary":"Get Evolves Edges","description":"Get memory evolution chains.\n\nShows how memories have been updated, enriched, or superseded over time. Filter by a specific `memory_id` to see its full version history. Use `offset` to paginate; `total` in the response reflects the count under the same filters.","operationId":"get_evolves_edges_agent_evolves_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":"content_relation","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Relation"}},{"name":"unreviewed_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Unreviewed Only"}},{"name":"memory_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter to EVOLVES edges where this memory appears as older or newer node.","title":"Memory Id"},"description":"Filter to EVOLVES edges where this memory appears as older or newer node."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Evolves Edges Agent Evolves Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/feed/events":{"get":{"tags":["knowledge-agent"],"summary":"Get Feed Events","description":"Read immutable Timeline events with bounded pagination and filters. Set review_only with unresolved_only to project the pending Memory Review Inbox; membership is determined by event type rather than presentation severity. Each pending review advertises allowed_actions, the conservative recommended_action for explicit approval, automatic_resolution=expired_no_change, and its absolute expires_at timestamp.","operationId":"get_feed_events_agent_feed_events_get","parameters":[{"name":"limit","in":"query","description":"Maximum events returned on this page.","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":50,"title":"Limit","format":"int64"}},{"name":"offset","in":"query","description":"Zero-based result offset.","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset","format":"int64"}},{"name":"severity","in":"query","description":"Filter by presentation severity.","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity","type":"string"}},{"name":"event_type","in":"query","description":"Filter by one exact event type.","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type","type":"string"}},{"name":"unresolved_only","in":"query","description":"Return only events that have not been resolved.","required":false,"schema":{"type":"boolean","default":false,"title":"Unresolved Only"}},{"name":"review_only","in":"query","description":"Project only actionable Timeline review families. Event type, not\npresentation severity, defines membership (Cloud/local parity).","required":false,"schema":{"type":"boolean","default":false}},{"name":"last_n_days","in":"query","description":"Number of recent date partitions to scan when no explicit range is supplied.","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":90,"title":"Last N Days","format":"int64"}},{"name":"date_from","in":"query","description":"Start of date range (YYYY-MM-DD). Overrides last_n_days lower bound.","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start of date range (YYYY-MM-DD). Overrides last_n_days lower bound.","title":"Date From","type":"string"}},{"name":"date_to","in":"query","description":"End of date range (YYYY-MM-DD, inclusive). Defaults to today.","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End of date range (YYYY-MM-DD, inclusive). Defaults to today.","title":"Date To","type":"string"}},{"name":"source","in":"query","description":"Filter by metadata.source value (e.g. 'library:source_id').","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by metadata.source value (e.g. 'library:source_id').","title":"Source","type":"string"}},{"name":"space_id","in":"query","description":"Filter by memory space. Feed storage stays global; matching is based on event metadata or related memories.","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by memory space. Feed storage stays global; matching is based on event metadata or related memories.","title":"Space Id","type":"string"}},{"name":"include_total","in":"query","description":"Return an exact total count. Set false for faster first-page loading when only page data and has_more are needed.","required":false,"schema":{"type":"boolean","description":"Return an exact total count. Set false for faster first-page loading when only page data and has_more are needed.","default":true,"title":"Include Total"}},{"name":"tz","in":"query","description":"Client IANA timezone so `date_from`/`date_to` (local day strings from the\ncalendar/timeline) compare against each event's LOCAL day, not its UTC day.\nAbsent/unknown → UTC (prior behavior).","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Timeline page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedEventsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/feed/events/{event_id}/retry":{"post":{"tags":["knowledge-agent","knowledge-agent","knowledge-agent"],"summary":"Retry Event","description":"Retry a failed background task.\n\nRe-submits the task with high priority. The original event is marked as retried.","operationId":"retry_event_agent_feed_events__event_id__retry_post","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Retry Event Agent Feed Events  Event Id  Retry Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/feed/events/{event_id}/resolve":{"post":{"tags":["knowledge-agent"],"summary":"Resolve Timeline Review","description":"Resolve one pending Memory review through the server's audited executor. Prefer review_action: the server validates the action against the stored event and performs any graph mutation before marking the event resolved. A failed action leaves the review pending. Replays are idempotent and return the persisted decision with already_resolved=true.","operationId":"resolve_event_agent_feed_events__event_id__resolve_post","parameters":[{"name":"event_id","in":"path","description":"Timeline review event id","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"review_action","in":"query","description":"Semantic review action; JSON body is preferred","required":false,"schema":{"$ref":"#/components/schemas/TimelineReviewAction"}},{"name":"resolution","in":"query","description":"Resolution type: accepted|dismissed|merged","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resolution type: accepted|dismissed|merged","title":"Resolution","type":"string"}},{"name":"action","in":"query","description":"Graph action: delete_memory|keep_newer|keep_both","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Graph action: delete_memory|keep_newer|keep_both","title":"Action","type":"string"}},{"name":"memory_ids","in":"query","description":"Comma-separated memory IDs to act on","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated memory IDs to act on","title":"Memory Ids","type":"string"}},{"name":"resolution_note","in":"query","description":"Optional human/agent note explaining a custom resolution","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional human/agent note explaining a custom resolution","title":"Resolution Note","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TimelineReviewResolveRequest"}]}}}},"responses":{"200":{"description":"Review resolved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimelineReviewResolveResponse"}}}},"404":{"description":"Review not found"},"409":{"description":"Review already resolved"},"422":{"description":"Action is invalid for this review","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/feed/events/{event_id}":{"delete":{"tags":["knowledge-agent"],"summary":"Hide Feed Event","description":"Compatibility endpoint that hides an immutable Timeline event from the current viewer. It does not delete the event or its evidence. Use PUT /agent/feed/events/{event_id}/visibility to hide or restore explicitly.","operationId":"delete_feed_event_agent_feed_events__event_id__delete","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Event hidden for the current viewer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedEventVisibilityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/feed/input/persist-question":{"post":{"tags":["knowledge-agent","knowledge-agent","knowledge-agent"],"summary":"Persist Question","description":"Save a question and its response as a feed event.\n\nCalled after agent streaming completes to persist the Q&A in the feed timeline. Does not create memories, only stores the conversation.","operationId":"persist_question_agent_feed_input_persist_question_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistQuestionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Persist Question Agent Feed Input Persist Question Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/feed/input/stream":{"post":{"tags":["knowledge-agent","knowledge-agent","knowledge-agent"],"summary":"Submit Feed Input Stream","description":"Stream agent processing of feed input.\n\nThe agent classifies your input, searches the knowledge base for context, and streams back a response. Captures are saved as memories automatically.","operationId":"submit_feed_input_stream_agent_feed_input_stream_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedInputRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/graph-intelligence/message":{"post":{"tags":["knowledge-agent","knowledge-agent","graph-intelligence"],"summary":"Send Message","description":"Send a message to the Graph Intelligence Agent with frozen graph context.\n\nReturns an SSE stream with text, tool_call, tool_result, canvas_command,\nand done events. The graphContext is injected into the agent prompt and\nstored as user message metadata.","operationId":"send_message_agent_graph_intelligence_message_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphIntelligenceMessageRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/graph-intelligence/status":{"get":{"tags":["knowledge-agent","knowledge-agent","graph-intelligence"],"summary":"Get Status","description":"Check if the Graph Intelligence Agent is running.","operationId":"get_status_agent_graph_intelligence_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/agent/graph-intelligence/session":{"get":{"tags":["knowledge-agent","knowledge-agent","graph-intelligence"],"summary":"Load Session","description":"Load the last chat session from disk.","operationId":"load_session_agent_graph_intelligence_session_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["knowledge-agent","knowledge-agent","graph-intelligence"],"summary":"Save Session","description":"Save chat session to disk (atomic write, size-capped).","operationId":"save_session_agent_graph_intelligence_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveSessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/ai-now/sessions":{"get":{"tags":["knowledge-agent","knowledge-agent","ai-now"],"summary":"List Ai Now Sessions","description":"List AI Now sessions.\n\nBy-id-direct. Includes backend sessions plus read-only legacy ACP sessions\nso upgrades preserve existing user conversations.","operationId":"list_ai_now_sessions_agent_ai_now_sessions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Ai Now Sessions Agent Ai Now Sessions Get"}}}}}},"post":{"tags":["knowledge-agent","knowledge-agent","ai-now"],"summary":"Create Ai Now Session","description":"Create a backend-owned AI Now session.\n\nSpace-scoped through ``activeSpaceId`` for Nowledge Mem MCP retrieval.","operationId":"create_ai_now_session_agent_ai_now_sessions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AINowSessionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Ai Now Session Agent Ai Now Sessions Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/ai-now/sessions/{session_id}":{"get":{"tags":["knowledge-agent","knowledge-agent","ai-now"],"summary":"Get Ai Now Session","operationId":"get_ai_now_session_agent_ai_now_sessions__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Ai Now Session Agent Ai Now Sessions  Session Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["knowledge-agent","knowledge-agent","ai-now"],"summary":"Update Ai Now Session","operationId":"update_ai_now_session_agent_ai_now_sessions__session_id__patch","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AINowSessionUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Ai Now Session Agent Ai Now Sessions  Session Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["knowledge-agent","knowledge-agent","ai-now"],"summary":"Delete Ai Now Session","operationId":"delete_ai_now_session_agent_ai_now_sessions__session_id__delete","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Ai Now Session Agent Ai Now Sessions  Session Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/ai-now/sessions/{session_id}/close":{"post":{"tags":["knowledge-agent","knowledge-agent","ai-now"],"summary":"Close Ai Now Session","operationId":"close_ai_now_session_agent_ai_now_sessions__session_id__close_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Close Ai Now Session Agent Ai Now Sessions  Session Id  Close Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/ai-now/sessions/{session_id}/messages":{"get":{"tags":["knowledge-agent","knowledge-agent","ai-now"],"summary":"Load Ai Now Messages","operationId":"load_ai_now_messages_agent_ai_now_sessions__session_id__messages_get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Load Ai Now Messages Agent Ai Now Sessions  Session Id  Messages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["knowledge-agent","knowledge-agent","ai-now"],"summary":"Save Ai Now Messages","operationId":"save_ai_now_messages_agent_ai_now_sessions__session_id__messages_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AINowMessagesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Save Ai Now Messages Agent Ai Now Sessions  Session Id  Messages Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/ai-now/sessions/{session_id}/files/read":{"post":{"tags":["knowledge-agent","knowledge-agent","ai-now"],"summary":"Read Ai Now Session File","description":"Read a text artifact generated inside an AI Now session workdir.\n\nBy-id-direct. The requested path must resolve inside the session working\ndirectory, so web/remote renderers can load generated cards without\nexposing arbitrary backend files.","operationId":"read_ai_now_session_file_agent_ai_now_sessions__session_id__files_read_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AINowFileReadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Read Ai Now Session File Agent Ai Now Sessions  Session Id  Files Read Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/ai-now/sessions/{session_id}/prompt":{"post":{"tags":["knowledge-agent","knowledge-agent","ai-now"],"summary":"Prompt Ai Now Session","description":"Stream a prompt turn.\n\nReturns SSE events in the existing AI Now UI event contract.","operationId":"prompt_ai_now_session_agent_ai_now_sessions__session_id__prompt_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AINowPromptRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/ai-now/sessions/{session_id}/events":{"get":{"tags":["knowledge-agent","knowledge-agent","ai-now"],"summary":"Stream Ai Now Session Events","description":"Attach to a live prompt stream without starting a new turn.","operationId":"stream_ai_now_session_events_agent_ai_now_sessions__session_id__events_get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/ai-now/sessions/{session_id}/cancel":{"post":{"tags":["knowledge-agent","knowledge-agent","ai-now"],"summary":"Cancel Ai Now Prompt","operationId":"cancel_ai_now_prompt_agent_ai_now_sessions__session_id__cancel_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cancel Ai Now Prompt Agent Ai Now Sessions  Session Id  Cancel Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/ai-now/sessions/{session_id}/permissions/{request_id}":{"post":{"tags":["knowledge-agent","knowledge-agent","ai-now"],"summary":"Respond Ai Now Permission","operationId":"respond_ai_now_permission_agent_ai_now_sessions__session_id__permissions__request_id__post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AINowPermissionResponseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Respond Ai Now Permission Agent Ai Now Sessions  Session Id  Permissions  Request Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/ai-now/sessions/{session_id}/auto-approve":{"get":{"tags":["knowledge-agent","knowledge-agent","ai-now"],"summary":"Get Ai Now Auto Approve","operationId":"get_ai_now_auto_approve_agent_ai_now_sessions__session_id__auto_approve_get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Ai Now Auto Approve Agent Ai Now Sessions  Session Id  Auto Approve Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["knowledge-agent","knowledge-agent","ai-now"],"summary":"Set Ai Now Auto Approve","operationId":"set_ai_now_auto_approve_agent_ai_now_sessions__session_id__auto_approve_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AINowAutoApproveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Set Ai Now Auto Approve Agent Ai Now Sessions  Session Id  Auto Approve Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/ai-now/skill-prompts":{"post":{"tags":["knowledge-agent","knowledge-agent","ai-now"],"summary":"Sync Ai Now Skill Prompts","description":"Update the server-side AI Now skill prompt injection file.\n\nBackend-owned AI Now sessions read this file when preparing their agent spec,\nso web/mobile/remote clients must sync it to the backend, not only to a\nclient-local Tauri filesystem.","operationId":"sync_ai_now_skill_prompts_agent_ai_now_skill_prompts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AINowSkillPromptsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Sync Ai Now Skill Prompts Agent Ai Now Skill Prompts Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/skill-builder/propose":{"post":{"tags":["knowledge-agent","knowledge-agent","skill-builder"],"summary":"Skill Builder Propose","description":"Propose a skill draft from intent, streaming the work as it happens (SSE).\n\nEvents (``data: {json}``): ``searching`` -> ``knowledge`` (the threads + notes\nit found, shown before the draft) -> ``drafting`` -> ``proposal`` (the draft +\nwhich sources it chose) -> ``done`` (or ``error``). The UI renders this as a\nlive process timeline so the agent shows its work. Cross-space when\n``space_id`` is omitted. The proposal is the builder form's pre-fill; the user\nreviews and creates.","operationId":"skill_builder_propose_agent_skill_builder_propose_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillBuilderProposeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/skill-builder/chat":{"post":{"tags":["knowledge-agent","knowledge-agent","skill-builder"],"summary":"Skill Builder Chat","description":"The Skills copilot turn (SSE). Reads the screen context, routes intent, and\nanswers, drafts a new skill, or emits one UI action.\n\nEvents: ``routing`` -> ``message`` (the reply) -> then EITHER ``action`` (a UI\ncommand the frontend applies) OR the draft sub-stream (``searching`` ->\n``knowledge`` -> ``drafting`` -> ``proposal``) -> ``done`` (or ``error``).\nCross-space when ``space_id`` is omitted.","operationId":"skill_builder_chat_agent_skill_builder_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillBuilderChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/skill-builder/refine":{"post":{"tags":["knowledge-agent","knowledge-agent","skill-builder"],"summary":"Skill Builder Refine","description":"Propose a sharper version of a compiled skill from how it has performed\n(plus optional guidance). Records it as a ``pending_version`` the user reviews\nand applies via apply-version; never auto-commits. Mirrors ProposeSkillVersion.\nNon-streaming; ``/refine/stream`` shows the work as it happens.","operationId":"skill_builder_refine_agent_skill_builder_refine_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillRefineRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Skill Builder Refine Agent Skill Builder Refine Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/skill-builder/refine/stream":{"post":{"tags":["knowledge-agent","knowledge-agent","skill-builder"],"summary":"Skill Builder Refine Stream","description":"Stream the refine work (SSE): ``reading`` -> ``outcomes`` -> ``drafting`` ->\n``revision`` -> ``done`` (or ``error``). The UI renders the optimize loop as a\nlive process, the same way create does.","operationId":"skill_builder_refine_stream_agent_skill_builder_refine_stream_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillRefineRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/skill-builder/edit-body":{"post":{"tags":["knowledge-agent","knowledge-agent","skill-builder"],"summary":"Skill Builder Edit Body","description":"Stage a user-authored body as a pending version (the user as a third author\nof ``pending_version``, beside refine-AI and the curator).\n\nStages INSTANTLY (validate + compose + secret-scan), then computes the A/B\ntransparency proof in the BACKGROUND so the save isn't blocked on running the\nbenchmark through the model (that was the 20-second \"Saving…\"). The edit is\nINTENT (D4): the proof never refuses it, only shows it, and the user can apply\nvia ``POST /skills/{id}/apply-version`` without waiting for it.","operationId":"skill_builder_edit_body_agent_skill_builder_edit_body_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillEditBodyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Skill Builder Edit Body Agent Skill Builder Edit Body Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/skill-builder/import":{"post":{"tags":["knowledge-agent","knowledge-agent","skill-builder"],"summary":"Skill Builder Import","description":"Import a hand-written skill as a managed draft (body verbatim, no compile).\n\nThe third way a skill is born (beside suggested + authored-from-scratch): it\nflows through the same review -> activate -> materialize -> evolve loop, gaining\nverification, self-improvement, cross-tool sync, and versioning. A folder import\nkeeps the whole tree (nested folders + binary assets) verbatim. Returns the\ncreated draft, or — when it looks like an existing active skill and ``force`` is\nfalse — the duplicate it matched, so the user can strengthen that one instead.\nLooks up by content; space-agnostic (skills list cross-space).","operationId":"skill_builder_import_agent_skill_builder_import_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillImportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Skill Builder Import Agent Skill Builder Import Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/skill-builder/discover-importable":{"get":{"tags":["knowledge-agent","knowledge-agent","skill-builder"],"summary":"Skill Builder Discover Importable","description":"Hand-written skills found in the user's connected host dirs that Mem does not\nmanage — the discovery half of enroll. Read-only scan; the user selects which to\nimport. Reads local disk directly (local-only, enforced).","operationId":"skill_builder_discover_importable_agent_skill_builder_discover_importable_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Skill Builder Discover Importable Agent Skill Builder Discover Importable Get"}}}}}}},"/agent/skill-builder/preview-importable":{"get":{"tags":["knowledge-agent","knowledge-agent","skill-builder"],"summary":"Skill Builder Preview Importable","description":"The SKILL.md + file list for one discoverable skill, for the enroll preview\npane (read what you're bringing in before you commit). Path-validated to a host\nskills dir. Reads local disk directly (local-only, enforced).","operationId":"skill_builder_preview_importable_agent_skill_builder_preview_importable_get","parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Skill Builder Preview Importable Agent Skill Builder Preview Importable Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sources/ingest/file":{"post":{"tags":["sources"],"summary":"Ingest File","description":"Ingest a file into the library.","operationId":"ingest_file_sources_ingest_file_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/IngestFileUploadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestResponse"}}}},"400":{"description":"Malformed multipart body or unsupported document parameters"},"408":{"description":"Upload body did not arrive before the bounded read timeout"},"413":{"description":"Upload exceeds the effective Library file limit"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"503":{"description":"Library upload processing capacity is temporarily busy"}}}},"/sources/ingest/folder-upload":{"post":{"tags":["sources"],"summary":"Ingest Folder Upload","description":"Ingest client-uploaded folder files via multipart.\n\nThis is the remote/web-safe folder API. The server never reads a client\nfilesystem path; clients upload file bytes and provide folder-relative\npaths in ``file_manifest``.\n\nSpace-scoped: writes sources to ``space_id``, defaulting to the canonical\ndefault space when omitted.","operationId":"ingest_folder_upload_sources_ingest_folder_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_ingest_folder_upload_sources_ingest_folder_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchIngestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sources/ingest/file-path":{"post":{"tags":["sources"],"summary":"Ingest File Path","description":"Ingest a file by its local path.","operationId":"ingest_file_path_sources_ingest_file_path_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestFilePathRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sources/ingest/folder-summary":{"post":{"tags":["sources"],"summary":"Ingest Folder Summary","description":"Emit a folder import summary event for remote/web chunked uploads.","operationId":"ingest_folder_summary_sources_ingest_folder_summary_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderIngestSummaryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchIngestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sources/ingest/batch":{"post":{"tags":["sources"],"summary":"Ingest Batch","description":"Ingest a batch of files at once.","operationId":"ingest_batch_sources_ingest_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchIngestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchIngestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sources/ingest/url":{"post":{"tags":["sources"],"summary":"Ingest Url","description":"Ingest a web page into the library.","operationId":"ingest_url_sources_ingest_url_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestUrlRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sources/ingest/content":{"post":{"tags":["sources"],"summary":"Ingest Content","description":"Ingest raw text content (a paste, or a text file the client read) as a Library\nsource. JSON-only so it works in every transport without multipart/file-path\nplumbing. The text is written to a temp file and run through the same ingest_file\npipeline, so it gets the identical Source lifecycle (parse, index, background\nextraction). Used by Deep Create's 'bring in material'.","operationId":"ingest_content_sources_ingest_content_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestContentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sources/{source_id}/extract":{"post":{"tags":["sources"],"summary":"Trigger Source Extraction","description":"Queue knowledge extraction for a source. Returns 202 when the extraction task is queued or already queued; 5xx is reserved for genuine rejection.","operationId":"trigger_source_extraction_sources__source_id__extract_post","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional isolation space guard","title":"Space Id"},"description":"Optional isolation space guard"}],"responses":{"202":{"description":"Extraction queued","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"SourceExtractionQueuedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"503":{"description":"Knowledge Agent is not running","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"SourceExtractionErrorResponse"}}}}}}},"/sources/{source_id}/refetch":{"post":{"tags":["sources"],"summary":"Refetch Source","description":"Re-fetch and re-parse a URL source.","operationId":"refetch_source_sources__source_id__refetch_post","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional isolation space guard","title":"Space Id"},"description":"Optional isolation space guard"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Refetch Source Sources  Source Id  Refetch Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sources/{source_id}":{"patch":{"tags":["sources"],"summary":"Update Source","description":"Update a source's processing state.\n\nSupported actions:\n\n- **reparse** re-extract and re-index the content.\n- **ocr_reparse** run or retry vision OCR for deterministic candidate PDF pages.\n- **mark_stale** flag the source as needing re-processing.","operationId":"update_source_sources__source_id__patch","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional isolation space guard","title":"Space Id"},"description":"Optional isolation space guard"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSourceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["sources"],"summary":"Delete Source","description":"Delete a source and its search index records.","operationId":"delete_source_sources__source_id__delete","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional isolation space guard","title":"Space Id"},"description":"Optional isolation space guard"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Source Sources  Source Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["sources"],"summary":"Get Source Detail","description":"Get source detail with related memories and revision chain.","operationId":"get_source_detail_sources__source_id__get","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional isolation space guard","title":"Space Id"},"description":"Optional isolation space guard"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sources/{source_id}/content":{"put":{"tags":["sources"],"summary":"Update Source Content","description":"Replace the markdown body of an editable source artifact.\n\nUsed by the Library inline editor for agent-generated artifacts (reports,\nblog drafts) and any other markdown source where editing in place makes\nsense. Re-runs chunk + index so search stays fresh.","operationId":"update_source_content_sources__source_id__content_put","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional isolation space guard","title":"Space Id"},"description":"Optional isolation space guard"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSourceContentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["sources"],"summary":"Get Source Content","description":"Read the parsed text content of a source.","operationId":"get_source_content_sources__source_id__content_get","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Character offset for pagination","default":0,"title":"Offset"},"description":"Character offset for pagination"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":50000,"minimum":100},{"type":"null"}],"description":"Maximum characters to return. Omit to read the full parsed content.","title":"Limit"},"description":"Maximum characters to return. Omit to read the full parsed content."},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional isolation space guard","title":"Space Id"},"description":"Optional isolation space guard"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceContentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sources/{source_id}/labels":{"get":{"tags":["sources"],"summary":"Get Source Labels","description":"Get labels assigned to a source.","operationId":"get_source_labels_sources__source_id__labels_get","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sources/{source_id}/labels/{label_id}":{"post":{"tags":["sources"],"summary":"Assign Label To Source","description":"Assign a label to a source.","operationId":"assign_label_to_source_sources__source_id__labels__label_id__post","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}},{"name":"label_id","in":"path","required":true,"schema":{"type":"string","title":"Label Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["sources"],"summary":"Remove Label From Source","description":"Remove a label from a source.","operationId":"remove_label_from_source_sources__source_id__labels__label_id__delete","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}},{"name":"label_id","in":"path","required":true,"schema":{"type":"string","title":"Label Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sources":{"get":{"tags":["sources"],"summary":"List Sources","description":"List sources with optional filtering and pagination.","operationId":"list_sources_sources_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":"source_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source_type","title":"Source Type"},"description":"Filter by source_type"},{"name":"lifecycle_state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by lifecycle_state","title":"Lifecycle State"},"description":"Filter by lifecycle_state"},{"name":"labels","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter by source label name or label_id. Repeat for AND semantics.","title":"Labels"},"description":"Filter by source label name or label_id. Repeat for AND semantics."},{"name":"label","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Alias for labels. Repeat for AND semantics.","title":"Label"},"description":"Alias for labels. Repeat for AND semantics."},{"name":"metadata","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter by source metadata equality, e.g. metadata=customer=acme. Repeat for AND semantics; repeat the same key for OR values.","title":"Metadata"},"description":"Filter by source metadata equality, e.g. metadata=customer=acme. Repeat for AND semantics; repeat the same key for OR values."},{"name":"space_id","in":"query","required":false,"schema":{"type":"string","description":"Isolation space to list","default":"default","title":"Space Id"},"description":"Isolation space to list"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sources/search":{"get":{"tags":["sources"],"summary":"Search Sources","description":"Full-text search across source names and content.","operationId":"search_sources_sources_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Search query","title":"Q"},"description":"Search query"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"labels","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter by source label name or label_id. Repeat for AND semantics.","title":"Labels"},"description":"Filter by source label name or label_id. Repeat for AND semantics."},{"name":"label","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Alias for labels. Repeat for AND semantics.","title":"Label"},"description":"Alias for labels. Repeat for AND semantics."},{"name":"metadata","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter by source metadata equality, e.g. metadata=customer=acme. Repeat for AND semantics; repeat the same key for OR values.","title":"Metadata"},"description":"Filter by source metadata equality, e.g. metadata=customer=acme. Repeat for AND semantics; repeat the same key for OR values."},{"name":"space_id","in":"query","required":false,"schema":{"type":"string","description":"Isolation space to search","default":"default","title":"Space Id"},"description":"Isolation space to search"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sources/{source_id}/images/{filename}":{"get":{"tags":["sources"],"summary":"Get Source Image","description":"Serve an extracted image from a source's images/ directory.","operationId":"get_source_image_sources__source_id__images__filename__get","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}},{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional isolation space guard","title":"Space Id"},"description":"Optional isolation space guard"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Source Image Sources  Source Id  Images  Filename  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sources/{source_id}/raw":{"get":{"tags":["sources"],"summary":"Get Source Raw","description":"Serve the raw source file for native preview (PDF, DOCX, etc).","operationId":"get_source_raw_sources__source_id__raw_get","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional isolation space guard","title":"Space Id"},"description":"Optional isolation space guard"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Source Raw Sources  Source Id  Raw Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills":{"get":{"tags":["skills","skills"],"summary":"List Skills","description":"List skills. Cross-space unless ``space_id`` is given.","operationId":"list_skills_skills_get","parameters":[{"name":"stage","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by lifecycle stage","title":"Stage"},"description":"Filter by lifecycle stage"},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Scope to a space (else all)","title":"Space Id"},"description":"Scope to a space (else all)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Skills Skills Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills/match":{"get":{"tags":["skills","skills"],"summary":"Match Skills Endpoint","description":"Rank active Skills against a task through the same semantic hybrid router used by MCP Skill discovery and routing benchmarks. When semantic embeddings are unavailable, interactive discovery remains usable through deterministic trigger matching; the response reports semantic or keyword_fallback in its routing field.","operationId":"match_skills_endpoint_skills_match_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Task/query to rank skills against","title":"Q"},"description":"Task/query to rank skills against"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":5,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Match Skills Endpoint Skills Match Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills/author":{"post":{"tags":["skills","skills"],"summary":"Author Skill","description":"Create a skill the user authored deliberately (top-down), from a name plus\noptional sources (memories and/or threads) and a free-text intent note.\n\nThreads are resolved to their source memories via the ``COMPACTS_TO`` edge so\nthey flow through the same ``SYNTHESIZED_FROM`` provenance and compile context\nas auto-detected evidence. The skill is created at stage ``promotable`` (ready\nto compile); the caller then runs the normal compile to produce a reviewable\ndraft. A note-only skill (no memories/threads) is allowed: the note carries\nthe intent. Scoped to the personal lane (skills list cross-space).\nSee docs/design/SKILL_BUILDER_AND_PURPOSE.md §4.2.","operationId":"author_skill_skills_author_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorSkillRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Author Skill Skills Author Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills/registration":{"get":{"tags":["skills","skills","skills"],"summary":"Skill Host Registration Status","description":"Per-host registration status (installed? registered? where?). Read-only.","operationId":"skill_host_registration_status_skills_registration_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Skill Host Registration Status Skills Registration Get"}}}}}}},"/skills/registration/{host}":{"post":{"tags":["skills","skills","skills"],"summary":"Register Skill Host","description":"Register one host, or ``all`` for every detected host. Idempotent.","operationId":"register_skill_host_skills_registration__host__post","parameters":[{"name":"host","in":"path","required":true,"schema":{"type":"string","title":"Host"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Register Skill Host Skills Registration  Host  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["skills","skills","skills"],"summary":"Unregister Skill Host","description":"Remove our entries for one host. Leaves foreign files/links untouched.","operationId":"unregister_skill_host_skills_registration__host__delete","parameters":[{"name":"host","in":"path","required":true,"schema":{"type":"string","title":"Host"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Unregister Skill Host Skills Registration  Host  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills/registration/{host}/config-dir":{"put":{"tags":["skills","skills","skills"],"summary":"Set Skill Host Config Dir","description":"Point one host at a custom config dir, then re-sync if it is connected.","operationId":"set_skill_host_config_dir_skills_registration__host__config_dir_put","parameters":[{"name":"host","in":"path","required":true,"schema":{"type":"string","title":"Host"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostConfigDir"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Set Skill Host Config Dir Skills Registration  Host  Config Dir Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills/activity":{"get":{"tags":["skills","skills"],"summary":"Get Skill Activity","description":"Recent skill-use moments, newest-first — the usage proof feed.\n\nReads each skill's metadata use/outcome logs and merges them (see\nSKILL_USAGE_PROOF_FEED.md). Registered BEFORE ``/{skill_id}`` so this static path\nis not shadowed. ``skill_id`` limits to one skill (the detail-page strip); else\ncross-skill, scoped to the active space when ``space_id`` is given.","operationId":"get_skill_activity_skills_activity_get","parameters":[{"name":"skill_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Limit to one skill (else all)","title":"Skill Id"},"description":"Limit to one skill (else all)"},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Scope to a space (else all)","title":"Space Id"},"description":"Scope to a space (else all)"},{"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":{"type":"object","additionalProperties":true,"title":"Response Get Skill Activity Skills Activity Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills/{skill_id}":{"get":{"tags":["skills"],"summary":"Get a Skill","description":"Get one Skill and optionally its procedure body or bounded portable bundle. Bundle files are returned only when explicitly requested; binary files use base64.","operationId":"get_skill_skills__skill_id__get","parameters":[{"name":"skill_id","in":"path","description":"Stable Skill ID","required":true,"schema":{"type":"string","title":"Skill Id"}},{"name":"include_body","in":"query","description":"Include the SKILL.md body","required":false,"schema":{"type":"boolean","description":"Include the SKILL.md body","default":false,"title":"Include Body"}},{"name":"include_files","in":"query","description":"Explicit opt-in for remote native-host projection. Normal UI detail\nrequests stay small and keep binary assets off the wire.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Skill detail","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Skill Skills  Skill Id  Get"}}}},"404":{"description":"Skill not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills/{skill_id}/eval":{"get":{"tags":["skills","skills"],"summary":"Get Skill Eval","description":"The skill's behavioral benchmark (§16): the cases it's proven on, by status.\n\nv1 returns the case inventory; the with/without run verdict is the v2\nmodel-runner. See docs/implementation/SKILL_EVAL_IMPLEMENTATION.md.","operationId":"get_skill_eval_skills__skill_id__eval_get","parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","title":"Skill Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Skill Eval Skills  Skill Id  Eval Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills/{skill_id}/eval/run":{"post":{"tags":["skills","skills"],"summary":"Run Skill Eval","description":"Run the Skill benchmark and return its verdict. Output cases grade generated behavior; should_not_trigger cases use the production semantic Skill router and become inconclusive when semantic evidence is unavailable rather than falling back to lexical matching. A passing routing negative is a safety gate and cannot by itself prove that a Skill helps on intended work. strict=true runs the output cases through the median-of-3 with/without gate; the streaming variant is /eval/stream.","operationId":"run_skill_eval_skills__skill_id__eval_run_post","parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","title":"Skill Id"}},{"name":"strict","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Strict"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Run Skill Eval Skills  Skill Id  Eval Run Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills/{skill_id}/eval/stream":{"get":{"tags":["skills","skills"],"summary":"Stream Skill Eval","description":"Run the benchmark, streaming per-case progress (SSE): ``bootstrapping`` ->\n``start`` -> ``case_started`` / ``case_done`` (per case) -> ``summary``. Feeds\nthe 'Proven on' surface case by case. ``strict=true`` runs the Phase 2 gate.","operationId":"stream_skill_eval_skills__skill_id__eval_stream_get","parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","title":"Skill Id"}},{"name":"strict","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Strict"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills/{skill_id}/harden":{"post":{"tags":["skills","skills"],"summary":"Harden Skill Endpoint","description":"Run the autonomous skill-hardening loop once: build/grow the harness, then each\nround propose -> prove on the held-out slice -> keep ONLY if strictly better\n(compounding), and stage ONE pending_version for the user's Apply. By-id-direct;\ncross-space. See docs/design/SKILL_AUTONOMOUS_HARDENING_LOOP.md.","operationId":"harden_skill_endpoint_skills__skill_id__harden_post","parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","title":"Skill Id"}},{"name":"max_rounds","in":"query","required":false,"schema":{"type":"integer","maximum":8,"minimum":1,"default":4,"title":"Max Rounds"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Harden Skill Endpoint Skills  Skill Id  Harden Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills/{skill_id}/activate":{"post":{"tags":["skills","skills"],"summary":"Activate Skill","description":"Publish a reviewed draft skill to active (the consumable surface).\n\nA manual publish: the user reviewed the SKILL.md and chose to publish. The\nmoment it goes live we fire a background verification (the entry gate), so an\nactive skill earns its trust verdict automatically rather than waiting for a\nmanual eval click — that is what makes the home a Verified Library.","operationId":"activate_skill_skills__skill_id__activate_post","parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","title":"Skill Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Activate Skill Skills  Skill Id  Activate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills/{skill_id}/apply-version":{"post":{"tags":["skills","skills"],"summary":"Apply Skill Version","description":"Commit a proposed new version (the evolve half of the human-approval gate).\n\n``ProposeSkillVersion`` only records ``metadata.pending_version`` (body +\nrationale); the live bundle is never touched until a human reviews and calls\nthis. Applying swaps the SKILL.md body, preserves the existing assets, bumps\nthe version, and clears the proposal. Stage is unchanged: applying to an\nactive skill republishes it live (the call itself is the approval); a\ndraft/stale skill still needs a separate ``activate``.\n\nReject-on-drift: if the live bundle changed since the proposal was made\n(``base_content_hash`` no longer matches), the proposal is stale — 409, so\nthe agent re-proposes against the current body rather than silently clobbering\nan intervening recompile. Filesystem and graph are not transactional, so a\nfailed graph write restores the prior bundle.","operationId":"apply_skill_version_skills__skill_id__apply_version_post","parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","title":"Skill Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Apply Skill Version Skills  Skill Id  Apply Version Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills/{skill_id}/edit-file":{"post":{"tags":["skills","skills"],"summary":"Edit Skill File","description":"Write one of a skill's own asset files (scripts/references) directly — the\nanswer to \"4 files but I can only edit SKILL.md\". Asset files are opt-gated, so\nthe edit commits straight away (no proof gate, unlike edit-body), bumps the\nversion, and re-syncs tools. SKILL.md/evals refused. By id; cross-space.","operationId":"edit_skill_file_skills__skill_id__edit_file_post","parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","title":"Skill Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillEditFileRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Edit Skill File Skills  Skill Id  Edit File Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills/{skill_id}/apply-enrichment":{"post":{"tags":["skills","skills"],"summary":"Apply Skill Enrichment","description":"Apply the skill's pending enrichments: link the fresh evidence the\nbackground agent found, then recompile so the body incorporates it. Clears\nthe applied enrichments. The recompile runs async; the body updates shortly.\n\nLooks up by id directly; cross-space when space_id is omitted.","operationId":"apply_skill_enrichment_skills__skill_id__apply_enrichment_post","parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","title":"Skill Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Apply Skill Enrichment Skills  Skill Id  Apply Enrichment Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills/{skill_id}/dismiss-enrichment":{"post":{"tags":["skills","skills"],"summary":"Dismiss Skill Enrichment","description":"Dismiss the skill's pending enrichments without applying them (the evidence\nstays in the graph; it just won't strengthen this skill). Looks up by id.","operationId":"dismiss_skill_enrichment_skills__skill_id__dismiss_enrichment_post","parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","title":"Skill Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dismiss Skill Enrichment Skills  Skill Id  Dismiss Enrichment Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills/{skill_id}/outcome":{"post":{"tags":["skills","skills"],"summary":"Report Skill Outcome","description":"Record how a skill actually performed in use (G1 Tier 2 feedback).\n\nVersion-anchored and content-bearing: the structured deviation/missing/failure\ntext is recompile + eval evidence, not a vanity rating. Updates use_count and a\ncurrent-version success_rate. A real failure also grows the skill's eval (G4),\nin the background. See SKILL_CRYSTALLIZATION.md §3.8.","operationId":"report_skill_outcome_skills__skill_id__outcome_post","parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","title":"Skill Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillOutcomeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Report Skill Outcome Skills  Skill Id  Outcome Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills/{skill_id}/deactivate":{"post":{"tags":["skills","skills"],"summary":"Deactivate Skill","description":"Turn an active skill OFF: keep it (body, versions, outcomes) but stop your\nagents using it.\n\nThe non-destructive half of the on/off toggle. We move active -> draft (the\ncompiled-but-not-live stage) and un-materialize from host skill dirs, so agents\nstop seeing it. Nothing is lost: turning it back on is the existing ``activate``\n(draft -> active), instant and lossless. This is deliberately NOT ``archive``\n(a removal end-state) and NOT a revert to a suggestion (that would discard the\ncompiled bundle and its history). A toggle must be reversible; discarding is a\nseparate, explicit gesture.\n\nScoped by id; the active set is global, so the materializer reconciles all hosts.","operationId":"deactivate_skill_skills__skill_id__deactivate_post","parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","title":"Skill Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Deactivate Skill Skills  Skill Id  Deactivate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills/{skill_id}/archive":{"post":{"tags":["skills","skills"],"summary":"Archive Skill","description":"Archive a compiled skill (recoverable; the bundle is retained).","operationId":"archive_skill_skills__skill_id__archive_post","parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","title":"Skill Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Archive Skill Skills  Skill Id  Archive Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills/{skill_id}/dismiss":{"post":{"tags":["skills","skills"],"summary":"Dismiss Skill","description":"Dismiss a candidate (stamps rejected_at via the repository), recording WHY.\n\nThe reason + resurface rule are persisted in metadata so the background\nreviewer doesn't keep re-suggesting the same bad idea (audit §3 P0). A default\nis applied when the caller passes none. By-id-direct; cross-space.","operationId":"dismiss_skill_skills__skill_id__dismiss_post","parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","title":"Skill Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DismissSkillRequest"},{"type":"null"}],"title":"Req"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dismiss Skill Skills  Skill Id  Dismiss Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills/{skill_id}/strengthen-instead":{"post":{"tags":["skills","skills"],"summary":"Strengthen Instead","description":"Resolve a duplicate suggestion: move its evidence onto the existing active\nskill as a pending enrichment, then dismiss the suggestion.\n\nThe product's one-tap answer to \"this is a skill I already have\": the evidence\nis preserved — it strengthens the real skill via the same pending-enrichment\npath as SuggestSkillEnrichment — instead of being lost to a blunt dismiss. The\ncandidate is a suggestion (``_DISMISSABLE``); the target must be an active skill.\nBy-id-direct; cross-space.","operationId":"strengthen_instead_skills__skill_id__strengthen_instead_post","parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","title":"Skill Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrengthenInsteadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Strengthen Instead Skills  Skill Id  Strengthen Instead Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills/{skill_id}/merge-into":{"post":{"tags":["skills","skills"],"summary":"Merge Into","description":"Merge a compiled skill INTO another, leaving one canonical skill.\n\nThe generalization of strengthen-instead for two COMPILED skills (the curator's\nnear-duplicate pair, or an off draft overlapping an active one): the absorbed\nskill's evidence moves onto the kept skill as a pending enrichment (the user\nreviews + applies it; the kept body is never silently rewritten), and the\nabsorbed skill is ARCHIVED with ``merged_into`` provenance — recoverable, and\nun-materialized from hosts by the shared transition. Outcomes do NOT transfer\n(they were measured against a different body); the kept skill records\n``merged_from`` for honest provenance. A suggestion still uses strengthen-instead\n(its end-state is reject, not archive). See docs/design/SKILL_MERGE_PRIMITIVE.md.\nBy-id-direct; cross-space.","operationId":"merge_into_skills__skill_id__merge_into_post","parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","title":"Skill Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeIntoRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Merge Into Skills  Skill Id  Merge Into Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills/{skill_id}/duplicate-of":{"get":{"tags":["skills","skills"],"summary":"Skill Duplicate Of","description":"The active skill this one looks like a duplicate of, or null.\n\nComputed lazily, OFF the detail hot path: it needs embeddings (which can\ncold-start slowly), so the UI fetches it separately after opening a skill — the\nsame non-blocking pattern as the benchmark — keeping skill-open instant. For a\nSUGGESTION the UI offers \"strengthen that one instead\"; for an OFF compiled skill\n(draft/stale) a read-only \"you may already have this\" hint + merge. Active skills\nARE the catalog, so they're never checked against themselves. Best-effort\n(no embeddings -> null). By-id-direct; cross-space.","operationId":"skill_duplicate_of_skills__skill_id__duplicate_of_get","parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","title":"Skill Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Skill Duplicate Of Skills  Skill Id  Duplicate Of Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills/{skill_id}/eval/cases":{"get":{"tags":["skills","skills"],"summary":"List Eval Cases","description":"List the editable benchmark inventory, including each case task, expectation, deterministic checks, review status, and source. Output cases use expectation output; routing negatives use should_not_trigger and carry no output checks.","operationId":"list_eval_cases_skills__skill_id__eval_cases_get","parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","title":"Skill Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Eval Cases Skills  Skill Id  Eval Cases Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["skills","skills"],"summary":"Add Eval Case","description":"Add a human-authored benchmark case. Use {task, checks:[{op, arg}], status?} for an output case, or {task, expectation:\"should_not_trigger\"} for a semantic routing negative. Routing negatives assert that production Skill discovery must leave this Skill silent for the near-miss task.","operationId":"add_eval_case_skills__skill_id__eval_cases_post","parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","title":"Skill Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Eval Case Skills  Skill Id  Eval Cases Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills/{skill_id}/eval/cases/{task_id}":{"patch":{"tags":["skills","skills"],"summary":"Update Eval Case","description":"Edit one case: any of ``{task, checks, status}``. Approving a bootstrapped\ncase is just ``{status: \"green\"}``. The task_id is preserved so a prior run's\ncoverage mapping stays stable.","operationId":"update_eval_case_skills__skill_id__eval_cases__task_id__patch","parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","title":"Skill Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Eval Case Skills  Skill Id  Eval Cases  Task Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["skills","skills"],"summary":"Delete Eval Case","description":"Remove a case from the benchmark.","operationId":"delete_eval_case_skills__skill_id__eval_cases__task_id__delete","parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","title":"Skill Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Eval Case Skills  Skill Id  Eval Cases  Task Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills/curator/proposals":{"get":{"tags":["skills","skills"],"summary":"Curator Proposals","description":"What the curator would propose right now: rotting skills (failing in real\nuse, no fix staged) and near-duplicate pairs worth merging.","operationId":"curator_proposals_skills_curator_proposals_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Curator Proposals Skills Curator Proposals Get"}}}}}}},"/skills/curator/dry-run":{"get":{"tags":["skills","skills"],"summary":"Curator Dry Run","description":"Preview the scheduled skill-curator pass without staging proposals.\n\nThis runs the same read-only detection surfaces as the scheduled curator:\nrot selection for bounded hardening and staleness detection from superseded\nevidence. It does not run hardening, stage pending versions, write pending\nenrichments, emit feed events, or queue background work.","operationId":"curator_dry_run_skills_curator_dry_run_get","parameters":[{"name":"budget","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":0,"default":3,"title":"Budget"}},{"name":"include_merges","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Merges"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Curator Dry Run Skills Curator Dry Run Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/skills/curator/run":{"post":{"tags":["skills","skills"],"summary":"Curator Run","description":"Run one budgeted curator cycle now: stage proven refines for the worst\nrotting skills. The work happens in the background (model-heavy); the proposals\nappear as pending updates the user reviews. Manual trigger today; the scheduler\ncalls this on a cadence later (default-off for managed tiers).","operationId":"curator_run_skills_curator_run_post","parameters":[{"name":"budget","in":"query","required":false,"schema":{"type":"integer","default":3,"title":"Budget"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Curator Run Skills Curator Run Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spaces":{"get":{"tags":["spaces","spaces"],"summary":"Get Spaces","operationId":"get_spaces_spaces_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemorySpaceSettingsResponse"}}}}}},"post":{"tags":["spaces","spaces"],"summary":"Create Space","operationId":"create_space_spaces_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemorySpacePayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemorySpaceSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spaces/roster":{"get":{"tags":["spaces","spaces"],"summary":"Get Space Roster","operationId":"get_space_roster_spaces_roster_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemorySpaceSettingsResponse"}}}}}}},"/spaces/{space_ref}":{"get":{"tags":["spaces","spaces"],"summary":"Get Space","operationId":"get_space_spaces__space_ref__get","parameters":[{"name":"space_ref","in":"path","required":true,"schema":{"type":"string","title":"Space Ref"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemorySpaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["spaces","spaces"],"summary":"Update Space","operationId":"update_space_spaces__space_ref__patch","parameters":[{"name":"space_ref","in":"path","required":true,"schema":{"type":"string","title":"Space Ref"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemorySpaceUpdatePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemorySpaceSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["spaces","spaces"],"summary":"Delete Space","operationId":"delete_space_spaces__space_ref__delete","parameters":[{"name":"space_ref","in":"path","required":true,"schema":{"type":"string","title":"Space Ref"}},{"name":"purge_working_memory","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Purge Working Memory"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemorySpaceSettingsResponse"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemorySpaceDeleteConflictResponse"}}},"description":"Conflict"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spaces/config":{"post":{"tags":["spaces","spaces"],"summary":"Update Space Settings","operationId":"update_space_settings_spaces_config_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemorySpaceSettingsUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemorySpaceSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/profile":{"get":{"tags":["settings","settings"],"summary":"Get User Profile","description":"Get user profile (name, aliases, context, preferred language).\n\nUsed by the browser extension and CLI to inject user identity\nand language preference into agent prompts.","operationId":"get_user_profile_settings_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}}}}}},"/settings/agent-profiles":{"get":{"tags":["settings","settings"],"summary":"Get Agent Profiles","description":"List owner-configured long-running agent identities.","operationId":"get_agent_profiles_settings_agent_profiles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentProfilesResponse"}}}}}},"post":{"tags":["settings","settings"],"summary":"Create Agent Profile","description":"Create a named agent identity consumed by Context Bundle.","operationId":"create_agent_profile_settings_agent_profiles_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentProfilePayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/agent-profiles/{agent_id}":{"put":{"tags":["settings","settings"],"summary":"Update Agent Profile","description":"Update an existing named agent identity.","operationId":"update_agent_profile_settings_agent_profiles__agent_id__put","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentProfilePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["settings","settings"],"summary":"Delete Agent Profile","description":"Delete a named agent identity.","operationId":"delete_agent_profile_settings_agent_profiles__agent_id__delete","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentProfilesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["settings"],"summary":"Patch Agent Profile","description":"Update only the supplied fields on an enrolled Agent identity. Omitted fields are preserved; empty or null values clear the field or restore its server default. The profile ID is immutable.","operationId":"patch_agent_profile_settings_agent_profiles__agent_id__patch","parameters":[{"name":"agent_id","in":"path","description":"Canonical Agent profile ID","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentProfilePatchPayload"}}},"required":true},"responses":{"200":{"description":"Updated Agent profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentProfileResponse"}}}},"404":{"description":"Agent profile not found"},"422":{"description":"Empty, invalid, or identity-changing patch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/rules":{"get":{"tags":["settings","settings"],"summary":"Get Guidance Rules","description":"List owner-managed AI Context rules consumed by Context Bundle.","operationId":"get_guidance_rules_settings_rules_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RulesResponse"}}}}}},"post":{"tags":["settings","settings"],"summary":"Create Guidance Rule","description":"Create an AI Context rule for the Context Bundle control plane.","operationId":"create_guidance_rule_settings_rules_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuidanceRulePayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuidanceRuleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/rules/{rule_id}":{"put":{"tags":["settings","settings"],"summary":"Update Guidance Rule","description":"Update an existing AI Context rule.","operationId":"update_guidance_rule_settings_rules__rule_id__put","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","title":"Rule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuidanceRulePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuidanceRuleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["settings","settings"],"summary":"Delete Guidance Rule","description":"Delete an AI Context rule.","operationId":"delete_guidance_rule_settings_rules__rule_id__delete","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","title":"Rule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RulesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/context/bundle":{"get":{"tags":["context","context"],"summary":"Get Context Bundle","description":"Return the owner/profile/policy/scope context bundle for agents.","operationId":"get_context_bundle_context_bundle_get","parameters":[{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Nowledge agent profile id/slug to resolve.","title":"Agent Id"},"description":"Nowledge agent profile id/slug to resolve."},{"name":"source_app","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Calling app/source hint, e.g. codex or hermes.","title":"Source App"},"description":"Calling app/source hint, e.g. codex or hermes."},{"name":"host_agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Host-local long-running agent identity, if known.","title":"Host Agent Id"},"description":"Host-local long-running agent identity, if known."},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Memory space id/name to use as the active lane.","title":"Space Id"},"description":"Memory space id/name to use as the active lane."},{"name":"include_working_memory","in":"query","required":false,"schema":{"type":"boolean","description":"Include the current Working Memory preview.","default":true,"title":"Include Working Memory"},"description":"Include the current Working Memory preview."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/models":{"get":{"tags":["openai-compatible"],"summary":"List the active embedding model","description":"List the active search embedding model on this local or self-hosted server. The endpoint is not available on Nowledge Cloud. If a remote embedding provider is selected in Settings, requests are forwarded by this server and count toward that provider's usage.","operationId":"list_models_v1_models_get","responses":{"200":{"description":"Active embedding model","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIModelListResponse"}}}},"503":{"description":"No real embedding model is active"}}}},"/v1/embeddings":{"post":{"tags":["openai-compatible"],"summary":"Create embeddings","description":"Generate embeddings with the active search model on this local or self-hosted server. Supports OpenAI-compatible float and base64 responses plus the optional Nowledge input_type extension. The endpoint is not available on Nowledge Cloud. If a remote embedding provider is active, calls are forwarded by this server and count toward that provider's usage.","operationId":"create_embeddings_v1_embeddings_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIEmbeddingRequest"}}},"required":true},"responses":{"200":{"description":"Embeddings in input order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIEmbeddingResponse"}}}},"400":{"description":"Invalid request or model mismatch"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"description":"Embedding generation failed"},"503":{"description":"No real embedding model is active"}}}},"/events/stream":{"get":{"tags":["events","events"],"summary":"Event Stream","description":"Server-Sent Events stream for real-time updates.\n\nEmits data-change, progress, and stage events as they occur.\nConnect using the browser EventSource API or any SSE client.","operationId":"event_stream_events_stream_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/upgrade/check":{"get":{"tags":["admin-upgrade","admin","upgrade"],"summary":"Check","description":"Aggregated check: current vs latest, sidecar reachability, pulled status.\n\nSafe to call from any same-origin client; respects the origin guard.","operationId":"check_admin_upgrade_check_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeCheckResponse"}}}}}}},"/admin/upgrade/download":{"post":{"tags":["admin-upgrade","admin","upgrade"],"summary":"Download","description":"Pre-pull a target tag into the local docker cache. Idempotent.\n\nReturns 412 if the sidecar is unreachable — the actual `docker pull`\nruns inside the sidecar, which is the only piece holding docker.sock.","operationId":"download_admin_upgrade_download_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeActionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Download Admin Upgrade Download Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/upgrade/install":{"post":{"tags":["admin-upgrade","admin","upgrade"],"summary":"Install","description":"Snapshot + recreate the mem container on a new tag.\n\nStrict checks BEFORE forwarding to the sidecar:\n  - Origin guard (default-closed).\n  - Stable semver tag.\n  - `confirm` matches `tag` (the type-to-confirm contract).\n  - Reject downgrades and same-version applies (catch operator misclicks).\n\nThe sidecar runs free-space precheck + lock acquisition + snapshot +\nrecreate detached and returns 202 immediately. The UI polls /check\nto learn when the new tag is live.","operationId":"install_admin_upgrade_install_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeApplyRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Install Admin Upgrade Install Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fs/capabilities":{"get":{"tags":["files","files"],"summary":"Fs Capabilities","description":"Return the machine-readable Nowledge FS contract.","operationId":"fs_capabilities_fs_capabilities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/fs/ls":{"get":{"tags":["files","files"],"summary":"Fs Ls","description":"List a directory in Nowledge FS.\n\nPreview space contract: graph-wide projection.  Pass ``cursor`` to fetch\nthe next page; agents should not peek inside the cursor payload (it's an\nopaque base64-JSON).  The explicit ``/spaces/...`` lens is deferred.","operationId":"fs_ls_fs_ls_get","parameters":[{"name":"path","in":"query","required":false,"schema":{"type":"string","description":"Nowledge FS path (e.g. '/memories/by-label/decisions')","default":"/","title":"Path"},"description":"Nowledge FS path (e.g. '/memories/by-label/decisions')"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque pagination cursor","title":"Cursor"},"description":"Opaque pagination cursor"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fs/cat":{"get":{"tags":["files","files"],"summary":"Fs Cat","description":"Return the rendered body of a Nowledge FS file.\n\nFor ``.md`` files this returns YAML-frontmatter markdown.  For\n``messages.jsonl`` it returns one JSON object per line.  Fragment\nselectors (``:page/N``, ``:section/<name>``, etc.) are documented in\nthe design doc but land in Phase 2; passing one returns\nENOTSUP for now.  ``line`` / ``lines`` are Phase 1 progressive-read\ncontrols for agents: they work for every rendered text body, including\nthread ``messages.jsonl`` where one line is one message.","operationId":"fs_cat_fs_cat_get","parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string","description":"Nowledge FS file path","title":"Path"},"description":"Nowledge FS file path"},{"name":"line","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"One-based line to start reading from","title":"Line"},"description":"One-based line to start reading from"},{"name":"lines","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":1000,"minimum":1},{"type":"null"}],"description":"Number of lines to return","title":"Lines"},"description":"Number of lines to return"},{"name":"fragment","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Fragment selector (page|section|sheet|slide|chunk) — Phase 2","title":"Fragment"},"description":"Fragment selector (page|section|sheet|slide|chunk) — Phase 2"},{"name":"raw","in":"query","required":false,"schema":{"type":"boolean","description":"For .source.* files: return original bytes (501 in Phase 1)","default":false,"title":"Raw"},"description":"For .source.* files: return original bytes (501 in Phase 1)"},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent identity id/slug for /context/* files","title":"Agent Id"},"description":"Agent identity id/slug for /context/* files"},{"name":"source_app","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Calling app provenance hint for /context/* files","title":"Source App"},"description":"Calling app provenance hint for /context/* files"},{"name":"host_agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Host-local long-running agent id for /context/* files","title":"Host Agent Id"},"description":"Host-local long-running agent id for /context/* files"},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Active space override for /context/* files","title":"Space Id"},"description":"Active space override for /context/* files"},{"name":"include_working_memory","in":"query","required":false,"schema":{"type":"boolean","description":"Include Working Memory preview in /context/* files","default":true,"title":"Include Working Memory"},"description":"Include Working Memory preview in /context/* files"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fs/stat":{"get":{"tags":["files","files"],"summary":"Fs Stat","description":"Return metadata for a Nowledge FS path.\n\nMirrors ``stat(2)`` shape with Mem extras: labels, mention count,\nback-reference count, importance.  Preview space contract: graph-wide\nprojection, with each file returning its concrete ``space_id`` metadata.","operationId":"fs_stat_fs_stat_get","parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string","description":"Nowledge FS path","title":"Path"},"description":"Nowledge FS path"},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent identity id/slug for /context/* files","title":"Agent Id"},"description":"Agent identity id/slug for /context/* files"},{"name":"source_app","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Calling app provenance hint for /context/* files","title":"Source App"},"description":"Calling app provenance hint for /context/* files"},{"name":"host_agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Host-local long-running agent id for /context/* files","title":"Host Agent Id"},"description":"Host-local long-running agent id for /context/* files"},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Active space override for /context/* files","title":"Space Id"},"description":"Active space override for /context/* files"},{"name":"include_working_memory","in":"query","required":false,"schema":{"type":"boolean","description":"Include Working Memory preview in /context/* files","default":true,"title":"Include Working Memory"},"description":"Include Working Memory preview in /context/* files"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fs/find":{"get":{"tags":["files","files"],"summary":"Fs Find","description":"Structural / metadata search.  Returns paths.\n\nPhase 1 covers ``type``, ``unit_type``, ``label``, ``since``, ``until``,\nand ``mentions`` over ``/memories``.  ``unit_type`` is also inferred from\n``/memories/by-type/<unit_type>``. Other roots return an empty result so\ncallers can compose without errors.","operationId":"fs_find_fs_find_get","parameters":[{"name":"path","in":"query","required":false,"schema":{"type":"string","description":"Nowledge FS path scope (e.g. '/memories')","default":"/memories","title":"Path"},"description":"Nowledge FS path scope (e.g. '/memories')"},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by file type: memory | crystal","title":"Type"},"description":"Filter by file type: memory | crystal"},{"name":"unit_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter memories by unit type; also inferred from /memories/by-type/<unit_type> paths","title":"Unit Type"},"description":"Filter memories by unit type; also inferred from /memories/by-type/<unit_type> paths"},{"name":"label","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by label name","title":"Label"},"description":"Filter by label name"},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Lower record-time bound (YYYY-MM-DD or ISO8601)","title":"Since"},"description":"Lower record-time bound (YYYY-MM-DD or ISO8601)"},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Upper record-time bound (YYYY-MM-DD or ISO8601)","title":"Until"},"description":"Upper record-time bound (YYYY-MM-DD or ISO8601)"},{"name":"mentions","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter memories that MENTION this entity name","title":"Mentions"},"description":"Filter memories that MENTION this entity name"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque pagination cursor","title":"Cursor"},"description":"Opaque pagination cursor"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fs/grep":{"get":{"tags":["files","files"],"summary":"Fs Grep","description":"Content search. Returns ``path:line:match`` shaped hits.\n\nPreview space contract: graph-wide projection. Phase 1 covers\nmemory/crystal bodies, thread messages, and parsed Library documents.\nMemory grep can be narrowed with ``unit_type`` or a\n``/memories/by-type/<unit_type>`` path.","operationId":"fs_grep_fs_grep_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Fixed string or regex pattern to find","title":"Q"},"description":"Fixed string or regex pattern to find"},{"name":"path","in":"query","required":false,"schema":{"type":"string","description":"Nowledge FS path scope. Supports /memories, /threads, and /sources in this preview.","default":"/memories","title":"Path"},"description":"Nowledge FS path scope. Supports /memories, /threads, and /sources in this preview."},{"name":"unit_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter memory grep by unit type; also inferred from /memories/by-type/<unit_type> paths","title":"Unit Type"},"description":"Filter memory grep by unit type; also inferred from /memories/by-type/<unit_type> paths"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque pagination cursor","title":"Cursor"},"description":"Opaque pagination cursor"},{"name":"literal","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"When false, treat q as a regular expression","title":"Literal"},"description":"When false, treat q as a regular expression"},{"name":"regex","in":"query","required":false,"schema":{"type":"boolean","description":"Treat q as a regular expression","default":false,"title":"Regex"},"description":"Treat q as a regular expression"},{"name":"ignore_case","in":"query","required":false,"schema":{"type":"boolean","description":"Match without regard to case; true by default","default":true,"title":"Ignore Case"},"description":"Match without regard to case; true by default"},{"name":"case_sensitive","in":"query","required":false,"schema":{"type":"boolean","description":"Force case-sensitive matching","default":false,"title":"Case Sensitive"},"description":"Force case-sensitive matching"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fs/recall":{"get":{"tags":["files","files"],"summary":"Fs Recall","description":"Semantic memory search.  Returns paths, not search hits.\n\nReuses the existing hybrid search pipeline (the one AI Now and\nLibrary already drive) so there's no second index.  Preview recall is\nmemory-backed; use ``grep`` for exact search in threads and sources.\nMemory recall can be narrowed with ``unit_type`` or a\n``/memories/by-type/<unit_type>`` path.\nResults are\nmaterialised as canonical Nowledge FS paths so the caller can pipe them\nstraight into ``cat``.","operationId":"fs_recall_fs_recall_get","parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Semantic query text","title":"Query"},"description":"Semantic query text"},{"name":"path","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Memory subtree to search; non-memory roots return no hits in preview","title":"Path"},"description":"Memory subtree to search; non-memory roots return no hits in preview"},{"name":"unit_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter semantic recall by memory unit type; also inferred from /memories/by-type/<unit_type> paths","title":"Unit Type"},"description":"Filter semantic recall by memory unit type; also inferred from /memories/by-type/<unit_type> paths"},{"name":"k","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"How many results to return","default":20,"title":"K"},"description":"How many results to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fs/write":{"post":{"tags":["files","files"],"summary":"Fs Write","description":"Write a canonical Nowledge FS file.\n\nWrites through the same concrete-space APIs as the underlying surface.\nThis bounded Phase 2 slice supports canonical\nmemory files under ``/memories/by-id/`` and\n``/working-memory/today.md``.  Alias paths return ``EXDEV`` and\nderived paths return ``EROFS``.","operationId":"fs_write_fs_write_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FSWriteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fs/delete":{"post":{"tags":["files"],"summary":"Delete a canonical Memory or Crystal path in its selected Space.","description":"A nonblank body Space wins over the ambient header. Explicit references\nmust resolve to a registered Space. A foreign or moved target is not found;\nan unscoped path still binds the target Space observed during preflight.\nWorking Memory deletion remains unsupported. Space selection is not a grant.","operationId":"fs_delete_fs_delete_post","parameters":[{"name":"X-Nmem-Space-Id","in":"header","description":"Ambient Space when the body omits it.","required":false,"schema":{"type":["string","null"]}},{"name":"X-Nowledge-Space-Id","in":"header","description":"Legacy ambient header; the canonical header takes precedence.","required":false,"schema":{"type":["string","null"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FSDeleteRequest"}}},"required":true},"responses":{"200":{"description":"Authoritative deletion succeeded; index_repair_pending reports deferred search delivery.","content":{"application/json":{"schema":{}}}},"400":{"description":"Malformed JSON or invalid canonical path.","content":{"application/json":{"schema":{}},"text/plain":{"schema":{"type":"string"}}}},"403":{"description":"Caller authority denied (KFS EACCES) or a derived path is read-only (KFS EROFS)."},"404":{"description":"Target missing or outside the selected/observed Space (KFS ENOENT)."},"409":{"description":"An alias is read-only; use an exact canonical path (KFS EXDEV)."},"422":{"description":"Invalid typed request (plain text) or unknown explicit Space (KFS JSON).","content":{"application/json":{"schema":{}},"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Authority state or graph storage unavailable."},"501":{"description":"Path type does not support deletion (KFS ENOTSUP)."}}}},"/spaces/{space_ref}/merge/preview":{"post":{"tags":["spaces"],"summary":"Preview Space Merge","description":"Preview an exact, server-owned Space merge plan without changing data. Returns entity counts, Working Memory disposition, and any conflicts that must be resolved before apply.","operationId":"preview_space_merge_spaces__space_ref__merge_preview_post","parameters":[{"name":"space_ref","in":"path","required":true,"schema":{"type":"string","title":"Space Ref"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceMergeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceMergePlan"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spaces/{space_ref}/merge":{"post":{"tags":["spaces"],"summary":"Merge Spaces","description":"Move Memories, Threads, Library sources, and Working Memory into the target Space, retire the source profile, and preserve its references as target aliases. Apply is rejected when preview reports conflicts.","operationId":"merge_space_spaces__space_ref__merge_post","parameters":[{"name":"space_ref","in":"path","required":true,"schema":{"type":"string","title":"Space Ref"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceMergeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceMergeResult"}}}},"409":{"description":"Merge Conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/backup":{"get":{"tags":["settings"],"summary":"Export portable settings","description":"Export profile, Spaces, knowledge-processing preferences, and provider routing without API keys, sign-in sessions, licenses, Access Anywhere keys, or device paths.","operationId":"export_settings_backup_handler","responses":{"200":{"description":"Portable settings artifact","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsBackupArtifact"}}}}}}},"/settings/restore/preview":{"post":{"tags":["settings"],"summary":"Preview a settings restore","description":"Validate a settings artifact and report its portable sections before any write.","operationId":"preview_settings_restore_handler","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsBackupArtifact"}}},"required":true},"responses":{"200":{"description":"Valid restore preview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsRestorePreview"}}}},"422":{"description":"Invalid, unsafe, or unsupported settings artifact"}}}},"/settings/restore":{"post":{"tags":["settings"],"summary":"Restore portable settings","description":"Merge portable settings into this installation. Existing credentials survive only for an unchanged non-OAuth provider identity; secrets are never read from the artifact.","operationId":"restore_settings_handler","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsBackupArtifact"}}},"required":true},"responses":{"200":{"description":"Settings restored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsRestoreResponse"}}}},"422":{"description":"Invalid, unsafe, or unsupported settings artifact"}}}},"/entities/{entity_id}/delete/preview":{"get":{"tags":["entities"],"summary":"Preview entity deletion","description":"Count the graph links that would be detached. Referencing memories are always preserved.","operationId":"preview_entity_delete_handler","parameters":[{"name":"entity_id","in":"path","description":"Entity id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deletion impact preview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityDeletePlanResponse"}}}},"404":{"description":"Entity not found"}}}},"/entities/{entity_id}":{"delete":{"tags":["entities"],"summary":"Delete an entity","description":"Delete one Entity and its incident graph links without deleting any Memory, Source, Label, or Community. Requires an exact entity-id confirmation.","operationId":"delete_entity_handler","parameters":[{"name":"entity_id","in":"path","description":"Entity id","required":true,"schema":{"type":"string"}},{"name":"confirm_entity_id","in":"query","description":"Must exactly match the entity id in the path.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Entity deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityMutationResponse"}}}},"404":{"description":"Entity not found"},"422":{"description":"Confirmation does not match the entity id"}}}},"/entities/{entity_id}/merge/preview":{"post":{"tags":["entities"],"summary":"Preview an entity merge","description":"Preview moving a duplicate Entity into a canonical target, including mention and custom-relation consolidation.","operationId":"preview_entity_merge_handler","parameters":[{"name":"entity_id","in":"path","description":"Source entity id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityMergeRequest"}}},"required":true},"responses":{"200":{"description":"Merge impact preview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityMergePlanResponse"}}}},"404":{"description":"Source or target Entity not found"},"422":{"description":"Source and target are invalid"}}}},"/entities/{entity_id}/merge":{"post":{"tags":["entities"],"summary":"Merge entities","description":"Atomically move the source Entity's mentions, aliases, labels, topics, and custom relations to the target, then remove the source. Requires an exact source-id confirmation.","operationId":"merge_entity_handler","parameters":[{"name":"entity_id","in":"path","description":"Source entity id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityMergeRequest"}}},"required":true},"responses":{"200":{"description":"Entities merged","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityMutationResponse"}}}},"404":{"description":"Source or target Entity not found"},"422":{"description":"Source, target, or confirmation is invalid"}}}},"/skills/{skill_id}/pending-version":{"delete":{"tags":["skills"],"summary":"Discard a pending Skill version","description":"Remove only the reviewable pending proposal. The live Skill body and version remain unchanged.","operationId":"discard_pending_version_handler","parameters":[{"name":"skill_id","in":"path","description":"Skill id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Pending version discarded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscardPendingVersionResponse"}}}},"404":{"description":"Skill not found"},"409":{"description":"The Skill has no pending version"}}}},"/resources/resolve":{"get":{"tags":["resources"],"summary":"Resolve a Nowledge resource URI","description":"Resolve one capability-free nowledgemem:// reference against the authenticated backend and workspace. This endpoint never fetches HTTP(S) or file URLs.","operationId":"resolve_resource_handler","parameters":[{"name":"uri","in":"query","description":"Capability-free `nowledgemem://` URI to resolve.","required":true,"schema":{"type":"string"}},{"name":"agent_id","in":"query","description":"Optional agent identity used only by Context KFS renderers.","required":false,"schema":{"type":"string"}},{"name":"source_app","in":"query","description":"Optional calling application identity used only by Context renderers.","required":false,"schema":{"type":"string"}},{"name":"host_agent_id","in":"query","description":"Optional host-agent identity used only by Context renderers.","required":false,"schema":{"type":"string"}},{"name":"space_id","in":"query","description":"Optional Space lens used only by Context renderers.","required":false,"schema":{"type":"string"}},{"name":"include_working_memory","in":"query","description":"Include Working Memory in a resolved Context Bundle.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Rendered resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolvedResourceResponse"}}}},"400":{"description":"Invalid or unsupported resource URI"},"404":{"description":"Resource not found"}}}},"/agent/ai-now/schedules":{"get":{"tags":["ai-now"],"summary":"List recurring AI Now tasks","operationId":"openapi_list_schedules","parameters":[{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleListResponse"}}}}}},"post":{"tags":["ai-now"],"summary":"Create a recurring AI Now task draft","description":"Creates a draft only. The task cannot run unattended until it is explicitly confirmed.","operationId":"openapi_create_schedule","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScheduleRequest"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleErrorResponse"}}}}}}},"/agent/ai-now/schedules/preview":{"post":{"tags":["ai-now"],"summary":"Preview recurring task occurrences","operationId":"openapi_preview_schedule","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewScheduleRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchedulePreviewResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleErrorResponse"}}}}}}},"/agent/ai-now/schedules/{schedule_id}":{"get":{"tags":["ai-now"],"summary":"Get a recurring AI Now task","operationId":"openapi_get_schedule","parameters":[{"name":"schedule_id","in":"path","description":"Stable recurring task ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleErrorResponse"}}}}}},"patch":{"tags":["ai-now"],"summary":"Edit a recurring AI Now task","description":"Permission-sensitive changes pause an active task until it is reviewed and confirmed again.","operationId":"openapi_update_schedule","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateScheduleRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleErrorResponse"}}}}}},"delete":{"tags":["ai-now"],"summary":"Delete a recurring AI Now task","operationId":"openapi_delete_schedule","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleDeleteResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleErrorResponse"}}}}}}},"/agent/ai-now/schedules/{schedule_id}/confirm":{"post":{"tags":["ai-now"],"summary":"Confirm and activate a recurring AI Now task","description":"Activates only when the capability grant matches the current instruction and connector configuration.","operationId":"openapi_confirm_schedule","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmScheduleRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleErrorResponse"}}}}}}},"/agent/ai-now/schedules/{schedule_id}/pause":{"post":{"tags":["ai-now"],"summary":"Pause a recurring task and request cancellation of its current run","operationId":"openapi_pause_schedule","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleErrorResponse"}}}},"500":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleErrorResponse"}}}}}}},"/agent/ai-now/schedules/{schedule_id}/resume":{"post":{"tags":["ai-now"],"summary":"Resume a recurring AI Now task","description":"Tasks with changed authority or uncertain external side effects must be confirmed instead.","operationId":"openapi_resume_schedule","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleErrorResponse"}}}}}}},"/agent/ai-now/schedules/{schedule_id}/runs":{"get":{"tags":["ai-now"],"summary":"List recurring task run history","operationId":"openapi_schedule_runs","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleRunsResponse"}}}}}}},"/labels/{label_id}/delete/preview":{"post":{"tags":["labels"],"summary":"Preview label deletion","description":"Return the exact resources whose label assignment would be detached. Memories and resources are preserved.","operationId":"preview_label_delete_handler","parameters":[{"name":"label_id","in":"path","description":"Label id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deletion plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelLifecyclePlanResponse"}}}},"404":{"description":"Label not found"}}}},"/labels/{label_id}/delete/apply":{"post":{"tags":["labels"],"summary":"Apply label deletion","description":"Atomically delete a label only if its current state still matches the supplied preview plan.","operationId":"apply_label_delete_handler","parameters":[{"name":"label_id","in":"path","description":"Label id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelApplyRequest"}}},"required":true},"responses":{"200":{"description":"Label deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelMutationResponse"}}}},"404":{"description":"Label not found"},"409":{"description":"Label changed after preview"}}}},"/labels/{label_id}/merge/preview":{"post":{"tags":["labels"],"summary":"Preview a label merge","description":"Preview moving every assignment from a duplicate label to a canonical label.","operationId":"preview_label_merge_handler","parameters":[{"name":"label_id","in":"path","description":"Source label id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelMergePreviewRequest"}}},"required":true},"responses":{"200":{"description":"Merge plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelLifecyclePlanResponse"}}}},"404":{"description":"Source or target label not found"},"422":{"description":"Source and target are invalid"}}}},"/labels/{label_id}/merge/apply":{"post":{"tags":["labels"],"summary":"Apply a label merge","description":"Atomically move assignments and remove the source label only if both labels still match the supplied preview plan.","operationId":"apply_label_merge_handler","parameters":[{"name":"label_id","in":"path","description":"Source label id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelMergeApplyRequest"}}},"required":true},"responses":{"200":{"description":"Labels merged","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelMutationResponse"}}}},"404":{"description":"Source or target label not found"},"409":{"description":"Labels changed after preview"},"422":{"description":"Missing plan id or invalid labels"}}}},"/agent/feed/events/{event_id}/visibility":{"put":{"tags":["knowledge-agent"],"summary":"Set Feed Event Visibility","description":"Hide or restore an immutable Timeline event for the current viewer. This changes personal presentation only; it does not delete the event or its evidence.","operationId":"openapi_set_feed_event_visibility","parameters":[{"name":"event_id","in":"path","description":"Timeline event id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedEventVisibilityRequest"}}},"required":true},"responses":{"200":{"description":"Visibility updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedEventVisibilityResponse"}}}}}}},"/memories/evolves/revision/preview":{"post":{"tags":["memories"],"summary":"Preview a Memory history correction","description":"Inspect the exact EVOLVES pair and bind a desired semantic state to its current topology. This never mutates raw edges or Memory visibility fields.","operationId":"preview_evolves_revision_handler","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvolvesRevisionPreviewRequest"}}},"required":true},"responses":{"200":{"description":"State-bound correction plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvolvesRevisionPlanResponse"}}}},"404":{"description":"Memory pair not found"},"422":{"description":"Invalid correction"}}}},"/memories/evolves/revision/apply":{"post":{"tags":["memories"],"summary":"Apply a Memory history correction","description":"Atomically reconcile the pair's direct EVOLVES edge, recompute visibility from the remaining replacement graph, and write an idempotent governance receipt.","operationId":"apply_evolves_revision_handler","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvolvesRevisionApplyRequest"}}},"required":true},"responses":{"200":{"description":"Correction applied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvolvesRevisionResultResponse"}}}},"409":{"description":"Pair changed after preview"},"422":{"description":"Invalid correction"}}}},"/settings/agent-profiles/{agent_id}/export":{"get":{"tags":["settings"],"summary":"Export Agent Identity","description":"Export one enrolled Agent profile as a versioned, credential-free identity card.","operationId":"export_agent_profile_handler","parameters":[{"name":"agent_id","in":"path","description":"Canonical Agent profile ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Portable Agent identity card","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentIdentityCard"}}}},"404":{"description":"Agent profile not found"}}}},"/settings/agent-profiles/import":{"post":{"tags":["settings"],"summary":"Import Agent Identity","description":"Enroll a versioned Agent identity card. Existing IDs return a conflict unless force is enabled.","operationId":"import_agent_profile_handler","parameters":[{"name":"force","in":"query","description":"Replace an existing profile with the same canonical ID","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentIdentityImportPayload"}}},"required":true},"responses":{"200":{"description":"Imported Agent profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentIdentityImportResponse"}}}},"409":{"description":"Agent profile already exists"},"422":{"description":"Invalid or unsupported identity card"}}}},"/settings/agent-profiles/{agent_id}/usage":{"get":{"tags":["settings"],"summary":"Get Agent Identity Usage","description":"Compute current attribution and key-usage evidence for an enrolled Agent identity without mutating its profile.","operationId":"agent_profile_usage_handler","parameters":[{"name":"agent_id","in":"path","description":"Canonical Agent profile ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Computed Agent identity usage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentProfileUsageResponse"}}}},"404":{"description":"Agent profile not found"}}}},"/skills/{skill_id}/restore-merge":{"post":{"tags":["skills"],"summary":"Undo a Skill merge","description":"Restore the absorbed Skill and remove this merge's pending evidence from the kept Skill. Available only until that evidence is applied or changed.","operationId":"restore_merged_skill_handler","parameters":[{"name":"skill_id","in":"path","description":"Archived Skill id returned by merge-into","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Merge undone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreMergedSkillResponse"}}}},"404":{"description":"Skill or merge target not found"},"409":{"description":"Skill is not a reversible merge or its evidence is no longer pending"}}}},"/agent/feed/events/{event_id}/review":{"post":{"tags":["knowledge-agent"],"summary":"Preview or Confirm Timeline Review","description":"Choose phase=preview to read the full authorized evidence and proposed graph effects. Show that snapshot to the person making the decision, then send phase=apply with the exact plan_id and unchanged command. A conflict requires an explicit new preview, never an invisible refresh and retry. Graph changes and their authoritative receipt commit together. An authorized retry returns the original decision, including when it differs from the requested action. Dismiss and note-only actions may use phase=apply without a plan. Older servers do not serve this endpoint; never fall back to the legacy resolve endpoint for a preview or graph confirmation.","operationId":"openapi_guarded_timeline_review","parameters":[{"name":"event_id","in":"path","description":"Timeline review event ID","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardedTimelineReviewRequest"}}},"required":true},"responses":{"200":{"description":"Evidence preview or recorded decision","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardedTimelineReviewResponse"}}}},"400":{"description":"Malformed request"},"403":{"description":"Current authority does not permit this review"},"404":{"description":"Review unavailable or endpoint unsupported; do not fall back"},"409":{"description":"Evidence changed; explicitly review a fresh preview"},"422":{"description":"Invalid phase, arguments or action for this review"},"428":{"description":"A displayed evidence plan is required"},"503":{"description":"Evidence or storage is unavailable"}}}},"/memories/distill/plan":{"post":{"tags":["distillation"],"summary":"Get Distillation Plan","description":"Decide whether this thread should use direct or background distillation.","operationId":"get_distillation_plan_memories_distill_plan_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistillationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistillationPlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/distill/preview":{"post":{"tags":["distillation"],"summary":"Preview Distillation","description":"Preview what memories would be created from a thread.","operationId":"preview_distillation_memories_distill_preview_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistillationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistillationPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/entities/{entity_id}/aliases":{"get":{"tags":["entities"],"summary":"Read entity aliases","operationId":"read_entity_aliases_handler","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Current aliases, rejected aliases and revision","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityAliasStateSchema"}}}},"404":{"description":"Entity missing"},"422":{"description":"Entity metadata cannot be safely corrected"}}},"post":{"tags":["entities"],"summary":"Correct entity aliases","description":"Correct aliases with expected_revision and expected_aliases from GET. add explicitly restores rejected aliases; remove persistently rejects them. Neither operation changes entity identity or links.","operationId":"change_entity_aliases_handler","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityAliasChangeSchema"}}},"required":true},"responses":{"200":{"description":"Updated alias state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityAliasStateSchema"}}}},"403":{"description":"Owner or admin user required"},"404":{"description":"Entity missing"},"409":{"description":"Alias state changed"},"422":{"description":"Invalid alias change"}}}},"/identity/profiles":{"get":{"tags":["memories"],"summary":"List identity profiles","description":"Use the target server's normal authentication and an explicit exact Space ID. No cross-Space fallback is performed. Requires current read authority. Returns independently enrolled profiles for this Space; matching names do not imply the same person. Reading does not invoke a model.","operationId":"get_identity_profiles","responses":{"200":{"description":"Current committed identity data.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IdentityProfile"}}}}},"400":{"description":"Malformed path or query; framework validation may return plain text."},"401":{"description":"Authentication is required by the target server."},"403":{"description":"Current actor, credential or Space authority denies this operation. Identity-specific denials use IdentityOperationError; earlier authentication gates may use their generic error format."},"404":{"description":"The Memory, profile or Space is unavailable to this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}},"409":{"description":"A current-state, capacity or concurrency condition prevents the operation. Inspect error_code; not every conflict means stale evidence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}},"413":{"description":"Source, snapshot or profile payload exceeds the bounded operation limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}},"422":{"description":"Invalid request keys, selection or profile. Identity validation uses IdentityOperationError; malformed JSON or DTO decoding may return a framework validation response."},"500":{"description":"Storage or worker failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}},"503":{"description":"Current authorization, storage or model admission is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}}},"parameters":[{"name":"space_id","in":"query","required":true,"schema":{"type":"string","description":"Exact Space ID. Pass explicitly; this operation does not infer the active Space or broaden to other Spaces."}}]},"post":{"tags":["memories"],"summary":"Create or update an identity profile","description":"Use the target server's normal authentication and an explicit exact Space ID. No cross-Space fallback is performed. Requires a human actor with current write authority. To create, send id: null and expected_revision: null (or omit expected_revision). To update, send both the existing ID and its current revision. Creation never coalesces profiles by name. The Space supports at most 100 profiles; bounded pending changes can reject further edits. Linking a subject is optional; omitting subject keeps any existing link. Saving queues selective background replay and may lead to later model use, but this request does not make an inline model call.","operationId":"save_identity_profile","responses":{"200":{"description":"Current committed identity data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityProfile"}}}},"400":{"description":"Malformed path or query; framework validation may return plain text."},"401":{"description":"Authentication is required by the target server."},"403":{"description":"Current actor, credential or Space authority denies this operation. Identity-specific denials use IdentityOperationError; earlier authentication gates may use their generic error format."},"404":{"description":"The Memory, profile, Space or linked AI Identity/member is unavailable to this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}},"409":{"description":"A current-state, capacity or concurrency condition prevents the operation, including a subject already linked to another profile in this Space. Inspect error_code; not every conflict means stale evidence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}},"413":{"description":"Source, snapshot or profile payload exceeds the bounded operation limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}},"422":{"description":"Invalid request keys, selection or profile. Identity validation uses IdentityOperationError; malformed JSON or DTO decoding may return a framework validation response."},"500":{"description":"Storage or worker failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}},"503":{"description":"Current authorization, storage or model admission is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityProfileWrite"},"examples":{"create":{"summary":"Create a distinct profile","value":{"space_id":"engineering","id":null,"expected_revision":null,"name":"Alice","aliases":[],"context":"Reviews the design","kind":"human"}},"update":{"summary":"Edit using the revision returned by a read","value":{"space_id":"engineering","id":"profile-id-from-this-server","expected_revision":1,"name":"Alice","aliases":["A."],"context":"Reviews the design","kind":"human"}}}}}}}},"/memories/{memory_id}/identity":{"get":{"tags":["memories"],"summary":"Read memory identity evidence","description":"Use the target server's normal authentication and an explicit exact Space ID. No cross-Space fallback is performed. Requires current read authority. Read this response before correcting an occurrence; retain source_revision, epoch, generation and the occurrence revision. An empty occurrences array is valid and reading does not invoke a model.","operationId":"read_memory_identity","responses":{"200":{"description":"Current committed identity data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityEvidence"}}}},"400":{"description":"Malformed path or query; framework validation may return plain text."},"401":{"description":"Authentication is required by the target server."},"403":{"description":"Current actor, credential or Space authority denies this operation. Identity-specific denials use IdentityOperationError; earlier authentication gates may use their generic error format."},"404":{"description":"The Memory, profile or Space is unavailable to this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}},"409":{"description":"A current-state, capacity or concurrency condition prevents the operation. Inspect error_code; not every conflict means stale evidence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}},"413":{"description":"Source, snapshot or profile payload exceeds the bounded operation limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}},"422":{"description":"Invalid request keys, selection or profile. Identity validation uses IdentityOperationError; malformed JSON or DTO decoding may return a framework validation response."},"500":{"description":"Storage or worker failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}},"503":{"description":"Current authorization, storage or model admission is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}}},"parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string"},"description":"Memory ID returned by the target server; the Memory must belong to the exact requested Space."},{"name":"space_id","in":"query","required":true,"schema":{"type":"string","description":"Exact Space ID. Pass explicitly; this operation does not infer the active Space or broaden to other Spaces."}}]}},"/memories/{memory_id}/identity/correction":{"post":{"tags":["memories"],"summary":"Correct a memory identity occurrence","description":"Use the target server's normal authentication and an explicit exact Space ID. No cross-Space fallback is performed. Requires a human actor with current write authority; an agent cannot mark a decision as human. Copy all concurrency fields from a fresh evidence read. Send identity_id: null to explicitly confirm unknown, or a profile ID in this Space. Omission is invalid. No model is called. If source or evidence changed, read again before choosing a correction; capacity and other conflicts require the recovery identified by error_code.","operationId":"correct_memory_identity","responses":{"200":{"description":"Current committed identity data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityEvidence"}}}},"400":{"description":"Malformed path or query; framework validation may return plain text."},"401":{"description":"Authentication is required by the target server."},"403":{"description":"Current actor, credential or Space authority denies this operation. Identity-specific denials use IdentityOperationError; earlier authentication gates may use their generic error format."},"404":{"description":"The Memory, profile or Space is unavailable to this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}},"409":{"description":"A current-state, capacity or concurrency condition prevents the operation. Inspect error_code; not every conflict means stale evidence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}},"413":{"description":"Source, snapshot or profile payload exceeds the bounded operation limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}},"422":{"description":"Invalid request keys, selection or profile. Identity validation uses IdentityOperationError; malformed JSON or DTO decoding may return a framework validation response."},"500":{"description":"Storage or worker failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}},"503":{"description":"Current authorization, storage or model admission is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}}},"parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string"},"description":"Memory ID returned by the target server; the Memory must belong to the exact requested Space."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityCorrectionRequest"},"examples":{"confirm_unknown":{"summary":"Record an explicit human unknown decision using current evidence","value":{"space_id":"engineering","source_revision":"source-revision-from-read","expected_epoch":"epoch-from-read","expected_generation":1,"mention_id":"mention-id-from-read","expected_revision":1,"identity_id":null}}}}}}}},"/memories/{memory_id}/identity/extract":{"post":{"tags":["memories"],"summary":"Extract or reconsider memory identities","description":"Use the target server's normal authentication and an explicit exact Space ID. No cross-Space fallback is performed. Requires current write and model authority; permitted agents may request machine extraction. Uses the configured model and applicable model billing/admission. Omit mention_ids (or use null) with no new_spans for initial extraction only when there are no existing occurrences. An eligible interactive request invokes the model, including a repeated request after an empty result; background initial-pass deduplication is separate. When occurrences already exist, use selected mode. An explicit mention_ids array selects machine occurrences, optionally with new_spans. Human-confirmed choices are preserved. This is a bounded request for one Memory, not whole-Space replay or automatic profile creation.","operationId":"extract_memory_identity","responses":{"200":{"description":"Current committed identity data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityEvidence"}}}},"400":{"description":"Malformed path or query; framework validation may return plain text."},"401":{"description":"Authentication is required by the target server."},"403":{"description":"Current actor, credential or Space authority denies this operation. Identity-specific denials use IdentityOperationError; earlier authentication gates may use their generic error format."},"404":{"description":"The Memory, profile or Space is unavailable to this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}},"409":{"description":"A current-state, capacity or concurrency condition prevents the operation. Inspect error_code; not every conflict means stale evidence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}},"413":{"description":"Source, snapshot or profile payload exceeds the bounded operation limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}},"422":{"description":"Invalid request keys, selection or profile. Identity validation uses IdentityOperationError; malformed JSON or DTO decoding may return a framework validation response."},"500":{"description":"Storage or worker failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}},"502":{"description":"The configured model failed to return an acceptable result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}},"503":{"description":"Current authorization, storage or model admission is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}},"504":{"description":"The bounded model attempt exceeded its deadline.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityOperationError"}}}}},"parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string"},"description":"Memory ID returned by the target server; the Memory must belong to the exact requested Space."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityExtractionRequest"},"examples":{"initial":{"summary":"Initial extraction for this Memory","value":{"space_id":"engineering"}},"selected":{"summary":"Reconsider one machine occurrence","value":{"space_id":"engineering","mention_ids":["machine-mention-id-from-read"],"new_spans":[]}}}}}}}}},"components":{"schemas":{"AINowAutoApproveRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false}},"type":"object","title":"AINowAutoApproveRequest"},"AINowFileReadRequest":{"properties":{"path":{"type":"string","title":"Path"}},"type":"object","required":["path"],"title":"AINowFileReadRequest"},"AINowMessagesRequest":{"properties":{"messages":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Messages"}},"type":"object","title":"AINowMessagesRequest"},"AINowPermissionResponseRequest":{"properties":{"optionId":{"type":"string","title":"Optionid","default":"reject"}},"type":"object","title":"AINowPermissionResponseRequest"},"AINowPromptRequest":{"properties":{"displayContent":{"type":"string","title":"Displaycontent","default":""},"displayMessageId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Displaymessageid"},"promptBlocks":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Promptblocks"},"attachments":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Attachments"}},"type":"object","title":"AINowPromptRequest"},"AINowSessionCreateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"workingDir":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workingdir"},"plugins":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Plugins"},"activeSpaceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activespaceid"}},"type":"object","title":"AINowSessionCreateRequest"},"AINowSessionUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"messageCount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Messagecount"},"plugins":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Plugins"},"activeSpaceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activespaceid"},"llmProvider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llmprovider"},"llmModel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llmmodel"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errormessage"}},"type":"object","title":"AINowSessionUpdateRequest"},"AINowSkillPromptsRequest":{"properties":{"content":{"type":"string","title":"Content","default":""}},"type":"object","title":"AINowSkillPromptsRequest"},"AgentProfilePayload":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Displayname"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"defaultSpaceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultspaceid"},"sourceApp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceapp"},"hostAgentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hostagentid"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"}},"type":"object","title":"AgentProfilePayload"},"AgentProfileResponse":{"type":"object","required":["id","displayName","role","description","instructions","defaultSpaceId","sourceApp","hostAgentId","tags","origin"],"properties":{"defaultSpaceId":{"type":"string"},"description":{"type":"string"},"displayName":{"type":"string"},"hostAgentId":{"type":"string"},"id":{"type":"string"},"instructions":{"type":"string"},"origin":{"type":"string","description":"How this identity was born: `minted` | `claimed` | `managed` |\n`imported` (#1276 S4). Server-authored; read-only to clients."},"role":{"type":"string"},"sourceApp":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"identityReference":{"type":["string","null"],"readOnly":true,"description":"Server-authored opaque scoped incarnation for content profile links.\nNull means this legacy identity has no issued reference. Copy the\nobserved value into IdentitySubject.reference; do not derive it from\nid or reuse it after replacement."}}},"AgentProfilesResponse":{"properties":{"agentProfiles":{"items":{"$ref":"#/components/schemas/AgentProfileResponse"},"type":"array","title":"Agentprofiles"}},"type":"object","title":"AgentProfilesResponse"},"AnalysisSummaryModel":{"properties":{"total_communities":{"type":"integer","title":"Total Communities","description":"Total number of detected communities","default":0},"total_entities":{"type":"integer","title":"Total Entities","description":"Total number of entities","default":0},"total_memories":{"type":"integer","title":"Total Memories","description":"Total number of memories","default":0},"total_relationships":{"type":"integer","title":"Total Relationships","description":"Total number of relationships","default":0},"network_density":{"type":"number","title":"Network Density","description":"Graph network density","default":0}},"type":"object","title":"AnalysisSummaryModel"},"AppendMessagesResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether append succeeded"},"thread_id":{"type":"string","title":"Thread Id","description":"Thread ID"},"messages_added":{"type":"integer","title":"Messages Added","description":"Number of messages added"},"total_messages":{"type":"integer","title":"Total Messages","description":"Total messages in thread"}},"additionalProperties":true,"type":"object","required":["success","thread_id","messages_added","total_messages"],"title":"AppendMessagesResponse","description":"Response from appending messages to thread."},"AugmentationJobItem":{"properties":{"job_id":{"type":"string","title":"Job Id"},"job_type":{"type":"string","title":"Job Type"},"status":{"type":"string","title":"Status"},"progress":{"title":"Progress"},"message":{"title":"Message"},"created_at":{"title":"Created At"}},"type":"object","required":["job_id","job_type","status","progress","message","created_at"],"title":"AugmentationJobItem"},"AugmentationJobListResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"jobs":{"items":{"$ref":"#/components/schemas/AugmentationJobItem"},"type":"array","title":"Jobs"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["success","jobs","total"],"title":"AugmentationJobListResponse"},"AugmentationJobStartResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"job_id":{"type":"string","title":"Job Id"},"job_type":{"type":"string","title":"Job Type"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","job_id","job_type","message"],"title":"AugmentationJobStartResponse"},"AugmentationJobStatusResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"job_status":{"additionalProperties":true,"type":"object","title":"Job Status"}},"type":"object","required":["success","job_status"],"title":"AugmentationJobStatusResponse"},"AugmentationStartRequest":{"properties":{"job_type":{"type":"string","title":"Job Type"},"parameters":{"additionalProperties":true,"type":"object","title":"Parameters"}},"type":"object","required":["job_type"],"title":"AugmentationStartRequest","description":"Request model for starting an augmentation job."},"AugmentationStateModel":{"properties":{"success":{"type":"boolean","title":"Success"},"state":{"additionalProperties":true,"type":"object","title":"State"}},"type":"object","required":["success","state"],"title":"AugmentationStateModel","description":"Pydantic model describing the augmentation state response."},"AuthorSkillRequest":{"properties":{"name":{"type":"string","title":"Name","description":"What the user calls the skill"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"When/why the AI should use it; the seed intent for a from-scratch skill"},"memory_ids":{"items":{"type":"string"},"type":"array","title":"Memory Ids","description":"Memories to build the skill from"},"thread_ids":{"items":{"type":"string"},"type":"array","title":"Thread Ids","description":"Threads to build from; resolved to their source memories"},"source_ids":{"items":{"type":"string"},"type":"array","title":"Source Ids","description":"Library sources (Deep Create: dropped files / URLs / pasted text) whose content seeds the compile"}},"type":"object","required":["name"],"title":"AuthorSkillRequest","description":"User-authored skill: a name, an optional intent note, and optional sources."},"AutoImportRuleModel":{"properties":{"id":{"type":"string","title":"Id","description":"Rule ID"},"type":{"type":"string","title":"Type","description":"Rule type: project, path_pattern, or source"},"value":{"type":"string","title":"Value","description":"Value to match"},"enabled":{"type":"boolean","title":"Enabled","description":"Whether rule is enabled","default":true},"created_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Created At","description":"Creation timestamp"}},"type":"object","required":["id","type","value"],"title":"AutoImportRuleModel","description":"Model for auto-import rule."},"BGEM3InstallRequest":{"properties":{"download_source":{"type":"string","enum":["huggingface","modelscope","auto"],"title":"Download Source","default":"auto"},"force_reinstall":{"type":"boolean","title":"Force Reinstall","default":false}},"type":"object","title":"BGEM3InstallRequest","description":"Request model for search embedding installation."},"BGEM3InstallResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"reindex_required":{"type":"boolean","title":"Reindex Required","default":true}},"type":"object","required":["success","message"],"title":"BGEM3InstallResponse","description":"Response model for search embedding installation."},"BGEM3StatusResponse":{"properties":{"exists":{"type":"boolean","title":"Exists"},"available_for_indexing":{"type":"boolean","title":"Available For Indexing","default":false},"model_name":{"type":"string","title":"Model Name","default":"search-embedding"},"size_mb":{"type":"integer","title":"Size Mb","default":500},"message":{"type":"string","title":"Message"},"embedding_mode":{"type":"string","enum":["local","remote"],"title":"Embedding Mode","default":"local"},"remote_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remote Provider"},"remote_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remote Model"},"backend":{"type":"string","title":"Backend","default":"auto"},"platform":{"type":"string","title":"Platform","default":"unknown"},"reindex_needed":{"type":"boolean","title":"Reindex Needed","default":false},"reindex_reason":{"type":"string","title":"Reindex Reason","default":""},"index_metadata_update_needed":{"type":"boolean","title":"Index Metadata Update Needed","default":false},"index_metadata_update_reason":{"type":"string","title":"Index Metadata Update Reason","default":""},"projection_repair_needed":{"type":"boolean","title":"Projection Repair Needed","default":false},"projection_repair_reason":{"type":"string","title":"Projection Repair Reason","default":""},"state":{"type":"string","title":"State","default":"not_installed"},"verified":{"type":"boolean","title":"Verified","default":false},"integrity_ok":{"type":"boolean","title":"Integrity Ok","default":false},"smoke_test_ok":{"type":"boolean","title":"Smoke Test Ok","default":false},"singleton_initialized":{"type":"boolean","title":"Singleton Initialized","default":false},"last_verified_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Verified At"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"embedding_runtime":{"$ref":"#/components/schemas/EmbeddingRuntime","description":"Runtime evidence about the configured embedding provider. Always sent by servers that support it, carrying zero counts before this process has run a search; absent entirely on older servers."}},"type":"object","required":["exists","message"],"title":"BGEM3StatusResponse","description":"Response model for search embedding model status."},"BatchIngestFile":{"properties":{"file_path":{"type":"string","title":"File Path","description":"Absolute path to the file on disk"},"relative_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relative Path","description":"Path relative to source folder, for hierarchy"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes","description":"Enumerated file size hint"}},"type":"object","required":["file_path"],"title":"BatchIngestFile","description":"A single file in a batch ingestion request."},"BatchIngestRequest":{"properties":{"files":{"items":{"$ref":"#/components/schemas/BatchIngestFile"},"type":"array","title":"Files","description":"Files to ingest"},"folder_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder Name","description":"Source folder name (for feed event title)"},"user_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Comment","description":"User comment about the batch"},"labels":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Labels","description":"Label names to assign to all ingested sources"},"space_id":{"type":"string","title":"Space Id","description":"Isolation space for all ingested sources","default":"default"},"emit_feed_event":{"type":"boolean","title":"Emit Feed Event","description":"Emit feed event on completion (set false for intermediate chunks)","default":true},"accumulated_totals":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Accumulated Totals","description":"Override counts for feed event metadata (used by chunked imports to report full-import totals)"}},"type":"object","required":["files"],"title":"BatchIngestRequest","description":"Request body for batch file ingestion (folder import from desktop app)."},"BatchIngestResponse":{"properties":{"folder_name":{"type":"string","title":"Folder Name","default":""},"total_ingested":{"type":"integer","title":"Total Ingested","default":0},"total_duplicates":{"type":"integer","title":"Total Duplicates","default":0},"total_errors":{"type":"integer","title":"Total Errors","default":0},"results":{"items":{"$ref":"#/components/schemas/IngestResponse"},"type":"array","title":"Results"},"message":{"type":"string","title":"Message","default":""}},"type":"object","title":"BatchIngestResponse","description":"Response from batch ingestion endpoint."},"Body_import_data_upload_data_import_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"mode":{"type":"string","enum":["merge","skip","overwrite"],"title":"Mode","default":"merge"},"include_memories":{"type":"boolean","title":"Include Memories","default":true},"include_threads":{"type":"boolean","title":"Include Threads","default":true},"include_messages":{"type":"boolean","title":"Include Messages","default":true},"include_entities":{"type":"boolean","title":"Include Entities","default":true},"include_labels":{"type":"boolean","title":"Include Labels","default":true},"include_sources":{"type":"boolean","title":"Include Sources","default":true},"include_communities":{"type":"boolean","title":"Include Communities","default":true},"include_skills":{"type":"boolean","title":"Include Skills","default":true},"include_edges":{"type":"boolean","title":"Include Edges","default":true},"include_working_memory":{"type":"boolean","title":"Include Working Memory","default":true},"include_working_memory_archive":{"type":"boolean","title":"Include Working Memory Archive","default":true},"include_source_files":{"type":"boolean","title":"Include Source Files","default":true}},"type":"object","required":["file"],"title":"Body_import_data_upload_data_import_upload_post"},"Body_ingest_folder_upload_sources_ingest_folder_upload_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"},"folder_name":{"type":"string","title":"Folder Name"},"file_manifest":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Manifest"},"user_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Comment"},"labels":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Labels"},"space_id":{"type":"string","title":"Space Id","default":"default"},"emit_feed_event":{"type":"boolean","title":"Emit Feed Event","default":true},"accumulated_totals":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accumulated Totals"}},"type":"object","required":["files","folder_name"],"title":"Body_ingest_folder_upload_sources_ingest_folder_upload_post"},"BulkDeleteMemoriesRequest":{"properties":{"selection":{"$ref":"#/components/schemas/BulkMemorySelection"},"cascade_delete":{"type":"boolean","title":"Cascade Delete","description":"Delete related graph artifacts","default":true}},"type":"object","required":["selection"],"title":"BulkDeleteMemoriesRequest","description":"Delete selected memories inside one source space."},"BulkDeleteMemoriesResponse":{"properties":{"deleted_count":{"type":"integer","title":"Deleted Count"},"failed_count":{"type":"integer","title":"Failed Count","default":0},"source_space_id":{"type":"string","title":"Source Space Id"},"cascade_delete":{"type":"boolean","title":"Cascade Delete","default":true},"results":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Results"},"message":{"type":"string","title":"Message"}},"type":"object","required":["deleted_count","source_space_id","message"],"title":"BulkDeleteMemoriesResponse","description":"Result for a bulk memory delete."},"BulkDeleteThreadsBySelectionRequest":{"properties":{"selection":{"$ref":"#/components/schemas/BulkThreadSelection"},"cascade_delete_memories":{"type":"boolean","title":"Cascade Delete Memories","description":"Delete memories extracted from these threads","default":false}},"type":"object","required":["selection"],"title":"BulkDeleteThreadsBySelectionRequest","description":"Delete selected threads inside one source space."},"BulkDeleteThreadsRequest":{"properties":{"thread_ids":{"items":{"type":"string"},"type":"array","title":"Thread Ids","description":"List of thread IDs to delete"}},"type":"object","required":["thread_ids"],"title":"BulkDeleteThreadsRequest","description":"Request to delete multiple threads."},"BulkDeleteThreadsResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Success message"},"deleted_count":{"type":"integer","title":"Deleted Count","description":"Number of threads successfully deleted"},"failed_count":{"type":"integer","title":"Failed Count","description":"Number of threads that failed to delete","default":0},"total_deleted_messages":{"type":"integer","title":"Total Deleted Messages","description":"Total number of messages deleted","default":0},"total_deleted_memories":{"type":"integer","minimum":0,"description":"Confirmed Memory deletions, including commits before a later failure. Never inferred from the requested cascade flag."},"cascade_deletion":{"type":"boolean","default":false,"description":"Whether cascade deletion was requested, not proof that any Memory was deleted. Cloud currently reports zero extracted Memory deletions."},"results":{"items":{"additionalProperties":true,"type":"object","properties":{"thread_id":{"type":"string"},"deleted":{"type":"boolean","description":"Whether the parent Thread deletion was confirmed. False with deletion_outcome_uncertain is not proof that no write committed."},"deleted_messages":{"type":"integer","minimum":0},"deleted_memories":{"type":"integer","minimum":0,"description":"Confirmed Memory deletions, including commits before a later failure. Never inferred from the requested cascade flag."},"cascade_deletion":{"type":"boolean","default":false,"description":"Whether cascade deletion was requested, not proof that any Memory was deleted. Cloud currently reports zero extracted Memory deletions."},"partial_success":{"type":"boolean","description":"Some deletions committed while the overall operation did not fully complete. Absence is not proof of rollback."},"index_repair_pending":{"type":"boolean","description":"Known search projection repair remains pending after the reported graph outcomes."},"deletion_outcome_uncertain":{"type":"boolean","description":"At least one submitted graph outcome could not be confirmed. Counts include only confirmed commits; refresh before retrying."},"error":{"type":"string"}}},"type":"array","title":"Results","description":"Detailed results for each thread deletion"},"partial_success":{"type":"boolean","description":"Some deletions committed while the overall operation did not fully complete. Absence is not proof of rollback."},"index_repair_pending":{"type":"boolean","description":"Known search projection repair remains pending after the reported graph outcomes."},"deletion_outcome_uncertain":{"type":"boolean","description":"At least one submitted graph outcome could not be confirmed. Counts include only confirmed commits; refresh before retrying."}},"additionalProperties":true,"type":"object","required":["message","deleted_count"],"title":"BulkDeleteThreadsResponse","description":"Response from bulk deleting threads."},"BulkMemorySelection":{"properties":{"mode":{"type":"string","enum":["ids","space"],"title":"Mode","default":"ids"},"memory_ids":{"items":{"type":"string"},"type":"array","title":"Memory Ids"},"source_space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Space Id"},"exclude_memory_ids":{"items":{"type":"string"},"type":"array","title":"Exclude Memory Ids"}},"type":"object","title":"BulkMemorySelection","description":"Selection descriptor for bulk memory operations."},"BulkMoveMemoriesRequest":{"properties":{"selection":{"$ref":"#/components/schemas/BulkMemorySelection"},"target_space_id":{"type":"string","title":"Target Space Id","description":"Target space name or storage key"}},"type":"object","required":["selection","target_space_id"],"title":"BulkMoveMemoriesRequest","description":"Move selected memories from one space into another."},"BulkMoveMemoriesResponse":{"properties":{"moved_count":{"type":"integer","title":"Moved Count"},"failed_count":{"type":"integer","title":"Failed Count","default":0},"source_space_id":{"type":"string","title":"Source Space Id"},"target_space_id":{"type":"string","title":"Target Space Id"},"index_updated_count":{"type":"integer","title":"Index Updated Count","default":0},"index_repair_needed":{"type":"boolean","title":"Index Repair Needed","default":false},"message":{"type":"string","title":"Message"}},"type":"object","required":["moved_count","source_space_id","target_space_id","message"],"title":"BulkMoveMemoriesResponse","description":"Result for a bulk memory move."},"BulkMovePreviewResponse":{"properties":{"count":{"type":"integer","title":"Count"},"max_allowed":{"type":"integer","title":"Max Allowed","default":5000},"limit_exceeded":{"type":"boolean","title":"Limit Exceeded"},"source_space_id":{"type":"string","title":"Source Space Id"},"target_space_id":{"type":"string","title":"Target Space Id"},"selection_mode":{"type":"string","title":"Selection Mode"},"excluded_count":{"type":"integer","title":"Excluded Count","default":0},"message":{"type":"string","title":"Message"}},"type":"object","required":["count","limit_exceeded","source_space_id","target_space_id","selection_mode","message"],"title":"BulkMovePreviewResponse","description":"Preview for a bulk memory move."},"BulkMoveThreadsPreviewResponse":{"properties":{"count":{"type":"integer","title":"Count"},"max_allowed":{"type":"integer","title":"Max Allowed"},"limit_exceeded":{"type":"boolean","title":"Limit Exceeded"},"source_space_id":{"type":"string","title":"Source Space Id"},"target_space_id":{"type":"string","title":"Target Space Id"},"selection_mode":{"type":"string","title":"Selection Mode"},"excluded_count":{"type":"integer","title":"Excluded Count","default":0},"conflicts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Conflicts"},"message":{"type":"string","title":"Message"}},"type":"object","required":["count","max_allowed","limit_exceeded","source_space_id","target_space_id","selection_mode","message"],"title":"BulkMoveThreadsPreviewResponse","description":"Preview for a bulk thread move."},"BulkMoveThreadsRequest":{"properties":{"selection":{"$ref":"#/components/schemas/BulkThreadSelection"},"target_space_id":{"type":"string","title":"Target Space Id","description":"Target space name or storage key"}},"type":"object","required":["selection","target_space_id"],"title":"BulkMoveThreadsRequest","description":"Move selected threads from one space into another."},"BulkMoveThreadsResponse":{"properties":{"moved_count":{"type":"integer","title":"Moved Count"},"failed_count":{"type":"integer","title":"Failed Count","default":0},"source_space_id":{"type":"string","title":"Source Space Id"},"target_space_id":{"type":"string","title":"Target Space Id"},"conflicts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Conflicts"},"message":{"type":"string","title":"Message"}},"type":"object","required":["moved_count","source_space_id","target_space_id","message"],"title":"BulkMoveThreadsResponse","description":"Result for a bulk thread move."},"BulkThreadSelection":{"properties":{"mode":{"type":"string","enum":["ids","space"],"title":"Mode","default":"ids"},"thread_ids":{"items":{"type":"string"},"type":"array","title":"Thread Ids"},"source_space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Space Id"},"exclude_thread_ids":{"items":{"type":"string"},"type":"array","title":"Exclude Thread Ids"}},"type":"object","title":"BulkThreadSelection","description":"Selection descriptor for bulk thread operations."},"CancelKnowledgeProcessingTaskRequest":{"properties":{"task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id","description":"Stable task id returned by the processing status endpoint."},"task_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Type","description":"Fallback task type selector when a task id is not available."}},"type":"object","title":"CancelKnowledgeProcessingTaskRequest","description":"Cancel a queued or running background task."},"CleanupOrphansResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"deleted_count":{"type":"integer","title":"Deleted Count"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","deleted_count","message"],"title":"CleanupOrphansResponse","description":"Response for orphan cleanup operation."},"CommunityContext":{"properties":{"community_id":{"type":"integer","title":"Community Id","description":"Louvain community id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Community name"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary","description":"LLM-generated community summary (ai_summary), falls back to description"},"member_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Member Count","description":"Number of members in this community"}},"type":"object","required":["community_id"],"title":"CommunityContext","description":"Community context attached to the queried entity."},"ContentStoreHealth":{"properties":{"state":{"type":"string","title":"State"},"db_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Db Path"},"sqlite_ready":{"type":"boolean","title":"Sqlite Ready"},"schema_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schema Version"},"schema_min_supported_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schema Min Supported Version"},"schema_migration_count":{"type":"integer","title":"Schema Migration Count","default":0},"thread_message_owner":{"type":"string","title":"Thread Message Owner"},"cutover_ready":{"type":"boolean","title":"Cutover Ready","default":false},"cutover_completed":{"type":"boolean","title":"Cutover Completed"},"legacy_graph_cleanup_completed":{"type":"boolean","title":"Legacy Graph Cleanup Completed"},"sqlite_message_count":{"type":"integer","title":"Sqlite Message Count","default":0},"sqlite_thread_count":{"type":"integer","title":"Sqlite Thread Count","default":0},"sqlite_anchor_count":{"type":"integer","title":"Sqlite Anchor Count","default":0},"legacy_kuzu_message_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Legacy Kuzu Message Count"},"legacy_kuzu_anchor_scan_offset":{"type":"integer","title":"Legacy Kuzu Anchor Scan Offset","default":0},"legacy_kuzu_anchor_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Legacy Kuzu Anchor Count"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["state","sqlite_ready","thread_message_owner","cutover_completed","legacy_graph_cleanup_completed"],"title":"ContentStoreHealth","description":"Content Store migration and ownership status."},"ConversationDiscoveryResponse":{"properties":{"conversations":{"additionalProperties":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"type":"object","title":"Conversations","description":"Discovered conversations by source"}},"type":"object","required":["conversations"],"title":"ConversationDiscoveryResponse","description":"Response from conversation discovery."},"ConversationExportRawRequest":{"properties":{"path":{"type":"string","title":"Path","description":"Path to conversation file"},"source":{"type":"string","title":"Source","description":"Source type: claude, codex, cursor, or opencode"},"format":{"type":"string","title":"Format","description":"Export format: markdown or json","default":"markdown"}},"type":"object","required":["path","source"],"title":"ConversationExportRawRequest","description":"Request model for exporting a raw conversation file without importing."},"ConversationImportRequestModel":{"properties":{"path":{"type":"string","title":"Path","description":"Path to conversation file"},"source":{"type":"string","title":"Source","description":"Source type: claude, codex, cursor, or opencode"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Session ID from discovery (used for thread deduplication)"},"thread_id_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thread Id Override","description":"Optional thread ID override"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary","description":"Optional user-provided summary"},"auto_compact":{"type":"boolean","title":"Auto Compact","description":"Auto-extract memories during import","default":false},"preserve_timestamps":{"type":"boolean","title":"Preserve Timestamps","description":"Preserve original timestamps","default":true},"workspace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace","description":"Workspace/project directory path (used for project-level auto-sync)"},"project":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project","description":"Human-readable project name"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Metadata from discovery (e.g. storage type for OpenCode SQLite sessions)"}},"type":"object","required":["path","source"],"title":"ConversationImportRequestModel","description":"Request model for importing a conversation."},"ConversationImportResponse":{"properties":{"thread":{"$ref":"#/components/schemas/ThreadNode"},"messages":{"items":{"$ref":"#/components/schemas/MessageNode"},"type":"array","title":"Messages"},"import_summary":{"type":"string","title":"Import Summary"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"created_memories":{"items":{"$ref":"#/components/schemas/MemoryNode"},"type":"array","title":"Created Memories"},"skipped_messages":{"type":"integer","title":"Skipped Messages","default":0}},"type":"object","required":["thread","messages","import_summary"],"title":"ConversationImportResponse","description":"Response from conversation import."},"ConversationPreviewMessage":{"properties":{"role":{"type":"string","title":"Role","description":"Message role"},"content":{"type":"string","title":"Content","description":"Preview snippet content"}},"type":"object","required":["role","content"],"title":"ConversationPreviewMessage","description":"One preview message snippet for the session browser."},"ConversationPreviewRequest":{"properties":{"path":{"type":"string","title":"Path","description":"Path to conversation file"},"source":{"type":"string","title":"Source","description":"Source type: claude, codex, cursor, or opencode"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Optional session ID for sources that multiplex multiple sessions in one file/database"}},"type":"object","required":["path","source"],"title":"ConversationPreviewRequest","description":"Request model for loading a richer preview for one discovered session."},"ConversationPreviewResponse":{"properties":{"message_count":{"type":"integer","title":"Message Count","description":"Total messages in the session"},"preview_messages":{"items":{"$ref":"#/components/schemas/ConversationPreviewMessage"},"type":"array","title":"Preview Messages","description":"Beginning and tail preview messages"}},"type":"object","required":["message_count"],"title":"ConversationPreviewResponse","description":"Structured preview for one discovered conversation."},"DataExportDownloadRequest":{"type":"object","title":"DataExportDownloadRequest","description":"Export options for the download endpoint (no local path needed).","properties":{"include_communities":{"type":"boolean","default":true},"include_edges":{"type":"boolean","default":true},"include_entities":{"type":"boolean","default":true},"include_feed_events":{"type":"boolean","description":"Include durable Timeline history from feed_events/*.jsonl.","default":true},"include_labels":{"type":"boolean","default":true},"include_memories":{"type":"boolean","default":true},"include_messages":{"type":"boolean","default":true},"include_skills":{"type":"boolean","default":true},"include_source_files":{"type":"boolean","default":true},"include_sources":{"type":"boolean","default":true},"include_threads":{"type":"boolean","default":true},"include_working_memory":{"type":"boolean","default":true},"include_working_memory_archive":{"type":"boolean","default":true}}},"DataExportRequest":{"type":"object","title":"DataExportRequest","description":"POST /data/export request body.","required":["export_path"],"properties":{"async":{"type":"boolean","description":"Return a job id immediately and run the export in the background.","default":false},"compress":{"type":"boolean","description":"Create a .zip archive.","default":true},"export_path":{"type":"string","description":"Target export directory or .zip path."},"include_communities":{"type":"boolean","default":true},"include_edges":{"type":"boolean","default":true},"include_entities":{"type":"boolean","default":true},"include_feed_events":{"type":"boolean","description":"Include durable Timeline history from feed_events/*.jsonl.","default":true},"include_labels":{"type":"boolean","default":true},"include_memories":{"type":"boolean","default":true},"include_messages":{"type":"boolean","default":true},"include_skills":{"type":"boolean","default":true},"include_source_files":{"type":"boolean","default":true},"include_sources":{"type":"boolean","default":true},"include_threads":{"type":"boolean","default":true},"include_working_memory":{"type":"boolean","default":true},"include_working_memory_archive":{"type":"boolean","default":true},"overwrite":{"type":"boolean","description":"Overwrite an existing export path.","default":false}}},"DataImportRequest":{"type":"object","title":"DataImportRequest","description":"POST /data/import request body.","required":["import_path"],"properties":{"import_path":{"type":"string","description":"Path to export folder or .zip."},"include_communities":{"type":"boolean","default":true},"include_edges":{"type":"boolean","default":true},"include_entities":{"type":"boolean","default":true},"include_feed_events":{"type":"boolean","description":"Include durable Timeline history from feed_events/*.jsonl.","default":true},"include_labels":{"type":"boolean","default":true},"include_memories":{"type":"boolean","default":true},"include_messages":{"type":"boolean","default":true},"include_skills":{"type":"boolean","default":true},"include_source_files":{"type":"boolean","default":true},"include_sources":{"type":"boolean","default":true},"include_threads":{"type":"boolean","default":true},"include_working_memory":{"type":"boolean","default":true},"include_working_memory_archive":{"type":"boolean","default":true},"mode":{"$ref":"#/components/schemas/DataImportMode","description":"merge | skip | overwrite."}}},"DataImportStartResponse":{"type":"object","title":"DataImportStartResponse","required":["job_id","status","message"],"properties":{"job_id":{"type":"string"},"message":{"type":"string"},"status":{"type":"string"},"success":{"type":"boolean","default":true}}},"DataImportStatusResponse":{"type":"object","title":"DataTransferStatusResponse","description":"Status for a Data Transfer import or export background job.","required":["job_id","status","result"],"properties":{"completed_at":{"type":["string","null"]},"error":{"type":["string","null"]},"job_id":{"type":"string"},"kind":{"type":["string","null"],"description":"Transfer kind, usually import or export. Older jobs may omit this field."},"result":{"type":["object","null"]},"started_at":{"type":["string","null"]},"status":{"type":"string"}}},"DatabaseRecoveryNotice":{"properties":{"id":{"type":"string","title":"Id"},"created_at":{"type":"string","title":"Created At"},"reason":{"type":"string","title":"Reason"},"support_email":{"type":"string","title":"Support Email"},"chosen_db_path":{"type":"string","title":"Chosen Db Path"},"backup_db_path":{"type":"string","title":"Backup Db Path"},"chosen_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chosen Size Bytes"},"backup_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Backup Size Bytes"}},"type":"object","required":["id","created_at","reason","support_email","chosen_db_path","backup_db_path"],"title":"DatabaseRecoveryNotice","description":"Startup notice when Mem had to preserve an alternate DB copy."},"DeleteLabelResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Deletion status message"}},"type":"object","required":["message"],"title":"DeleteLabelResponse","description":"Response model for label deletion."},"DeleteMemoryResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Success message"},"deleted_relationships":{"type":"integer","title":"Deleted Relationships","description":"Number of relationships deleted"},"deleted_entities":{"type":"integer","title":"Deleted Entities","description":"Number of entities deleted"}},"additionalProperties":true,"type":"object","required":["message","deleted_relationships","deleted_entities"],"title":"DeleteMemoryResponse","description":"Response from deleting a memory."},"DeleteThreadResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Success message"},"deleted_messages":{"type":"integer","title":"Deleted Messages","description":"Number of messages deleted","default":0},"deleted_memories":{"type":"integer","minimum":0,"description":"Confirmed Memory deletions, including commits before a later failure. Never inferred from the requested cascade flag."},"cascade_deletion":{"type":"boolean","default":false,"description":"Whether cascade deletion was requested, not proof that any Memory was deleted. Cloud currently reports zero extracted Memory deletions."},"index_repair_pending":{"type":"boolean","description":"Known search projection repair remains pending after the reported graph outcomes."},"storage_cleanup_pending":{"type":"boolean","description":"The Thread graph deletion committed but associated content cleanup remains pending."}},"additionalProperties":true,"type":"object","required":["message"],"title":"DeleteThreadResponse","description":"Response from deleting a thread."},"DeprecateMemoryRequest":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"replacement_memory_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Replacement Memory Id"},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id","description":"Optional isolation space guard; the memory must belong to it."}},"type":"object","title":"DeprecateMemoryRequest","description":"Mark a memory as obsolete without deleting provenance."},"DismissSkillRequest":{"properties":{"rejection_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rejection Reason","description":"too_broad | not_recurring | duplicate | policy | one_off | stale | not_useful | user_preference"},"resurface_rule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resurface Rule","description":"new_distinct_occasion_threshold | user_requested | never"}},"type":"object","title":"DismissSkillRequest","description":"Why a suggestion was dismissed, so the reviewer doesn't re-suggest it.\n\nBoth fields are optional: a bare dismiss still records a sensible default\n(``not_useful`` + ``new_distinct_occasion_threshold``) so the same idea is\nsuppressed until genuinely new evidence appears."},"DistillationPlanResponse":{"properties":{"thread_id":{"type":"string","title":"Thread Id"},"direct_allowed":{"type":"boolean","title":"Direct Allowed"},"recommended_execution_mode":{"type":"string","title":"Recommended Execution Mode","description":"Recommended execution mode: 'direct' or 'background_agent'"},"message_count":{"type":"integer","title":"Message Count"},"char_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Char Count"},"direct_message_limit":{"type":"integer","title":"Direct Message Limit"},"direct_char_limit":{"type":"integer","title":"Direct Char Limit"},"background_delay_seconds":{"type":"integer","title":"Background Delay Seconds"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["thread_id","direct_allowed","recommended_execution_mode","message_count","direct_message_limit","direct_char_limit","background_delay_seconds"],"title":"DistillationPlanResponse","description":"Execution plan for a thread distillation request."},"DistillationPreviewResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"cache_key":{"type":"string","title":"Cache Key","description":"Cache key to reuse these results"},"distillation_type":{"type":"string","title":"Distillation Type"},"processing_time":{"type":"number","title":"Processing Time"},"memories":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Memories"},"entities":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Entities"},"relationships":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Relationships"},"memory_relations":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Memory Relations"},"insights":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Insights"},"summary":{"type":"string","title":"Summary"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"direct_allowed":{"type":"boolean","title":"Direct Allowed","default":true},"recommended_execution_mode":{"type":"string","title":"Recommended Execution Mode","description":"Recommended execution mode: 'direct' or 'background_agent'","default":"direct"},"message_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Message Count"},"char_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Char Count"},"direct_message_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Direct Message Limit"},"direct_char_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Direct Char Limit"},"background_delay_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Background Delay Seconds"}},"type":"object","required":["success","cache_key","distillation_type","processing_time","memories","entities","relationships","insights","summary"],"title":"DistillationPreviewResponse","description":"Response for distillation preview."},"DistillationRequest":{"properties":{"thread_id":{"type":"string","title":"Thread Id","description":"Source thread ID"},"thread_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thread Title","description":"Thread title for context"},"thread_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thread Content","description":"Full thread content to distill. Optional when thread_id refers to a stored thread."},"distillation_type":{"type":"string","title":"Distillation Type","description":"Type: 'simple_llm' or 'knowledge_graph'","default":"simple_llm"},"extraction_level":{"type":"string","title":"Extraction Level","description":"Extraction level: 'swift' (fast, local), 'guided' (multi-step, local), or 'expert' (remote LLM). Auto-upgrades to expert when local LLM is unavailable.","default":"swift"},"cache_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cache Key","description":"Cache key from preview to reuse results"},"selected_message_indices":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Selected Message Indices","description":"Optional list of message indices to process; if omitted, process full thread"},"preferred_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Language","description":"User preferred output language (ISO 639-1 code, e.g. 'en', 'zh', 'ja'), or None to follow input language"},"force_distill":{"type":"boolean","title":"Force Distill","description":"When true, bypass the strict worthiness gate because the user explicitly requested distillation","default":false},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id","description":"Optional isolation space guard for the source thread."},"existing_memories":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Existing Memories","description":"Optional compact existing memories for preview-time Memory-to-Memory relation proposals."},"native_source_operation":{"$ref":"#/components/schemas/NativeSourceOperation"}},"type":"object","required":["thread_id"],"title":"DistillationRequest","description":"Request for memory distillation from thread content."},"DistillationScheduleRequest":{"properties":{"thread_id":{"type":"string","title":"Thread Id","description":"Source thread ID"},"thread_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thread Title","description":"Thread title for context"},"thread_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thread Content","description":"Full thread content to distill. Optional when thread_id refers to a stored thread."},"distillation_type":{"type":"string","title":"Distillation Type","description":"Type: 'simple_llm' or 'knowledge_graph'","default":"simple_llm"},"extraction_level":{"type":"string","title":"Extraction Level","description":"Extraction level: 'swift' (fast, local), 'guided' (multi-step, local), or 'expert' (remote LLM). Auto-upgrades to expert when local LLM is unavailable.","default":"swift"},"cache_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cache Key","description":"Cache key from preview to reuse results"},"selected_message_indices":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Selected Message Indices","description":"Optional list of message indices to process; if omitted, process full thread"},"preferred_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Language","description":"User preferred output language (ISO 639-1 code, e.g. 'en', 'zh', 'ja'), or None to follow input language"},"force_distill":{"type":"boolean","title":"Force Distill","description":"When true, bypass the strict worthiness gate because the user explicitly requested distillation","default":false},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id","description":"Optional isolation space guard for the source thread."},"existing_memories":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Existing Memories","description":"Optional compact existing memories for preview-time Memory-to-Memory relation proposals."},"delay_seconds":{"type":"integer","maximum":300,"minimum":1,"title":"Delay Seconds","description":"Delay before the background Knowledge Agent starts the task.","default":5},"memory_policy_override":{"anyOf":[{"$ref":"#/components/schemas/MemoryPolicyPatch"},{"type":"null"}],"description":"Optional one-run Memory Policy applied after global and actual source-Thread Space settings. Does not change stored policy or routing. Omitted, null, or empty objects preserve inherited behavior. Existing force_distill semantics remain separate; set it to request re-distillation of unchanged content."},"native_source_operation":{"$ref":"#/components/schemas/NativeSourceOperation"}},"type":"object","required":["thread_id"],"title":"DistillationScheduleRequest","description":"Request to schedule agent-backed thread distillation."},"DistillationScheduleResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"task_id":{"type":"string","title":"Task Id"},"scheduled_at":{"type":"string","title":"Scheduled At"},"delay_seconds":{"type":"integer","title":"Delay Seconds"},"task_type":{"type":"string","title":"Task Type"},"thread_id":{"type":"string","title":"Thread Id"},"recommended_execution_mode":{"type":"string","title":"Recommended Execution Mode","default":"background_agent"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","task_id","scheduled_at","delay_seconds","task_type","thread_id","message"],"title":"DistillationScheduleResponse","description":"Response from scheduling background thread distillation."},"EntityNode":{"properties":{"id":{"type":"string","title":"Id"},"node_type":{"$ref":"#/components/schemas/NodeType","default":"Entity"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"name":{"type":"string","title":"Name","description":"Entity name"},"entity_type":{"type":"string","title":"Entity Type","description":"Entity type (person, concept, etc.)"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Entity description"},"aliases":{"items":{"type":"string"},"type":"array","title":"Aliases","description":"Alternative names"},"confidence":{"type":"number","maximum":1,"minimum":0,"title":"Confidence","description":"Entity confidence","default":0.5},"entity_created":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Created","description":"When entity was created/born/founded (normalized YYYY-MM-DD)"},"entity_ended":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Ended","description":"When entity died/closed/discontinued (normalized YYYY-MM-DD)"},"temporal_precision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Temporal Precision","description":"Date precision for UI display: year/month/day"},"temporal_confidence":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"title":"Temporal Confidence","description":"LLM confidence in temporal extraction (0-1)"},"temporal_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Temporal Context","description":"Temporal context: past/present/timeless"}},"type":"object","required":["name","entity_type"],"title":"EntityNode","description":"Entity node representing concepts, people, places, etc."},"EntityRelationship":{"properties":{"source_entity":{"$ref":"#/components/schemas/EntitySummary","description":"Source entity"},"target_entity":{"$ref":"#/components/schemas/EntitySummary","description":"Target entity"},"relationship":{"$ref":"#/components/schemas/RelationshipInfo","description":"Relationship information"},"depth":{"type":"integer","title":"Depth","description":"Depth of traversal from source entity"}},"type":"object","required":["source_entity","target_entity","relationship","depth"],"title":"EntityRelationship","description":"A relationship between two entities."},"EntityRelationshipsData":{"properties":{"relates_to":{"items":{"$ref":"#/components/schemas/EntityRelationship"},"type":"array","title":"Relates To","description":"Entity-to-entity relationships"},"mentioned_in":{"items":{"$ref":"#/components/schemas/MemoryMention"},"type":"array","title":"Mentioned In","description":"Memories mentioning this entity"},"community":{"anyOf":[{"$ref":"#/components/schemas/CommunityContext"},{"type":"null"}],"description":"Community this entity belongs to, with name/summary if available"}},"type":"object","title":"EntityRelationshipsData","description":"Collection of entity relationships."},"EntityRelationshipsMetadata":{"properties":{"total_relates_to":{"type":"integer","title":"Total Relates To","description":"Total number of entity relationships"},"total_mentions":{"type":"integer","title":"Total Mentions","description":"Total number of memory mentions"},"traversal_depth":{"type":"integer","title":"Traversal Depth","description":"Depth of relationship traversal"},"limit":{"type":"integer","title":"Limit","description":"Maximum results returned"}},"type":"object","required":["total_relates_to","total_mentions","traversal_depth","limit"],"title":"EntityRelationshipsMetadata","description":"Metadata about entity relationships query."},"EntityRelationshipsResponse":{"properties":{"entity":{"$ref":"#/components/schemas/EntitySummary","description":"The queried entity"},"relationships":{"$ref":"#/components/schemas/EntityRelationshipsData","description":"All relationships for this entity"},"metadata":{"$ref":"#/components/schemas/EntityRelationshipsMetadata","description":"Query metadata"}},"type":"object","required":["entity","relationships","metadata"],"title":"EntityRelationshipsResponse","description":"Response for entity relationships endpoint."},"EntitySummary":{"properties":{"id":{"type":"string","title":"Id","description":"Entity ID"},"name":{"type":"string","title":"Name","description":"Entity name"},"type":{"type":"string","title":"Type","description":"Entity type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Entity description","default":""},"aliases":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Aliases","description":"Alternative names (primary entity only)"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence","description":"Extraction confidence 0-1 (primary entity only)"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"ISO timestamp of first extraction (primary entity only)"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"ISO timestamp of last update (primary entity only)"},"community_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Community Id","description":"Louvain community id, if assigned (primary entity only)"}},"type":"object","required":["id","name","type"],"title":"EntitySummary","description":"Summary of an entity for relationship responses.\n\nThe optional fields below are populated only on the *primary* entity in a\nrelationships response (the one that was queried by id). Related/source/\ntarget entities embedded in `EntityRelationship` only carry the core\nid/name/type/description quartet to keep the payload tight."},"ExpandNeighborsMetadata":{"properties":{"expansion_depth":{"type":"integer","title":"Expansion Depth","description":"How far the expansion traversed in hops"},"max_limit":{"type":"integer","title":"Max Limit","description":"Limit on nodes returned"},"include_metadata":{"type":"boolean","title":"Include Metadata","description":"If results include detailed metadata"},"query_type":{"type":"string","title":"Query Type","description":"Indicates the search/query method"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if failed"}},"type":"object","required":["expansion_depth","max_limit","include_metadata","query_type"],"title":"ExpandNeighborsMetadata"},"ExpandNeighborsResponse":{"properties":{"center_node":{"type":"string","title":"Center Node","description":"ID of expanded node"},"depth":{"type":"integer","title":"Depth","description":"Traversal depth used for expansion"},"neighbors":{"items":{},"type":"array","title":"Neighbors","description":"Neighbor nodes discovered in expansion"},"edges":{"items":{},"type":"array","title":"Edges","description":"Edges connecting neighbors to center or each other"},"total_neighbors":{"type":"integer","title":"Total Neighbors","description":"Number of neighbors found","default":0},"total_edges":{"type":"integer","title":"Total Edges","description":"Number of edges found","default":0},"metadata":{"$ref":"#/components/schemas/ExpandNeighborsMetadata"}},"type":"object","required":["center_node","depth","metadata"],"title":"ExpandNeighborsResponse"},"FSDeleteRequest":{"type":"object","required":["path"],"properties":{"path":{"type":"string","minLength":1},"space_id":{"type":["string","null"],"description":"Optional existing Space id, name or alias. Blank/omitted values may use\nthe X-Nmem-Space-Id header (legacy X-Nowledge-Space-Id). Without either,\nthe path selects its current Space; later movement prevents deletion."}}},"FSWriteRequest":{"properties":{"path":{"type":"string","minLength":1,"title":"Path"},"body":{"type":"string","title":"Body","default":""},"frontmatter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Frontmatter"},"record_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Record Version"}},"type":"object","required":["path"],"title":"FSWriteRequest"},"FeedInputRequest":{"properties":{"content":{"type":"string","maxLength":10000,"minLength":1,"title":"Content"},"source":{"type":"string","title":"Source","default":"feed"},"persist":{"type":"boolean","title":"Persist","description":"Auto-persist after streaming. False for ephemeral queries (e.g. Chat-to-Doc Q&A).","default":true},"thread_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thread Id","description":"Thread root event ID for follow-up conversations"},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id","description":"Memory space for persisted captures and questions"}},"type":"object","required":["content"],"title":"FeedInputRequest"},"FiltersApplied":{"properties":{"node_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Node Types","description":"Node types filter"},"edge_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Edge Types","description":"Edge types filter"}},"additionalProperties":true,"type":"object","title":"FiltersApplied","description":"Filters applied to the search."},"FolderIngestSummaryRequest":{"properties":{"folder_name":{"type":"string","title":"Folder Name","description":"Source folder name (for feed event title)"},"accumulated_totals":{"additionalProperties":{"type":"integer"},"type":"object","title":"Accumulated Totals","description":"Aggregate totals collected by a remote/web chunked import"},"space_id":{"type":"string","title":"Space Id","description":"Isolation space for the imported folder","default":"default"}},"type":"object","required":["folder_name","accumulated_totals"],"title":"FolderIngestSummaryRequest","description":"Emit a single folder import summary event without ingesting files."},"GraphAnalysisCapabilitiesModel":{"properties":{"community_detection":{"type":"boolean","title":"Community Detection","description":"Is community detection available"},"pagerank_calculation":{"type":"boolean","title":"Pagerank Calculation","description":"Is PageRank calculation available"},"unified_graph_analysis":{"type":"boolean","title":"Unified Graph Analysis","description":"Unified graph analysis supported"},"llm_summarization":{"type":"boolean","title":"Llm Summarization","description":"LLM summarization supported"}},"type":"object","required":["community_detection","pagerank_calculation","unified_graph_analysis","llm_summarization"],"title":"GraphAnalysisCapabilitiesModel"},"GraphAnalysisHealthCheckModel":{"properties":{"status":{"type":"string","title":"Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"algo_extension_loaded":{"type":"boolean","title":"Algo Extension Loaded"},"db_connection":{"type":"string","title":"Db Connection"},"capabilities":{"$ref":"#/components/schemas/GraphAnalysisCapabilitiesModel"},"checked_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checked At"}},"type":"object","required":["status","algo_extension_loaded","db_connection","capabilities"],"title":"GraphAnalysisHealthCheckModel"},"GraphAnalysisResponseModel":{"properties":{"communities":{"items":{},"type":"array","title":"Communities","description":"List of community data"},"community_metrics":{"additionalProperties":true,"type":"object","title":"Community Metrics","description":"Community metrics"},"centrality_measures":{"additionalProperties":true,"type":"object","title":"Centrality Measures","description":"Centrality measures"},"graph_statistics":{"additionalProperties":true,"type":"object","title":"Graph Statistics","description":"Graph statistics"},"analysis_summary":{"$ref":"#/components/schemas/AnalysisSummaryModel","description":"Summary of analysis metrics"},"retrieved_at":{"title":"Retrieved At","description":"Timestamp when data was retrieved"}},"type":"object","required":["analysis_summary"],"title":"GraphAnalysisResponseModel"},"GraphCommunity":{"properties":{"id":{"type":"string","title":"Id","description":"Community identifier"},"name":{"type":"string","title":"Name","description":"Community name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Community description","default":""},"member_count":{"type":"integer","title":"Member Count","description":"Number of members in the community","default":0},"strength":{"type":"number","title":"Strength","description":"Community strength score","default":1},"algorithm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Algorithm","description":"Algorithm used for detection","default":"louvain"},"resolution":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Resolution","description":"Resolution parameter used","default":1},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional community metadata"}},"additionalProperties":true,"type":"object","required":["id","name"],"title":"GraphCommunity","description":"Community data structure."},"GraphCommunityHull":{"properties":{"community_id":{"type":"string","title":"Community Id","description":"Community identifier"},"community_name":{"type":"string","title":"Community Name","description":"Community name"},"member_nodes":{"items":{"type":"string"},"type":"array","title":"Member Nodes","description":"List of node IDs in this community"},"member_count":{"type":"integer","title":"Member Count","description":"Number of members"},"hull_type":{"type":"string","title":"Hull Type","description":"Type of hull visualization","default":"convex"},"color":{"type":"string","title":"Color","description":"Hull color","default":"#9B59B6"},"opacity":{"type":"number","title":"Opacity","description":"Hull opacity","default":0.1},"stroke_color":{"type":"string","title":"Stroke Color","description":"Hull stroke color","default":"#8E44AD"},"stroke_width":{"type":"integer","title":"Stroke Width","description":"Hull stroke width","default":2},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional hull metadata"}},"additionalProperties":true,"type":"object","required":["community_id","community_name","member_count"],"title":"GraphCommunityHull","description":"Community hull data structure for visualization."},"GraphDataResponse":{"properties":{"nodes":{"items":{"$ref":"#/components/schemas/GraphNode"},"type":"array","title":"Nodes","description":"List of graph nodes"},"edges":{"items":{"$ref":"#/components/schemas/GraphEdge"},"type":"array","title":"Edges","description":"List of graph edges"},"communities":{"items":{"$ref":"#/components/schemas/GraphCommunity"},"type":"array","title":"Communities","description":"List of communities"},"community_hulls":{"items":{"$ref":"#/components/schemas/GraphCommunityHull"},"type":"array","title":"Community Hulls","description":"List of community hulls"},"visualization_config":{"$ref":"#/components/schemas/VisualizationConfig","description":"Visualization configuration"},"metadata":{"$ref":"#/components/schemas/GraphMetadata","description":"Graph metadata"}},"additionalProperties":true,"type":"object","title":"GraphDataResponse","description":"Graph data response for visualization."},"GraphEdge":{"properties":{"id":{"type":"string","title":"Id","description":"Edge identifier"},"source":{"type":"string","title":"Source","description":"Source node ID"},"target":{"type":"string","title":"Target","description":"Target node ID"},"edge_type":{"type":"string","title":"Edge Type","description":"Type of edge relationship"},"weight":{"type":"number","title":"Weight","description":"Edge weight"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Display label for the edge"},"relevance_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Relevance Score","description":"Relevance score"},"metadata":{"$ref":"#/components/schemas/GraphEdgeMetadata","description":"Additional edge metadata"}},"additionalProperties":true,"type":"object","required":["id","source","target","edge_type","weight"],"title":"GraphEdge","description":"Graph edge data structure."},"GraphEdgeMetadata":{"properties":{"relation_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relation Type"},"relationship_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relationship Type"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context"},"path_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Path Length"},"hop_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hop Count"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"strength":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Strength"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"conditions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conditions"},"temporal_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Temporal Info"},"source_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Reference"},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name"},"target_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Name"},"source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id"},"target_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Id"},"path_position":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Path Position"},"total_path_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Path Length"},"visualization":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Visualization"}},"additionalProperties":true,"type":"object","title":"GraphEdgeMetadata","description":"Metadata for graph edges."},"GraphIntelligenceMessageRequest":{"properties":{"content":{"type":"string","maxLength":10000,"minLength":1,"title":"Content"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Exploration session ID. If omitted, uses the shared session."},"graph_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Graph Context","description":"Serialized GraphSessionContext (frozen snapshot from frontend)."},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id","description":"Optional active memory space for space-aware tool retrieval."}},"type":"object","required":["content"],"title":"GraphIntelligenceMessageRequest"},"GraphMetadata":{"properties":{"total_nodes":{"type":"integer","title":"Total Nodes","description":"Total number of nodes","default":0},"total_edges":{"type":"integer","title":"Total Edges","description":"Total number of edges","default":0},"total_communities":{"type":"integer","title":"Total Communities","description":"Total number of communities","default":0},"entity_nodes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Entity Nodes","description":"Number of entity nodes"},"memory_nodes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Memory Nodes","description":"Number of memory nodes"},"relationship_edges":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Relationship Edges","description":"Number of RELATES_TO edges"},"mention_edges":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mention Edges","description":"Number of MENTIONS edges"},"traversal_depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Traversal Depth","description":"Traversal depth used"},"query_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query Method","description":"Query method used"},"filter_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter Type","description":"Filter type applied"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if any"}},"additionalProperties":true,"type":"object","title":"GraphMetadata","description":"Metadata about the graph data."},"GraphNode":{"properties":{"id":{"type":"string","title":"Id","description":"Node identifier"},"label":{"type":"string","title":"Label","description":"Display label for the node"},"node_type":{"type":"string","title":"Node Type","description":"Type of node (entity, memory, etc.)"},"node_subtype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Node Subtype","description":"Subtype of the node"},"size":{"type":"number","title":"Size","description":"Node size for visualization"},"color":{"type":"string","title":"Color","description":"Node color for visualization"},"community":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Community","description":"Community ID this node belongs to"},"importance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Importance","description":"Importance score of the node"},"hop_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hop Count","description":"Number of hops from source"},"pagerank_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pagerank Score","description":"PageRank score"},"thread_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thread Id","description":"Thread ID if node is a thread"},"metadata":{"$ref":"#/components/schemas/GraphNodeMetadata","description":"Additional node metadata"}},"additionalProperties":true,"type":"object","required":["id","label","node_type","size","color"],"title":"GraphNode","description":"Graph node data structure."},"GraphNodeMetadata":{"properties":{"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"degree":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Degree"},"community_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Community Id"},"pagerank_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pagerank Score"},"hop_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hop Count"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"importance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Importance"},"entity_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Entity Count"},"thread_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thread Id"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"additionalProperties":true,"type":"object","title":"GraphNodeMetadata","description":"Metadata for graph nodes."},"GraphSearchResponse":{"properties":{"nodes":{"anyOf":[{"items":{"$ref":"#/components/schemas/GraphNode"},"type":"array"},{"type":"null"}],"title":"Nodes","description":"List of graph nodes"},"edges":{"anyOf":[{"items":{"$ref":"#/components/schemas/GraphEdge"},"type":"array"},{"type":"null"}],"title":"Edges","description":"List of graph edges"},"communities":{"items":{"$ref":"#/components/schemas/GraphCommunity"},"type":"array","title":"Communities","description":"List of communities"},"community_hulls":{"items":{"$ref":"#/components/schemas/GraphCommunityHull"},"type":"array","title":"Community Hulls","description":"List of community hulls"},"visualization_config":{"$ref":"#/components/schemas/VisualizationConfig","description":"Visualization configuration"},"metadata":{"anyOf":[{"$ref":"#/components/schemas/GraphMetadata"},{"type":"null"}],"description":"Graph metadata"},"query":{"type":"string","title":"Query","description":"Search query string"},"search_metadata":{"anyOf":[{"$ref":"#/components/schemas/SearchMetadata"},{"type":"null"}],"description":"Search-specific metadata"}},"additionalProperties":true,"type":"object","required":["query"],"title":"GraphSearchResponse","description":"Graph search response that extends GraphDataResponse with search-specific fields."},"GraphStatsSummary":{"properties":{"memory_nodes":{"type":"integer","title":"Memory Nodes","description":"Number of memory nodes","default":0},"entity_nodes":{"type":"integer","title":"Entity Nodes","description":"Number of entity nodes","default":0},"community_nodes":{"type":"integer","title":"Community Nodes","description":"Number of community nodes","default":0},"mention_edges":{"type":"integer","title":"Mention Edges","description":"Number of MENTIONS edges","default":0},"relation_edges":{"type":"integer","title":"Relation Edges","description":"Number of RELATES_TO edges","default":0}},"additionalProperties":true,"type":"object","title":"GraphStatsSummary","description":"Summary of graph statistics."},"GuidanceRulePayload":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"agentProfileId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agentprofileid"},"spaceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Spaceid"},"priority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"evidenceMemoryIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Evidencememoryids"},"supportedEvidenceMemoryIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Supportedevidencememoryids"},"unsupportedEvidenceMemoryIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Unsupportedevidencememoryids"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale"},"supportCount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Supportcount"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archivedat"},"archivedReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archivedreason"},"archivedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archivedby"}},"type":"object","title":"GuidanceRulePayload"},"GuidanceRuleResponse":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body"},"scope":{"type":"string","enum":["global","agent","space"],"title":"Scope","default":"global"},"status":{"type":"string","enum":["draft","active","archived"],"title":"Status","default":"active"},"agentProfileId":{"type":"string","title":"Agentprofileid","default":""},"spaceId":{"type":"string","title":"Spaceid","default":"default"},"priority":{"type":"integer","title":"Priority","default":50},"source":{"type":"string","title":"Source","default":"manual"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"evidenceMemoryIds":{"items":{"type":"string"},"type":"array","title":"Evidencememoryids"},"supportedEvidenceMemoryIds":{"items":{"type":"string"},"type":"array","title":"Supportedevidencememoryids"},"unsupportedEvidenceMemoryIds":{"items":{"type":"string"},"type":"array","title":"Unsupportedevidencememoryids"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"rationale":{"type":"string","title":"Rationale","default":""},"supportCount":{"type":"integer","title":"Supportcount","default":0},"archivedAt":{"type":"string","title":"Archivedat","default":""},"archivedReason":{"type":"string","title":"Archivedreason","default":""},"archivedBy":{"type":"string","title":"Archivedby","default":""},"createdAt":{"type":"string","title":"Createdat","default":""},"updatedAt":{"type":"string","title":"Updatedat","default":""}},"type":"object","required":["id","title","body"],"title":"GuidanceRuleResponse","description":"Owner-managed AI Context rule stored in app-settings.json."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"version":{"type":"string","title":"Version"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"database_connected":{"type":"boolean","title":"Database Connected"},"services_ready":{"type":"boolean","title":"Services Ready"},"buffer_pool_exhausted":{"type":"boolean","title":"Buffer Pool Exhausted","default":false},"buffer_pool_auto_escalated_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Buffer Pool Auto Escalated Mb"},"buffer_pool_current_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Buffer Pool Current Mb"},"buffer_pool_next_start_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Buffer Pool Next Start Mb"},"buffer_pool_restart_required":{"type":"boolean","title":"Buffer Pool Restart Required","default":false},"buffer_pool_restart_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buffer Pool Restart Reason"},"buffer_pool_auto_mode":{"type":"boolean","title":"Buffer Pool Auto Mode","default":true},"buffer_pool_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buffer Pool Source"},"buffer_pool_auto_floor_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Buffer Pool Auto Floor Mb"},"buffer_pool_auto_cap_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Buffer Pool Auto Cap Mb"},"plugin_updates":{"items":{"$ref":"#/components/schemas/PluginUpdateInfo"},"type":"array","title":"Plugin Updates"},"db_recovery_notice":{"anyOf":[{"$ref":"#/components/schemas/DatabaseRecoveryNotice"},{"type":"null"}]},"content_store":{"anyOf":[{"$ref":"#/components/schemas/ContentStoreHealth"},{"type":"null"}]}},"type":"object","required":["status","version","timestamp","database_connected","services_ready"],"title":"HealthResponse","description":"Health check response."},"HostConfigDir":{"properties":{"config_dir":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Config Dir"}},"type":"object","title":"HostConfigDir","description":"Custom config directory for one host, or empty to clear the override."},"ImportConfigModel":{"properties":{"hidden_projects":{"items":{"type":"string"},"type":"array","title":"Hidden Projects","description":"Hidden project encodings"},"hidden_sessions":{"items":{"type":"string"},"type":"array","title":"Hidden Sessions","description":"Hidden session IDs"},"auto_import_rules":{"items":{"$ref":"#/components/schemas/AutoImportRuleModel"},"type":"array","title":"Auto Import Rules","description":"Auto-import rules"},"watcher_enabled":{"type":"boolean","title":"Watcher Enabled","description":"Whether watcher is enabled","default":false},"show_hidden_by_default":{"type":"boolean","title":"Show Hidden By Default","description":"Show hidden by default","default":false},"dedup_window_seconds":{"type":"integer","title":"Dedup Window Seconds","description":"Deduplication window in seconds","default":60},"watched_platforms":{"items":{"type":"string"},"type":"array","title":"Watched Platforms","description":"Platforms to auto-import from (e.g. claude, codex, opencode, cursor)"},"watched_projects":{"items":{"type":"string"},"type":"array","title":"Watched Projects","description":"Encoded project paths to auto-import"},"cursor_poll_interval":{"type":"number","title":"Cursor Poll Interval","description":"Seconds between Cursor polls (SQLite polling)","default":30}},"type":"object","title":"ImportConfigModel","description":"Model for import configuration."},"ImportConfigUpdateRequest":{"properties":{"hidden_projects":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Hidden Projects","description":"Hidden project encodings"},"hidden_sessions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Hidden Sessions","description":"Hidden session IDs"},"auto_import_rules":{"anyOf":[{"items":{"$ref":"#/components/schemas/AutoImportRuleModel"},"type":"array"},{"type":"null"}],"title":"Auto Import Rules","description":"Auto-import rules"},"watcher_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Watcher Enabled","description":"Whether watcher is enabled"},"show_hidden_by_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Hidden By Default","description":"Show hidden by default"},"dedup_window_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dedup Window Seconds","description":"Deduplication window"},"watched_platforms":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Watched Platforms","description":"Platforms to auto-import from (e.g. claude, codex, opencode, cursor)"},"watched_projects":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Watched Projects","description":"Encoded project paths to auto-import"},"cursor_poll_interval":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cursor Poll Interval","description":"Seconds between Cursor polls (SQLite polling)"}},"type":"object","title":"ImportConfigUpdateRequest","description":"Request for updating import config."},"IngestContentRequest":{"properties":{"name":{"type":"string","title":"Name","description":"A display name for the source, e.g. notes.md"},"content":{"type":"string","title":"Content","description":"The raw text to ingest as a Library source"},"user_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Comment","description":"Optional note about it"},"labels":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Labels","description":"Label names to assign"},"space_id":{"type":"string","title":"Space Id","description":"Isolation space","default":"default"}},"type":"object","required":["name","content"],"title":"IngestContentRequest","description":"Request body for ingesting raw text content (a paste, or a text file read on\nthe client). JSON, so it works identically in desktop/web/remote without the\nmultipart + file-path plumbing — the client reads the text and posts it."},"IngestFilePathRequest":{"type":"object","required":["file_path"],"properties":{"file_path":{"type":"string","description":"Absolute path on the server host."},"labels":{"type":"array","items":{"type":"string"},"description":"Label names to assign to the Source."},"pdf_render_scale":{"type":["number","null"],"format":"float","description":"PDFium render scale for scanned-PDF vision/OCR pages. `1.0` is 72 DPI.\nWhen omitted, remote vision uses `1.0`; an installed local vision model\nkeeps the higher-quality local default. `NMEM_PDF_VISION_RENDER_SCALE`\nprovides a process-wide override.","maximum":2,"minimum":0.5},"processing_mode":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SourceProcessingMode","description":"`interactive` returns a text-bearing PDF after native parsing without\nwaiting for optional figure enrichment. Scanned PDFs still run OCR."}]},"space_id":{"type":"string","description":"Existing Space to store the Source in."},"user_comment":{"type":["string","null"],"description":"Optional note stored with the Source."}}},"IngestResponse":{"properties":{"source_id":{"type":"string","title":"Source Id"},"original_name":{"type":"string","title":"Original Name"},"lifecycle_state":{"type":"string","title":"Lifecycle State"},"is_duplicate":{"type":"boolean","title":"Is Duplicate","default":false},"message":{"type":"string","title":"Message","default":""}},"type":"object","required":["source_id","original_name","lifecycle_state"],"title":"IngestResponse","description":"Response from ingestion endpoints."},"IngestUrlRequest":{"type":"object","required":["url"],"properties":{"labels":{"type":"array","items":{"type":"string"},"description":"Label names to assign to the Source."},"pdf_render_scale":{"type":["number","null"],"format":"float","description":"PDFium render scale for scanned-PDF vision/OCR pages when the URL\nresolves to a PDF. See [`IngestFilePathRequest::pdf_render_scale`].","maximum":2,"minimum":0.5},"space_id":{"type":"string","description":"Existing Space to store the Source in."},"url":{"type":"string","description":"Public URL to fetch and ingest."},"user_comment":{"type":["string","null"],"description":"Optional note stored with the Source."}}},"LabelResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Label identifier"},"name":{"type":"string","title":"Name","description":"Label name"},"color":{"type":"string","title":"Color","description":"Label color (hex)"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Label description"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"Creation timestamp"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"Last update timestamp"},"usage_count":{"type":"integer","title":"Usage Count","description":"Number of memories/entities using this label","default":0}},"additionalProperties":true,"type":"object","required":["id","name","color"],"title":"LabelResponse","description":"Label response model."},"LabelsResponse":{"properties":{"labels":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Labels","description":"List of assigned labels"}},"additionalProperties":true,"type":"object","title":"LabelsResponse","description":"Response containing a list of labels (used for both memory and source label endpoints)."},"MemoryCleanupArchiveRequest":{"properties":{"memory_ids":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Memory Ids"},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id"},"review_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Token"}},"type":"object","title":"MemoryCleanupArchiveRequest"},"MemoryCleanupCompactionRequest":{"properties":{"memory_ids":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Memory Ids"},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id"},"review_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Token"}},"type":"object","title":"MemoryCleanupCompactionRequest"},"MemoryCleanupKeepRequest":{"properties":{"memory_ids":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Memory Ids"},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id"},"review_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Token"}},"type":"object","title":"MemoryCleanupKeepRequest"},"MemoryCreateRequest":{"type":"object","description":"Request to create a new Memory, or upsert one by custom ID.","required":["content"],"properties":{"agent_id":{"type":["string","null"],"description":"Portable AI Identity attribution. Identity is provenance, not auth."},"confidence":{"type":"number","format":"double","description":"Confidence score.","default":0.5,"maximum":1,"minimum":0},"content":{"type":"string","description":"Memory content.","maxLength":32768},"event_end":{"type":["string","null"],"description":"When an event range ended: `YYYY`, `YYYY-MM`, or `YYYY-MM-DD`."},"event_start":{"type":["string","null"],"description":"When the event occurred: `YYYY`, `YYYY-MM`, or `YYYY-MM-DD`."},"host_agent_id":{"type":["string","null"],"description":"Stable host-local alias for the same AI Identity."},"id":{"type":["string","null"],"description":"Optional custom ID. An existing ID is updated; an absent ID generates a UUID.","maxLength":200,"minLength":1},"importance":{"type":"number","format":"double","description":"Importance score.","default":0.5,"maximum":1,"minimum":0},"labels":{"type":["array","null"],"items":{"type":"string"},"description":"Label names to assign."},"metadata":{"type":"object","description":"Additional metadata.","additionalProperties":{},"propertyNames":{"type":"string"}},"source":{"type":["string","null"],"description":"Display/source provenance, for example `manual`, `codex`, or `claude-code`."},"source_app":{"type":["string","null"],"description":"Runtime provenance, kept separate from the display/source field."},"source_message_id":{"type":["string","null"],"description":"Compatibility form for one source message. Preserved in metadata;\ncallers that know message order should prefer `source_message_indices`."},"source_message_indices":{"type":["array","null"],"items":{"type":"integer","format":"int64"},"description":"Exact message order-indices used to distill this Memory."},"source_message_range":{"type":["object","null"],"description":"Legacy Python-compatible inclusive message range\n`{start_index, end_index}`. Canonicalized to `source_message_indices`.","additionalProperties":{"type":"integer","format":"int64"},"propertyNames":{"type":"string"}},"source_thread_id":{"type":["string","null"],"description":"Thread-distillation provenance: the source thread + the exact source\nmessage order-indices the memory was distilled from\n(`CreateMemoryParams`, `agent/knowledge_tools/memory_create_params.py`)."},"space_id":{"type":["string","null"],"description":"Existing Space to store the Memory in. Defaults to the Agent profile's\nSpace when identity is present, otherwise the canonical default Space."},"temporal_context":{"type":["string","null"],"description":"Temporal context: `past`, `present`, `future`, or `timeless`."},"title":{"type":["string","null"],"description":"Optional descriptive title.","maxLength":200},"unit_type":{"type":["string","null"],"description":"Knowledge unit type, for example `fact`, `decision`, `preference`,\n`procedure`, or `learning`."},"write_intent":{"oneOf":[{"type":"object","properties":{"version":{"type":"integer","enum":[1]},"kind":{"type":"string","enum":["authored"]}},"required":["version","kind"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"integer","enum":[1]},"kind":{"type":"string","enum":["source_derived"]},"assessment":{"type":"string","enum":["source_support","human_ruling"]},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["thread"]},"thread_id":{"type":"string","minLength":1},"message_ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":10000,"uniqueItems":true}},"required":["kind","thread_id","message_ids"],"additionalProperties":false}},"required":["version","kind","assessment","source"],"additionalProperties":false}],"description":"Explicit authored or server-assessed source-derived write. source_support allows ordinary observations; human_ruling additionally requires supported human adoption. Both require authoritative selected thread/message evidence and never fall back to authored on failure. Omit for legacy authored behavior."},"claim_status":{"type":["string","null"],"description":"Exact claim status for source-derived assessment; metadata remains supported."},"source_grounding":{"type":["string","null"],"description":"Exact source grounding for source-derived assessment, without display normalization."}}},"MemoryCreateResponse":{"properties":{"memory":{"$ref":"#/components/schemas/MemoryNode"},"extracted_entities":{"items":{"$ref":"#/components/schemas/EntityNode"},"type":"array","title":"Extracted Entities"},"assigned_labels":{"items":{"type":"string"},"type":"array","title":"Assigned Labels"},"created_relationships":{"type":"integer","title":"Created Relationships","description":"Number of relationships created","default":0},"action":{"type":"string","title":"Action","description":"'created' for new memories, 'updated' for upsert hits","default":"created"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings","description":"Non-fatal follow-up issues after the memory was persisted"}},"type":"object","required":["memory"],"title":"MemoryCreateResponse","description":"Response from memory creation or upsert."},"MemoryKGApplyRequest":{"properties":{"entities":{"items":{},"type":"array","title":"Entities","description":"Extracted entities to save"},"relationships":{"items":{},"type":"array","title":"Relationships","description":"Extracted relationships to save"},"extraction_confidence":{"type":"number","title":"Extraction Confidence","description":"Confidence of the extraction"},"entity_resolution":{"type":"string","enum":["automatic","exact"],"default":"automatic","description":"Use exact for controlled external writes on a backend supporting this policy. Exact matches trimmed, case-sensitive name and type only; it does not resolve through aliases or normalize punctuation. Omitted or empty aliases preserve existing aliases. Automatic retains extraction preview matching. Exact batches allow up to 50 entities and 100 relationships, require unique names and explicit type, and require relationship endpoints to exactly match submitted names."}},"type":"object","required":["entities","relationships","extraction_confidence"],"title":"MemoryKGApplyRequest","description":"Request to apply KG extraction results to a memory.\n\nNote: memory_id is provided in the URL path, not in the request body. Exact requests reject invalid batches before writing and reject ambiguous stored identities. Older backends may ignore this field; upgrade the backend before relying on exact resolution."},"MemoryKGApplyResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether application was successful"},"memory_id":{"type":"string","title":"Memory Id","description":"ID of the updated memory"},"entities_created":{"type":"integer","title":"Entities Created","description":"Number of entities created in graph"},"relationships_created":{"type":"integer","title":"Relationships Created","description":"Number of relationships created in graph"},"metadata_updated":{"type":"boolean","title":"Metadata Updated","description":"Whether memory metadata was updated"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if application failed"},"entity_resolution":{"type":"string","enum":["exact"],"description":"Present when exact resolution was applied."},"resolved_entities":{"type":"array","description":"Graph identities successfully resolved by an exact request, including partial failure. Retain for source auditing.","items":{"type":"object","required":["id","name","entity_type"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"entity_type":{"type":"string"}}}},"index_repair_needed":{"type":"boolean","description":"Entity search projection is pending repair; graph writes may already be complete."},"warnings":{"type":"array","items":{"type":"string"}}},"type":"object","required":["success","memory_id","entities_created","relationships_created","metadata_updated"],"title":"MemoryKGApplyResponse","description":"Response from applying KG extraction to memory."},"MemoryKGContentExtractionRequest":{"properties":{"force_reextraction":{"type":"boolean","title":"Force Reextraction","description":"Force re-extraction even if KG was already extracted","default":false},"extraction_level":{"type":"string","title":"Extraction Level","description":"Extraction level: 'swift' (fast, local), 'guided' (multi-step, local), or 'expert' (remote LLM). Auto-upgrades to expert when local LLM is unavailable.","default":"swift"},"use_remote_llm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Remote Llm","description":"Whether to use a remote LLM (via LiteLLM). Omit to keep backward-compatible server defaults; desktop clients should set this explicitly."},"preferred_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Language","description":"User preferred output language for descriptions (ISO 639-1 code), or None to follow source language"},"memory_id":{"type":"string","title":"Memory Id","description":"Stable caller-provided preview ID. It is not written to the graph.","default":"preview-memory"},"memory_title":{"type":"string","title":"Memory Title","description":"Preview memory title"},"memory_content":{"type":"string","title":"Memory Content","description":"Preview memory content"}},"type":"object","required":["memory_title","memory_content"],"title":"MemoryKGContentExtractionRequest","description":"Read-only KG extraction preview from explicit memory-like content."},"MemoryKGExtractionRequest":{"properties":{"force_reextraction":{"type":"boolean","title":"Force Reextraction","description":"Force re-extraction even if KG was already extracted","default":false},"extraction_level":{"type":"string","title":"Extraction Level","description":"Extraction level: 'swift' (fast, local), 'guided' (multi-step, local), or 'expert' (remote LLM). Auto-upgrades to expert when local LLM is unavailable.","default":"swift"},"use_remote_llm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Remote Llm","description":"Whether to use a remote LLM (via LiteLLM). Omit to keep backward-compatible server defaults; desktop clients should set this explicitly."},"preferred_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Language","description":"User preferred output language for descriptions (ISO 639-1 code), or None to follow source language"}},"type":"object","title":"MemoryKGExtractionRequest","description":"Request for knowledge graph extraction from a memory.\n\nNote: memory_id is provided in the URL path, not in the request body."},"MemoryKGExtractionResponse":{"properties":{"memory_id":{"type":"string","title":"Memory Id","description":"ID of the memory"},"memory_title":{"type":"string","title":"Memory Title","description":"Title of the memory"},"memory_content":{"type":"string","title":"Memory Content","description":"Content of the memory"},"entities":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Entities","description":"Extracted entities"},"relationships":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Relationships","description":"Extracted relationships"},"extraction_confidence":{"type":"number","title":"Extraction Confidence","description":"Confidence of the extraction"},"entities_count":{"type":"integer","title":"Entities Count","description":"Number of extracted entities"},"relationships_count":{"type":"integer","title":"Relationships Count","description":"Number of extracted relationships"},"kg_already_extracted":{"type":"boolean","title":"Kg Already Extracted","description":"Whether KG was already extracted"},"can_extract":{"type":"boolean","title":"Can Extract","description":"Whether extraction is possible"},"write_plan":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Write Plan","description":"Read-only preview of KG writes/reuse decisions."}},"type":"object","required":["memory_id","memory_title","memory_content","entities","relationships","extraction_confidence","entities_count","relationships_count","kg_already_extracted","can_extract"],"title":"MemoryKGExtractionResponse","description":"Response from memory KG extraction preview."},"MemoryListResponse":{"properties":{"memories":{"items":{"$ref":"#/components/schemas/MemoryPublic"},"type":"array","title":"Memories","description":"List of memories"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination info"}},"additionalProperties":true,"type":"object","required":["pagination"],"title":"MemoryListResponse","description":"Response from listing memories."},"MemoryMention":{"properties":{"memory":{"$ref":"#/components/schemas/MemorySummary","description":"Memory information"},"confidence":{"type":"number","title":"Confidence","description":"Confidence of the mention"},"mention_count":{"type":"integer","title":"Mention Count","description":"Number of times entity is mentioned"}},"type":"object","required":["memory","confidence","mention_count"],"title":"MemoryMention","description":"A memory mentioning an entity."},"MemoryNode":{"properties":{"id":{"type":"string","title":"Id"},"node_type":{"$ref":"#/components/schemas/NodeType","default":"Memory"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"content":{"type":"string","title":"Content","description":"Memory content"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Memory title/heading"},"importance":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"title":"Importance","description":"Importance score","default":0.5},"confidence":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"title":"Confidence","description":"Confidence score","default":0.5},"pagerank_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pagerank Score","description":"Graph centrality score from PageRank"},"embedding":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Embedding","description":"Vector embedding"},"source_range":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Source Range","description":"Source message range {start_index, end_index}"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Source application (cursor, chatwise, manual, etc.)"},"space_id":{"type":"string","title":"Space Id","description":"Isolation space for this memory (for example: default, work, life)","default":"default"},"semantic_field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Semantic Field","description":"Combined title+content for optimized indexing and search"},"reindex_needed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Reindex Needed","description":"Whether memory needs reindexing after edits","default":false},"last_reindexed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Reindexed At","description":"When memory was last reindexed"},"last_accessed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Accessed At","description":"Last time memory was shown in results or clicked"},"access_count":{"type":"integer","title":"Access Count","description":"Total number of accesses (for frequency boost)","default":0},"appearances":{"type":"integer","title":"Appearances","description":"Times shown in search results","default":0},"clicks":{"type":"integer","title":"Clicks","description":"Times clicked/opened by user","default":0},"total_dwell_time_ms":{"type":"integer","title":"Total Dwell Time Ms","description":"Total time spent reading (milliseconds)","default":0},"last_clicked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Clicked At","description":"Last time user clicked/opened this memory"},"decay_score_cached":{"type":"number","maximum":1,"minimum":0,"title":"Decay Score Cached","description":"Pre-computed decay score (0-1)","default":1},"temporal_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Temporal Context","description":"Temporal context: past/present/future/timeless","default":"timeless"},"temporal_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Temporal Type","description":"Temporal type: exact/range/unknown"},"event_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Start","description":"Event start date (normalized YYYY-MM-DD)"},"event_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event End","description":"Event end date (for ranges, normalized YYYY-MM-DD)"},"temporal_precision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Temporal Precision","description":"Date precision for UI display: year/month/day"},"temporal_confidence":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"title":"Temporal Confidence","description":"LLM confidence in temporal extraction (0-1)"},"unit_type":{"type":"string","title":"Unit Type","description":"Knowledge unit type: fact|preference|decision|plan|procedure|learning|context|event","default":"fact"},"is_latest":{"type":"boolean","title":"Is Latest","description":"Head of EVOLVES(replaces) version chain","default":true},"version":{"type":"integer","title":"Version","description":"Version counter within EVOLVES chain","default":1},"is_crystal":{"type":"boolean","title":"Is Crystal","description":"True for crystallized knowledge synthesized from multiple sources","default":false},"crystal_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crystal Title","description":"Human-readable crystal title (only when is_crystal=true)"},"source_unit_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Unit Count","description":"Number of source units (only when is_crystal=true)"},"extraction_method":{"type":"string","title":"Extraction Method","description":"How this memory was created: manual|llm|rule|agent","default":"manual"},"last_evaluated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Evaluated At","description":"When this crystal was last checked for staleness (only when is_crystal=true)"},"review_status":{"type":"string","title":"Review Status","description":"User review: '' (unreviewed), 'confirmed', 'dismissed'","default":""}},"type":"object","required":["content"],"title":"MemoryNode","description":"Memory node representing distilled knowledge from conversations."},"MemoryPublic":{"properties":{"id":{"type":"string","title":"Id","description":"Memory ID"},"title":{"type":"string","title":"Title","description":"Memory title"},"content":{"type":"string","title":"Content","description":"Memory content"},"source":{"type":"string","title":"Source","description":"Memory source"},"time":{"type":"string","title":"Time","description":"Formatted time string"},"importance":{"type":"number","title":"Importance","description":"Memory importance score from 0.0 to 1.0"},"rating":{"type":"integer","title":"Rating","description":"Rating 1-5"},"label_ids":{"items":{"type":"string"},"type":"array","title":"Label Ids","description":"Label IDs"},"is_favorite":{"type":"boolean","title":"Is Favorite","description":"Favorite status","default":false},"source_thread":{"anyOf":[{"$ref":"#/components/schemas/SourceThreadInfo"},{"type":"null"}],"description":"Source thread info"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence","description":"Confidence score"},"space_id":{"type":"string","title":"Space Id","description":"Isolation space for this memory","default":"default"},"unit_type":{"type":"string","title":"Unit Type","description":"Memory unit type","default":"fact"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Additional metadata"}},"additionalProperties":true,"type":"object","required":["id","title","content","source","time","importance","rating"],"title":"MemoryPublic","description":"Frontend memory format."},"MemoryReindexRequest":{"type":"object","properties":{"memory_ids":{"type":["array","null"],"items":{"type":"string"},"description":"Specific Memory IDs to refresh. When omitted, only rows carrying the\nauthoritative `reindex_needed` flag are repaired."}}},"MemoryRelationCreateRequest":{"properties":{"target_memory_id":{"type":"string","minLength":1,"title":"Target Memory Id"},"relation_type":{"type":"string","minLength":1,"title":"Relation Type"},"strength":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"title":"Strength","default":1},"confidence":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"title":"Confidence","default":1},"bidirectional":{"type":"boolean","title":"Bidirectional","default":false},"status":{"type":"string","enum":["active","suggested","dismissed"],"title":"Status","default":"active"},"reviewed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Reviewed"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","default":"api"},"author_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Id"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"source_app":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source App"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"properties":{"additionalProperties":true,"type":"object","title":"Properties"},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id"}},"type":"object","required":["target_memory_id","relation_type"],"title":"MemoryRelationCreateRequest"},"MemoryRelationListResponse":{"properties":{"memory_id":{"type":"string","title":"Memory Id"},"relations":{"items":{"$ref":"#/components/schemas/MemoryRelationPublic"},"type":"array","title":"Relations"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["memory_id","relations","total"],"title":"MemoryRelationListResponse"},"MemoryRelationPublic":{"properties":{"id":{"type":"string","title":"Id"},"source_memory_id":{"type":"string","title":"Source Memory Id"},"source_title":{"type":"string","title":"Source Title","default":""},"source_space_id":{"type":"string","title":"Source Space Id"},"target_memory_id":{"type":"string","title":"Target Memory Id"},"target_title":{"type":"string","title":"Target Title","default":""},"target_space_id":{"type":"string","title":"Target Space Id"},"relation_type":{"type":"string","title":"Relation Type"},"strength":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Strength"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"bidirectional":{"type":"boolean","title":"Bidirectional","default":false},"status":{"type":"string","title":"Status","default":"active"},"reviewed":{"type":"boolean","title":"Reviewed","default":true},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"author_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Id"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"source_app":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source App"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"properties":{"additionalProperties":true,"type":"object","title":"Properties"},"created_at":{"title":"Created At"},"updated_at":{"title":"Updated At"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"}},"type":"object","required":["id","source_memory_id","source_space_id","target_memory_id","target_space_id","relation_type"],"title":"MemoryRelationPublic"},"MemoryRelationSuggestRequest":{"properties":{"target_memory_id":{"type":"string","minLength":1,"title":"Target Memory Id"},"preferred_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Language"},"known_relation_types":{"items":{"type":"string"},"type":"array","title":"Known Relation Types"}},"type":"object","required":["target_memory_id"],"title":"MemoryRelationSuggestRequest"},"MemoryRelationSuggestionPublic":{"properties":{"should_link":{"type":"boolean","title":"Should Link"},"relation_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relation Type"},"display_label":{"type":"string","title":"Display Label","default":""},"reason":{"type":"string","title":"Reason","default":""},"confidence":{"type":"number","title":"Confidence","default":0},"bidirectional":{"type":"boolean","title":"Bidirectional","default":false}},"type":"object","required":["should_link"],"title":"MemoryRelationSuggestionPublic"},"MemoryRelationUpdateRequest":{"properties":{"relation_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relation Type"},"strength":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"title":"Strength"},"confidence":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"title":"Confidence"},"bidirectional":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Bidirectional"},"status":{"anyOf":[{"type":"string","enum":["active","suggested","dismissed","deleted"]},{"type":"null"}],"title":"Status"},"reviewed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Reviewed"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"author_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Id"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"source_app":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source App"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"properties":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Properties"}},"type":"object","title":"MemoryRelationUpdateRequest"},"MemorySearchRequest":{"properties":{"query":{"type":"string","title":"Query","description":"Search query"},"limit":{"type":"integer","maximum":100,"minimum":1,"title":"Limit","description":"Maximum results","default":10},"include_entities":{"type":"boolean","title":"Include Entities","description":"Include related entities","default":true},"filter_labels":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Filter Labels","description":"Filter by label names"},"metadata_filters":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Metadata Filters","description":"Filter by memory metadata key=value. Repeat for AND filters; repeat the same key for OR values.","examples":[["customer=acme","purpose=contract-review"]]},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode","description":"Search mode: 'deep' (default) or 'fast' (BM25+vector only)"},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id","description":"Isolation space to search within. Defaults to the canonical default space on user-facing APIs.","examples":["default","work"]},"unit_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit Type","description":"Filter by memory unit type: fact | preference | decision | plan | procedure | learning | context | event","examples":["procedure","decision"]},"event_date_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Date From","description":"Filter by when the EVENT occurred (not when recorded). Format: YYYY, YYYY-MM, or YYYY-MM-DD","examples":["2020","2023-06","2024-01-15"]},"event_date_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Date To","description":"Upper bound for event date. Format: YYYY, YYYY-MM, or YYYY-MM-DD","examples":["2024","2023-12","2024-12-31"]},"temporal_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Temporal Context","description":"Filter by temporal context: 'past', 'present', 'future', or 'timeless'","examples":["past","present","future","timeless"]},"recorded_date_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recorded Date From","description":"Filter by when the memory was RECORDED into the system. Format: YYYY-MM-DD","examples":["2024-11-20","2024-11-01"]},"recorded_date_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recorded Date To","description":"Upper bound for recording date. Format: YYYY-MM-DD","examples":["2024-11-24"]}},"type":"object","required":["query"],"title":"MemorySearchRequest","description":"Request for memory search."},"MemorySearchResult":{"properties":{"memory":{"anyOf":[{"$ref":"#/components/schemas/MemoryNode"},{"type":"null"}]},"similarity_score":{"type":"number","maximum":1,"minimum":0,"title":"Similarity Score","description":"Semantic similarity score"},"relevance_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relevance Reason","description":"Why this memory is relevant"},"related_entities":{"items":{"$ref":"#/components/schemas/EntityNode"},"type":"array","title":"Related Entities"},"evolves_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Evolves Context","description":"EVOLVES chain context: version history and relationships"},"related_memory_links":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Related Memory Links","description":"Active explicit Memory Links around this result"}},"type":"object","required":["similarity_score"],"title":"MemorySearchResult","description":"Result from memory search operations."},"MemorySpaceDeleteConflictResponse":{"properties":{"type":{"type":"string","const":"space_delete_blocked","title":"Type","default":"space_delete_blocked"},"spaceId":{"type":"string","title":"Spaceid"},"reason":{"type":"string","enum":["primary_records","working_memory"],"title":"Reason"},"message":{"type":"string","title":"Message"},"usage":{"$ref":"#/components/schemas/MemorySpaceUsageResponse"},"canPurgeWorkingMemory":{"type":"boolean","title":"Canpurgeworkingmemory","default":false}},"type":"object","required":["spaceId","reason","message"],"title":"MemorySpaceDeleteConflictResponse"},"MemorySpacePayload":{"properties":{"name":{"type":"string","title":"Name"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"sharedSpaceIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Sharedspaceids"},"defaultRetrievalMode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultretrievalmode"}},"type":"object","required":["name"],"title":"MemorySpacePayload"},"MemorySpaceResponse":{"properties":{"id":{"type":"string","title":"Id"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"name":{"type":"string","title":"Name"},"aliases":{"items":{"type":"string"},"type":"array","title":"Aliases"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"sharedSpaceIds":{"items":{"type":"string"},"type":"array","title":"Sharedspaceids"},"defaultRetrievalMode":{"type":"string","title":"Defaultretrievalmode","default":"strict"},"usage":{"$ref":"#/components/schemas/MemorySpaceUsageResponse"},"observed":{"type":"boolean","title":"Observed","default":false},"hasProfile":{"type":"boolean","title":"Hasprofile","default":true}},"type":"object","required":["id","name"],"title":"MemorySpaceResponse"},"MemorySpaceSettingsResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"spaces":{"items":{"$ref":"#/components/schemas/MemorySpaceResponse"},"type":"array","title":"Spaces"}},"type":"object","title":"MemorySpaceSettingsResponse"},"MemorySpaceSettingsUpdate":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"MemorySpaceSettingsUpdate"},"MemorySpaceUpdatePayload":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"sharedSpaceIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Sharedspaceids"},"defaultRetrievalMode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultretrievalmode"}},"type":"object","title":"MemorySpaceUpdatePayload"},"MemorySpaceUsageResponse":{"properties":{"memories":{"type":"integer","title":"Memories","default":0},"threads":{"type":"integer","title":"Threads","default":0},"sources":{"type":"integer","title":"Sources","default":0},"hasWorkingMemory":{"type":"boolean","title":"Hasworkingmemory","default":false}},"type":"object","title":"MemorySpaceUsageResponse"},"MemoryStateRequest":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id","description":"Optional isolation space guard; the memory must belong to it."}},"type":"object","title":"MemoryStateRequest","description":"Set an explicit lifecycle state for a memory."},"MemorySummary":{"properties":{"id":{"type":"string","title":"Id","description":"Memory ID"},"title":{"type":"string","title":"Title","description":"Memory title","default":""},"content":{"type":"string","title":"Content","description":"Memory content (truncated)","default":""}},"type":"object","required":["id"],"title":"MemorySummary","description":"Summary of a memory for relationship responses."},"MergeIntoRequest":{"properties":{"into_skill_id":{"type":"string","title":"Into Skill Id","description":"The active skill that absorbs this one's evidence and remains"}},"type":"object","required":["into_skill_id"],"title":"MergeIntoRequest"},"MessageCreateRequest":{"properties":{"content":{"type":"string","title":"Content","description":"Message content"},"role":{"type":"string","title":"Role","description":"Message role (user, assistant, system)"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp","description":"Message timestamp"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["content","role"],"title":"MessageCreateRequest","description":"Request to create a message within a thread."},"MessageNode":{"properties":{"id":{"type":"string","title":"Id"},"node_type":{"$ref":"#/components/schemas/NodeType","default":"Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"content":{"type":"string","title":"Content","description":"Message content"},"role":{"type":"string","title":"Role","description":"Message role (user, assistant, system)"},"order_index":{"type":"integer","title":"Order Index","description":"Order within thread"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp","description":"Original message timestamp"},"token_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Token Count","description":"Approximate token count"}},"type":"object","required":["content","role","order_index"],"title":"MessageNode","description":"Message node representing a single message in a conversation."},"MessageResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Response message"}},"additionalProperties":true,"type":"object","required":["message"],"title":"MessageResponse","description":"Generic message response."},"ModelMemoryEntry":{"properties":{"loaded":{"type":"boolean","title":"Loaded","default":false},"estimated_mb":{"type":"integer","title":"Estimated Mb","default":0},"backend":{"type":"string","enum":["none","local","remote"],"title":"Backend","default":"none"}},"type":"object","title":"ModelMemoryEntry"},"ModelMemoryStatusResponse":{"properties":{"embedding":{"$ref":"#/components/schemas/ModelMemoryEntry","default":{"loaded":false,"estimated_mb":0,"backend":"none"}},"llm":{"$ref":"#/components/schemas/ModelMemoryEntry","default":{"loaded":false,"estimated_mb":0,"backend":"none"}}},"type":"object","title":"ModelMemoryStatusResponse"},"ModelUnloadResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"model":{"type":"string","title":"Model"},"message":{"type":"string","title":"Message","default":""}},"type":"object","required":["success","model"],"title":"ModelUnloadResponse"},"NodeType":{"type":"string","enum":["Thread","Message","Memory","Entity","Label","Community","Source","Skill"],"title":"NodeType","description":"Enumeration of node types in the graph."},"OpenAIEmbeddingData":{"type":"object","required":["object","index","embedding"],"properties":{"embedding":{"$ref":"#/components/schemas/EmbeddingVector"},"index":{"type":"integer","minimum":0},"object":{"type":"string"}}},"OpenAIEmbeddingRequest":{"type":"object","required":["model","input"],"properties":{"dimensions":{"type":["integer","null"],"minimum":0},"encoding_format":{"type":"string","default":"float"},"input":{"$ref":"#/components/schemas/EmbeddingInput"},"input_type":{"type":["string","null"],"description":"Nowledge extension: `query` or `document` (default)."},"model":{"type":["string","null"]},"user":{"type":["string","null"]}}},"OpenAIEmbeddingResponse":{"type":"object","required":["object","data","model","usage"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OpenAIEmbeddingData"}},"model":{"type":"string"},"object":{"type":"string"},"usage":{"$ref":"#/components/schemas/OpenAIEmbeddingUsage"}}},"OpenAIEmbeddingUsage":{"type":"object","required":["prompt_tokens","total_tokens"],"properties":{"prompt_tokens":{"type":"integer","minimum":0},"total_tokens":{"type":"integer","minimum":0}}},"OpenAIModelData":{"type":"object","required":["id","object","created","owned_by","permission","root"],"properties":{"created":{"type":"integer","format":"int64","minimum":0},"id":{"type":"string"},"object":{"type":"string"},"owned_by":{"type":"string"},"parent":{"type":["string","null"]},"permission":{"type":"array","items":{}},"root":{"type":"string"}}},"OpenAIModelListResponse":{"type":"object","required":["object","data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OpenAIModelData"}},"object":{"type":"string"}}},"OptimizeStorageResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"before_bytes":{"type":"integer","title":"Before Bytes","default":0},"after_bytes":{"type":"integer","title":"After Bytes","default":0},"freed_bytes":{"type":"integer","title":"Freed Bytes","default":0},"message":{"type":"string","title":"Message","default":""}},"type":"object","required":["success"],"title":"OptimizeStorageResponse"},"OrphanedEntitiesResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"orphaned_entities":{"items":{"$ref":"#/components/schemas/OrphanedEntityItem"},"type":"array","title":"Orphaned Entities"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["success","orphaned_entities","count"],"title":"OrphanedEntitiesResponse","description":"Response for orphaned entities lookup."},"OrphanedEntityItem":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"entity_name":{"type":"string","title":"Entity Name"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"}},"type":"object","required":["entity_id","entity_name"],"title":"OrphanedEntityItem","description":"Orphaned entity item."},"PaginationInfo":{"properties":{"limit":{"type":"integer","title":"Limit","description":"Items per page"},"offset":{"type":"integer","title":"Offset","description":"Offset"},"total":{"type":"integer","title":"Total","description":"Total items"},"has_more":{"type":"boolean","title":"Has More","description":"Whether more items available"}},"additionalProperties":true,"type":"object","required":["limit","offset","total","has_more"],"title":"PaginationInfo","description":"Pagination metadata."},"PersistQuestionRequest":{"properties":{"question":{"type":"string","maxLength":10000,"minLength":1,"title":"Question"},"agent_response":{"type":"string","maxLength":50000,"title":"Agent Response"},"source":{"type":"string","title":"Source","default":"feed"},"related_memory_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Related Memory Ids"},"tool_calls":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tool Calls"},"thread_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thread Id","description":"Thread root event ID for follow-up conversations"},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id","description":"Memory space associated with this question"}},"type":"object","required":["question","agent_response"],"title":"PersistQuestionRequest"},"PluginUpdateInfo":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"installed_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Installed Version"},"available_version":{"type":"string","title":"Available Version"}},"type":"object","required":["id","name","available_version"],"title":"PluginUpdateInfo","description":"Plugin update information for health response."},"ReconcileTailResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether reconciliation succeeded"},"thread_id":{"type":"string","title":"Thread Id","description":"Thread ID"},"messages_replaced":{"type":"integer","title":"Messages Replaced","description":"Number of tail messages removed"},"messages_added":{"type":"integer","title":"Messages Added","description":"Number of replacement messages added"},"total_messages":{"type":"integer","title":"Total Messages","description":"Total messages in thread after reconciliation"}},"additionalProperties":true,"type":"object","required":["success","thread_id","messages_replaced","messages_added","total_messages"],"title":"ReconcileTailResponse","description":"Response from safely replacing a thread tail."},"ReindexDetail":{"type":"object","required":["memory_id","status"],"properties":{"embedding_dimension":{"type":["integer","null"],"minimum":0},"error":{"type":["string","null"]},"memory_id":{"type":"string"},"reason":{"type":["string","null"]},"status":{"type":"string"}}},"ReindexResponse":{"type":"object","required":["success","processed","failed","details"],"properties":{"details":{"type":"array","items":{"$ref":"#/components/schemas/ReindexDetail"}},"error":{"type":["string","null"]},"failed":{"type":"integer","minimum":0},"processed":{"type":"integer","minimum":0},"success":{"type":"boolean","description":"Whether the batch request completed. Individual row failures are\nreported through `failed` and `details`, matching the legacy API."}}},"ReindexStatusResponse":{"type":"object","required":["count_needing_reindex","sample_memories","has_memories_needing_reindex"],"properties":{"all_memory_ids":{"type":["array","null"],"items":{"type":"string"}},"count_needing_reindex":{"type":"integer","format":"int64"},"has_memories_needing_reindex":{"type":"boolean"},"sample_memories":{"type":"array","items":{"$ref":"#/components/schemas/MemoryReindexSample"}}}},"RelationshipInfo":{"properties":{"type":{"type":"string","title":"Type","description":"Relationship type (e.g., RELATES_TO)"},"confidence":{"type":"number","title":"Confidence","description":"Confidence score of the relationship"},"strength":{"type":"number","title":"Strength","description":"Strength of the relationship"}},"type":"object","required":["type","confidence","strength"],"title":"RelationshipInfo","description":"Information about a relationship between entities."},"RulesResponse":{"properties":{"rules":{"items":{"$ref":"#/components/schemas/GuidanceRuleResponse"},"type":"array","title":"Rules"}},"type":"object","title":"RulesResponse"},"SaveSessionRequest":{"properties":{"messages":{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":50,"title":"Messages","default":[]}},"type":"object","title":"SaveSessionRequest"},"SearchIndexReindexResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"memories":{"type":"integer","title":"Memories","description":"Number of memories indexed","default":0},"messages":{"type":"integer","title":"Messages","description":"Number of messages indexed","default":0},"sources":{"type":"integer","title":"Sources","description":"Number of Library sources indexed","default":0},"source_chunks":{"type":"integer","title":"Source Chunks","description":"Number of Library source chunks indexed","default":0},"communities":{"type":"integer","title":"Communities","description":"Number of communities indexed","default":0},"entities":{"type":"integer","title":"Entities","description":"Number of entities indexed","default":0},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","description":"Any errors encountered"},"message":{"type":"string","title":"Message","description":"Status message","default":""},"restart_recommended":{"type":"boolean","title":"Restart Recommended","description":"Whether desktop clients should restart the local backend after a successful rebuild to release native allocator high-water memory","default":false}},"type":"object","required":["success"],"title":"SearchIndexReindexResponse","description":"Response for search index reindex operation."},"SearchIndexReindexRuntimeStatusResponse":{"properties":{"active":{"type":"boolean","title":"Active"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id","description":"Current rebuild run identifier"},"stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stage","description":"Current rebuild stage"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Current rebuild message"},"progress":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Progress","description":"Best-known rebuild percentage"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At","description":"When the active rebuild started (UTC)"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"Last status update time (UTC)"},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finished At","description":"When the last rebuild finished (UTC)"},"success":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Success","description":"Whether the last rebuild ended successfully"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","description":"Last known rebuild errors"},"stats":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Stats","description":"Last known rebuild counters"}},"type":"object","required":["active"],"title":"SearchIndexReindexRuntimeStatusResponse","description":"Current or last-known full search rebuild state."},"SearchIndexStatusResponse":{"properties":{"available":{"type":"boolean","title":"Available","description":"Whether search index service is available"},"model_cached":{"type":"boolean","title":"Model Cached","description":"Whether a local search embedding model is cached"},"model_name":{"type":"string","title":"Model Name","description":"Model being used (platform-specific)","default":""},"message":{"type":"string","title":"Message","description":"Status message"},"embedding_mode":{"type":"string","title":"Embedding Mode","description":"local or remote","default":"local"},"remote_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remote Provider","description":"Configured remote provider, if any"},"remote_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remote Model","description":"Configured remote embedding model, if any"}},"type":"object","required":["available","model_cached","message"],"title":"SearchIndexStatusResponse","description":"Response for search index status."},"SearchMetadata":{"properties":{"search_method":{"type":"string","title":"Search Method","description":"Method used for search"},"search_results":{"$ref":"#/components/schemas/SearchResultsSummary","description":"Summary of search results"},"graph_stats":{"$ref":"#/components/schemas/GraphStatsSummary","description":"Graph statistics"},"filters_applied":{"$ref":"#/components/schemas/FiltersApplied","description":"Filters applied to search"},"visualization_ready":{"type":"boolean","title":"Visualization Ready","description":"Whether results are ready for visualization","default":true},"unified_query":{"type":"boolean","title":"Unified Query","description":"Whether unified query was used","default":true}},"additionalProperties":true,"type":"object","required":["search_method"],"title":"SearchMetadata","description":"Metadata specific to search operations."},"SearchResultsSummary":{"properties":{"memories_found":{"type":"integer","title":"Memories Found","description":"Number of memories found","default":0},"entities_found":{"type":"integer","title":"Entities Found","description":"Number of entities found","default":0},"threads_found":{"type":"integer","title":"Threads Found","description":"Number of threads found","default":0},"communities_found":{"type":"integer","title":"Communities Found","description":"Number of communities found","default":0}},"additionalProperties":true,"type":"object","title":"SearchResultsSummary","description":"Summary of search results counts."},"SessionSaveRequest":{"properties":{"client":{"type":"string","pattern":"^(claude-code|codex|gemini-cli)$","title":"Client","description":"Client type: 'claude-code', 'codex', or 'gemini-cli'"},"project_path":{"type":"string","title":"Project Path","description":"Project working directory path"},"persist_mode":{"type":"string","pattern":"^(current|all)$","title":"Persist Mode","description":"Mode: 'current' (most recent session) or 'all' (all sessions)","default":"current"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Specific session ID (optional)"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary","description":"Brief session summary (1-2 sentences)"},"truncate_large_content":{"type":"boolean","title":"Truncate Large Content","description":"Truncate large tool results >10KB","default":false}},"type":"object","required":["client","project_path"],"title":"SessionSaveRequest","description":"Request model for saving a coding session."},"SessionSaveResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Status: 'success' or 'error'"},"client":{"type":"string","title":"Client","description":"Client type"},"project_path":{"type":"string","title":"Project Path","description":"Project path"},"persist_mode":{"type":"string","title":"Persist Mode","description":"Persist mode used"},"results":{"items":{"$ref":"#/components/schemas/SessionSaveResultItem"},"type":"array","title":"Results","description":"Results for each session"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if failed"},"hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hint","description":"Hint for resolution"}},"type":"object","required":["status","client","project_path","persist_mode"],"title":"SessionSaveResponse","description":"Response from session save operation."},"SessionSaveResultItem":{"properties":{"action":{"type":"string","title":"Action","description":"Action taken: 'created' or 'appended'"},"session_id":{"type":"string","title":"Session Id","description":"Session ID"},"thread_id":{"type":"string","title":"Thread Id","description":"Thread ID"},"message_count":{"type":"integer","title":"Message Count","description":"Total messages in thread"},"messages_added":{"type":"integer","title":"Messages Added","description":"New messages added (append only)","default":0},"file":{"type":"string","title":"File","description":"Source file name","default":""}},"type":"object","required":["action","session_id","thread_id","message_count"],"title":"SessionSaveResultItem","description":"Result of persisting a single session."},"SkillBuilderChatContext":{"properties":{"view":{"type":"string","title":"View","default":"overview"},"skill_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skill Name"},"skill_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skill Stage"},"skill_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skill Description"},"draft_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Name"},"draft_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Note"},"has_pending":{"type":"boolean","title":"Has Pending","default":false},"has_assets":{"type":"boolean","title":"Has Assets","default":false},"has_duplicate":{"type":"boolean","title":"Has Duplicate","default":false}},"type":"object","title":"SkillBuilderChatContext","description":"What's on the user's Skills screen, sent every turn (stateless copilot)."},"SkillBuilderChatRequest":{"properties":{"message":{"type":"string","title":"Message","description":"The user's latest message"},"history":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"History"},"context":{"$ref":"#/components/schemas/SkillBuilderChatContext"},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id"}},"type":"object","required":["message"],"title":"SkillBuilderChatRequest","description":"A copilot turn: the user's message plus the current screen context."},"SkillBuilderProposeRequest":{"properties":{"goal":{"type":"string","title":"Goal","description":"The user's intent / latest message"},"history":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"History","description":"Prior {role, content} turns for context"},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id"},"deep":{"type":"boolean","title":"Deep","description":"Deep Create: surf the graph for the fuller pattern before draft","default":false}},"type":"object","required":["goal"],"title":"SkillBuilderProposeRequest","description":"A turn of the floating builder assistant."},"SkillEditBodyRequest":{"properties":{"skill_id":{"type":"string","title":"Skill Id","description":"The skill being edited"},"body":{"type":"string","title":"Body","description":"The full procedure markdown (frontmatter optional)"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale","description":"Optional one-line note about what they changed"}},"type":"object","required":["skill_id","body"],"title":"SkillEditBodyRequest","description":"The user authored a new body for a skill directly (power-user edit)."},"SkillEditFileRequest":{"properties":{"path":{"type":"string","title":"Path","description":"Bundle-relative path, e.g. references/api.md"},"content":{"type":"string","title":"Content","description":"The full new text of that file"}},"type":"object","required":["path","content"],"title":"SkillEditFileRequest"},"SkillImportRequest":{"properties":{"skill_md":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skill Md","description":"A full agentskills.io SKILL.md (with frontmatter)"},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path","description":"Absolute path to a skill folder (the one with SKILL.md)"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"A public code-host link (GitHub/GitLab/gist) to a skill; the agent resolves it and the bytes are fetched server-side"},"files":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Files","description":"A folder's files as {relpath: base64}, read by the client. Content-based (no disk path), so it works in every client mode."},"force":{"type":"boolean","title":"Force","description":"Import even when it looks like an existing active skill","default":false},"take_ownership":{"type":"boolean","title":"Take Ownership","description":"For a folder import: move the hand-written original aside when the skill is turned on (reversible), so a host shows only Mem's copy","default":true}},"type":"object","title":"SkillImportRequest","description":"Enroll the user's own skill into managed scope (the third birth).\n\nEither paste a single-file SKILL.md (``skill_md``) or point at a hand-written\nskill FOLDER on disk (``path``, from the discovery scan) to bring a multi-file\nskill in whole."},"SkillOutcomeRequest":{"properties":{"skill_version":{"type":"integer","minimum":1,"title":"Skill Version","description":"The version the agent used"},"outcome":{"type":"string","title":"Outcome","description":"completed | completed_with_deviation | failed | abandoned"},"deviations":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deviations","description":"What you changed"},"missing":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Missing","description":"A step the skill lacked"},"failure":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure","description":"Why it failed"},"source":{"type":"string","title":"Source","description":"agent (Tier-2) | user (Tier-3, from the UI)","default":"agent"}},"type":"object","required":["skill_version","outcome"],"title":"SkillOutcomeRequest"},"SkillRefineRequest":{"properties":{"skill_id":{"type":"string","title":"Skill Id","description":"A compiled skill to re-version"},"instruction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instruction","description":"Optional user guidance for the revision"}},"type":"object","required":["skill_id"],"title":"SkillRefineRequest","description":"Ask the assistant to propose a sharper version of a compiled skill."},"SourceContentResponse":{"properties":{"source_id":{"type":"string","title":"Source Id"},"original_name":{"type":"string","title":"Original Name"},"content":{"type":"string","title":"Content"},"offset":{"type":"integer","title":"Offset","default":0},"returned_length":{"type":"integer","title":"Returned Length","default":0},"total_length":{"type":"integer","title":"Total Length","default":0},"has_more":{"type":"boolean","title":"Has More","default":false},"content_type":{"type":"string","title":"Content Type","default":"markdown"}},"type":"object","required":["source_id","original_name","content"],"title":"SourceContentResponse","description":"Parsed content for preview."},"SourceDetailResponse":{"properties":{"source":{"$ref":"#/components/schemas/SourceResponse"},"memories":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Memories"},"revisions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Revisions"}},"type":"object","required":["source"],"title":"SourceDetailResponse","description":"Source detail with relationships."},"SourceListResponse":{"properties":{"sources":{"items":{"$ref":"#/components/schemas/SourceResponse"},"type":"array","title":"Sources"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["sources","total"],"title":"SourceListResponse","description":"Paginated list of sources."},"SourceResponse":{"properties":{"id":{"type":"string","title":"Id"},"source_type":{"type":"string","title":"Source Type"},"original_name":{"type":"string","title":"Original Name"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mime Type"},"file_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Path"},"parsed_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parsed Path"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sha256"},"size_bytes":{"type":"integer","title":"Size Bytes","default":0},"version":{"type":"integer","title":"Version","default":1},"space_id":{"type":"string","title":"Space Id","default":"default"},"lifecycle_state":{"type":"string","title":"Lifecycle State","default":"ingested"},"chunk_count":{"type":"integer","title":"Chunk Count","default":0},"memory_count":{"type":"integer","title":"Memory Count","default":0},"section_tree":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Tree"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"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"},"label_ids":{"items":{"type":"string"},"type":"array","title":"Label Ids","description":"Label IDs assigned to this source"}},"type":"object","required":["id","source_type","original_name"],"title":"SourceResponse","description":"Source node as returned by the API."},"SourceSearchResponse":{"properties":{"results":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["results","total"],"title":"SourceSearchResponse","description":"Search results for sources."},"SourceThreadInfo":{"properties":{"id":{"type":"string","title":"Id","description":"Thread ID"},"title":{"type":"string","title":"Title","description":"Thread title"},"space_id":{"type":"string","title":"Space Id","description":"Isolation space for the source thread","default":"default"}},"additionalProperties":true,"type":"object","required":["id","title"],"title":"SourceThreadInfo","description":"Source thread information."},"StorageInfoResponse":{"properties":{"graph_db_bytes":{"type":"integer","title":"Graph Db Bytes","default":0},"message_store_bytes":{"type":"integer","title":"Message Store Bytes","default":0},"search_index_bytes":{"type":"integer","title":"Search Index Bytes","default":0},"total_bytes":{"type":"integer","title":"Total Bytes","default":0}},"type":"object","title":"StorageInfoResponse"},"StrengthenInsteadRequest":{"properties":{"target_skill_id":{"type":"string","title":"Target Skill Id","description":"The active skill that should absorb this suggestion's evidence"}},"type":"object","required":["target_skill_id"],"title":"StrengthenInsteadRequest"},"SupersedeMemoryRequest":{"properties":{"newer_memory_id":{"type":"string","minLength":1,"title":"Newer Memory Id"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id","description":"Optional isolation space guard; the memory must belong to it."}},"type":"object","required":["newer_memory_id"],"title":"SupersedeMemoryRequest","description":"Mark one memory as replaced by a newer memory."},"ThreadCoverageResponse":{"properties":{"thread_id":{"type":"string","title":"Thread Id","description":"Thread ID"},"total_messages":{"type":"integer","title":"Total Messages","description":"Total messages"},"covered_messages":{"type":"integer","title":"Covered Messages","description":"Messages covered by memories"},"memories":{"type":"integer","title":"Memories","description":"Number of memories"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Thread metadata"}},"additionalProperties":true,"type":"object","required":["thread_id","total_messages","covered_messages","memories"],"title":"ThreadCoverageResponse","description":"Response for thread coverage report."},"ThreadCreateRequest":{"properties":{"thread_id":{"type":"string","title":"Thread Id","description":"Human-readable thread identifier"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Thread title"},"messages":{"items":{"$ref":"#/components/schemas/MessageCreateRequest"},"type":"array","title":"Messages","description":"Thread messages"},"participants":{"items":{"type":"string"},"type":"array","title":"Participants"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Source system"},"space_id":{"type":"string","title":"Space Id","description":"Isolation space for this thread","default":"default"},"project":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project","description":"Project identifier"},"workspace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace","description":"Workspace path"},"tool_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Version","description":"Tool version"},"import_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Import Date","description":"Import timestamp"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["thread_id","messages"],"title":"ThreadCreateRequest","description":"Request to create a new thread with messages."},"ThreadCreateResponse":{"properties":{"thread":{"$ref":"#/components/schemas/ThreadNode"},"messages":{"items":{"$ref":"#/components/schemas/MessageNode"},"type":"array","title":"Messages"},"created_relationships":{"type":"integer","title":"Created Relationships","default":0},"auto_generated_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auto Generated Summary"},"extracted_memories":{"items":{"$ref":"#/components/schemas/MemoryNode"},"type":"array","title":"Extracted Memories"},"auto_extraction_performed":{"type":"boolean","title":"Auto Extraction Performed","default":false}},"type":"object","required":["thread","messages"],"title":"ThreadCreateResponse","description":"Response from thread creation."},"ThreadDistillationBatchPlanRequest":{"properties":{"selection":{"$ref":"#/components/schemas/BulkThreadSelection"},"max_scan":{"type":"integer","maximum":2000,"minimum":1,"title":"Max Scan","description":"Maximum matching threads to inspect for this planning pass.","default":500},"max_threads_per_run":{"type":"integer","maximum":20,"minimum":1,"title":"Max Threads Per Run","description":"Maximum threads to schedule in the next background wave.","default":3},"max_messages_per_run":{"type":"integer","maximum":50000,"minimum":100,"title":"Max Messages Per Run","description":"Soft total message budget for one background wave.","default":2000},"min_messages_for_candidate":{"type":"integer","maximum":500,"minimum":1,"title":"Min Messages For Candidate","description":"Skip very small threads unless they already need anchor repair.","default":20}},"type":"object","required":["selection"],"title":"ThreadDistillationBatchPlanRequest","description":"Plan the next safe opt-in batch for thread distillation."},"ThreadDistillationBatchPlanResponse":{"properties":{"version":{"type":"integer","title":"Version","default":1},"source":{"type":"string","const":"api_thread_batch_plan","title":"Source","default":"api_thread_batch_plan"},"selection_mode":{"type":"string","title":"Selection Mode"},"source_space_id":{"type":"string","title":"Source Space Id"},"selection_count":{"type":"integer","title":"Selection Count"},"scanned_threads":{"type":"integer","title":"Scanned Threads"},"scan_limited":{"type":"boolean","title":"Scan Limited"},"plan":{"additionalProperties":true,"type":"object","title":"Plan"},"message":{"type":"string","title":"Message"}},"type":"object","required":["selection_mode","source_space_id","selection_count","scanned_threads","scan_limited","plan","message"],"title":"ThreadDistillationBatchPlanResponse","description":"Read-only bulk distillation plan."},"ThreadFetchResponse":{"properties":{"thread":{"$ref":"#/components/schemas/ThreadNode"},"messages":{"items":{"$ref":"#/components/schemas/MessageNode"},"type":"array","title":"Messages"},"related_memories":{"items":{"$ref":"#/components/schemas/MemoryNode"},"type":"array","title":"Related Memories"},"entities":{"items":{"type":"string"},"type":"array","title":"Entities","description":"Extracted entities from thread"},"total_messages":{"type":"integer","title":"Total Messages"},"total_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Tokens"},"covered_message_ids":{"items":{"type":"string"},"type":"array","title":"Covered Message Ids"}},"type":"object","required":["thread","messages","total_messages"],"title":"ThreadFetchResponse","description":"Response for fetching a complete thread."},"ThreadHistorySyncCompletedRequest":{"properties":{"client":{"type":"string","title":"Client","description":"Local agent host, e.g. codex or hermes"},"imported_count":{"type":"integer","minimum":0,"title":"Imported Count","description":"Threads created or meaningfully updated","default":0},"imported_message_count":{"type":"integer","minimum":0,"title":"Imported Message Count","description":"Messages newly imported","default":0},"created_count":{"type":"integer","minimum":0,"title":"Created Count","description":"Threads created","default":0},"updated_count":{"type":"integer","minimum":0,"title":"Updated Count","description":"Threads updated with new messages","default":0},"failed_count":{"type":"integer","minimum":0,"title":"Failed Count","description":"Sessions that failed to sync","default":0},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id","description":"Target memory space"}},"type":"object","required":["client"],"title":"ThreadHistorySyncCompletedRequest","description":"Batch-level notification emitted by nmem history sync."},"ThreadImportItem":{"type":"object","description":"A single thread to import; provide either `messages` or `markdown_content`\n(`schemas.ThreadImportItem`, threads_module/schemas.py:468-487).","properties":{"expected_message_count":{"type":["integer","null"],"format":"int64","description":"Optimistic checkpoint for an already-created Thread. When present, the\nserver must use the bounded checkpoint append path instead of scanning\nthe complete Thread for duplicates."},"idempotency_key":{"type":["string","null"],"description":"Stable identity for retrying one checkpointed suffix."},"markdown_content":{"type":["string","null"]},"messages":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ThreadImportMessage"}},"metadata":{"type":["object","null"],"additionalProperties":{},"propertyNames":{"type":"string"}},"participants":{"type":["array","null"],"items":{"type":"string"}},"project":{"type":["string","null"]},"source":{"type":["string","null"]},"space_id":{"type":["string","null"]},"thread_id":{"type":["string","null"]},"title":{"type":["string","null"]},"tool_version":{"type":["string","null"]},"workspace":{"type":["string","null"]}}},"ThreadImportMessage":{"type":"object","description":"A message in an imported thread (`schemas.ThreadImportMessage`,\nthreads_module/schemas.py:455-465).","required":["content","role"],"properties":{"content":{"type":"string"},"metadata":{"type":["object","null"],"additionalProperties":{},"propertyNames":{"type":"string"}},"role":{"type":"string"},"timestamp":{"type":["string","null"]}}},"ThreadImportRequest":{"type":"object","description":"Import one or more conversation threads (`schemas.ThreadImportRequest`,\nthreads_module/schemas.py:490-525). Single mode sets the flat fields;\nbatch mode uses `threads`.","properties":{"expected_message_count":{"type":["integer","null"],"format":"int64"},"idempotency_key":{"type":["string","null"]},"markdown_content":{"type":["string","null"]},"messages":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ThreadImportMessage"}},"metadata":{"type":["object","null"],"additionalProperties":{},"propertyNames":{"type":"string"}},"participants":{"type":["array","null"],"items":{"type":"string"}},"project":{"type":["string","null"]},"source":{"type":["string","null"]},"space_id":{"type":["string","null"]},"thread_id":{"type":["string","null"]},"threads":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ThreadImportItem"}},"title":{"type":["string","null"]},"tool_version":{"type":["string","null"]},"workspace":{"type":["string","null"]}}},"ThreadImportResponse":{"type":"object","required":["success","imported_count","skipped_count","failed_count","results"],"properties":{"auto_review":{},"failed_count":{"type":"integer","format":"int64"},"imported_count":{"type":"integer","format":"int64"},"results":{"type":"array","items":{"$ref":"#/components/schemas/ThreadImportResultItem"}},"skipped_count":{"type":"integer","format":"int64"},"success":{"type":"boolean"}}},"ThreadImportResultItem":{"type":"object","description":"Result of importing a single thread (`schemas.ThreadImportResultItem`,\nthreads_module/schemas.py:528-535).","required":["success","thread_id","message_count","messages_added","already_existed"],"properties":{"already_existed":{"type":"boolean"},"append_mode":{"type":["string","null"]},"error":{"type":["string","null"]},"error_code":{"type":["string","null"]},"message_count":{"type":"integer","format":"int64"},"messages_added":{"type":"integer","format":"int64"},"success":{"type":"boolean"},"thread_id":{"type":"string"},"title":{"type":["string","null"]}}},"ThreadListResponse":{"properties":{"threads":{"items":{"$ref":"#/components/schemas/nowledge_graph_server__api__routers__threads_module__schemas__ThreadPublic"},"type":"array","title":"Threads","description":"List of threads"},"pagination":{"$ref":"#/components/schemas/ThreadPaginationInfo","description":"Pagination info"}},"additionalProperties":true,"type":"object","required":["pagination"],"title":"ThreadListResponse","description":"Response from listing threads."},"ThreadNode":{"properties":{"id":{"type":"string","title":"Id"},"node_type":{"$ref":"#/components/schemas/NodeType","default":"Thread"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"thread_id":{"type":"string","title":"Thread Id","description":"Human-readable thread identifier"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Thread title"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary","description":"Thread summary for embedding"},"message_count":{"type":"integer","title":"Message Count","description":"Number of messages in thread","default":0},"participants":{"items":{"type":"string"},"type":"array","title":"Participants","description":"Thread participants"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Source system (cursor, claude, etc.)"},"space_id":{"type":"string","title":"Space Id","description":"Isolation space for this thread","default":"default"},"project":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project","description":"Project identifier"},"workspace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace","description":"Workspace path"},"tool_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Version","description":"Tool version that created this thread"},"import_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Import Date","description":"When thread was imported"}},"type":"object","required":["thread_id"],"title":"ThreadNode","description":"Thread node representing a conversation."},"ThreadPaginationInfo":{"properties":{"limit":{"type":"integer","title":"Limit","description":"Items per page"},"offset":{"type":"integer","title":"Offset","description":"Offset"},"total":{"type":"integer","title":"Total","description":"Total items"},"has_more":{"type":"boolean","title":"Has More","description":"Whether more items available"}},"additionalProperties":true,"type":"object","required":["limit","offset","total","has_more"],"title":"ThreadPaginationInfo","description":"Pagination metadata for threads."},"ThreadParseRequest":{"properties":{"file_content":{"type":"string","title":"File Content","description":"Content of the conversation file"},"file_name":{"type":"string","title":"File Name","description":"Name of the file being parsed"}},"type":"object","required":["file_content","file_name"],"title":"ThreadParseRequest","description":"Request for parsing thread content."},"ThreadParseResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether parsing was successful"},"parsed_thread":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Parsed Thread","description":"Parsed thread data"},"format_detected":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format Detected","description":"Detected format"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if parsing failed"}},"type":"object","required":["success"],"title":"ThreadParseResponse","description":"Response from thread parsing."},"ThreadSearchMetadata":{"properties":{"query":{"type":"string","title":"Query","description":"Search query"},"mode":{"type":"string","title":"Mode","description":"Search mode"},"matched_messages_count":{"type":"integer","title":"Matched Messages Count","description":"Total matched messages","default":0},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if any"}},"additionalProperties":true,"type":"object","required":["query","mode"],"title":"ThreadSearchMetadata","description":"Metadata for thread search results."},"ThreadSearchResponse":{"properties":{"threads":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Threads","description":"Search results"},"total_found":{"type":"integer","title":"Total Found","description":"Total threads found"},"search_metadata":{"$ref":"#/components/schemas/ThreadSearchMetadata","description":"Search metadata"}},"additionalProperties":true,"type":"object","required":["total_found","search_metadata"],"title":"ThreadSearchResponse","description":"Response from thread search."},"ThreadSourceListResponse":{"properties":{"sources":{"items":{"$ref":"#/components/schemas/ThreadSourceSummary"},"type":"array","title":"Sources","description":"Global thread source options"}},"additionalProperties":true,"type":"object","title":"ThreadSourceListResponse","description":"Response from listing thread source options."},"ThreadSourceSummary":{"properties":{"source":{"type":"string","title":"Source","description":"Thread source label"},"thread_count":{"type":"integer","title":"Thread Count","description":"Number of threads in this source"}},"additionalProperties":true,"type":"object","required":["source","thread_count"],"title":"ThreadSourceSummary","description":"Global thread source option with count."},"ThreadSummariesResponse":{"properties":{"summaries":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Summaries","description":"List of thread summaries"}},"additionalProperties":true,"type":"object","title":"ThreadSummariesResponse","description":"Response for thread summaries."},"TriageRequest":{"properties":{"thread_content":{"type":"string","maxLength":50000,"title":"Thread Content","description":"Conversation content to triage"},"preferred_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Language","description":"User preferred language (ISO 639-1 code), or None to auto-detect"}},"type":"object","required":["thread_content"],"title":"TriageRequest","description":"Request for lightweight triage of conversation content.\n\nA cheap LLM call to determine whether a conversation contains\nknowledge worth distilling into structured memories."},"UnitTypeReclassificationRequest":{"properties":{"limit":{"type":"integer","maximum":500,"minimum":1,"title":"Limit","description":"Maximum candidate memories to review.","default":50},"scan_limit":{"type":"integer","maximum":5000,"minimum":1,"title":"Scan Limit","description":"Maximum weakly typed memories to scan before selecting candidates.","default":250},"min_confidence":{"type":"number","maximum":1,"minimum":0,"title":"Min Confidence","description":"Minimum classifier confidence required before changing a type.","default":0.78},"dry_run":{"type":"boolean","title":"Dry Run","description":"Preview changes without writing metadata.","default":true},"unit_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Unit Types","description":"Optional unit_type subset to scan; defaults to fact, decision, learning."},"target_unit_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Target Unit Types","description":"Optional classifier target unit_type subset to apply or preview."},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id","description":"Optional space scope. Omit to scan all spaces."}},"type":"object","title":"UnitTypeReclassificationRequest","description":"Manual unit_type review request."},"UpdateLabelRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Label name"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color","description":"Label color (hex)"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Label description"}},"type":"object","title":"UpdateLabelRequest","description":"Request body for updating a label."},"UpdateSourceContentRequest":{"properties":{"content":{"type":"string","minLength":1,"title":"Content","description":"New markdown body"}},"type":"object","required":["content"],"title":"UpdateSourceContentRequest","description":"Replace the markdown body of an editable source artifact."},"UpdateSourceRequest":{"type":"object","description":"`sources_shared.py:174-183` (`UpdateSourceRequest`): legacy PATCH bodies\ncarry a lifecycle `action`. Rust also accepts a target `space_id` for source\nmoves; the query-string `space_id` remains the strict source-space guard.","properties":{"action":{"type":["string","null"],"description":"Lifecycle operation: `move`, `reparse`, `ocr_reparse`, or `mark_stale`."},"pdf_render_scale":{"type":["number","null"],"format":"float","description":"PDFium render scale for `ocr_reparse`. See\n[`IngestFilePathRequest::pdf_render_scale`].","maximum":2,"minimum":0.5},"space_id":{"type":["string","null"],"description":"Compatibility spelling for a move target."},"target_space_id":{"type":["string","null"],"description":"Space to move the Source into."}}},"UpdateWorkingMemoryRequest":{"properties":{"content":{"type":"string","maxLength":10000,"minLength":1,"title":"Content"},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id"}},"type":"object","required":["content"],"title":"UpdateWorkingMemoryRequest"},"UpgradeActionRequest":{"properties":{"tag":{"type":"string","title":"Tag","description":"Target tag, e.g. '0.9.15'. Stable semver only."}},"type":"object","required":["tag"],"title":"UpgradeActionRequest"},"UpgradeApplyRequest":{"properties":{"tag":{"type":"string","title":"Tag","description":"Target tag, e.g. '0.9.15'. Stable semver only."},"confirm":{"type":"string","title":"Confirm","description":"Must equal `tag` — the type-to-confirm value the operator types."}},"type":"object","required":["tag","confirm"],"title":"UpgradeApplyRequest"},"UpgradeCheckResponse":{"properties":{"current_version":{"type":"string","title":"Current Version","description":"Version the running backend reports."},"latest_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Version","description":"Newest stable semver tag on Docker Hub. None if no check has succeeded yet."},"update_available":{"type":"boolean","title":"Update Available","description":"True iff a strictly newer stable tag exists."},"pulled":{"type":"boolean","title":"Pulled","description":"True iff the latest image is already cached locally by the sidecar.","default":false},"is_docker_deploy":{"type":"boolean","title":"Is Docker Deploy","description":"True iff this server is the headless Docker deployment (set by NOWLEDGE_HEADLESS=1 in the official image). The UI uses this to decide whether the server-update affordance applies at all: .deb / AppImage / desktop-in-remote-mode servers update through their native mechanisms, not this endpoint. When False, the UI must hide the badge and Server card entirely even if a newer Mem version exists on Docker Hub."},"auto_update_available":{"type":"boolean","title":"Auto Update Available","description":"True iff the sidecar is configured AND reachable. UI shows the Apply button only when True; otherwise renders the SSH hint."},"auto_update_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auto Update Reason","description":"Human-readable explanation when auto_update_available is False."},"registry_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registry Error","description":"Docker Hub fetch error (non-fatal; UI shows 'cannot check')."},"last_checked_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Last Checked At","description":"Unix timestamp of the last successful Hub fetch."}},"type":"object","required":["current_version","update_available","is_docker_deploy","auto_update_available"],"title":"UpgradeCheckResponse","description":"Aggregated state for the UI's Update card / title-bar badge.\n\nAlways populated; sub-features degrade gracefully."},"UserProfileResponse":{"properties":{"name":{"type":"string","title":"Name","default":""},"aliases":{"type":"string","title":"Aliases","default":""},"context":{"type":"string","title":"Context","default":""},"preferred_language":{"type":"string","title":"Preferred Language","default":"en"},"custom_instructions":{"type":"string","title":"Custom Instructions","default":""}},"type":"object","title":"UserProfileResponse","description":"User profile data for external consumers (browser extension, CLI)."},"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"},"VisualizationConfig":{"properties":{"node_size_range":{"items":{"type":"integer"},"type":"array","title":"Node Size Range"},"edge_weight_range":{"items":{"type":"integer"},"type":"array","title":"Edge Weight Range"},"layout_recommendations":{"additionalProperties":true,"type":"object","title":"Layout Recommendations"}},"additionalProperties":true,"type":"object","title":"VisualizationConfig","description":"Visualization configuration."},"WatcherStatusModel":{"properties":{"running":{"type":"boolean","title":"Running","description":"Whether watcher is running"},"watched_paths":{"items":{"type":"string"},"type":"array","title":"Watched Paths","description":"Paths being watched"},"last_check":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Last Check","description":"Last check timestamp"},"auto_import_count":{"type":"integer","title":"Auto Import Count","description":"Number of auto-imports","default":0},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","description":"Recent errors"}},"type":"object","required":["running"],"title":"WatcherStatusModel","description":"Model for watcher status."},"nowledge_graph_server__api__routers__threads_module__schemas__ThreadPublic":{"properties":{"id":{"type":"string","title":"Id","description":"Thread ID"},"title":{"type":"string","title":"Title","description":"Thread title"},"summary":{"type":"string","title":"Summary","description":"Agent-generated thread summary","default":""},"source":{"type":"string","title":"Source","description":"Thread source"},"messages":{"type":"integer","title":"Messages","description":"Number of messages"},"date":{"type":"string","title":"Date","description":"Formatted date string"},"is_favorite":{"type":"boolean","title":"Is Favorite","description":"Favorite status","default":false},"space_id":{"type":"string","title":"Space Id","description":"Isolation space for this thread","default":"default"}},"additionalProperties":true,"type":"object","required":["id","title","source","messages","date"],"title":"ThreadPublic","description":"Frontend thread format for listing."},"nowledge_graph_server__models__memories_api__ThreadPublic":{"properties":{"id":{"type":"string","title":"Id","description":"Thread ID"},"title":{"type":"string","title":"Title","description":"Thread title"},"source":{"type":"string","title":"Source","description":"Thread source"},"messages":{"type":"integer","title":"Messages","description":"Number of messages"},"date":{"type":"string","title":"Date","description":"Formatted date string"},"is_favorite":{"type":"boolean","title":"Is Favorite","description":"Favorite status","default":false},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"Creation timestamp"},"last_activity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Activity","description":"Last activity timestamp"}},"additionalProperties":true,"type":"object","required":["id","title","source","messages","date"],"title":"ThreadPublic","description":"Frontend thread format."},"DataExportStartResponse":{"type":"object","title":"DataExportStartResponse","description":"Returned by POST /data/export when async is true.","required":["success","job_id","status","message"],"properties":{"job_id":{"type":"string"},"message":{"type":"string"},"status":{"type":"string"},"success":{"type":"boolean"}}},"DataExportResponse":{"oneOf":[{"$ref":"#/components/schemas/DataExportSyncResponse"},{"$ref":"#/components/schemas/DataExportStartResponse"}]},"DataExportSyncResponse":{"type":"object","title":"DataExportResult","description":"Synchronous export result when async is false.","required":["success","export_id","format","version","created_at","counts","warnings"],"properties":{"counts":{"type":"object"},"created_at":{"type":"string"},"export_dir":{"type":["string","null"]},"export_id":{"type":"string"},"export_path":{"type":["string","null"]},"format":{"type":"string"},"manifest_path":{"type":["string","null"]},"success":{"type":"boolean"},"version":{"type":"integer","format":"int64","minimum":0},"warnings":{"type":"array","items":{"type":"string"}}}},"DataImportMode":{"type":"string","enum":["merge","skip","overwrite"]},"DataImportUploadRequest":{"type":"object","title":"Body_import_data_upload_data_import_upload_post","description":"Multipart body for POST /data/import/upload.","required":["file"],"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream"},"include_communities":{"type":"boolean","default":true},"include_edges":{"type":"boolean","default":true},"include_entities":{"type":"boolean","default":true},"include_feed_events":{"type":"boolean","description":"Include durable Timeline history from feed_events/*.jsonl.","default":true},"include_labels":{"type":"boolean","default":true},"include_memories":{"type":"boolean","default":true},"include_messages":{"type":"boolean","default":true},"include_skills":{"type":"boolean","default":true},"include_source_files":{"type":"boolean","default":true},"include_sources":{"type":"boolean","default":true},"include_threads":{"type":"boolean","default":true},"include_working_memory":{"type":"boolean","default":true},"include_working_memory_archive":{"type":"boolean","default":true},"mode":{"$ref":"#/components/schemas/DataImportMode"}}},"DataTransferCheckpointResponse":{"type":"object","required":["success","checkpointed"],"properties":{"checkpointed":{"type":"boolean"},"detail":{"type":["string","null"]},"success":{"type":"boolean"}}},"SpaceMergeRequest":{"type":"object","title":"SpaceMergeRequest","required":["targetSpaceId"],"properties":{"targetSpaceId":{"type":"string","title":"Target Space Id","description":"Target Space name, alias, or stable ID."}}},"SpaceMergeEntityCounts":{"type":"object","title":"SpaceMergeEntityCounts","required":["memories","threads","sources"],"properties":{"memories":{"type":"integer","minimum":0},"threads":{"type":"integer","minimum":0},"sources":{"type":"integer","minimum":0}}},"SpaceMergePlan":{"type":"object","title":"SpaceMergePlan","required":["source","target","counts","workingMemory","conflicts","canMerge","preservesSourceAliases"],"properties":{"source":{"type":"object","additionalProperties":true},"target":{"type":"object","additionalProperties":true},"counts":{"$ref":"#/components/schemas/SpaceMergeEntityCounts"},"workingMemory":{"type":"object","additionalProperties":true},"conflicts":{"type":"array","items":{"type":"object","additionalProperties":true}},"canMerge":{"type":"boolean"},"preservesSourceAliases":{"type":"boolean"}}},"SpaceMergeResult":{"type":"object","title":"SpaceMergeResult","required":["merged","sourceSpaceId","targetSpaceId","counts","workingMemoryMoved","warnings","settings"],"properties":{"merged":{"type":"boolean"},"sourceSpaceId":{"type":"string"},"targetSpaceId":{"type":"string"},"counts":{"$ref":"#/components/schemas/SpaceMergeEntityCounts"},"workingMemoryMoved":{"type":"boolean"},"contentUpdated":{"type":"object","additionalProperties":true},"indexUpdated":{"type":"object","additionalProperties":true},"warnings":{"type":"array","items":{"type":"string"}},"settings":{"type":"object","additionalProperties":true}}},"EntityDeletePlanResponse":{"type":"object","required":["entity","counts","memories_preserved","can_delete"],"properties":{"can_delete":{"type":"boolean"},"counts":{"$ref":"#/components/schemas/EntityImpactCounts"},"entity":{"$ref":"#/components/schemas/EntityLifecycleSummary"},"memories_preserved":{"type":"boolean"}}},"EntityImpactCounts":{"type":"object","required":["mentions","outgoing_relations","incoming_relations","labels","communities"],"properties":{"communities":{"type":"integer","format":"int64","minimum":0},"incoming_relations":{"type":"integer","format":"int64","minimum":0},"labels":{"type":"integer","format":"int64","minimum":0},"mentions":{"type":"integer","format":"int64","minimum":0},"outgoing_relations":{"type":"integer","format":"int64","minimum":0}}},"EntityLifecycleSummary":{"type":"object","required":["id","name","entity_type","description","aliases"],"properties":{"aliases":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"entity_type":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"}}},"EntityMergePlanResponse":{"type":"object","required":["source","target","counts","duplicate_mentions","self_relations_removed","duplicate_relations_removed","can_merge"],"properties":{"can_merge":{"type":"boolean"},"counts":{"$ref":"#/components/schemas/EntityImpactCounts"},"duplicate_mentions":{"type":"integer","format":"int64","minimum":0},"duplicate_relations_removed":{"type":"integer","format":"int64","minimum":0},"self_relations_removed":{"type":"integer","format":"int64","minimum":0},"source":{"$ref":"#/components/schemas/EntityLifecycleSummary"},"target":{"$ref":"#/components/schemas/EntityLifecycleSummary"}}},"EntityMergeRequest":{"type":"object","required":["target_entity_id"],"properties":{"confirm_source_entity_id":{"type":["string","null"]},"target_entity_id":{"type":"string"}}},"EntityMutationResponse":{"type":"object","required":["action","source_entity_id","counts","duplicate_mentions","self_relations_removed","duplicate_relations_removed","warnings"],"properties":{"action":{"type":"string"},"counts":{"$ref":"#/components/schemas/EntityImpactCounts"},"duplicate_mentions":{"type":"integer","format":"int64","minimum":0},"duplicate_relations_removed":{"type":"integer","format":"int64","minimum":0},"self_relations_removed":{"type":"integer","format":"int64","minimum":0},"source_entity_id":{"type":"string"},"target_entity_id":{"type":["string","null"]},"warnings":{"type":"array","items":{"type":"string"}}}},"SettingsBackupArtifact":{"type":"object","required":["format","version","exported_at","settings","providers","omitted"],"properties":{"exported_at":{"type":"string","description":"RFC 3339 export time."},"format":{"type":"string","description":"Stable artifact discriminator. Currently `nowledge-mem-settings`."},"omitted":{"type":"array","items":{"type":"string"},"description":"Secret and device-local sections deliberately excluded from this file."},"providers":{"description":"Credential-free provider definitions and purpose routing."},"settings":{"description":"Whitelisted portable app preferences."},"version":{"type":"integer","format":"int32","description":"Settings artifact schema version, independent from the app version.","minimum":0}}},"SettingsRestorePreview":{"type":"object","required":["valid","version","sections","provider_count","credentials_included","warnings"],"properties":{"credentials_included":{"type":"boolean"},"provider_count":{"type":"integer","minimum":0},"sections":{"type":"array","items":{"type":"string"}},"valid":{"type":"boolean"},"version":{"type":"integer","format":"int32","minimum":0},"warnings":{"type":"array","items":{"type":"string"}}}},"SettingsRestoreResponse":{"type":"object","required":["restored","sections","provider_count","credentials_restored","warnings"],"properties":{"credentials_restored":{"type":"boolean"},"provider_count":{"type":"integer","minimum":0},"restored":{"type":"boolean"},"sections":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}}}},"DiscardPendingVersionResponse":{"type":"object","description":"Confirmation that only the reviewable proposal was removed.","required":["id","discarded"],"properties":{"discarded":{"type":"boolean"},"id":{"type":"string"}}},"ResolvedResourceResponse":{"type":"object","required":["requested_uri","canonical_uri","kind","path","mime_type","body","frontmatter"],"properties":{"body":{"type":"string","description":"Rendered resource body. Some large resources (for example Threads)\nintentionally return a compact handoff card with progressive read\ninstructions rather than embedding the full payload."},"canonical_uri":{"type":"string","description":"Normalized, safely percent-encoded Nowledge URI."},"frontmatter":{"description":"Structured metadata emitted by the underlying KFS renderer."},"kind":{"type":"string","description":"Stable resource kind (`fs`, `memory`, `thread`, `working-memory`, or `context-bundle`)."},"mime_type":{"type":"string","description":"MIME type for the textual representation."},"path":{"type":"string","description":"Backend path used by this resolver. Compound aliases may use a synthetic path\nor a KFS directory when the compact resource card points at subresources."},"requested_uri":{"type":"string","description":"URI exactly as supplied by the caller."}}},"ArgumentGrant":{"allOf":[{"$ref":"#/components/schemas/ArgumentRule"},{"type":"object","properties":{"required":{"type":"boolean"}}}]},"ArgumentRule":{"oneOf":[{"type":"object","description":"The model may choose this value per occurrence (for example note body).","required":["mode"],"properties":{"mode":{"type":"string","enum":["dynamic"]}}},{"type":"object","description":"The argument must equal this JSON value (for example a document ID).","required":["value","mode"],"properties":{"mode":{"type":"string","enum":["exact"]},"value":{}}},{"type":"object","description":"The argument must be a string under this stable resource prefix.","required":["value","mode"],"properties":{"mode":{"type":"string","enum":["prefix"]},"value":{"type":"string"}}},{"type":"object","description":"The argument must equal one member of this bounded set.","required":["values","mode"],"properties":{"mode":{"type":"string","enum":["one_of"]},"values":{"type":"array","items":{}}}}]},"CapabilityGrant":{"type":"object","required":["version","revision","instruction_revision","granted_at"],"properties":{"granted_at":{"type":"string"},"instruction_revision":{"type":"integer","format":"int64","description":"The exact instruction revision this authority was reviewed against.","minimum":0},"revision":{"type":"integer","format":"int64","minimum":0},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ToolCapability"}},"version":{"type":"integer","format":"int32","minimum":0}}},"ConfirmScheduleRequest":{"type":"object","properties":{"capability_grant":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CapabilityGrant"}]}}},"ConnectorBinding":{"type":"object","description":"Stable reference to connector-owned configuration and credentials.\n\nSchedules never persist endpoint headers, API keys, OAuth tokens, or full\nplugin definitions. The runtime resolves this id in its connector store and\ncompares the non-secret configuration fingerprint before every occurrence.","required":["plugin_id","server_name","config_fingerprint"],"properties":{"config_fingerprint":{"type":"string"},"plugin_id":{"type":"string"},"server_name":{"type":"string"}}},"ConnectorBindingRequest":{"type":"object","required":["plugin_id"],"properties":{"plugin_id":{"type":"string"}}},"CreateScheduleRequest":{"type":"object","required":["title","instruction","recurrence","local_time","timezone"],"properties":{"capability_grant":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CapabilityGrant"}]},"connectors":{"type":"array","items":{"$ref":"#/components/schemas/ConnectorBindingRequest"}},"enabled_plugin_ids":{"type":"array","items":{"type":"string"}},"instruction":{"type":"string"},"local_time":{"$ref":"#/components/schemas/WallClockTime"},"missed_run_policy":{"$ref":"#/components/schemas/MissedRunPolicy"},"model_policy":{"$ref":"#/components/schemas/ModelPolicy"},"recurrence":{"$ref":"#/components/schemas/Recurrence"},"space_id":{"type":["string","null"]},"timezone":{"type":"string"},"title":{"type":"string"}}},"MissedRunPolicy":{"type":"string","enum":["skip","run_once"]},"ModelPolicy":{"type":"object","required":["max_output_tokens","max_tool_calls"],"properties":{"max_output_tokens":{"type":"integer","format":"int32","minimum":0},"max_tool_calls":{"type":"integer","format":"int32","minimum":0},"model":{"type":["string","null"]},"provider":{"type":["string","null"]}}},"OccurrenceLease":{"type":"object","required":["occurrence_id","runtime_id","started_at"],"properties":{"last_tool":{"type":["string","null"]},"occurrence_id":{"type":"string"},"runtime_id":{"type":"string"},"started_at":{"type":"string"},"tool_calls_started":{"type":"integer","format":"int32","minimum":0}}},"OccurrenceOutcome":{"type":"object","required":["occurrence_id","scheduled_for","status","started_at","completed_at","summary","tool_calls"],"properties":{"completed_at":{"type":"string"},"error_code":{"type":["string","null"]},"occurrence_id":{"type":"string"},"scheduled_for":{"type":"string"},"started_at":{"type":"string"},"status":{"$ref":"#/components/schemas/OccurrenceStatus"},"summary":{"type":"string"},"tool_calls":{"type":"integer","format":"int32","minimum":0}}},"OccurrenceStatus":{"type":"string","enum":["queued","running","succeeded","partial","failed","skipped","cancelled"]},"PauseReason":{"type":"string","enum":["user","permission_changed","credentials_missing","persistent_failure","recovery_required"]},"PreviewScheduleRequest":{"type":"object","required":["recurrence","local_time","timezone"],"properties":{"after":{"type":["string","null"]},"count":{"type":"integer","minimum":0},"local_time":{"$ref":"#/components/schemas/WallClockTime"},"recurrence":{"$ref":"#/components/schemas/Recurrence"},"timezone":{"type":"string"}}},"Recurrence":{"type":"object","required":["kind"],"properties":{"day_of_month":{"type":["integer","null"],"format":"int32","description":"Monthly day 1..31. Short months clamp to their last calendar day.","minimum":0},"kind":{"$ref":"#/components/schemas/RecurrenceKind"},"weekdays":{"type":"array","items":{"type":"integer","format":"int32","minimum":0},"description":"ISO weekday numbers, Monday=1 through Sunday=7. `Weekly` accepts one;\n`SelectedWeekdays` accepts one or more."}}},"RecurrenceKind":{"type":"string","enum":["daily","weekdays","selected_weekdays","weekly","monthly"]},"RecurringTask":{"type":"object","required":["contract_version","id","title","status","instruction","instruction_revision","required_grant_revision","recurrence","local_time","timezone","missed_run_policy","model_policy","capability_grant","capability_fingerprint","project_dir","next_run_at","created_at","updated_at"],"properties":{"capability_fingerprint":{"type":"string"},"capability_grant":{"$ref":"#/components/schemas/CapabilityGrant"},"connector_bindings":{"type":"array","items":{"$ref":"#/components/schemas/ConnectorBinding"}},"consecutive_failures":{"type":"integer","format":"int32","minimum":0},"contract_version":{"type":"integer","format":"int32","minimum":0},"created_at":{"type":"string"},"enabled_plugin_ids":{"type":"array","items":{"type":"string"},"description":"Stable plugin ids used by the native tool gate. Contains no connector\nconfiguration or credentials."},"id":{"type":"string"},"in_flight":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OccurrenceLease","description":"Durable execution lease for the current occurrence. A new process may\nretry an interrupted occurrence only while `tool_calls_started == 0`.\nOnce a tool has started, the external side effect is uncertain and the\ntask must pause for review instead of replaying it."}]},"instruction":{"type":"string"},"instruction_revision":{"type":"integer","format":"int64","minimum":0},"last_outcome":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OccurrenceOutcome"}]},"last_settled_at":{"type":["string","null"]},"local_time":{"$ref":"#/components/schemas/WallClockTime"},"missed_run_policy":{"$ref":"#/components/schemas/MissedRunPolicy"},"model_policy":{"$ref":"#/components/schemas/ModelPolicy"},"next_run_at":{"type":"string"},"pause_reason":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PauseReason"}]},"project_dir":{"type":"string"},"recurrence":{"$ref":"#/components/schemas/Recurrence"},"required_grant_revision":{"type":"integer","format":"int64","description":"Minimum grant revision required before this task may become active.\nPermission-sensitive edits advance this value while preserving the old\ngrant for a human-readable diff.","minimum":0},"space_id":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/ScheduleStatus"},"timezone":{"type":"string"},"title":{"type":"string"},"updated_at":{"type":"string"}}},"ScheduleDeleteResponse":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"}}},"ScheduleErrorResponse":{"type":"object","required":["detail"],"properties":{"detail":{"type":"string"},"error_code":{"type":["string","null"]}}},"ScheduleListResponse":{"type":"object","required":["schedules","knowledge_capabilities"],"properties":{"knowledge_capabilities":{"type":"array","items":{"$ref":"#/components/schemas/ToolCapability"}},"schedules":{"type":"array","items":{"$ref":"#/components/schemas/RecurringTask"}}}},"SchedulePreviewResponse":{"type":"object","required":["occurrences"],"properties":{"occurrences":{"type":"array","items":{"type":"string"}}}},"ScheduleResponse":{"type":"object","required":["schedule"],"properties":{"schedule":{"$ref":"#/components/schemas/RecurringTask"}}},"ScheduleRunsResponse":{"type":"object","required":["runs"],"properties":{"runs":{"type":"array","items":{"$ref":"#/components/schemas/OccurrenceOutcome"}}}},"ScheduleStatus":{"type":"string","enum":["draft","active","paused","deleted"]},"ToolCapability":{"type":"object","required":["server","tool","operation"],"properties":{"action_fingerprint":{"type":["string","null"],"description":"SHA-256 of the reviewed external action contract. This is required to\nactivate connector-backed capabilities, but remains optional here so\nolder paused drafts can be loaded and reviewed safely."},"allow_unknown_arguments":{"type":"boolean"},"arguments":{"type":"object","description":"Root JSON argument name -> rule. Undeclared arguments are rejected unless\n`allow_unknown_arguments` is explicitly true (not recommended for writes).","additionalProperties":{"$ref":"#/components/schemas/ArgumentGrant"},"propertyNames":{"type":"string"}},"operation":{"$ref":"#/components/schemas/ToolOperation"},"resource_label":{"type":["string","null"]},"server":{"type":"string","description":"`nowledge` for native tools, or the exact custom MCP server name."},"tool":{"type":"string"}}},"ToolOperation":{"type":"string","enum":["read","write"]},"UpdateScheduleRequest":{"type":"object","properties":{"capability_grant":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CapabilityGrant"}]},"connectors":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ConnectorBindingRequest"}},"enabled_plugin_ids":{"type":["array","null"],"items":{"type":"string"}},"instruction":{"type":["string","null"]},"local_time":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/WallClockTime"}]},"missed_run_policy":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/MissedRunPolicy"}]},"model_policy":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ModelPolicy"}]},"recurrence":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Recurrence"}]},"space_id":{"type":["string","null"]},"timezone":{"type":["string","null"]},"title":{"type":["string","null"]}}},"WallClockTime":{"type":"object","required":["hour","minute"],"properties":{"hour":{"type":"integer","format":"int32","minimum":0},"minute":{"type":"integer","format":"int32","minimum":0}}},"LabelAffectedIdsResponse":{"type":"object","required":["memories","sources","entities","threads","truncated","limit_per_type"],"properties":{"entities":{"type":"array","items":{"type":"string"}},"limit_per_type":{"type":"integer","minimum":0},"memories":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"string"}},"threads":{"type":"array","items":{"type":"string"}},"truncated":{"type":"boolean"}}},"LabelApplyRequest":{"type":"object","required":["plan_id"],"properties":{"plan_id":{"type":"string"}}},"LabelImpactCountsResponse":{"type":"object","required":["memories","sources","entities","threads","total"],"properties":{"entities":{"type":"integer","format":"int64","minimum":0},"memories":{"type":"integer","format":"int64","minimum":0},"sources":{"type":"integer","format":"int64","minimum":0},"threads":{"type":"integer","format":"int64","minimum":0},"total":{"type":"integer","format":"int64","minimum":0}}},"LabelLifecyclePlanResponse":{"type":"object","required":["action","plan_id","source","affected","affected_ids","duplicate_assignments","memories_preserved","can_apply"],"properties":{"action":{"type":"string"},"affected":{"$ref":"#/components/schemas/LabelImpactCountsResponse"},"affected_ids":{"$ref":"#/components/schemas/LabelAffectedIdsResponse"},"can_apply":{"type":"boolean"},"duplicate_assignments":{"type":"integer","format":"int64","minimum":0},"memories_preserved":{"type":"boolean"},"plan_id":{"type":"string"},"source":{"$ref":"#/components/schemas/LabelLifecycleSummaryResponse"},"target":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LabelLifecycleSummaryResponse"}]}}},"LabelLifecycleSummaryResponse":{"type":"object","required":["id","name","canonical_name","color","description"],"properties":{"canonical_name":{"type":"string"},"color":{"type":"string"},"description":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"}}},"LabelMergeApplyRequest":{"type":"object","required":["target_label_id","plan_id"],"properties":{"plan_id":{"type":"string"},"target_label_id":{"type":"string"}}},"LabelMergePreviewRequest":{"type":"object","required":["target_label_id"],"properties":{"target_label_id":{"type":"string"}}},"LabelMutationResponse":{"type":"object","required":["action","plan_id","source_label_id","affected","affected_ids","duplicate_assignments","already_applied"],"properties":{"action":{"type":"string"},"affected":{"$ref":"#/components/schemas/LabelImpactCountsResponse"},"affected_ids":{"$ref":"#/components/schemas/LabelAffectedIdsResponse"},"already_applied":{"type":"boolean"},"duplicate_assignments":{"type":"integer","format":"int64","minimum":0},"plan_id":{"type":"string"},"source_label_id":{"type":"string"},"target_label_id":{"type":["string","null"]}}},"FeedEventVisibilityRequest":{"type":"object","required":["hidden"],"properties":{"hidden":{"type":"boolean","description":"Hide this immutable Timeline event from the current viewer."}}},"FeedEventVisibilityResponse":{"type":"object","required":["success","event_id","hidden"],"properties":{"event_id":{"type":"string"},"hidden":{"type":"boolean"},"success":{"type":"boolean"}}},"FeedEventsResponse":{"type":"object","required":["offset","limit","has_more","events"],"properties":{"events":{"type":"array","items":{},"description":"Heterogeneous immutable Timeline events. Review events include a\n`review` object with state, accepted/recommended actions, unattended\nno-change resolution, and an absolute expiry timestamp."},"has_more":{"type":"boolean"},"limit":{"type":"integer","format":"int64"},"offset":{"type":"integer","format":"int64"},"total":{"type":["integer","null"],"format":"int64"}}},"TimelineReviewAction":{"type":"string","enum":["keep_newer_as_latest","keep_older_as_latest","keep_both_linked","no_change_needed","dismiss","custom_note_only"]},"TimelineReviewResolveRequest":{"type":"object","properties":{"action":{"type":["string","null"],"description":"Legacy backend action retained for older app clients."},"memory_ids":{"type":["array","null"],"items":{"type":"string"},"description":"Optional evidence IDs. Every supplied ID must belong to the event."},"plan_id":{"type":["string","null"],"description":"Exact plan from the evidence the caller reviewed."},"preview":{"type":["boolean","null"],"description":"Return the evidence snapshot and plan without settling the event."},"resolution":{"type":["string","null"],"description":"Legacy resolution label retained for older app clients."},"resolution_metadata":{"description":"Plan-backed cleanup detail retained for the existing Timeline UI."},"resolution_note":{"type":["string","null"],"description":"Decision note; required for `custom_note_only`.","maxLength":1000},"review_action":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TimelineReviewAction","description":"Preferred semantic action. The server validates it against the stored\nevent family before any graph mutation."}]}}},"TimelineReviewResolveResponse":{"type":"object","required":["success","event_id","resolution","already_resolved"],"properties":{"action":{"type":["string","null"]},"action_result":{},"already_resolved":{"type":"boolean","description":"True when another client or policy resolved this immutable review first.\nThe response carries that persisted decision and performs no mutation."},"event_id":{"type":"string"},"resolution":{"type":"string"},"resolution_note":{"type":["string","null"]},"success":{"type":"boolean"}}},"EmbeddingInput":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"EmbeddingVector":{"oneOf":[{"type":"array","items":{"type":"number","format":"float"}},{"type":"string"}]},"EvolvesRevisionApplyRequest":{"type":"object","required":["memory_ids","decision","plan_id"],"properties":{"authoritative_memory_id":{"type":["string","null"]},"decision":{"type":"string","description":"`keep_memory`, `keep_both_linked`, or `mark_unrelated`."},"keep_both_relation":{"type":["string","null"],"description":"`confirms` or `challenges`; required only for `keep_both_linked`."},"memory_ids":{"type":"array","items":{"type":"string"}},"plan_id":{"type":"string"},"reason":{"type":["string","null"],"maxLength":1000}}},"EvolvesRevisionEdgeResponse":{"type":"object","required":["from_memory_id","to_memory_id","relation","confidence","reviewed","detected_by","reason"],"properties":{"confidence":{"type":"number","format":"double"},"detected_by":{"type":"string"},"from_memory_id":{"type":"string"},"reason":{"type":"string"},"relation":{"type":"string"},"reviewed":{"type":"boolean"},"to_memory_id":{"type":"string"}}},"EvolvesRevisionMemoryResponse":{"type":"object","required":["id","title","is_latest","lifecycle_state","space_id","created_at"],"properties":{"created_at":{},"id":{"type":"string"},"is_latest":{"type":"boolean"},"lifecycle_state":{"type":"string"},"space_id":{"type":"string"},"title":{"type":"string"}}},"EvolvesRevisionPlanResponse":{"type":"object","required":["plan_id","decision","memories","memory_contents","current_edges","memories_preserved","can_apply"],"properties":{"authoritative_memory_id":{"type":["string","null"]},"can_apply":{"type":"boolean"},"cannot_apply_reason":{"type":["string","null"]},"current_edges":{"type":"array","items":{"$ref":"#/components/schemas/EvolvesRevisionEdgeResponse"}},"decision":{"type":"string"},"memories":{"type":"array","items":{"$ref":"#/components/schemas/EvolvesRevisionMemoryResponse"}},"memories_preserved":{"type":"boolean"},"memory_contents":{"type":"object","description":"Complete authorized bodies from the plan's snapshot, keyed by Memory ID.\nPreview only; omitted from apply responses and persisted receipts.","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}},"plan_id":{"type":"string"},"target_relation":{"type":["string","null"]}}},"EvolvesRevisionPreviewRequest":{"type":"object","required":["memory_ids","decision"],"properties":{"authoritative_memory_id":{"type":["string","null"]},"decision":{"type":"string","description":"`keep_memory`, `keep_both_linked`, or `mark_unrelated`."},"keep_both_relation":{"type":["string","null"],"description":"`confirms` or `challenges`; required only for `keep_both_linked`."},"memory_ids":{"type":"array","items":{"type":"string"}},"reason":{"type":["string","null"],"maxLength":1000}}},"EvolvesRevisionResultResponse":{"type":"object","required":["plan_id","decision","memories","removed_edges","already_applied","labels_preserved"],"properties":{"already_applied":{"type":"boolean"},"authoritative_memory_id":{"type":["string","null"]},"decision":{"type":"string"},"labels_preserved":{"type":"boolean"},"memories":{"type":"array","items":{"$ref":"#/components/schemas/EvolvesRevisionMemoryResponse"}},"plan_id":{"type":"string"},"relation":{"type":["string","null"]},"removed_edges":{"type":"integer","format":"int64","minimum":0}}},"DataTransferErrorResponse":{"type":"object","required":["detail"],"properties":{"detail":{"type":"string"}}},"AgentProfilePatchPayload":{"type":"object","description":"Public wire contract for a partial Agent profile update.\n\nThe runtime handler deliberately keeps a JSON map so it can distinguish an\nomitted field from a present `null` or empty value. This type is the\ncode-first OpenAPI contract for the same canonical field set.","properties":{"defaultSpaceId":{"type":["string","null"]},"description":{"type":["string","null"]},"displayName":{"type":["string","null"]},"hostAgentId":{"type":["string","null"]},"instructions":{"type":["string","null"]},"role":{"type":["string","null"]},"sourceApp":{"type":["string","null"]},"tags":{"type":["array","null"],"items":{"type":"string"}}},"additionalProperties":false},"AgentIdentityCard":{"type":"object","required":["nowledge_identity_card","profile","exported_at"],"properties":{"exported_at":{"type":"string"},"nowledge_identity_card":{"type":"integer","format":"int64"},"profile":{"$ref":"#/components/schemas/AgentProfileResponse"}}},"AgentIdentityImportPayload":{"type":"object","required":["nowledge_identity_card","profile"],"properties":{"force":{"type":["boolean","null"],"description":"Replace an existing profile with the same canonical ID."},"nowledge_identity_card":{"type":"integer","format":"int64"},"profile":{"$ref":"#/components/schemas/AgentProfileCardPayload"}}},"AgentIdentityImportResponse":{"type":"object","required":["profile","imported"],"properties":{"imported":{"type":"boolean"},"profile":{"$ref":"#/components/schemas/AgentProfileResponse"}}},"AgentKeyUsageResponse":{"type":"object","required":["key_id","created_at","revoked","legacy_name_match"],"properties":{"agent_label":{"type":["string","null"]},"created_at":{"type":"string"},"key_id":{"type":"string"},"last_used_at":{"type":["string","null"]},"legacy_name_match":{"type":"boolean"},"member_id":{"type":["string","null"]},"revoked":{"type":"boolean"}}},"AgentProfileCardPayload":{"type":"object","required":["id"],"properties":{"defaultSpaceId":{"type":["string","null"]},"description":{"type":["string","null"]},"displayName":{"type":["string","null"]},"hostAgentId":{"type":["string","null"]},"id":{"type":"string"},"instructions":{"type":["string","null"]},"role":{"type":["string","null"]},"sourceApp":{"type":["string","null"]},"tags":{"type":["array","null"],"items":{"type":"string"}}},"additionalProperties":false},"AgentProfileUsageResponse":{"type":"object","required":["agent_profile_id","memories_created","spaces_touched","keys","computed_at"],"properties":{"agent_profile_id":{"type":"string"},"computed_at":{"type":"string"},"keys":{"type":"array","items":{"$ref":"#/components/schemas/AgentKeyUsageResponse"}},"last_key_used_at":{"type":["string","null"]},"last_memory_at":{"type":["string","null"]},"memories_created":{"type":"integer","format":"int64"},"spaces_touched":{"type":"array","items":{"type":"string"}}}},"RestoreMergedSkillResponse":{"type":"object","required":["id","stage","unmerged_from"],"properties":{"id":{"type":"string"},"stage":{"type":"string"},"unmerged_from":{"type":"string"}}},"IngestFileUploadRequest":{"type":"object","description":"Typed multipart body for `POST /sources/ingest/file`.","required":["file"],"properties":{"attachment_reference":{"type":["string","null"],"description":"JSON-encoded Thread attachment reference. When present, the server\nvalidates it against authoritative message metadata and authors capture\nprovenance; clients cannot supply provenance through `metadata`."},"file":{"type":"string","description":"File payload. The complete multipart request is limited to 32 MiB or the\noperator's lower process-wide request limit.","contentMediaType":"application/octet-stream"},"labels":{"type":["string","null"],"description":"Comma-separated label names."},"metadata":{"type":["string","null"],"description":"Optional JSON object merged into Source metadata."},"pdf_render_scale":{"type":["number","null"],"format":"float","description":"PDFium render scale for scanned-PDF vision/OCR pages.","maximum":2,"minimum":0.5},"processing_mode":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SourceProcessingMode","description":"`interactive` prioritizes immediate native-text availability."}]},"space_id":{"type":["string","null"],"description":"Existing Space to store the Source in."},"user_comment":{"type":["string","null"],"description":"Optional note stored with the Source."}}},"SourceProcessingMode":{"type":"string","enum":["complete","interactive"]},"MemoryReindexSample":{"type":"object","required":["id","title"],"properties":{"id":{"type":"string"},"last_reindexed_at":{"type":["string","null"]},"title":{"type":"string"},"updated_at":{"type":["string","null"]}}},"GuardedReviewLabel":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"GuardedReviewMemory":{"type":"object","required":["id","title","content","space_id","lifecycle_state","is_latest","created_at","evidence_fields","labels"],"properties":{"content":{"type":"string"},"created_at":{},"evidence_fields":{"type":"object","additionalProperties":{},"propertyNames":{"type":"string"}},"id":{"type":"string"},"is_latest":{"type":"boolean"},"labels":{"type":"array","items":{"$ref":"#/components/schemas/GuardedReviewLabel"}},"lifecycle_state":{"type":"string"},"space_id":{"type":"string"},"title":{"type":"string"}}},"GuardedReviewPhase":{"type":"string","enum":["preview","apply"]},"GuardedReviewPlan":{"type":"object","required":["plan_id","action","memories","current_edges","from_memory_id","to_memory_id","relation","can_apply"],"properties":{"action":{"$ref":"#/components/schemas/TimelineReviewAction"},"can_apply":{"type":"boolean"},"cannot_apply_reason":{"type":["string","null"]},"current_edges":{"type":"array","items":{}},"from_memory_id":{"type":"string"},"memories":{"type":"array","items":{"$ref":"#/components/schemas/GuardedReviewMemory"}},"plan_id":{"type":"string"},"relation":{"type":"string"},"to_memory_id":{"type":"string"}}},"GuardedReviewResult":{"type":"object","required":["success","event_id"],"properties":{"action":{"type":["string","null"]},"action_result":{"description":"Original backend effect detail, never reconstructed on retry."},"already_resolved":{"type":["boolean","null"]},"event_id":{"type":"string"},"preview":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/GuardedReviewPlan"}]},"projection_pending":{"type":["boolean","null"]},"receipt":{"description":"Original semantic receipt, null for historical decisions without one."},"resolution":{"type":["string","null"]},"resolution_note":{"type":["string","null"]},"success":{"type":"boolean"}}},"GuardedTimelineReviewRequest":{"type":"object","description":"Documentation mirror of the protocol-only nmem-wire request. The live\nroute deserializes the shared request; contract tests compare both forms.","required":["phase","action"],"properties":{"action":{"$ref":"#/components/schemas/TimelineReviewAction"},"memory_ids":{"type":["array","null"],"items":{"type":"string"}},"phase":{"$ref":"#/components/schemas/GuardedReviewPhase"},"plan_id":{"type":["string","null"],"description":"Exact plan displayed before applying a graph-changing decision."},"resolution_note":{"type":["string","null"],"maxLength":1000}},"additionalProperties":false},"GuardedTimelineReviewResponse":{"type":"object","required":["protocol_version","success","event_id","result","message"],"properties":{"action":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TimelineReviewAction","description":"Semantic action from the preview or stored decision, not the retry request."}]},"event_id":{"type":"string"},"message":{"type":"string"},"protocol_version":{"type":"integer","format":"int32","example":1,"minimum":0},"result":{"$ref":"#/components/schemas/GuardedReviewResult"},"success":{"type":"boolean"}}},"ThreadDeletionErrorResponse":{"type":"object","additionalProperties":true,"required":["detail"],"description":"App deletion error. Optional progress fields preserve confirmed prior commits. Cloud and admission failures may return only detail. This is not an all-or-nothing rollback guarantee.","properties":{"detail":{"type":"string"},"deleted":{"type":"boolean","description":"Whether the parent Thread deletion was confirmed."},"deleted_messages":{"type":"integer","minimum":0},"deleted_memories":{"type":"integer","minimum":0,"description":"Confirmed Memory deletions, including commits before a later failure. Never inferred from the requested cascade flag."},"partial_success":{"type":"boolean","description":"Some deletions committed while the overall operation did not fully complete. Absence is not proof of rollback."},"index_repair_pending":{"type":"boolean","description":"Known search projection repair remains pending after the reported graph outcomes."},"deletion_outcome_uncertain":{"type":"boolean","description":"At least one submitted graph outcome could not be confirmed. Counts include only confirmed commits; refresh before retrying."}}},"MemoryPolicyPatch":{"type":"object","additionalProperties":false,"description":"Extraction-only settings. Omitted or null fields inherit the stored policy; an explicit empty list clears the inherited list. Text is trimmed before server validation. This is not an authorization policy or a Context Rule.","properties":{"density":{"type":["string","null"],"enum":["focused","balanced","comprehensive",null],"description":"Maximum retained candidates: focused 1, balanced 3, comprehensive 5. Grounding and durability review still apply."},"detail":{"type":["string","null"],"enum":["concise","balanced","detailed",null]},"priorities":{"anyOf":[{"type":"array","maxItems":12,"items":{"type":"string","maxLength":200}},{"type":"null"}]},"exclusions":{"anyOf":[{"type":"array","maxItems":12,"items":{"type":"string","maxLength":200}},{"type":"null"}]},"additionalInstructions":{"type":["string","null"],"maxLength":2000,"description":"One-run extraction guidance; cannot override source fidelity or access boundaries."}}},"EmbeddingRuntime":{"properties":{"identity":{"type":"string","title":"Identity","description":"The embedder these counts describe, as `provider/model`, or `local` for the on-device embedder."},"attempted":{"type":"integer","title":"Attempted","description":"Query embeddings attempted in this window. Equals `succeeded + timed_out + failed`."},"succeeded":{"type":"integer","title":"Succeeded"},"timed_out":{"type":"integer","title":"Timed Out","description":"Attempts abandoned at `wait_budget_seconds`. Each one answered the search with keyword-only results."},"failed":{"type":"integer","title":"Failed","description":"Attempts that ended in an error rather than a timeout: auth, quota, network and malformed responses alike. Not separated further, because the search path cannot tell them apart."},"last_success_latency_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Success Latency Ms","description":"How long the most recent SUCCESSFUL query embedding took. Null until one succeeds in this window. Never derived from a timed-out call, whose elapsed time is the budget rather than a measurement of the provider."},"wait_budget_seconds":{"type":"number","title":"Wait Budget Seconds","description":"The wait a query embedding gets before the search degrades to keyword-only, resolved as explicit setting, then environment override, then default."},"window_started_at_unix":{"type":"integer","title":"Window Started At Unix","description":"Unix seconds when this window opened."}},"type":"object","required":["identity","attempted","succeeded","timed_out","failed","last_success_latency_ms","wait_budget_seconds","window_started_at_unix"],"title":"EmbeddingRuntime","description":"What real searches got from the active embedding provider, since this window opened. Process-local and not persisted: a restart opens a fresh window, and so does a change of embedder identity or of the wait budget, because counts gathered under a configuration the user has left no longer describe the one in force. Present with zero counts before the first search rather than absent, so a client can judge a connection test against the wait before any search has run."},"EntityAliasChangeSchema":{"type":"object","required":["expected_revision","expected_aliases"],"properties":{"add":{"type":"array","items":{"type":"string"}},"expected_aliases":{"type":"array","items":{"type":"string"}},"expected_revision":{"type":"integer","format":"int64","minimum":0},"remove":{"type":"array","items":{"type":"string"}}}},"EntityAliasStateSchema":{"type":"object","required":["entity_id","name","aliases","rejected_aliases","revision"],"properties":{"aliases":{"type":"array","items":{"type":"string"}},"entity_id":{"type":"string"},"name":{"type":"string"},"rejected_aliases":{"type":"array","items":{"type":"string"}},"revision":{"type":"integer","format":"int64","minimum":0}}},"IdentityOccurrence":{"type":"object","properties":{"mention_id":{"type":"string","description":"Opaque occurrence ID from this evidence response."},"start":{"type":"integer","minimum":0,"description":"Zero-based Unicode scalar-value offsets into the current Memory text, with an exclusive end. These are not UTF-8 byte or JavaScript UTF-16 offsets."},"end":{"type":"integer","minimum":0,"description":"Zero-based Unicode scalar-value offsets into the current Memory text, with an exclusive end. These are not UTF-8 byte or JavaScript UTF-16 offsets."},"surface":{"type":"string","description":"The exact source text covered by this occurrence."},"identity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Assigned profile ID, or null for unresolved/unknown."},"origin":{"type":"string","enum":["machine","human"]},"revision":{"type":"integer","minimum":0}},"required":["mention_id","start","end","surface","identity_id","origin","revision"]},"IdentityEvidence":{"type":"object","properties":{"memory_id":{"type":"string"},"space_id":{"type":"string","description":"Exact Space ID. Pass explicitly; this operation does not infer the active Space or broaden to other Spaces."},"source_revision":{"type":"string","description":"Source fingerprint used for optimistic concurrency; copy from the latest read."},"epoch":{"type":"string","description":"Ledger incarnation; copy into expected_epoch for a correction."},"generation":{"type":"integer","minimum":0},"occurrences":{"type":"array","items":{"$ref":"#/components/schemas/IdentityOccurrence"}}},"required":["memory_id","space_id","source_revision","epoch","generation","occurrences"]},"IdentityProfile":{"type":"object","properties":{"id":{"type":"string","description":"Opaque profile ID returned by this server. Same-name profiles have distinct IDs."},"revision":{"type":"integer","minimum":0},"kind":{"type":"string","enum":["human","agent","unknown"],"description":"Descriptive identity kind; it grants no account membership or permissions."},"names":{"type":"array","items":{"type":"string"}},"context":{"type":"array","items":{"type":"string"}},"subject":{"anyOf":[{"$ref":"#/components/schemas/IdentitySubject"},{"type":"null"}],"description":"Linked AI Identity or member; null for people and Agents known only from content. A link whose AI Identity was deleted or whose member left is still returned."}},"required":["id","revision","kind","names","context"]},"IdentityExtractionSpan":{"type":"object","properties":{"start":{"type":"integer","minimum":0,"description":"Zero-based Unicode scalar-value offsets into the current Memory text, with an exclusive end. These are not UTF-8 byte or JavaScript UTF-16 offsets."},"end":{"type":"integer","minimum":0,"description":"Zero-based Unicode scalar-value offsets into the current Memory text, with an exclusive end. These are not UTF-8 byte or JavaScript UTF-16 offsets."}},"required":["start","end"],"additionalProperties":false},"IdentityExtractionRequest":{"type":"object","properties":{"space_id":{"type":"string","description":"Exact Space ID. Pass explicitly; this operation does not infer the active Space or broaden to other Spaces."},"mention_ids":{"anyOf":[{"type":"array","items":{"type":"string"},"maxItems":100},{"type":"null"}],"description":"Omit or set null for initial extraction only, with no new_spans. An explicit array selects existing machine occurrences; an empty array can accompany new_spans. Human decisions cannot be overwritten."},"new_spans":{"type":"array","items":{"$ref":"#/components/schemas/IdentityExtractionSpan"},"maxItems":100,"default":[],"description":"Optional nonempty, non-overlapping source spans (start must be less than end). Requires an explicit mention_ids array. A span overlapping existing machine evidence must fully contain each overlapping occurrence and explicitly select its mention ID. Overlapping human evidence is rejected."}},"required":["space_id"],"additionalProperties":false},"IdentityCorrectionRequest":{"type":"object","properties":{"space_id":{"type":"string","description":"Exact Space ID. Pass explicitly; this operation does not infer the active Space or broaden to other Spaces."},"source_revision":{"type":"string","description":"Copy from the latest IdentityEvidence."},"expected_epoch":{"type":"string","description":"Copy epoch from the latest IdentityEvidence."},"expected_generation":{"type":"integer","minimum":0},"mention_id":{"type":"string","description":"Occurrence to correct."},"expected_revision":{"type":"integer","minimum":0},"identity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required even when null: null records an explicit human-confirmed unknown decision; omission is invalid."}},"required":["space_id","source_revision","expected_epoch","expected_generation","mention_id","expected_revision","identity_id"],"additionalProperties":false},"IdentityProfileWrite":{"type":"object","properties":{"space_id":{"type":"string","description":"Exact Space ID. Pass explicitly; this operation does not infer the active Space or broaden to other Spaces."},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required: explicit null creates a new independent profile; an existing ID updates that profile."},"expected_revision":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Null or omitted on creation; required and equal to the current revision on update."},"name":{"type":"string","description":"Nonblank display name, at most 512 UTF-8 bytes."},"aliases":{"type":"array","items":{"type":"string","description":"Nonblank alias, at most 512 UTF-8 bytes."},"maxItems":32},"context":{"type":"string","description":"Disambiguating context, at most 8192 UTF-8 bytes. An empty string is allowed."},"kind":{"type":"string","enum":["human","agent","unknown"],"description":"Descriptive identity kind; it grants no account membership or permissions."},"subject":{"anyOf":[{"$ref":"#/components/schemas/IdentitySubject"},{"type":"null"}],"description":"Optional. Omit to keep the current link; null removes it; an object links the profile to an enrolled AI Identity (kind must be agent) or an active member (kind must be human). The subject must be available when set, and at most one profile per Space may link to it."}},"required":["space_id","id","name","aliases","context","kind"],"additionalProperties":false,"oneOf":[{"properties":{"id":{"type":"null"},"expected_revision":{"type":"null"}}},{"required":["expected_revision"],"properties":{"id":{"type":"string"},"expected_revision":{"type":"integer","minimum":0}}}]},"IdentityOperationError":{"type":"object","properties":{"detail":{"type":"string","description":"Safe message explaining this cause."},"error_code":{"type":"string","description":"Registered cause identifier. Do not infer the cause from status or message text."},"retryable":{"type":"boolean","description":"Whether the same operation may be retried after the transient cause clears. Evidence/profile conflicts can instead require a fresh read."}},"required":["detail","error_code","retryable"]},"IdentitySubject":{"description":"An accountable identity that a content profile denotes. Linking grants no membership or permissions. AI Identity links retain their original roster incarnation even after deletion, replacement or import.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"agent_identity"},"id":{"type":"string","minLength":1,"maxLength":256},"reference":{"type":["string","null"],"description":"Opaque scoped incarnation from AgentProfileResponse.identityReference. Copy the observed value when linking; a stale or foreign reference is rejected. Omitted/null historical references remain unverified. Explicitly linking an uninitialized legacy roster identity with null may initialize its reference."}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"member"},"id":{"type":"string","minLength":1,"maxLength":256}},"required":["kind","id"],"additionalProperties":false}]},"NativeSourceOperation":{"type":"object","properties":{"version":{"type":"integer","enum":[1]},"kind":{"type":"string","enum":["source_derived"]},"assessment":{"type":"string","enum":["source_support","human_ruling"]},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["thread"]},"thread_id":{"type":"string","minLength":1},"message_ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":10000,"uniqueItems":true}},"required":["kind","thread_id","message_ids"],"additionalProperties":false}},"required":["version","kind","assessment","source"],"additionalProperties":false,"description":"Explicit scheduled native source-derived Thread operation. Recorded roles and source references do not authenticate humans or establish adoption. The host restores the original scheduled task funding and assesses each exact candidate before publication. Authored intent, inline transcript overrides, conflicting selectors and foreign/unreadable Space are rejected. Omit the field for unchanged deterministic distillation. No caller root, grant, provider or cancellation authority is accepted."}}}}