{"openapi":"3.1.0","info":{"title":"MemClaw","version":"2.8.0"},"paths":{"/api/v1/version":{"get":{"tags":["System"],"summary":"Version","operationId":"version_api_v1_version_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/whoami":{"get":{"tags":["System"],"summary":"Whoami","description":"Identity probe — returns the caller's resolved (tenant_id, agent_id)\nalong with the resolution source. A single round-trip answers ~80% of\n\"is my integration wired correctly?\" debugging during plugin / SDK\nbootstrap (friction §2.1, §2.8 / Stage 7).\n\nResolution priority mirrors MCPAuthMiddleware:\n  gateway-header — X-Tenant-ID (and optionally X-Agent-ID) injected\n                   by the enterprise gateway after auth_request\n  standalone     — settings.is_standalone fixed tenant\n  anonymous      — no auth resolved (caller will hit 401 on first\n                   write; this endpoint stays open as a probe)","operationId":"whoami_api_v1_whoami_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Whoami Api V1 Whoami Get"}}}}}}},"/api/v1/tool-descriptions":{"get":{"tags":["System"],"summary":"Tool Descriptions","description":"Return tool descriptions, derived from the SoT registry.\n\nDefault: ``{name: description}`` (backward compatible).\nWith ``?enriched=true``: ``{name: {description, stm_only}}``.\n\nThe registry is the single source of truth — ``stm_only`` is\nderived from ``spec.plugin_exposed`` (inverted).","operationId":"tool_descriptions_api_v1_tool_descriptions_get","parameters":[{"name":"enriched","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Enriched"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health":{"get":{"tags":["System"],"summary":"Health","description":"Liveness + readiness probe.\n\nReturns 503 when any required dependency is unavailable so deploy\ngates and Cloud Run health checks can fail-fast on status code alone.\nRequired deps:\n  - storage (core-storage-api): always\n  - redis:                      only when ``settings.redis_url`` is set\n                                (empty url = in-memory fallback, OSS default)\n  - event_bus:                  ``InProcessEventBus`` always reports ok;\n                                ``PubSubEventBus`` reports ``unhealthy``\n                                when a pull loop has halted on a permanent\n                                subscription / IAM error.\n\nNon-critical issues (platform provider init errors) flip status to\n``\"degraded\"`` but keep a 200 — the app can still serve requests.","operationId":"health_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/status":{"get":{"tags":["System"],"summary":"Status ","description":"Public service-fingerprint endpoint — version, mode, providers, deps.\n\nDistinct from ``/health`` (which returns 503 to fail deploy gates) and\n``/stats`` (which returns row counts). ``/status`` describes the *shape*\nof the running service: which models are loaded, which dependencies\nanswer, what version is deployed.\n\nProvider names and model identifiers are intentional public knowledge\n(already in marketing copy and the FAQ). Secrets — API keys, GCP\nproject IDs / locations, internal hostnames, raw SDK error strings —\nare NEVER surfaced; ``platform_init_errors`` reports the symbolic tag\nset populated by ``init_platform_providers`` (e.g. ``\"vertex-llm-config\"``,\n``\"openai-embedding\"``), never the underlying message.","operationId":"status__api_v1_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Status  Api V1 Status Get"}}}}}}},"/api/v1/tenants":{"get":{"tags":["Memory"],"summary":"List Tenants","description":"Return distinct tenant IDs that have memories.","operationId":"list_tenants_api_v1_tenants_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/fleets":{"get":{"tags":["Memory"],"summary":"List Fleets","description":"Return distinct fleet_ids with memory counts.","operationId":"list_fleets_api_v1_fleets_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/memories":{"get":{"tags":["Memory"],"summary":"List Memories","description":"List memories with filtering, sorting, and pagination.\n\n**Visibility scoping:** When ``agent_id`` is provided, the caller can see\ntheir own ``scope_agent`` memories plus all ``scope_team``/``scope_org``\nmemories. When ``agent_id`` is omitted, ``scope_agent`` memories are hidden\n(safe default). This means memory types like ``insight`` that are typically\ncreated with agent-scoped visibility will only appear when ``agent_id`` is\npassed.\n\n**Pagination:** Both cursor-based and offset-based pagination are supported.\nCursor pagination (via ``cursor``) is recommended for large datasets and only\nworks with ``sort=created_at&order=desc``. Offset pagination works with any\nsort order.","operationId":"list_memories_api_v1_memories_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"}},{"name":"fleet_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},{"name":"memory_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"visibility","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visibility"}},{"name":"run_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^(created_at|weight|memory_type|agent_id|status|recall_count|fleet_id|tenant_id|expires_at|deleted_at)$","default":"created_at","title":"Sort"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","default":"desc","title":"Order"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Deleted"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedMemoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Memory"],"summary":"Delete All Memories","description":"Soft-delete all matching memories for a tenant.\n\nBody fields (all optional):\n\n* ``exclude_ids``: list of UUID strings to skip from the soft-delete.\n* ``metadata_filter``: dict of equality matches against\n  ``metadata->>key``. Lets clients (most concretely the load-test\n  harness, tagging rows with ``metadata.load_test_run_id``) clean\n  up by tag in one round-trip instead of paginated enumerate +\n  per-row delete. All entries combine with AND.","operationId":"delete_all_memories_api_v1_memories_delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"fleet_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},{"name":"memory_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Body"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Memory"],"summary":"Write Memory","operationId":"write_memory_api_v1_memories_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/memories/stats":{"get":{"tags":["Memory"],"summary":"Memory Stats","operationId":"memory_stats_api_v1_memories_stats_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"}},{"name":"fleet_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},{"name":"memory_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Deleted"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/memories/bulk-delete":{"post":{"tags":["Memory"],"summary":"Bulk Delete By Ids","description":"Soft-delete memories by a list of IDs.","operationId":"bulk_delete_by_ids_api_v1_memories_bulk_delete_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/memories/{memory_id}":{"get":{"tags":["Memory"],"summary":"Get Memory","description":"Get a single memory with full details including embedding and entity links.","operationId":"get_memory_api_v1_memories__memory_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Memory Id"}},{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Memory"],"summary":"Delete Memory","operationId":"delete_memory_api_v1_memories__memory_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Memory Id"}},{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Memory"],"summary":"Update Memory Endpoint","description":"Update a memory. Only provide fields you want to change.\nIf content changes, embedding and entity extraction are re-run automatically.","operationId":"update_memory_endpoint_api_v1_memories__memory_id__patch","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Memory Id"}},{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/memories/{memory_id}/contradictions":{"get":{"tags":["Memory"],"summary":"Get Contradictions","description":"Return contradiction detector findings for this memory.\n\nThe contradiction detector (services/contradiction_detector.py) runs\nfire-and-forget post-commit on writes and persists its findings via\ntwo side-effects on the memories table:\n\n1. Conflicted/outdated rows get ``status`` set to ``\"conflicted\"`` or\n   ``\"outdated\"``.\n2. The newer (winning) row's ``supersedes_id`` is set to the older\n   (losing) row's id.\n\nThere is no separate ``contradictions`` table — the supersedes chain\n+ status fields ARE the persisted detector output (CAURA-604).\n\nResponse fields (``superseded_by``, ``superseded_memories``) are kept\nintact for back-compat. New fields added in CAURA-604:\n\n- ``detection_status``: ``\"completed\"`` if any contradiction evidence\n  exists for this memory (it has ``supersedes_id`` set, or another\n  row supersedes it, or its own status is outdated/conflicted),\n  otherwise ``\"pending\"``. ``\"pending\"`` means \"no contradictions\n  have been recorded\" — it covers both \"detector ran and found\n  nothing\" and \"detector hasn't run yet\"; the API has no way to\n  distinguish those without re-running detection synchronously,\n  which would side-effect from a GET. We chose the cheap, no-side-\n  effect path (return pending) over an inline re-run.\n- ``contradictions``: detector-shaped findings derived from the\n  persisted chain (id, status, reason, content_preview, direction,\n  created_at). ``reason`` is inferred from the status of the\n  conflicting row: ``outdated`` -> ``rdf_conflict``,\n  ``conflicted`` -> ``semantic_conflict``. ``direction`` is\n  ``superseded_by`` (this memory was replaced by a newer row) or\n  ``supersedes`` (this memory replaced an older row).","operationId":"get_contradictions_api_v1_memories__memory_id__contradictions_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Memory Id"}},{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/memories/bulk":{"post":{"tags":["Memory"],"summary":"Write Memories Bulk","description":"Write up to 100 memories with per-attempt idempotency (CAURA-602).\n\nRequired header ``X-Bulk-Attempt-Id`` identifies the *attempt*. A\nretry of the same logical batch reuses the same value; storage's\nper-item unique constraint then converts each row into either\n``created`` or ``duplicate_attempt`` deterministically. The route\nreturns:\n\n- ``200`` when every item resolved as ``created``,\n  ``duplicate_attempt``, or ``duplicate_content``.\n- ``207 Multi-Status`` when at least one item has ``status=\"error\"``\n  (validation, enrichment timeout, missing storage id) AND at least\n  one item succeeded — partial outcomes are explicit, never inferred\n  from a 5xx with side effects.\n- ``200`` when every item is an error too — the request was processed\n  successfully; per-item ``status`` carries the rejection. We\n  deliberately don't reuse 422 here because FastAPI already emits\n  422 for request-body Pydantic validation, and clients that branch\n  on status code alone shouldn't have to disambiguate \"request was\n  malformed\" from \"request parsed and every item was rejected on\n  merit.\"\n- ``504`` when the bulk-only budget burns before storage commits;\n  the response carries no per-item state, so a retry with the same\n  attempt id is the recovery path.\n\nThe pre-existing ``Idempotency-Key`` header still controls\n*response*-level replay; ``X-Bulk-Attempt-Id`` is a separate\ncontract operating one layer down. Both are honoured: the header\ncache short-circuits when the receipt is final, the per-row\nconstraint resolves the slow path when the receipt is missing or\npending.","operationId":"write_memories_bulk_api_v1_memories_bulk_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"X-Bulk-Attempt-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Bulk-Attempt-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkMemoryCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkMemoryResponse"}}}},"207":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkMemoryResponse"}}},"description":"Multi-Status"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/memories/{memory_id}/status":{"patch":{"tags":["Memory"],"summary":"Update Memory Status","description":"Update memory status (e.g., active → confirmed).","operationId":"update_memory_status_api_v1_memories__memory_id__status_patch","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Memory Id"}},{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/search":{"post":{"tags":["Memory"],"summary":"Search","operationId":"search_api_v1_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/ingest/preview":{"post":{"tags":["Memory"],"summary":"Ingest Preview Endpoint","description":"Extract facts from a URL or text for preview (no writes).\n\nBody size cap: enforced upstream by ``IngestBodySizeMiddleware`` (PR #9).","operationId":"ingest_preview_endpoint_api_v1_ingest_preview_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/ingest/commit":{"post":{"tags":["Memory"],"summary":"Ingest Commit Endpoint","description":"Write previewed facts as memories.","operationId":"ingest_commit_endpoint_api_v1_ingest_commit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/ingest/file":{"post":{"tags":["Memory"],"summary":"Ingest File Endpoint","description":"PR #9: multipart file upload entry point.\n\nAccepts the same 3 MB cap as JSON / URL ingest. Supported MIMEs:\n- Text formats (md, txt, csv, html): decoded directly.\n- Binary formats (pdf, docx, pptx, xlsx, epub, rtf, odt): routed\n  through Kreuzberg for text extraction.\n\nThe uploaded file's ``Content-Type`` drives dispatch. The Content-Length\ncap is enforced upstream by ``IngestBodySizeMiddleware``; we re-check\nthe extracted payload size here for defense in depth (multipart envelope\noverhead can hide the real payload size from the request header).","operationId":"ingest_file_endpoint_api_v1_ingest_file_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_ingest_file_endpoint_api_v1_ingest_file_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/ingest/undo/{run_id}":{"post":{"tags":["Memory"],"summary":"Ingest Undo Endpoint","description":"A3 (PR #6): soft-delete every memory tagged with the given run_id.\n\nThe undo lever for an entire ingest batch. Filters by the top-level\n``Memory.run_id`` column (indexed as of the parent-doc PR) AND\n``metadata.source = \"ingest\"`` (belt-and-braces — prevents non-ingest\nmemories sharing a run_id from being touched) AND tenant_id ownership.\n\nAlso deletes the parent ``documents`` row for the batch\n(``collection='ingest-sources'``, ``doc_id=<run_id>``) on a best-effort\nbasis — a missing parent isn't an error since older batches predate\nthe parent-doc PR.\n\nReturns ``{\"deleted\": N, \"run_id\": \"...\"}``. ``deleted=0`` is a valid\nresponse (no rows matched — already cleaned up or never existed).","operationId":"ingest_undo_endpoint_api_v1_ingest_undo__run_id__post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/recall":{"post":{"tags":["Memory"],"summary":"Recall Endpoint","description":"Search memories and return an LLM-synthesized context summary.","operationId":"recall_endpoint_api_v1_recall_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/memories/redistribute":{"post":{"tags":["Memory"],"summary":"Redistribute Memories","description":"Bulk-reassign memories to a different agent.\n\nAdmin-only (trust_level >= 3).  Moves memories to ``target_agent_id``,\nauto-promoting ``scope_agent`` → ``scope_team`` to prevent data loss.\n\nCross-fleet moves are intentionally allowed — a primary use case is\nreassigning memories from a central orchestrator to domain specialists\nthat may reside in different fleets.  The admin trust-level requirement\n(>= 3) is the authorization gate instead of fleet scoping.","operationId":"redistribute_memories_api_v1_memories_redistribute_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"agent_id","in":"query","required":true,"schema":{"type":"string","description":"Requesting agent (must be trust_level >= 3)","title":"Agent Id"},"description":"Requesting agent (must be trust_level >= 3)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedistributeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedistributeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/tenants":{"get":{"tags":["Admin"],"summary":"Admin List Tenants","description":"Admin: list all tenant IDs that have memories.","operationId":"admin_list_tenants_api_v1_admin_tenants_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/admin/fleets":{"get":{"tags":["Admin"],"summary":"Admin List Fleets","description":"Admin: list distinct fleet_ids with memory counts.","operationId":"admin_list_fleets_api_v1_admin_fleets_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/memories":{"get":{"tags":["Admin"],"summary":"Admin List Memories","description":"Admin: list memories across all tenants with full pagination.","operationId":"admin_list_memories_api_v1_admin_memories_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"}},{"name":"fleet_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},{"name":"memory_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^(created_at|weight|memory_type|agent_id|status|recall_count|fleet_id|tenant_id|expires_at|deleted_at)$","default":"created_at","title":"Sort"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","default":"desc","title":"Order"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Deleted"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedMemoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/memories/stats":{"get":{"tags":["Admin"],"summary":"Admin Memory Stats","description":"Admin: memory stats across all tenants (or filtered by tenant_id).","operationId":"admin_memory_stats_api_v1_admin_memories_stats_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"}},{"name":"fleet_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entities":{"get":{"tags":["Knowledge Graph"],"summary":"List Entities","description":"List all entities for a tenant.","operationId":"list_entities_api_v1_entities_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"fleet_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"}},{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/graph":{"get":{"tags":["Knowledge Graph"],"summary":"Get Graph","description":"Return full knowledge graph (entities + relations) for a tenant.","operationId":"get_graph_api_v1_graph_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"fleet_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entities/upsert":{"post":{"tags":["Knowledge Graph"],"summary":"Upsert Entity Route","operationId":"upsert_entity_route_api_v1_entities_upsert_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityUpsert"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/entities/{entity_id}":{"get":{"tags":["Knowledge Graph"],"summary":"Get Entity Route","operationId":"get_entity_route_api_v1_entities__entity_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}},{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/relations/upsert":{"post":{"tags":["Knowledge Graph"],"summary":"Upsert Relation Route","operationId":"upsert_relation_route_api_v1_relations_upsert_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationUpsert"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationUpsertOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/audit-log":{"get":{"tags":["Admin"],"summary":"List Audit Log","operationId":"list_audit_log_api_v1_audit_log_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AuditEntry"},"title":"Response List Audit Log Api V1 Audit Log Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/settings":{"get":{"tags":["Auth & Account"],"summary":"Get Tenant Settings","description":"Get tenant settings (API keys masked). Admin can query any tenant.","operationId":"get_tenant_settings_api_v1_settings_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Auth & Account"],"summary":"Update Tenant Settings","description":"Update tenant settings. Accepts partial updates. API keys are encrypted at rest.\n\nAudit attribution: honours ``X-Changed-By`` only when the caller is\nauthenticated via the admin API key (i.e. the enterprise admin-api proxy).\nRegular user requests always use ``auth.user_id`` regardless of the header.","operationId":"update_tenant_settings_api_v1_settings_put","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"}},{"name":"X-Changed-By","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Changed-By"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/settings/providers":{"get":{"tags":["Auth & Account"],"summary":"List Providers","description":"List available LLM providers and models for each function.","operationId":"list_providers_api_v1_settings_providers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/agents":{"get":{"tags":["Admin"],"summary":"List Agents","description":"List all registered agents for a tenant with their trust levels.","operationId":"list_agents_api_v1_agents_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"fleet_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentOut"},"title":"Response List Agents Api V1 Agents Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agents/{agent_id}":{"get":{"tags":["Admin"],"summary":"Get Agent","description":"Get a single agent's details and trust level.","operationId":"get_agent_api_v1_agents__agent_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Agent","description":"Delete an agent. Memories written by this agent are NOT deleted.","operationId":"delete_agent_api_v1_agents__agent_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agents/{agent_id}/trust":{"patch":{"tags":["Admin"],"summary":"Patch Agent Trust","description":"Update an agent's trust level (and optionally fleet).","operationId":"patch_agent_trust_api_v1_agents__agent_id__trust_patch","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTrustUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agents/{agent_id}/fleet":{"patch":{"tags":["Admin"],"summary":"Update Agent Fleet","description":"Reassign an agent's home fleet.","operationId":"update_agent_fleet_api_v1_agents__agent_id__fleet_patch","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agents/{agent_id}/tune":{"get":{"tags":["Admin"],"summary":"Get Agent Tune","description":"Get an agent's current search profile (retrieval tuning parameters).","operationId":"get_agent_tune_api_v1_agents__agent_id__tune_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin"],"summary":"Patch Agent Tune","description":"Update an agent's search profile (per-agent retrieval tuning). Pass ?reset=true to clear.","operationId":"patch_agent_tune_api_v1_agents__agent_id__tune_patch","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"reset","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Reset"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchProfileUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/fleet":{"post":{"tags":["Fleet"],"summary":"Create Fleet","description":"Explicitly create a fleet (team) within a tenant.","operationId":"create_fleet_api_v1_fleet_post","security":[{"APIKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FleetCreateIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Fleet"],"summary":"List Fleets","description":"List distinct fleets for a tenant with node counts.","operationId":"list_fleets_api_v1_fleet_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/fleet/{fleet_id}":{"delete":{"tags":["Fleet"],"summary":"Delete Fleet","description":"Delete a fleet and all its nodes. Memories are NOT deleted (they retain fleet_id for history).","operationId":"delete_fleet_api_v1_fleet__fleet_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"fleet_id","in":"path","required":true,"schema":{"type":"string","title":"Fleet Id"}},{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/fleet/heartbeat":{"post":{"tags":["Fleet"],"summary":"Heartbeat","description":"Plugin pushes status; receives pending commands in response.","operationId":"heartbeat_api_v1_fleet_heartbeat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeartbeatIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/fleet/commands/{command_id}/result":{"post":{"tags":["Fleet"],"summary":"Command Result","description":"Plugin reports command completion.","operationId":"command_result_api_v1_fleet_commands__command_id__result_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"command_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Command Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResultIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/fleet/nodes":{"get":{"tags":["Fleet"],"summary":"List Nodes","description":"List fleet nodes for a tenant with computed status.","operationId":"list_nodes_api_v1_fleet_nodes_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"fleet_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/fleet/stats":{"get":{"tags":["Fleet"],"summary":"Fleet Stats","description":"Per-agent and fleet-level memory stats for the Fleet UI.","operationId":"fleet_stats_api_v1_fleet_stats_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"fleet_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/fleet/commands":{"post":{"tags":["Fleet"],"summary":"Create Command","description":"Queue a command for a fleet node.","operationId":"create_command_api_v1_fleet_commands_post","security":[{"APIKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Fleet"],"summary":"List Commands","description":"List recent commands for a tenant, optionally filtered by node.","operationId":"list_commands_api_v1_fleet_commands_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Node Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents":{"post":{"tags":["Document Store"],"summary":"Upsert Document","description":"Upsert a document. If collection+doc_id exists, data is replaced.","operationId":"upsert_document_api_v1_documents_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocWriteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Document Store"],"summary":"List Documents","description":"List all documents in a collection.\n\nCross-tenant credentials may pass any tenant in their readable set\n(one-tenant-at-a-time; the aggregate ``list_collections`` view widens).","operationId":"list_documents_api_v1_documents_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"collection","in":"query","required":true,"schema":{"type":"string","title":"Collection"}},{"name":"fleet_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/collections":{"get":{"tags":["Document Store"],"summary":"List Collections","description":"Enumerate document collections in the tenant. Mirror of MCP\n``memclaw_doc op=list_collections``. Returns one row per collection\nwith the per-collection document count.\n\nCross-tenant credentials see collections across every tenant in their\nreadable set; counts merge by collection name. Pinning ``tenant_id``\nto a single tenant in the readable set scopes the result to that\ntenant's collections.","operationId":"list_collections_api_v1_documents_collections_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"fleet_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/{doc_id}":{"get":{"tags":["Document Store"],"summary":"Get Document","description":"Get a single document by collection + doc_id.\n\nCross-tenant credentials may pass any ``tenant_id`` in their readable\nset; the gate widens via ``enforce_readable_tenant``. Single-tenant\nbehavior unchanged.","operationId":"get_document_api_v1_documents__doc_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}},{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"collection","in":"query","required":true,"schema":{"type":"string","title":"Collection"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Document Store"],"summary":"Delete Document","description":"Delete a document by collection + doc_id.","operationId":"delete_document_api_v1_documents__doc_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}},{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"collection","in":"query","required":true,"schema":{"type":"string","title":"Collection"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/query":{"post":{"tags":["Document Store"],"summary":"Query Documents","description":"Query documents by field equality filters on JSONB data.\n\nCross-tenant credentials may pass any tenant in their readable set\nas ``body.tenant_id`` (one-tenant-at-a-time scope; aggregate-across\nwidening lives on the direct-DB ``memclaw_doc`` MCP path).","operationId":"query_documents_api_v1_documents_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/documents/search":{"post":{"tags":["Document Store"],"summary":"Search Documents","description":"Vector search over indexed documents. Mirror of MCP ``memclaw_doc op=search``.\n\nEmbeds ``body.query`` via the configured embedding provider, then ranks\ndocuments by cosine similarity. ``collection=None`` searches across all\ncollections in the tenant; supplying ``collection`` scopes the search.","operationId":"search_documents_api_v1_documents_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/memclaw/keystones":{"get":{"tags":["Keystones"],"summary":"List Keystones","description":"Return scope-merged keystone rules. No trust gate — reads are\nsafe and the plugin needs this on every session start.\n\nCross-tenant credentials may inspect any tenant in their readable set\nby pinning ``tenant_id`` to it; the read is scoped to that single\ntenant's rules. Aggregate keystone view across the readable set\nisn't exposed here — agents should keep keystones explicitly per\ntenant for scope clarity.","operationId":"list_keystones_api_v1_memclaw_keystones_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"fleet_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Keystones"],"summary":"Upsert Keystone","description":"Upsert a keystone rule. Trust ≥ 1 for self-authored ``scope=agent``\nrules; ≥ 2 otherwise. See module docstring.","operationId":"upsert_keystone_api_v1_memclaw_keystones_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"X-Agent-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Agent-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeystoneSetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/memclaw/keystones/{doc_id}":{"delete":{"tags":["Keystones"],"summary":"Delete Keystone","description":"Remove a keystone rule. Trust ≥ 1 to delete a self-authored\n``scope=agent`` rule; ≥ 2 otherwise. The rule is fetched first so\nthe gate can read the actual scope/agent_id from the stored row\nrather than trusting any caller assertion.","operationId":"delete_keystone_api_v1_memclaw_keystones__doc_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,99}$","title":"Doc Id"}},{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"X-Agent-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Agent-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/crystallize":{"post":{"tags":["Memory Crystallizer"],"summary":"Trigger Crystallization","description":"Trigger crystallization for a tenant (analysis + auto-curate).","operationId":"trigger_crystallization_api_v1_crystallize_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrystallizeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrystallizeResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/crystallize/all":{"post":{"tags":["Memory Crystallizer"],"summary":"Trigger Crystallization All","description":"Trigger crystallization for ALL tenants (nightly batch).","operationId":"trigger_crystallization_all_api_v1_crystallize_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrystallizeAllResult"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/crystallize/reports":{"get":{"tags":["Memory Crystallizer"],"summary":"List Reports","description":"List crystallization reports for a tenant.","operationId":"list_reports_api_v1_crystallize_reports_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"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":"array","items":{"$ref":"#/components/schemas/ReportSummaryOut"},"title":"Response List Reports Api V1 Crystallize Reports Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/crystallize/reports/{report_id}":{"get":{"tags":["Memory Crystallizer"],"summary":"Get Report","description":"Get a full crystallization report by ID.","operationId":"get_report_api_v1_crystallize_reports__report_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/crystallize/latest":{"get":{"tags":["Memory Crystallizer"],"summary":"Get Latest Report","description":"Get the most recent completed crystallization report for a tenant.\n\nReturns ``200`` with the report body when a completed report exists;\nreturns ``200`` with body ``null`` when the tenant has none yet. The\nURL itself is the well-defined \"give me my latest report\" resource —\nthe fact that no completed report exists yet is *empty state*, not a\nmissing resource. ``404`` would conflate the two and force every\nclient to special-case it as \"actually empty\"; see CAURA-646. The\nsibling ``/crystallize/reports/{report_id}`` keeps its 404 because\n*that* endpoint genuinely points at an opaque id that may not exist.","operationId":"get_latest_report_api_v1_crystallize_latest_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/plugin-source":{"get":{"tags":["System"],"summary":"Plugin Source","description":"Serve plugin source files. Use ?file=prompt-section.ts for other files.","operationId":"plugin_source_api_v1_plugin_source_get","parameters":[{"name":"file","in":"query","required":false,"schema":{"type":"string","default":"index.ts","title":"File"}}],"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/plugin-manifest":{"get":{"tags":["System"],"summary":"Plugin Manifest","description":"Single source of truth for what a plugin should fetch on update.\n\nReturns the canonical version string, the list of source files\n(``plugin/src/*.ts``) and root files (``tools.json``,\n``skills/memclaw/SKILL.md``, ``openclaw.plugin.json``) the plugin\nmust download to materialise a fresh install or upgrade, plus the\ncombined content hash so callers can short-circuit when they're\nalready current.\n\nWhy a manifest instead of two separate hardcoded lists (Python here\n+ bash in the install script + TypeScript in\n``plugin/src/heartbeat.ts``): drift. A 2026-04-16 refactor added\n``paths.ts`` and ``logger.ts`` to ``plugin/src`` and forgot the\nbash list, breaking every fresh install for three days. Today the\nplugin's deploy command (``heartbeat.ts:processCommand``) carries\nits OWN hardcoded array of 15 files — drifting from this module's\n22-entry ``_plugin_files`` — so a plugin upgrade silently leaves\nsix files stale on disk. Centralising the answer here lets the\nplugin pull the live list and removes one drift class entirely.\n\nResponse shape (stable contract; see CAURA-444):\n    {\n        \"version\":      \"<plugin version from plugin/package.json>\",\n        \"src_files\":    [\"index.ts\", ...],\n        \"root_files\":   [\"openclaw.plugin.json\", ...],\n        \"content_hash\": \"<sha256 over all served files>\"\n    }\n\n``version`` is the **plugin's** release version (read from\n``plugin/package.json``), NOT the backend's ``VERSION`` — the two\nare decoupled (PR #131). The plugin's deploy handler uses this\nvalue to stamp ``version.ts`` and ``package.json`` post-build, so\nit must reflect what the plugin SHOULD be after a successful deploy.\n\nAuth: unauthenticated (mirrors ``/plugin-source`` and\n``/plugin-source-hash``); the plugin uses this on the update path\nbefore its API key may have been issued for the new install.","operationId":"plugin_manifest_api_v1_plugin_manifest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/plugin-source-hash":{"get":{"tags":["System"],"summary":"Plugin Source Hash","description":"SHA-256 hash of all plugin source files (for update checks).\n\nCovers both ``_plugin_files`` (``plugin/src/*.ts``) and\n``_plugin_root_files`` (``plugin/tools.json``, ``plugin/skills/...``)\nso content changes in plugin-root artifacts (e.g. the shared\n``skills/memclaw/SKILL.md``) are reflected in the hash and picked up\nby clients polling for updates.\n\nRoot files are iterated in sorted order to keep the hash stable\nacross processes (``_plugin_root_files`` is a ``set``; Python's\nhash randomization would otherwise make iteration order\nnon-deterministic).","operationId":"plugin_source_hash_api_v1_plugin_source_hash_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/api/v1/install-plugin":{"get":{"tags":["System"],"summary":"Install Plugin Script","description":"Generate a bash install script for first-time plugin setup on an OpenClaw gateway.","operationId":"install_plugin_script_api_v1_install_plugin_get","parameters":[{"name":"fleet_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Fleet Id"}},{"name":"api_url","in":"query","required":false,"schema":{"type":"string","default":"http://localhost:8000","title":"Api Url"}},{"name":"node_name","in":"query","required":false,"schema":{"type":"string","default":"","title":"Node Name"}}],"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["System"],"summary":"Install Plugin Script Post","description":"Generate a bash install script via POST (preferred — no secrets in URL).","operationId":"install_plugin_script_post_api_v1_install_plugin_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallPluginRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/install-skill":{"get":{"tags":["System"],"summary":"Install Skill Script","description":"Bash installer for the direct-MCP memclaw skill.\n\nServes a shell script that fetches the SKILL.md adapter and writes it to\n``~/.claude/skills/memclaw/`` (Claude Code) and/or ``~/.agents/skills/memclaw/``\n(Codex). Designed for ``curl -s ... | bash`` use by teammates who have\nalready connected via ``claude mcp add`` or the equivalent Codex MCP\nregistration.\n\n- Forwards the caller's ``X-API-Key`` into the generated script so the\n  script's internal curl calls pass auth (required on edge-gated deploys).\n- Auto-derives the install URL from the request host when ``api_url`` is\n  not passed, so the one-liner works against any deployed host with no\n  manual parameter tuning.","operationId":"install_skill_script_api_v1_install_skill_get","parameters":[{"name":"agent","in":"query","required":false,"schema":{"type":"string","description":"claude-code | codex | both","default":"both","title":"Agent"},"description":"claude-code | codex | both"},{"name":"api_url","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Override the server URL the script will install from. Auto-derived from the request Host (and X-Forwarded-Proto) when omitted — so ``curl https://memclaw.dev/api/v1/install-skill | bash`` just works.","title":"Api Url"},"description":"Override the server URL the script will install from. Auto-derived from the request Host (and X-Forwarded-Proto) when omitted — so ``curl https://memclaw.dev/api/v1/install-skill | bash`` just works."}],"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/skill/memclaw":{"get":{"tags":["System"],"summary":"Skill Memclaw","description":"Serve the direct-MCP SKILL.md adapter.\n\nPublic, auth-free — it's generic usage guidance for Claude Code / Codex\nusers with no tenant data in it. Content lives at\n``static/skills/memclaw/SKILL.md`` (not under ``plugin/`` — it's not an\nOpenClaw artifact). The OpenClaw plugin's own shared skill lives at\n``plugin/skills/memclaw/SKILL.md`` and is served via ``/plugin-source``.","operationId":"skill_memclaw_api_v1_skill_memclaw_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/api/plugin-source":{"get":{"tags":["System"],"summary":"Plugin Source","description":"Serve plugin source files. Use ?file=prompt-section.ts for other files.","operationId":"plugin_source_api_plugin_source_get","parameters":[{"name":"file","in":"query","required":false,"schema":{"type":"string","default":"index.ts","title":"File"}}],"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/plugin-manifest":{"get":{"tags":["System"],"summary":"Plugin Manifest","description":"Single source of truth for what a plugin should fetch on update.\n\nReturns the canonical version string, the list of source files\n(``plugin/src/*.ts``) and root files (``tools.json``,\n``skills/memclaw/SKILL.md``, ``openclaw.plugin.json``) the plugin\nmust download to materialise a fresh install or upgrade, plus the\ncombined content hash so callers can short-circuit when they're\nalready current.\n\nWhy a manifest instead of two separate hardcoded lists (Python here\n+ bash in the install script + TypeScript in\n``plugin/src/heartbeat.ts``): drift. A 2026-04-16 refactor added\n``paths.ts`` and ``logger.ts`` to ``plugin/src`` and forgot the\nbash list, breaking every fresh install for three days. Today the\nplugin's deploy command (``heartbeat.ts:processCommand``) carries\nits OWN hardcoded array of 15 files — drifting from this module's\n22-entry ``_plugin_files`` — so a plugin upgrade silently leaves\nsix files stale on disk. Centralising the answer here lets the\nplugin pull the live list and removes one drift class entirely.\n\nResponse shape (stable contract; see CAURA-444):\n    {\n        \"version\":      \"<plugin version from plugin/package.json>\",\n        \"src_files\":    [\"index.ts\", ...],\n        \"root_files\":   [\"openclaw.plugin.json\", ...],\n        \"content_hash\": \"<sha256 over all served files>\"\n    }\n\n``version`` is the **plugin's** release version (read from\n``plugin/package.json``), NOT the backend's ``VERSION`` — the two\nare decoupled (PR #131). The plugin's deploy handler uses this\nvalue to stamp ``version.ts`` and ``package.json`` post-build, so\nit must reflect what the plugin SHOULD be after a successful deploy.\n\nAuth: unauthenticated (mirrors ``/plugin-source`` and\n``/plugin-source-hash``); the plugin uses this on the update path\nbefore its API key may have been issued for the new install.","operationId":"plugin_manifest_api_plugin_manifest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/install-plugin":{"get":{"tags":["System"],"summary":"Install Plugin Script","description":"Generate a bash install script for first-time plugin setup on an OpenClaw gateway.","operationId":"install_plugin_script_api_install_plugin_get","parameters":[{"name":"fleet_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Fleet Id"}},{"name":"api_url","in":"query","required":false,"schema":{"type":"string","default":"http://localhost:8000","title":"Api Url"}},{"name":"node_name","in":"query","required":false,"schema":{"type":"string","default":"","title":"Node Name"}}],"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["System"],"summary":"Install Plugin Script Post","description":"Generate a bash install script via POST (preferred — no secrets in URL).","operationId":"install_plugin_script_post_api_install_plugin_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallPluginRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/stats":{"get":{"tags":["System"],"summary":"Public Stats","description":"Minimal public counters for the landing page status bar.","operationId":"public_stats_api_v1_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"integer"},"type":"object","title":"Response Public Stats Api V1 Stats Get"}}}}}}},"/api/v1/stm/notes":{"get":{"tags":["stm"],"summary":"Get Notes","operationId":"get_notes_api_v1_stm_notes_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"agent_id","in":"query","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["stm"],"summary":"Clear Notes","operationId":"clear_notes_api_v1_stm_notes_delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"agent_id","in":"query","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/stm/bulletin":{"get":{"tags":["stm"],"summary":"Get Bulletin","operationId":"get_bulletin_api_v1_stm_bulletin_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"fleet_id","in":"query","required":true,"schema":{"type":"string","title":"Fleet Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["stm"],"summary":"Clear Bulletin","operationId":"clear_bulletin_api_v1_stm_bulletin_delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"fleet_id","in":"query","required":true,"schema":{"type":"string","title":"Fleet Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/stm/promote":{"post":{"tags":["stm"],"summary":"Promote Stm","operationId":"promote_stm_api_v1_stm_promote_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/insights/generate":{"post":{"tags":["Insights"],"summary":"Generate Insights Endpoint","description":"Generate insights over stored memories.\n\nIdentity resolution mirrors the data-plane endpoints (write/search/recall):\nif the gateway stamped a verified ``X-Agent-ID`` header (``auth.agent_id``),\nthat wins; otherwise ``body.agent_id`` is used. The resolved id must\ncorrespond to an existing agent in the tenant that meets the scope's\ntrust requirement.\n\nTrust gating: scope='agent' requires trust ≥ 1, scope='fleet'/'all'\nrequires trust ≥ 2. Admin keys bypass.","operationId":"generate_insights_endpoint_api_v1_insights_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsightsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/evolve/report":{"post":{"tags":["Evolve"],"summary":"Report Outcome Endpoint","description":"Report an action outcome to evolve memory weights and generate rules.\n\nIdentity resolution mirrors the data-plane endpoints (write/search/recall):\nif the gateway stamped a verified ``X-Agent-ID`` header (``auth.agent_id``),\nthat wins; otherwise ``body.agent_id`` is used. The resolved id must\ncorrespond to an existing agent in the tenant that meets the scope's\ntrust requirement.\n\nTrust gating: scope='agent' requires trust ≥ 1, scope='fleet'/'all'\nrequires trust ≥ 2. Admin keys bypass.","operationId":"report_outcome_endpoint_api_v1_evolve_report_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/admin/lifecycle/fanout/{action}":{"post":{"tags":["Admin","Lifecycle"],"summary":"Fanout Lifecycle Action","description":"Cron entry point — publish one message per active org.\n\nCaller is ``core-operations`` (``triggered_by='core-operations'``).\nReturns ``{\"action\", \"published\", \"failed\"}`` — counts only, no\nper-org id list, so the response stays bounded at scale.\n\nThe DB session is opened locally and released BEFORE the\n``asyncio.gather`` fan-out so a slow per-org Pub/Sub publish can't\npark a connection for the whole loop. The fan-out only needs the\norg list, not the session.","operationId":"fanout_lifecycle_action_api_v1_admin_lifecycle_fanout__action__post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"action","in":"path","required":true,"schema":{"type":"string","title":"Action"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Fanout Lifecycle Action Api V1 Admin Lifecycle Fanout  Action  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/lifecycle/{action}":{"post":{"tags":["Admin","Lifecycle"],"summary":"Trigger Lifecycle Action","description":"Manual single-org trigger.\n\nBody: ``{\"org_id\": \"...\", \"fleet_id\": \"...\" (optional)}``. Same\ndownstream as the fanout-loop body. ``triggered_by`` records who\ninitiated: ``manual:<user-id>`` if the auth context carries a user,\nelse ``manual:admin-key`` for raw curl.","operationId":"trigger_lifecycle_action_api_v1_admin_lifecycle__action__post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"action","in":"path","required":true,"schema":{"type":"string","title":"Action"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Trigger Lifecycle Action Api V1 Admin Lifecycle  Action  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AgentOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"fleet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"},"agent_id":{"type":"string","title":"Agent Id"},"trust_level":{"type":"integer","title":"Trust Level"},"search_profile":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Search Profile"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","tenant_id","agent_id","trust_level","created_at"],"title":"AgentOut"},"AgentTrustUpdate":{"properties":{"trust_level":{"type":"integer","maximum":3.0,"minimum":0.0,"title":"Trust Level"},"fleet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"}},"type":"object","required":["trust_level"],"title":"AgentTrustUpdate"},"AuditEntry":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"action":{"type":"string","title":"Action"},"resource_type":{"type":"string","title":"Resource Type"},"resource_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Resource Id"},"detail":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Detail"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","tenant_id","agent_id","action","resource_type","resource_id","detail","created_at"],"title":"AuditEntry"},"Body_ingest_file_endpoint_api_v1_ingest_file_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"tenant_id":{"type":"string","title":"Tenant Id"},"focus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Focus"},"fleet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},"type":"object","required":["file","tenant_id"],"title":"Body_ingest_file_endpoint_api_v1_ingest_file_post"},"BulkItemResult":{"properties":{"index":{"type":"integer","title":"Index"},"client_request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Request Id"},"status":{"type":"string","enum":["created","duplicate_attempt","duplicate_content","error"],"title":"Status"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"duplicate_of":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Duplicate Of"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["index","status"],"title":"BulkItemResult","description":"Per-item outcome of a bulk write (CAURA-602).\n\nStatus semantics:\n\n- ``\"created\"``: this attempt newly inserted the row; ``id`` is the\n  new row's id.\n- ``\"duplicate_attempt\"``: same ``X-Bulk-Attempt-Id``+index already\n  committed in a prior call. ``id`` is the canonical row from that\n  first attempt. Returned when a retry hits the per-item unique\n  constraint — what eliminates the silent-create class.\n- ``\"duplicate_content\"``: a different attempt's row with the same\n  ``content_hash`` already exists. ``id`` and ``duplicate_of`` both\n  point at the existing row; emitted in place of an insert.\n- ``\"error\"``: the row could not be processed (validation,\n  enrichment timeout, missing storage id). ``error`` describes.\n\nThe legacy ``\"duplicate\"`` status is gone — callers must read\n``duplicate_attempt`` vs ``duplicate_content`` because they imply\ndifferent client-side actions (an idempotent retry succeeded vs\n\"you already wrote this content earlier\")."},"BulkMemoryCreate":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"fleet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"items":{"items":{"$ref":"#/components/schemas/BulkMemoryItem"},"type":"array","maxItems":100,"minItems":1,"title":"Items"},"visibility":{"anyOf":[{"type":"string","pattern":"^(scope_agent|scope_team|scope_org)$"},{"type":"null"}],"title":"Visibility"}},"type":"object","required":["tenant_id","items"],"title":"BulkMemoryCreate"},"BulkMemoryItem":{"properties":{"memory_type":{"anyOf":[{"$ref":"#/components/schemas/MemoryType"},{"type":"null"}],"description":"Memory type. Auto-classified by LLM if omitted. Valid values: fact, episode, decision, preference, task, semantic, intention, plan, commitment, action, outcome, cancellation, rule, insight."},"content":{"type":"string","maxLength":10000,"minLength":1,"title":"Content"},"weight":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Weight"},"source_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Uri"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"entity_links":{"items":{"$ref":"#/components/schemas/EntityLinkIn"},"type":"array","title":"Entity Links","default":[]},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"subject_entity_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Entity Id"},"predicate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Predicate"},"object_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Object Value"},"ts_valid_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ts Valid Start"},"ts_valid_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ts Valid End"},"reference_datetime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reference Datetime"},"status":{"anyOf":[{"type":"string","pattern":"^(active|pending|confirmed|cancelled|outdated|conflicted|archived|deleted)$"},{"type":"null"}],"title":"Status"}},"type":"object","required":["content"],"title":"BulkMemoryItem","description":"Single item in a bulk write request. tenant_id/fleet_id/agent_id inherited from parent."},"BulkMemoryResponse":{"properties":{"created":{"type":"integer","title":"Created"},"duplicates":{"type":"integer","title":"Duplicates"},"errors":{"type":"integer","title":"Errors"},"results":{"items":{"$ref":"#/components/schemas/BulkItemResult"},"type":"array","title":"Results"},"bulk_ms":{"type":"integer","title":"Bulk Ms"}},"type":"object","required":["created","duplicates","errors","results","bulk_ms"],"title":"BulkMemoryResponse","description":"Aggregate response from the bulk-write endpoint.\n\n``duplicates`` rolls up both ``duplicate_attempt`` and\n``duplicate_content`` for top-level metric continuity; per-item\ndetail lives in ``results``. The route returns 200 when everything\nsucceeded and 207 Multi-Status when at least one item is in error —\ncallers must read per-item ``status`` and never infer success from\na 2xx alone."},"CommandIn":{"properties":{"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"},"node_id":{"type":"string","format":"uuid","title":"Node Id"},"command":{"type":"string","title":"Command"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"}},"type":"object","required":["node_id","command"],"title":"CommandIn"},"CommandResultIn":{"properties":{"status":{"type":"string","title":"Status"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result"}},"type":"object","required":["status"],"title":"CommandResultIn"},"ContradictionInfo":{"properties":{"old_memory_id":{"type":"string","format":"uuid","title":"Old Memory Id"},"old_status":{"type":"string","title":"Old Status"},"reason":{"type":"string","title":"Reason"},"old_content_preview":{"type":"string","title":"Old Content Preview"},"direction":{"type":"string","enum":["canonical","flipped"],"title":"Direction","default":"canonical"}},"type":"object","required":["old_memory_id","old_status","reason","old_content_preview"],"title":"ContradictionInfo","description":"Summary of a contradiction detected on write.\n\n``old_memory_id`` always refers to the **pre-existing candidate**\n(never to ``new_memory``), regardless of which row ended up being\nthe older one in the supersession chain. The ``direction`` field\ndisambiguates the two cases:\n\n  - ``\"canonical\"`` — the candidate is older than ``new_memory``;\n    the candidate became outdated/conflicted, ``new_memory``\n    carries ``supersedes_id`` pointing at it. (Historical behaviour.)\n  - ``\"flipped\"`` — the candidate is newer than ``new_memory``;\n    ``new_memory`` is the row that became outdated/conflicted, and\n    the candidate now carries ``supersedes_id`` pointing back at\n    ``new_memory``. This branch was previously unreachable\n    (CAURA-125; gap A6) and is now exercised by deferred-embedding\n    races and ``created_at`` ties."},"CrystallizeAllResult":{"properties":{"reports":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Reports"}},"type":"object","required":["reports"],"title":"CrystallizeAllResult"},"CrystallizeRequest":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"fleet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"}},"type":"object","required":["tenant_id"],"title":"CrystallizeRequest"},"CrystallizeResult":{"properties":{"report_id":{"type":"string","title":"Report Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["report_id","status"],"title":"CrystallizeResult"},"DocOut":{"properties":{"id":{"type":"string","title":"Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"fleet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"},"collection":{"type":"string","title":"Collection"},"doc_id":{"type":"string","title":"Doc Id"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","tenant_id","fleet_id","collection","doc_id","data","created_at","updated_at"],"title":"DocOut"},"DocQueryRequest":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"fleet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"},"collection":{"type":"string","maxLength":200,"minLength":1,"title":"Collection"},"where":{"additionalProperties":true,"type":"object","title":"Where"},"order_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order By"},"order":{"type":"string","pattern":"^(asc|desc)$","title":"Order","default":"asc"},"limit":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Limit","default":20},"offset":{"type":"integer","minimum":0.0,"title":"Offset","default":0}},"type":"object","required":["tenant_id","collection"],"title":"DocQueryRequest"},"DocSearchRequest":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"fleet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"},"collection":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Collection"},"query":{"type":"string","minLength":1,"title":"Query"},"top_k":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Top K","default":5}},"type":"object","required":["tenant_id","query"],"title":"DocSearchRequest","description":"Vector search over indexed documents.\n\nMirrors MCP ``memclaw_doc op=search``: when ``collection`` is omitted,\nsearch spans every collection in the tenant (broad strategy); when\nsupplied, search is restricted to that collection (narrow strategy).\nOnly documents written with a ``data[\"summary\"]`` (i.e. with a\nnon-NULL embedding column) are considered."},"DocWriteRequest":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"fleet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"},"collection":{"type":"string","maxLength":200,"minLength":1,"title":"Collection"},"doc_id":{"type":"string","maxLength":500,"minLength":1,"title":"Doc Id"},"data":{"additionalProperties":true,"type":"object","title":"Data"}},"type":"object","required":["tenant_id","collection","doc_id","data"],"title":"DocWriteRequest"},"EntityLinkIn":{"properties":{"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"role":{"type":"string","title":"Role"}},"type":"object","required":["entity_id","role"],"title":"EntityLinkIn"},"EntityLinkOut":{"properties":{"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"role":{"type":"string","title":"Role"}},"type":"object","required":["entity_id","role"],"title":"EntityLinkOut"},"EntityOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"fleet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"},"entity_type":{"type":"string","title":"Entity Type"},"canonical_name":{"type":"string","title":"Canonical Name"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"linked_memories":{"items":{"$ref":"#/components/schemas/MemoryOut"},"type":"array","title":"Linked Memories","default":[]},"relations":{"items":{"$ref":"#/components/schemas/RelationOut"},"type":"array","title":"Relations","default":[]}},"type":"object","required":["id","tenant_id","entity_type","canonical_name","attributes"],"title":"EntityOut"},"EntityUpsert":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"fleet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"},"entity_type":{"type":"string","title":"Entity Type"},"canonical_name":{"type":"string","title":"Canonical Name"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["tenant_id","entity_type","canonical_name"],"title":"EntityUpsert"},"EvolveRequest":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"outcome":{"type":"string","minLength":1,"title":"Outcome","description":"What happened — natural language description of the outcome."},"outcome_type":{"type":"string","title":"Outcome Type","description":"Result type: 'success', 'failure', or 'partial'."},"related_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Related Ids","description":"Memory UUIDs that influenced your action. Use IDs from your most recent memclaw_recall results."},"scope":{"type":"string","title":"Scope","description":"Scope: 'agent' (default, requires trust ≥ 1, touches caller-owned memories only), 'fleet' (requires trust ≥ 2, touches memories in fleet_id), or 'all' (requires trust ≥ 2, tenant-wide).","default":"agent"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Identifier of the reporting agent. Optional: the gateway-verified ``X-Agent-ID`` header takes precedence when present; falls back to 'mcp-agent' when both are absent."},"fleet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id","description":"Required when scope='fleet'; also used as the outcome/rule memory's fleet_id."}},"type":"object","required":["tenant_id","outcome","outcome_type"],"title":"EvolveRequest"},"FleetCreateIn":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"fleet_id":{"type":"string","title":"Fleet Id"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["tenant_id","fleet_id"],"title":"FleetCreateIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HeartbeatIn":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"node_name":{"type":"string","title":"Node Name"},"fleet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"},"hostname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hostname"},"ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip"},"openclaw_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Openclaw Version"},"plugin_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plugin Version"},"plugin_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plugin Hash"},"os_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Os Info"},"agents":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Agents"},"tools":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Tools"},"channels":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Channels"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"install_id":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Install Id"},"recall_metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Recall Metrics"},"deploy_blocked_until":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Deploy Blocked Until"}},"type":"object","required":["tenant_id","node_name"],"title":"HeartbeatIn"},"IngestCommitRequest":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"fleet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"},"agent_id":{"type":"string","title":"Agent Id","default":"ingest-agent"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"facts":{"items":{"$ref":"#/components/schemas/IngestFact"},"type":"array","title":"Facts"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"doc_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doc Hash"}},"type":"object","required":["tenant_id","facts"],"title":"IngestCommitRequest"},"IngestFact":{"properties":{"content":{"type":"string","title":"Content"},"suggested_type":{"type":"string","title":"Suggested Type","default":"fact"},"source_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Uri"},"salience":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Salience"}},"type":"object","required":["content"],"title":"IngestFact"},"IngestRequest":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"fleet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"},"agent_id":{"type":"string","title":"Agent Id","default":"ingest-agent"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"focus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Focus"},"source_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Uri"}},"type":"object","required":["tenant_id"],"title":"IngestRequest"},"InsightsRequest":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"focus":{"type":"string","title":"Focus","description":"Analysis focus: 'contradictions', 'failures', 'stale', 'divergence', 'patterns', or 'discover'."},"scope":{"type":"string","title":"Scope","description":"Scope: 'agent' (your memories), 'fleet' (fleet-wide), or 'all' (tenant-wide).","default":"agent"},"fleet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id","description":"Fleet to analyze (required when scope='fleet')."},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Identifier of the requesting agent. Optional: the gateway-verified ``X-Agent-ID`` header takes precedence when present; falls back to 'mcp-agent' when both are absent."}},"type":"object","required":["tenant_id","focus"],"title":"InsightsRequest"},"InstallPluginRequest":{"properties":{"fleet_id":{"type":"string","title":"Fleet Id","default":""},"api_url":{"type":"string","title":"Api Url","default":"http://localhost:8000"},"api_key":{"type":"string","title":"Api Key","default":""},"node_name":{"type":"string","title":"Node Name","default":""}},"type":"object","title":"InstallPluginRequest"},"KeystoneSetRequest":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"fleet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"doc_id":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,99}$","title":"Doc Id"},"title":{"type":"string","minLength":1,"title":"Title"},"content":{"type":"string","minLength":1,"title":"Content"},"scope":{"type":"string","enum":["tenant","fleet","agent"],"title":"Scope"},"weight":{"type":"string","enum":["low","med","high"],"title":"Weight"},"author_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author User Id"}},"type":"object","required":["tenant_id","doc_id","title","content","scope","weight"],"title":"KeystoneSetRequest","description":"Payload shape mirrors the storage-api validator one-for-one so we\ndon't need to re-do the scope/weight/fleet shape checks here — the\nstorage 422 propagates through."},"MemoryCreate":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"fleet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"},"agent_id":{"type":"string","title":"Agent Id"},"memory_type":{"anyOf":[{"$ref":"#/components/schemas/MemoryType"},{"type":"null"}],"description":"Memory type. Auto-classified by LLM if omitted. Valid values: fact, episode, decision, preference, task, semantic, intention, plan, commitment, action, outcome, cancellation, rule, insight."},"content":{"type":"string","maxLength":10000,"minLength":1,"title":"Content"},"weight":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Weight"},"source_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Uri"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"entity_links":{"items":{"$ref":"#/components/schemas/EntityLinkIn"},"type":"array","title":"Entity Links","default":[]},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"subject_entity_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Entity Id"},"predicate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Predicate"},"object_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Object Value"},"ts_valid_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ts Valid Start"},"ts_valid_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ts Valid End"},"reference_datetime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reference Datetime"},"status":{"anyOf":[{"type":"string","pattern":"^(active|pending|confirmed|cancelled|outdated|conflicted|archived|deleted)$"},{"type":"null"}],"title":"Status"},"visibility":{"anyOf":[{"type":"string","pattern":"^(scope_agent|scope_team|scope_org)$"},{"type":"null"}],"title":"Visibility"},"persist":{"type":"boolean","title":"Persist","default":true},"write_mode":{"anyOf":[{"type":"string","enum":["fast","strong","auto","stm"]},{"type":"null"}],"title":"Write Mode"}},"type":"object","required":["tenant_id","agent_id","content"],"title":"MemoryCreate"},"MemoryOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"fleet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"},"agent_id":{"type":"string","title":"Agent Id"},"memory_type":{"type":"string","title":"Memory Type"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"content":{"type":"string","title":"Content"},"weight":{"type":"number","title":"Weight"},"source_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Uri"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"entity_links":{"items":{"$ref":"#/components/schemas/EntityLinkOut"},"type":"array","title":"Entity Links","default":[]},"similarity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Similarity"},"subject_entity_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Entity Id"},"predicate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Predicate"},"object_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Object Value"},"ts_valid_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ts Valid Start"},"ts_valid_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ts Valid End"},"status":{"type":"string","title":"Status","default":"active"},"visibility":{"type":"string","title":"Visibility","default":"scope_team"},"recall_count":{"type":"integer","title":"Recall Count","default":0},"last_recalled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Recalled At"},"supersedes_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Supersedes Id"},"superseded_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContradictionInfo"},"type":"array"},{"type":"null"}],"title":"Superseded By"},"usage":{"anyOf":[{"$ref":"#/components/schemas/UsageSummary"},{"type":"null"}]}},"type":"object","required":["id","tenant_id","agent_id","memory_type","content","weight","source_uri","run_id","metadata","created_at","expires_at"],"title":"MemoryOut"},"MemoryType":{"type":"string","enum":["fact","episode","decision","preference","task","semantic","intention","plan","commitment","action","outcome","cancellation","rule","insight"],"title":"MemoryType","description":"Typed enum for the memory-type vocabulary.\n\nInheriting from ``str`` keeps full backward compatibility with the\nstring-based call sites: ``MemoryType.FACT == \"fact\"`` is True,\ndict lookup with the enum hashes the same as the literal, JSON\nserialisation emits the bare string, and SQLAlchemy reads of a\n``Text`` column coerce cleanly via Pydantic."},"MemoryUpdate":{"properties":{"content":{"anyOf":[{"type":"string","maxLength":10000,"minLength":1},{"type":"null"}],"title":"Content"},"memory_type":{"anyOf":[{"$ref":"#/components/schemas/MemoryType"},{"type":"null"}],"description":"Memory type. Auto-classified by LLM if omitted. Valid values: fact, episode, decision, preference, task, semantic, intention, plan, commitment, action, outcome, cancellation, rule, insight."},"weight":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Weight"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"status":{"anyOf":[{"type":"string","pattern":"^(active|pending|confirmed|cancelled|outdated|conflicted|archived|deleted)$"},{"type":"null"}],"title":"Status"},"visibility":{"anyOf":[{"type":"string","pattern":"^(scope_agent|scope_team|scope_org)$"},{"type":"null"}],"title":"Visibility"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"metadata_mode":{"anyOf":[{"type":"string","pattern":"^(merge|replace)$"},{"type":"null"}],"title":"Metadata Mode","description":"How to apply ``metadata``: ``merge`` (default when omitted or ``null``) does a top-level JSONB ``||`` merge, preserving keys not present in the patch; ``replace`` overwrites the column wholesale."},"source_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Uri"},"subject_entity_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Entity Id"},"predicate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Predicate"},"object_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Object Value"},"ts_valid_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ts Valid Start"},"ts_valid_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ts Valid End"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"entity_links":{"anyOf":[{"items":{"$ref":"#/components/schemas/EntityLinkIn"},"type":"array"},{"type":"null"}],"title":"Entity Links"}},"type":"object","title":"MemoryUpdate"},"PaginatedMemoryResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MemoryOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"PaginatedMemoryResponse"},"PromoteRequest":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"content":{"type":"string","title":"Content"},"fleet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"},"memory_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory Type"},"visibility":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visibility"}},"type":"object","required":["agent_id","content"],"title":"PromoteRequest"},"RedistributeRequest":{"properties":{"memory_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":500,"minItems":1,"title":"Memory Ids"},"target_agent_id":{"type":"string","maxLength":256,"minLength":1,"title":"Target Agent Id"}},"type":"object","required":["memory_ids","target_agent_id"],"title":"RedistributeRequest"},"RedistributeResponse":{"properties":{"moved":{"type":"integer","title":"Moved"},"promoted":{"type":"integer","title":"Promoted"},"skipped":{"type":"integer","title":"Skipped"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"},"redistribute_ms":{"type":"integer","title":"Redistribute Ms"}},"type":"object","required":["moved","promoted","skipped","errors","redistribute_ms"],"title":"RedistributeResponse"},"RelationOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"relation_type":{"type":"string","title":"Relation Type"},"to_entity_id":{"type":"string","format":"uuid","title":"To Entity Id"},"to_entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Entity Name"},"weight":{"type":"number","title":"Weight"},"evidence_memory_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evidence Memory Id"}},"type":"object","required":["id","relation_type","to_entity_id","weight","evidence_memory_id"],"title":"RelationOut"},"RelationUpsert":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"fleet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"},"from_entity_id":{"type":"string","format":"uuid","title":"From Entity Id"},"relation_type":{"type":"string","title":"Relation Type"},"to_entity_id":{"type":"string","format":"uuid","title":"To Entity Id"},"weight":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Weight","default":1.0},"evidence_memory_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evidence Memory Id"}},"type":"object","required":["tenant_id","from_entity_id","relation_type","to_entity_id"],"title":"RelationUpsert"},"RelationUpsertOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"fleet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"},"from_entity_id":{"type":"string","format":"uuid","title":"From Entity Id"},"relation_type":{"type":"string","title":"Relation Type"},"to_entity_id":{"type":"string","format":"uuid","title":"To Entity Id"},"weight":{"type":"number","title":"Weight"},"evidence_memory_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evidence Memory Id"}},"type":"object","required":["id","tenant_id","from_entity_id","relation_type","to_entity_id","weight","evidence_memory_id"],"title":"RelationUpsertOut"},"ReportSummaryOut":{"properties":{"id":{"type":"string","title":"Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"fleet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fleet Id"},"trigger":{"type":"string","title":"Trigger"},"status":{"type":"string","title":"Status"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"summary":{"additionalProperties":true,"type":"object","title":"Summary"}},"type":"object","required":["id","tenant_id","fleet_id","trigger","status","started_at","completed_at","duration_ms","summary"],"title":"ReportSummaryOut"},"SearchProfileUpdate":{"properties":{"top_k":{"anyOf":[{"type":"integer","maximum":20.0,"minimum":1.0},{"type":"null"}],"title":"Top K"},"min_similarity":{"anyOf":[{"type":"number","maximum":0.9,"minimum":0.1},{"type":"null"}],"title":"Min Similarity"},"fts_weight":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Fts Weight"},"freshness_floor":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Freshness Floor"},"freshness_decay_days":{"anyOf":[{"type":"integer","maximum":730.0,"minimum":7.0},{"type":"null"}],"title":"Freshness Decay Days"},"recall_boost_cap":{"anyOf":[{"type":"number","maximum":3.0,"minimum":1.0},{"type":"null"}],"title":"Recall Boost Cap"},"recall_decay_window_days":{"anyOf":[{"type":"integer","maximum":365.0,"minimum":7.0},{"type":"null"}],"title":"Recall Decay Window Days"},"graph_max_hops":{"anyOf":[{"type":"integer","maximum":3.0,"minimum":0.0},{"type":"null"}],"title":"Graph Max Hops"},"similarity_blend":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Similarity Blend"}},"type":"object","title":"SearchProfileUpdate","description":"Per-agent search tuning knobs. All fields optional — only override what you set."},"SearchRequest":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"fleet_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Fleet Ids"},"query":{"type":"string","maxLength":5000,"minLength":1,"title":"Query"},"filter_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter Agent Id"},"memory_type_filter":{"anyOf":[{"$ref":"#/components/schemas/MemoryType"},{"type":"null"}],"description":"Filter results to a single memory type. Memory type. Auto-classified by LLM if omitted. Valid values: fact, episode, decision, preference, task, semantic, intention, plan, commitment, action, outcome, cancellation, rule, insight."},"status_filter":{"anyOf":[{"type":"string","pattern":"^(active|pending|confirmed|cancelled|outdated|conflicted|archived|deleted)$"},{"type":"null"}],"title":"Status Filter"},"valid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Valid At"},"top_k":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Top K","description":"Maximum results to return (1-20, default 5).","default":5},"diagnostic":{"type":"boolean","title":"Diagnostic","default":false}},"type":"object","required":["tenant_id","query"],"title":"SearchRequest"},"SearchResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MemoryOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"SearchResponse","description":"Envelope for search results — matches PaginatedMemoryResponse shape."},"UsageSummary":{"properties":{"memories_stored":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Memories Stored"},"memories_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Memories Limit"},"writes_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Writes Remaining"}},"type":"object","title":"UsageSummary"},"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"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}}}}