{"openapi":"3.1.0","info":{"title":"TMCRA Memory API","description":"Tenant-isolated long-term memory ingestion and prompt-ready recall. TMCRA does not generate the final assistant answer.","version":"0.2.0"},"servers":[{"url":"https://api.tmcra.com","description":"Configured API"}],"paths":{"/v1/session":{"get":{"tags":["access"],"summary":"Authenticated Session","operationId":"getAuthenticatedSession","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticatedSessionView"}}}}},"security":[{"TMCRAApiKey":[]}]}},"/v1/access-tokens":{"post":{"tags":["access"],"summary":"Issue Access Token","operationId":"issueScopedAccessToken","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200,"title":"Idempotency-Key"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScopeTokenCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuedScopeTokenView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["access"],"summary":"List Access Tokens","operationId":"listScopedAccessTokens","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ScopeTokenView"},"title":"Response Listscopedaccesstokens"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/access-tokens/{token_id}/confirm":{"post":{"tags":["access"],"summary":"Confirm Access Token","operationId":"confirmScopedAccessTokenDelivery","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string","title":"Token Id"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScopeTokenView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/access-tokens/{token_id}":{"delete":{"tags":["access"],"summary":"Revoke Access Token","operationId":"revokeScopedAccessToken","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string","title":"Token Id"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Revokescopedaccesstoken"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scopes":{"get":{"tags":["memory"],"summary":"List Scopes","operationId":"listMemoryScopes","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"prefix","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"Prefix"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ScopeCatalogView"},"title":"Response Listmemoryscopes"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scopes/{scope_name}/summary":{"get":{"tags":["memory"],"summary":"Scope Summary","operationId":"getMemoryScopeSummary","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"scope_name","in":"path","required":true,"schema":{"type":"string","title":"Scope Name"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScopeSummaryView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/usage/quota":{"get":{"tags":["usage"],"summary":"Usage Quota","operationId":"getMemoryQuota","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"subject","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"title":"Subject"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuotaView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["usage"],"summary":"Set Usage Quota Entitlement","operationId":"setMemoryQuotaEntitlement","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"subject","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"title":"Subject"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuotaView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/usage/entitlements/{subject}":{"put":{"tags":["usage"],"summary":"Set Usage Entitlement","operationId":"setMemoryEntitlement","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"subject","in":"path","required":true,"schema":{"type":"string","title":"Subject"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuotaView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks":{"post":{"tags":["webhooks"],"summary":"Create Webhook","operationId":"createWebhook","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuedWebhookView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["webhooks"],"summary":"List Webhooks","operationId":"listWebhooks","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookView"},"title":"Response Listwebhooks"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/{endpoint_id}":{"delete":{"tags":["webhooks"],"summary":"Disable Webhook","operationId":"disableWebhook","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","title":"Endpoint Id"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Disablewebhook"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scopes/{scope_name}/ingest":{"post":{"tags":["memory"],"summary":"Ingest","operationId":"ingestMemory","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"scope_name","in":"path","required":true,"schema":{"type":"string","title":"Scope Name"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200,"title":"Idempotency-Key"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobView"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scopes/{scope_name}/ingest/batch":{"post":{"tags":["memory"],"summary":"Bulk Ingest","operationId":"bulkIngestMemory","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"scope_name","in":"path","required":true,"schema":{"type":"string","title":"Scope Name"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkIngestRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkIngestResponse"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scopes/{scope_name}/consolidate":{"post":{"tags":["memory"],"summary":"Consolidate","operationId":"consolidateMemory","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"scope_name","in":"path","required":true,"schema":{"type":"string","title":"Scope Name"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200,"title":"Idempotency-Key"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scopes/{scope_name}/recall":{"post":{"tags":["memory"],"summary":"Recall","operationId":"recallMemory","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"scope_name","in":"path","required":true,"schema":{"type":"string","title":"Scope Name"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecallRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecallResponse"}}}},"429":{"description":"Tenant quota, rate, or recall queue limit was reached.","headers":{"Retry-After":{"description":"Whole seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Recall capacity is temporarily unavailable.","headers":{"Retry-After":{"description":"Whole seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scopes/{scope_name}/exports":{"post":{"tags":["governance"],"summary":"Export Scope","operationId":"exportMemoryScope","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"scope_name","in":"path","required":true,"schema":{"type":"string","title":"Scope Name"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200,"title":"Idempotency-Key"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scopes/{scope_name}/exports/{export_id}":{"get":{"tags":["governance"],"summary":"Download Scope Export","operationId":"downloadMemoryScopeExport","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"scope_name","in":"path","required":true,"schema":{"type":"string","title":"Scope Name"}},{"name":"export_id","in":"path","required":true,"schema":{"type":"string","title":"Export Id"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scopes/{scope_name}":{"delete":{"tags":["governance"],"summary":"Delete Scope","operationId":"deleteMemoryScope","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"scope_name","in":"path","required":true,"schema":{"type":"string","title":"Scope Name"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200,"title":"Idempotency-Key"}},{"name":"X-TMCRA-Confirm-Scope","in":"header","required":true,"schema":{"type":"string","title":"X-Tmcra-Confirm-Scope"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scopes/{scope_name}/reopen":{"post":{"tags":["governance"],"summary":"Reopen Scope","operationId":"reopenMemoryScope","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"scope_name","in":"path","required":true,"schema":{"type":"string","title":"Scope Name"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reopenmemoryscope"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scopes/{scope_name}/retention":{"put":{"tags":["governance"],"summary":"Set Retention Policy","operationId":"setMemoryRetentionPolicy","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"scope_name","in":"path","required":true,"schema":{"type":"string","title":"Scope Name"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetentionPolicyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetentionPolicyView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["governance"],"summary":"Get Retention Policy","operationId":"getMemoryRetentionPolicy","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"scope_name","in":"path","required":true,"schema":{"type":"string","title":"Scope Name"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetentionPolicyView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scopes/{scope_name}/feedback":{"post":{"tags":["governance"],"summary":"Submit Feedback","operationId":"submitMemoryFeedback","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"scope_name","in":"path","required":true,"schema":{"type":"string","title":"Scope Name"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scopes/{scope_name}/memory-graph":{"get":{"tags":["memory-graph"],"summary":"Memory Graph","operationId":"getMemoryGraph","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"scope_name","in":"path","required":true,"schema":{"type":"string","title":"Scope Name"}},{"name":"layers","in":"query","required":false,"schema":{"type":"string","maxLength":40,"default":"slow","title":"Layers"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":300,"minimum":1,"default":180,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Cursor"}},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Query"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryGraphResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scopes/{scope_name}/memory-graph/nodes/{memory_id}/neighbors":{"get":{"tags":["memory-graph"],"summary":"Memory Graph Neighbors","operationId":"getMemoryGraphNeighbors","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"scope_name","in":"path","required":true,"schema":{"type":"string","title":"Scope Name"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"depth","in":"query","required":false,"schema":{"type":"integer","maximum":2,"minimum":1,"default":1,"title":"Depth"}},{"name":"layers","in":"query","required":false,"schema":{"type":"string","maxLength":40,"default":"slow,fast,source","title":"Layers"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":120,"minimum":1,"default":80,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Cursor"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryGraphResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scopes/{scope_name}/memory-graph/nodes/{memory_id}/evidence":{"get":{"tags":["memory-graph"],"summary":"Memory Graph Evidence","operationId":"getMemoryGraphEvidence","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"scope_name","in":"path","required":true,"schema":{"type":"string","title":"Scope Name"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":25,"minimum":1,"default":10,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Cursor"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryGraphEvidenceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scopes/{scope_name}/memory-graph/trace":{"post":{"tags":["memory-graph"],"summary":"Memory Graph Trace","operationId":"traceMemoryRecall","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"scope_name","in":"path","required":true,"schema":{"type":"string","title":"Scope Name"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryGraphTraceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryGraphTraceResponse"}}}},"429":{"description":"Tenant quota, rate, or recall queue limit was reached.","headers":{"Retry-After":{"description":"Whole seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Recall capacity is temporarily unavailable.","headers":{"Retry-After":{"description":"Whole seconds to wait before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jobs/{job_id}":{"get":{"tags":["jobs"],"summary":"Get Job","operationId":"getMemoryJob","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/usage/costs":{"get":{"tags":["usage"],"summary":"Usage Costs","operationId":"getMemoryUsage","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"scope_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Name"}},{"name":"scope_prefix","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Prefix"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Getmemoryusage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jobs/{job_id}/cancel":{"post":{"tags":["jobs"],"summary":"Cancel Job","operationId":"cancelMemoryJob","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jobs/{job_id}/retry":{"post":{"tags":["jobs"],"summary":"Retry Job","operationId":"retryMemoryJob","security":[{"TMCRAApiKey":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200,"title":"Idempotency-Key"}},{"name":"X-TMCRA-On-Behalf-Of-Subject","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key.","title":"X-Tmcra-On-Behalf-Of-Subject"},"description":"Trusted subject attribution for server-side control-plane proxies. Requires a tokens:manage API key."}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AuthenticatedSessionView":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"authenticated":{"type":"boolean","const":true,"title":"Authenticated","default":true},"service":{"$ref":"#/components/schemas/SessionServiceView"},"credential":{"$ref":"#/components/schemas/SessionCredentialView"}},"additionalProperties":false,"type":"object","required":["service","credential"],"title":"AuthenticatedSessionView"},"BulkIngestItem":{"properties":{"session_id":{"type":"string","maxLength":200,"minLength":1,"title":"Session Id"},"messages":{"items":{"$ref":"#/components/schemas/MemoryMessage"},"type":"array","maxItems":1000,"minItems":1,"title":"Messages"},"consistency":{"type":"string","enum":["eventual","read_your_writes"],"title":"Consistency","default":"eventual"},"slow_policy":{"type":"string","enum":["auto","deferred","force"],"title":"Slow Policy","default":"auto"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"idempotency_key":{"type":"string","maxLength":200,"minLength":8,"title":"Idempotency Key"}},"additionalProperties":false,"type":"object","required":["session_id","messages","idempotency_key"],"title":"BulkIngestItem"},"BulkIngestRequest":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BulkIngestItem"},"type":"array","maxItems":100,"minItems":1,"title":"Items"}},"additionalProperties":false,"type":"object","required":["items"],"title":"BulkIngestRequest"},"BulkIngestResponse":{"properties":{"scope_name":{"type":"string","title":"Scope Name"},"jobs":{"items":{"$ref":"#/components/schemas/JobView"},"type":"array","title":"Jobs"}},"additionalProperties":false,"type":"object","required":["scope_name","jobs"],"title":"BulkIngestResponse"},"ConsistencyContract":{"properties":{"mode":{"type":"string","enum":["eventual","read_your_writes"],"title":"Mode"},"visible_after_job_id":{"type":"string","title":"Visible After Job Id"},"recall_wait_for_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recall Wait For Job Id"}},"additionalProperties":false,"type":"object","required":["mode","visible_after_job_id"],"title":"ConsistencyContract"},"EntitlementUpdateRequest":{"properties":{"ingest_raw_tokens":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Ingest Raw Tokens"},"recall_requests":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Recall Requests"}},"additionalProperties":false,"type":"object","required":["ingest_raw_tokens","recall_requests"],"title":"EntitlementUpdateRequest"},"ErrorDetail":{"properties":{"code":{"type":"string","title":"Code"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id"},"details":{"title":"Details"},"retry_after_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Retry After Seconds"}},"additionalProperties":false,"type":"object","required":["code"],"title":"ErrorDetail"},"ErrorResponse":{"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}},"additionalProperties":false,"type":"object","required":["error"],"title":"ErrorResponse"},"EvidenceRouteView":{"properties":{"requested":{"type":"string","title":"Requested"},"selected":{"type":"string","enum":["raw","compiled"],"title":"Selected"},"reasons":{"items":{"type":"string"},"type":"array","title":"Reasons"}},"additionalProperties":false,"type":"object","required":["requested","selected","reasons"],"title":"EvidenceRouteView"},"FeedbackRequest":{"properties":{"query_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Query Id"},"rating":{"type":"string","enum":["helpful","incorrect","stale","unsafe","missing"],"title":"Rating"},"memory_ids":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Memory Ids"},"comment":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Comment"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"additionalProperties":false,"type":"object","required":["rating"],"title":"FeedbackRequest"},"FeedbackView":{"properties":{"feedback_id":{"type":"string","title":"Feedback Id"},"scope_name":{"type":"string","title":"Scope Name"},"rating":{"type":"string","title":"Rating"},"created_at":{"type":"number","title":"Created At"}},"additionalProperties":false,"type":"object","required":["feedback_id","scope_name","rating","created_at"],"title":"FeedbackView"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IngestRequest":{"properties":{"session_id":{"type":"string","maxLength":200,"minLength":1,"title":"Session Id"},"messages":{"items":{"$ref":"#/components/schemas/MemoryMessage"},"type":"array","maxItems":1000,"minItems":1,"title":"Messages"},"consistency":{"type":"string","enum":["eventual","read_your_writes"],"title":"Consistency","default":"eventual"},"slow_policy":{"type":"string","enum":["auto","deferred","force"],"title":"Slow Policy","default":"auto"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"additionalProperties":false,"type":"object","required":["session_id","messages"],"title":"IngestRequest"},"IssuedScopeTokenView":{"properties":{"token_id":{"type":"string","title":"Token Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions"},"scope_names":{"items":{"type":"string"},"type":"array","title":"Scope Names"},"scope_prefixes":{"items":{"type":"string"},"type":"array","title":"Scope Prefixes"},"label":{"type":"string","title":"Label"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"created_by_key_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Key Id"},"created_at":{"type":"number","title":"Created At"},"expires_at":{"type":"number","title":"Expires At"},"revoked_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Revoked At"},"last_used_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Last Used At"},"access_token":{"type":"string","title":"Access Token"}},"additionalProperties":false,"type":"object","required":["token_id","tenant_id","permissions","scope_names","scope_prefixes","label","created_at","expires_at","access_token"],"title":"IssuedScopeTokenView"},"IssuedWebhookView":{"properties":{"endpoint_id":{"type":"string","title":"Endpoint Id"},"label":{"type":"string","title":"Label"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"enabled":{"type":"boolean","title":"Enabled"},"created_at":{"type":"number","title":"Created At"},"updated_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Updated At"},"signing_secret":{"type":"string","title":"Signing Secret"}},"additionalProperties":false,"type":"object","required":["endpoint_id","label","url","events","enabled","created_at","signing_secret"],"title":"IssuedWebhookView"},"JobView":{"properties":{"job_id":{"type":"string","title":"Job Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"scope_name":{"type":"string","title":"Scope Name"},"job_type":{"type":"string","title":"Job Type"},"status":{"type":"string","title":"Status"},"attempts":{"type":"integer","title":"Attempts"},"created_at":{"type":"number","title":"Created At"},"updated_at":{"type":"number","title":"Updated At"},"started_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Finished At"},"heartbeat_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Heartbeat At"},"lease_expires_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lease Expires At"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result"},"error":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Error"},"status_url":{"type":"string","title":"Status Url"},"idempotent_replay":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Idempotent Replay"},"idempotent_retry":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Idempotent Retry"},"resume_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resume Mode"},"consistency_contract":{"anyOf":[{"$ref":"#/components/schemas/ConsistencyContract"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["job_id","tenant_id","scope_name","job_type","status","attempts","created_at","updated_at","status_url"],"title":"JobView"},"MemoryGraphCountsView":{"properties":{"nodes":{"type":"integer","title":"Nodes"},"edges":{"type":"integer","title":"Edges"},"slow":{"type":"integer","title":"Slow"},"fast":{"type":"integer","title":"Fast"},"source":{"type":"integer","title":"Source"}},"additionalProperties":false,"type":"object","required":["nodes","edges","slow","fast","source"],"title":"MemoryGraphCountsView"},"MemoryGraphEdgeView":{"properties":{"id":{"type":"string","title":"Id"},"source":{"type":"string","title":"Source"},"target":{"type":"string","title":"Target"},"type":{"type":"string","title":"Type"},"weight":{"type":"number","title":"Weight"},"origin":{"type":"string","enum":["stored","derived"],"title":"Origin"},"provenance":{"additionalProperties":true,"type":"object","title":"Provenance"}},"additionalProperties":false,"type":"object","required":["id","source","target","type","weight","origin"],"title":"MemoryGraphEdgeView"},"MemoryGraphEvidenceItem":{"properties":{"source_record_id":{"type":"string","title":"Source Record Id"},"relationship":{"type":"string","title":"Relationship"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Id"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"actor_role":{"anyOf":[{"type":"string","enum":["user","assistant","system","tool"]},{"type":"null"}],"title":"Actor Role"},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At"},"text":{"type":"string","title":"Text"},"text_sha256":{"type":"string","title":"Text Sha256"},"source_text_verbatim":{"type":"boolean","title":"Source Text Verbatim"},"evidence_char_start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Evidence Char Start"},"evidence_char_end":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Evidence Char End"}},"additionalProperties":false,"type":"object","required":["source_record_id","relationship","text","text_sha256","source_text_verbatim"],"title":"MemoryGraphEvidenceItem"},"MemoryGraphEvidenceResponse":{"properties":{"schema_version":{"type":"string","title":"Schema Version"},"scope_name":{"type":"string","title":"Scope Name"},"snapshot_id":{"type":"string","title":"Snapshot Id"},"memory_id":{"type":"string","title":"Memory Id"},"items":{"items":{"$ref":"#/components/schemas/MemoryGraphEvidenceItem"},"type":"array","title":"Items"},"page":{"$ref":"#/components/schemas/MemoryGraphPageView"}},"additionalProperties":false,"type":"object","required":["schema_version","scope_name","snapshot_id","memory_id","items","page"],"title":"MemoryGraphEvidenceResponse"},"MemoryGraphNodeView":{"properties":{"id":{"type":"string","title":"Id"},"layer":{"type":"string","enum":["slow","fast","source"],"title":"Layer"},"kind":{"type":"string","title":"Kind"},"category":{"type":"string","title":"Category"},"label":{"type":"string","title":"Label"},"summary":{"type":"string","title":"Summary"},"relation":{"type":"string","title":"Relation"},"state":{"type":"string","title":"State"},"status":{"type":"string","title":"Status"},"confidence":{"type":"number","title":"Confidence"},"salience":{"type":"number","title":"Salience"},"turn_index":{"type":"integer","title":"Turn Index"},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At"},"subject_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Id"},"cluster_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cluster Id"},"source_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Kind"},"actor_role":{"anyOf":[{"type":"string","enum":["user","assistant","system","tool"]},{"type":"null"}],"title":"Actor Role"},"actor_roles":{"items":{"type":"string","enum":["user","assistant","system","tool"]},"type":"array","title":"Actor Roles"},"authority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authority"},"provenance_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provenance Source"},"evidence_count":{"type":"integer","title":"Evidence Count"},"visible_neighbor_count":{"type":"integer","title":"Visible Neighbor Count"},"expandable":{"type":"boolean","title":"Expandable"},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes"}},"additionalProperties":false,"type":"object","required":["id","layer","kind","category","label","summary","relation","state","status","confidence","salience","turn_index","evidence_count","visible_neighbor_count","expandable"],"title":"MemoryGraphNodeView"},"MemoryGraphPageView":{"properties":{"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"truncated":{"type":"boolean","title":"Truncated"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"returned_neighbors":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Returned Neighbors"}},"additionalProperties":false,"type":"object","required":["limit","offset","truncated"],"title":"MemoryGraphPageView"},"MemoryGraphResponse":{"properties":{"schema_version":{"type":"string","title":"Schema Version"},"scope_name":{"type":"string","title":"Scope Name"},"snapshot_id":{"type":"string","title":"Snapshot Id"},"view":{"type":"string","enum":["overview","neighbors","recall_trace"],"title":"View"},"requested_layers":{"items":{"type":"string","enum":["slow","fast","source"]},"type":"array","title":"Requested Layers"},"resolved_layers":{"items":{"type":"string","enum":["slow","fast","source"]},"type":"array","title":"Resolved Layers"},"fallback_layer":{"anyOf":[{"type":"string","enum":["slow","fast","source"]},{"type":"null"}],"title":"Fallback Layer"},"nodes":{"items":{"$ref":"#/components/schemas/MemoryGraphNodeView"},"type":"array","title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/MemoryGraphEdgeView"},"type":"array","title":"Edges"},"counts":{"$ref":"#/components/schemas/MemoryGraphCountsView"},"page":{"$ref":"#/components/schemas/MemoryGraphPageView"},"root_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Root Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"},"selected_memory_ids":{"items":{"type":"string"},"type":"array","title":"Selected Memory Ids"},"missing_memory_ids":{"items":{"type":"string"},"type":"array","title":"Missing Memory Ids"}},"additionalProperties":false,"type":"object","required":["schema_version","scope_name","snapshot_id","view","requested_layers","resolved_layers","nodes","edges","counts","page"],"title":"MemoryGraphResponse"},"MemoryGraphTraceRequest":{"properties":{"query":{"type":"string","maxLength":100000,"minLength":1,"title":"Query"},"query_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Query Time"},"max_windows":{"type":"integer","const":8,"title":"Max Windows","default":8},"debug":{"type":"boolean","title":"Debug","default":false}},"additionalProperties":false,"type":"object","required":["query"],"title":"MemoryGraphTraceRequest"},"MemoryGraphTraceResponse":{"properties":{"schema_version":{"type":"string","title":"Schema Version"},"scope_name":{"type":"string","title":"Scope Name"},"snapshot_id":{"type":"string","title":"Snapshot Id"},"view":{"type":"string","enum":["overview","neighbors","recall_trace"],"title":"View"},"requested_layers":{"items":{"type":"string","enum":["slow","fast","source"]},"type":"array","title":"Requested Layers"},"resolved_layers":{"items":{"type":"string","enum":["slow","fast","source"]},"type":"array","title":"Resolved Layers"},"fallback_layer":{"anyOf":[{"type":"string","enum":["slow","fast","source"]},{"type":"null"}],"title":"Fallback Layer"},"nodes":{"items":{"$ref":"#/components/schemas/MemoryGraphNodeView"},"type":"array","title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/MemoryGraphEdgeView"},"type":"array","title":"Edges"},"counts":{"$ref":"#/components/schemas/MemoryGraphCountsView"},"page":{"$ref":"#/components/schemas/MemoryGraphPageView"},"root_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Root Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"},"selected_memory_ids":{"items":{"type":"string"},"type":"array","title":"Selected Memory Ids"},"missing_memory_ids":{"items":{"type":"string"},"type":"array","title":"Missing Memory Ids"},"query_id":{"type":"string","title":"Query Id"},"index_job_id":{"type":"string","title":"Index Job Id"},"retrieval_summary":{"additionalProperties":true,"type":"object","title":"Retrieval Summary"},"debug":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Debug"}},"additionalProperties":false,"type":"object","required":["schema_version","scope_name","snapshot_id","view","requested_layers","resolved_layers","nodes","edges","counts","page","query_id","index_job_id","retrieval_summary"],"title":"MemoryGraphTraceResponse"},"MemoryMessage":{"properties":{"message_id":{"type":"string","maxLength":200,"minLength":1,"title":"Message Id"},"role":{"type":"string","enum":["user","assistant","system","tool"],"title":"Role"},"content":{"type":"string","maxLength":200000,"minLength":1,"title":"Content"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"}},"additionalProperties":false,"type":"object","required":["message_id","role","content","timestamp"],"title":"MemoryMessage"},"PromptEvidenceView":{"properties":{"schema_version":{"type":"string","title":"Schema Version"},"format":{"type":"string","enum":["text/plain","application/json"],"title":"Format"},"mode":{"type":"string","enum":["raw_hierarchical","compiled_evidence_packet"],"title":"Mode"},"content":{"type":"string","title":"Content"},"content_sha256":{"type":"string","title":"Content Sha256"},"content_character_count":{"type":"integer","title":"Content Character Count"},"source_text_verbatim":{"type":"boolean","title":"Source Text Verbatim"},"trust_boundary":{"type":"string","title":"Trust Boundary"},"window_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Window Count"},"source_block_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Block Count"},"neighbor_block_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Neighbor Block Count"},"memory_context_block_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Memory Context Block Count"}},"additionalProperties":false,"type":"object","required":["schema_version","format","mode","content","content_sha256","content_character_count","source_text_verbatim","trust_boundary"],"title":"PromptEvidenceView"},"QuotaMetricView":{"properties":{"used":{"type":"integer","title":"Used"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Remaining"}},"additionalProperties":false,"type":"object","required":["used"],"title":"QuotaMetricView"},"QuotaView":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"principal":{"type":"string","title":"Principal"},"plan":{"type":"string","const":"pilot","title":"Plan","default":"pilot"},"ingest_raw_tokens":{"$ref":"#/components/schemas/QuotaMetricView"},"recall_requests":{"$ref":"#/components/schemas/QuotaMetricView"}},"additionalProperties":false,"type":"object","required":["tenant_id","principal","ingest_raw_tokens","recall_requests"],"title":"QuotaView"},"RecallRequest":{"properties":{"query":{"type":"string","maxLength":100000,"minLength":1,"title":"Query"},"query_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Query Time"},"evidence_mode":{"type":"string","enum":["raw","auto","compiled"],"title":"Evidence Mode","default":"auto"},"max_windows":{"type":"integer","const":8,"title":"Max Windows","default":8},"wait_for_job_id":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Wait For Job Id"},"debug":{"type":"boolean","title":"Debug","default":false}},"additionalProperties":false,"type":"object","required":["query"],"title":"RecallRequest"},"RecallResponse":{"properties":{"query_id":{"type":"string","title":"Query Id"},"scope_name":{"type":"string","title":"Scope Name"},"index_job_id":{"type":"string","title":"Index Job Id"},"evidence_route":{"$ref":"#/components/schemas/EvidenceRouteView"},"evidence":{"additionalProperties":true,"type":"object","title":"Evidence"},"prompt_evidence":{"$ref":"#/components/schemas/PromptEvidenceView"},"debug":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Debug"}},"additionalProperties":false,"type":"object","required":["query_id","scope_name","index_job_id","evidence_route","evidence","prompt_evidence"],"title":"RecallResponse"},"RetentionPolicyRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"inactive_days":{"type":"integer","maximum":3650.0,"minimum":1.0,"title":"Inactive Days"}},"additionalProperties":false,"type":"object","required":["enabled","inactive_days"],"title":"RetentionPolicyRequest"},"RetentionPolicyView":{"properties":{"scope_name":{"type":"string","title":"Scope Name"},"enabled":{"type":"boolean","title":"Enabled"},"inactive_days":{"type":"integer","title":"Inactive Days"},"created_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Updated At"}},"additionalProperties":false,"type":"object","required":["scope_name","enabled","inactive_days"],"title":"RetentionPolicyView"},"ScopeCatalogView":{"properties":{"scope_name":{"type":"string","title":"Scope Name"},"created_at":{"type":"number","title":"Created At"},"last_seen_at":{"type":"number","title":"Last Seen At"},"last_ingest_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Last Ingest At"},"last_recall_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Last Recall At"},"session_count":{"type":"integer","title":"Session Count"},"ingest_request_count":{"type":"integer","title":"Ingest Request Count"},"recall_request_count":{"type":"integer","title":"Recall Request Count"},"message_count":{"type":"integer","title":"Message Count"}},"additionalProperties":false,"type":"object","required":["scope_name","created_at","last_seen_at","session_count","ingest_request_count","recall_request_count","message_count"],"title":"ScopeCatalogView"},"ScopeSessionView":{"properties":{"session_id":{"type":"string","title":"Session Id"},"created_at":{"type":"number","title":"Created At"},"last_ingest_at":{"type":"number","title":"Last Ingest At"},"ingest_request_count":{"type":"integer","title":"Ingest Request Count"},"message_count":{"type":"integer","title":"Message Count"}},"additionalProperties":false,"type":"object","required":["session_id","created_at","last_ingest_at","ingest_request_count","message_count"],"title":"ScopeSessionView"},"ScopeSummaryView":{"properties":{"scope":{"$ref":"#/components/schemas/ScopeCatalogView"},"sessions":{"items":{"$ref":"#/components/schemas/ScopeSessionView"},"type":"array","title":"Sessions"}},"additionalProperties":false,"type":"object","required":["scope","sessions"],"title":"ScopeSummaryView"},"ScopeTokenCreateRequest":{"properties":{"label":{"type":"string","maxLength":120,"minLength":1,"title":"Label"},"subject":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Subject"},"permissions":{"items":{"type":"string"},"type":"array","maxItems":10,"minItems":1,"title":"Permissions"},"scope_names":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Scope Names"},"scope_prefixes":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Scope Prefixes"},"expires_in_seconds":{"type":"integer","maximum":31622400.0,"minimum":300.0,"title":"Expires In Seconds"},"provisional_delivery_seconds":{"anyOf":[{"type":"integer","maximum":900.0,"minimum":60.0},{"type":"null"}],"title":"Provisional Delivery Seconds"}},"additionalProperties":false,"type":"object","required":["label","permissions","expires_in_seconds"],"title":"ScopeTokenCreateRequest"},"ScopeTokenView":{"properties":{"token_id":{"type":"string","title":"Token Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions"},"scope_names":{"items":{"type":"string"},"type":"array","title":"Scope Names"},"scope_prefixes":{"items":{"type":"string"},"type":"array","title":"Scope Prefixes"},"label":{"type":"string","title":"Label"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"created_by_key_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Key Id"},"created_at":{"type":"number","title":"Created At"},"expires_at":{"type":"number","title":"Expires At"},"revoked_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Revoked At"},"last_used_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Last Used At"}},"additionalProperties":false,"type":"object","required":["token_id","tenant_id","permissions","scope_names","scope_prefixes","label","created_at","expires_at"],"title":"ScopeTokenView"},"SessionCredentialView":{"properties":{"type":{"type":"string","enum":["api_key","scope_token"],"title":"Type"},"tenant_id":{"type":"string","title":"Tenant Id"},"principal":{"type":"string","title":"Principal"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions"},"scope_restrictions":{"$ref":"#/components/schemas/SessionScopeRestrictionsView"},"expires_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Expires At"}},"additionalProperties":false,"type":"object","required":["type","tenant_id","principal","permissions","scope_restrictions"],"title":"SessionCredentialView"},"SessionScopeRestrictionsView":{"properties":{"unrestricted":{"type":"boolean","title":"Unrestricted"},"names":{"items":{"type":"string"},"type":"array","title":"Names"},"prefixes":{"items":{"type":"string"},"type":"array","title":"Prefixes"}},"additionalProperties":false,"type":"object","required":["unrestricted","names","prefixes"],"title":"SessionScopeRestrictionsView"},"SessionServiceView":{"properties":{"name":{"type":"string","const":"tmcra-memory","title":"Name","default":"tmcra-memory"},"version":{"type":"string","title":"Version"},"capabilities":{"items":{"type":"string"},"type":"array","title":"Capabilities"}},"additionalProperties":false,"type":"object","required":["version","capabilities"],"title":"SessionServiceView"},"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"},"WebhookCreateRequest":{"properties":{"label":{"type":"string","maxLength":120,"minLength":1,"title":"Label"},"url":{"type":"string","maxLength":2048,"minLength":8,"title":"Url"},"events":{"items":{"type":"string","enum":["job.succeeded","job.failed","job.cancelled","ingest.completed","consolidation.completed","index.completed","export.ready","scope.deleted"]},"type":"array","maxItems":8,"minItems":1,"title":"Events"}},"additionalProperties":false,"type":"object","required":["label","url","events"],"title":"WebhookCreateRequest"},"WebhookView":{"properties":{"endpoint_id":{"type":"string","title":"Endpoint Id"},"label":{"type":"string","title":"Label"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"enabled":{"type":"boolean","title":"Enabled"},"created_at":{"type":"number","title":"Created At"},"updated_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Updated At"}},"additionalProperties":false,"type":"object","required":["endpoint_id","label","url","events","enabled","created_at"],"title":"WebhookView"}},"securitySchemes":{"TMCRAApiKey":{"type":"http","scheme":"bearer"}}},"tags":[{"name":"memory","description":"Write, consolidate, and recall memory."},{"name":"memory-graph","description":"Explore committed slow, fast, and source memory projections."},{"name":"jobs","description":"Inspect and control asynchronous jobs."},{"name":"usage","description":"Inspect registered model-API usage."},{"name":"access","description":"Issue revocable persona-scoped access tokens."},{"name":"governance","description":"Export, delete, retain, and review memory."},{"name":"webhooks","description":"Deliver signed lifecycle event notifications."}]}