{ "components": { "securitySchemes": { "apiKey": { "in": "header", "name": "X-API-Key", "type": "apiKey" }, "sessionBearer": { "scheme": "bearer", "type": "http" } } }, "info": { "description": "The /api/v1 REST mirror of the 3ngram memory core (docs/concepts/architecture.mdx: one core, N transports). Authenticate with an X-API-Key header or a session Bearer token.", "title": "3ngram REST API", "version": "v1" }, "openapi": "3.1.0", "paths": { "/api/v1/account": { "delete": { "operationId": "deleteAccount", "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "confirm": { "const": true, "type": "boolean" } }, "required": [ "confirm" ], "type": "object" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "alreadyDeleted": { "type": "boolean" }, "deleted": { "const": true, "type": "boolean" }, "erased": { "additionalProperties": false, "properties": { "agentSessions": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "apiKeysRevoked": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "commitments": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "emailVerificationTokensDeleted": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "factProposals": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "facts": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "memories": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "oauthCodesDeleted": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "oauthTokensRevoked": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "passwordResetTokensDeleted": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "proposals": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "sessionsDeleted": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": [ "memories", "facts", "commitments", "proposals", "factProposals", "agentSessions", "sessionsDeleted", "apiKeysRevoked", "oauthTokensRevoked", "oauthCodesDeleted", "passwordResetTokensDeleted", "emailVerificationTokensDeleted" ], "type": "object" } }, "required": [ "deleted", "alreadyDeleted", "erased" ], "type": "object" } } }, "description": "Success" } }, "summary": "Self-serve account deletion: erase PII in place and revoke credentials (GDPR Art. 17 erasure)" } }, "/api/v1/agent-sessions/close": { "post": { "operationId": "closeAgentSession", "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "agent": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "sessionId": { "maxLength": 256, "minLength": 1, "type": "string" } }, "required": [ "agent", "sessionId" ], "type": "object" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "activationEpoch": { "exclusiveMinimum": 0, "maximum": 9007199254740991, "type": "integer" }, "alreadyClosed": { "type": "boolean" }, "closedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "sessionRunId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } }, "required": [ "sessionRunId", "activationEpoch", "closedAt", "alreadyClosed" ], "type": "object" } } }, "description": "Success" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "error": { "enum": [ "not_found" ], "type": "string" } }, "required": [ "error" ], "type": "object" } } }, "description": "This tenant owns no session with that natural key" } }, "summary": "Close an agent session by natural key (SessionEnd). Carries no activation_epoch and is idempotent — a repeat close echoes the first close timestamp." } }, "/api/v1/agent-sessions/heartbeat": { "post": { "operationId": "heartbeatAgentSession", "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "agent": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "lastMessageExcerpt": { "maxLength": 4000, "minLength": 1, "type": "string" }, "sessionId": { "maxLength": 256, "minLength": 1, "type": "string" } }, "required": [ "agent", "sessionId" ], "type": "object" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "activationEpoch": { "exclusiveMinimum": 0, "maximum": 9007199254740991, "type": "integer" }, "lastSeenAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "resurrected": { "type": "boolean" }, "sessionRunId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } }, "required": [ "sessionRunId", "activationEpoch", "lastSeenAt", "resurrected" ], "type": "object" } } }, "description": "Success" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "error": { "enum": [ "not_found" ], "type": "string" } }, "required": [ "error" ], "type": "object" } } }, "description": "This tenant owns no session with that natural key" } }, "summary": "Refresh an agent session lease by natural key (Stop), resurrecting a closed or lease-expired row and optionally snapshotting the turn's bounded last assistant message." } }, "/api/v1/agent-sessions/open": { "post": { "operationId": "openAgentSession", "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "agent": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "briefedMemories": { "items": { "additionalProperties": false, "properties": { "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "status": { "maxLength": 64, "minLength": 1, "type": "string" }, "topic": { "maxLength": 256, "minLength": 1, "type": "string" } }, "required": [ "id", "topic", "status" ], "type": "object" }, "maxItems": 100, "type": "array" }, "project": { "maxLength": 256, "minLength": 1, "type": "string" }, "scope": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "selector": { "default": { "kind": "all" }, "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "const": "all", "type": "string" } }, "required": [ "kind" ], "type": "object" }, { "additionalProperties": false, "properties": { "kind": { "const": "scope", "type": "string" }, "scope": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" } }, "required": [ "kind", "scope" ], "type": "object" }, { "additionalProperties": false, "properties": { "kind": { "const": "project", "type": "string" }, "project": { "maxLength": 256, "minLength": 1, "type": "string" } }, "required": [ "kind", "project" ], "type": "object" }, { "additionalProperties": false, "properties": { "includeUnscoped": { "default": false, "description": "Also match memories in the scope written with NO project (project IS NULL). Default false: strict scope AND project intersection.", "type": "boolean" }, "kind": { "const": "scope_project", "type": "string" }, "project": { "maxLength": 256, "minLength": 1, "type": "string" }, "scope": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" } }, "required": [ "kind", "scope", "project" ], "type": "object" } ] }, "sessionId": { "maxLength": 256, "minLength": 1, "type": "string" }, "source": { "enum": [ "startup", "resume" ], "type": "string" } }, "required": [ "agent", "sessionId", "source" ], "type": "object" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "activationEpoch": { "exclusiveMinimum": 0, "maximum": 9007199254740991, "type": "integer" }, "briefingDeliveredAt": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] }, "created": { "type": "boolean" }, "lastSeenAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "openedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "reopened": { "type": "boolean" }, "sessionRunId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "source": { "enum": [ "startup", "resume" ], "type": "string" } }, "required": [ "sessionRunId", "activationEpoch", "source", "created", "reopened", "openedAt", "lastSeenAt", "briefingDeliveredAt" ], "type": "object" } } }, "description": "Success" }, "409": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "error": { "enum": [ "conflict" ], "type": "string" } }, "required": [ "error" ], "type": "object" } } }, "description": "A startup open reused a natural key already opened with different project, scope or selector" }, "410": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "error": { "enum": [ "account_deleted" ], "type": "string" } }, "required": [ "error" ], "type": "object" } } }, "description": "The account was erased while the request was in flight" } }, "summary": "Open or re-activate an agent session by its natural key (SessionStart). Idempotent: startup inserts, resume reuses the row and advances activation_epoch, and neither restamps the briefing." } }, "/api/v1/agent-sessions/triage/begin": { "post": { "operationId": "beginAgentSessionTriage", "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "agent": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "sessionId": { "maxLength": 256, "minLength": 1, "type": "string" }, "stopHookActive": { "type": "boolean" }, "turnCount": { "maximum": 100000, "minimum": 0, "type": "integer" } }, "required": [ "agent", "sessionId" ], "type": "object" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "armed": { "type": "boolean" }, "attemptId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "reason": { "enum": [ "not-live", "terminal", "pending", "pending-fresh", "no-signal", "cooldown", "debounce", "overflowed" ], "type": "string" }, "sessionRunId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "triageStatus": { "enum": [ "idle", "pending", "completed", "expired", "overflowed" ], "type": "string" } }, "required": [ "sessionRunId", "armed", "triageStatus" ], "type": "object" } } }, "description": "Success" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "error": { "enum": [ "not_found" ], "type": "string" } }, "required": [ "error" ], "type": "object" } } }, "description": "This tenant owns no session with that natural key" } }, "summary": "Ask whether a Stop should inject the debrief nudge for this run (natural key). The server evaluates the entry rule and the debounce and answers `armed`; a decline is a 200 carrying a content-free reason, and only an unknown natural key is a 404." } }, "/api/v1/agent-sessions/triage/complete": { "post": { "operationId": "completeAgentSessionTriage", "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "agent": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "attemptId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "defensive": { "type": "boolean" }, "sessionId": { "maxLength": 256, "minLength": 1, "type": "string" } }, "required": [ "agent", "sessionId", "attemptId" ], "type": "object" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "eventCount": { "maximum": 500, "minimum": 0, "type": "integer" }, "sessionRunId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "sinceBeginCount": { "maximum": 500, "minimum": 0, "type": "integer" }, "triageStatus": { "enum": [ "completed", "expired", "overflowed" ], "type": "string" }, "truncated": { "type": "boolean" } }, "required": [ "sessionRunId", "triageStatus", "eventCount", "sinceBeginCount", "truncated" ], "type": "object" } } }, "description": "Success" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "error": { "enum": [ "not_found" ], "type": "string" } }, "required": [ "error" ], "type": "object" } } }, "description": "This tenant owns no session with that natural key" }, "409": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "error": { "enum": [ "conflict" ], "type": "string" } }, "required": [ "error" ], "type": "object" } } }, "description": "The attempt named is no longer the current one — a stale hook delivery, a second Stop, or a closer that re-claimed the row" } }, "summary": "Finish a triage attempt: absorb whatever the continuation wrote and stamp the outcome — completed with provenance, expired on a zero-write continuation so the closer still runs, overflowed past the per-run ceiling — plus the cumulative event-id watermark. defensive: true (no debrief was shown) lands expired and keeps the begin watermark." } }, "/api/v1/agent-sessions/{sessionRunId}": { "get": { "operationId": "getAgentSessionRun", "parameters": [ { "in": "path", "name": "sessionRunId", "required": true, "schema": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "activationEpoch": { "exclusiveMinimum": 0, "maximum": 9007199254740991, "type": "integer" }, "agent": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "briefedMemories": { "items": { "additionalProperties": false, "properties": { "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "status": { "maxLength": 64, "minLength": 1, "type": "string" }, "topic": { "maxLength": 256, "minLength": 1, "type": "string" } }, "required": [ "id", "topic", "status" ], "type": "object" }, "maxItems": 100, "type": "array" }, "briefingDeliveredAt": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] }, "closedAt": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] }, "lastSeenAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "openedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "project": { "anyOf": [ { "maxLength": 256, "minLength": 1, "type": "string" }, { "type": "null" } ] }, "scope": { "anyOf": [ { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, { "type": "null" } ] }, "selector": { "oneOf": [ { "additionalProperties": false, "properties": { "kind": { "const": "all", "type": "string" } }, "required": [ "kind" ], "type": "object" }, { "additionalProperties": false, "properties": { "kind": { "const": "scope", "type": "string" }, "scope": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" } }, "required": [ "kind", "scope" ], "type": "object" }, { "additionalProperties": false, "properties": { "kind": { "const": "project", "type": "string" }, "project": { "maxLength": 256, "minLength": 1, "type": "string" } }, "required": [ "kind", "project" ], "type": "object" }, { "additionalProperties": false, "properties": { "includeUnscoped": { "default": false, "description": "Also match memories in the scope written with NO project (project IS NULL). Default false: strict scope AND project intersection.", "type": "boolean" }, "kind": { "const": "scope_project", "type": "string" }, "project": { "maxLength": 256, "minLength": 1, "type": "string" }, "scope": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" } }, "required": [ "kind", "scope", "project", "includeUnscoped" ], "type": "object" } ] }, "sessionId": { "maxLength": 256, "minLength": 1, "type": "string" }, "sessionRunId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "source": { "enum": [ "startup", "resume" ], "type": "string" }, "triageStatus": { "enum": [ "idle", "pending", "completed", "expired", "overflowed" ], "type": "string" } }, "required": [ "sessionRunId", "agent", "sessionId", "source", "project", "scope", "selector", "activationEpoch", "triageStatus", "openedAt", "closedAt", "lastSeenAt", "briefingDeliveredAt", "briefedMemories" ], "type": "object" } } }, "description": "Success" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "detail": { "maxLength": 512, "type": "string" }, "error": { "const": "invalid_input", "type": "string" } }, "required": [ "error" ], "type": "object" } } }, "description": "Malformed run id, or a run id this tenant does not own" } }, "summary": "The bookkeeping row for one run, addressed by sessionRunId: identity, lifecycle timestamps, activation_epoch, triage status and the briefed memories the run was shown. Read-only — the read never refreshes the lease or resurrects a closed row. The last assistant-message excerpt and the watermark ids are not projected." } }, "/api/v1/agent-sessions/{sessionRunId}/events": { "get": { "operationId": "listSessionEvents", "parameters": [ { "in": "path", "name": "sessionRunId", "required": true, "schema": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } }, { "in": "query", "name": "cursor", "required": false, "schema": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 50, "maximum": 100, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "additionalProperties": false, "properties": { "actorKind": { "enum": [ "user_dashboard", "user_api", "user_mcp", "worker", "importer", "system" ], "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "eventKind": { "enum": [ "create", "revise", "supersede", "resolve", "unresolve", "archive", "import", "embed_failed", "reaffirm" ], "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "memoryId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "sessionRunId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } }, "required": [ "id", "memoryId", "eventKind", "actorKind", "sessionRunId", "createdAt" ], "type": "object" }, "maxItems": 100, "type": "array" }, "nextCursor": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "truncated": { "type": "boolean" } }, "required": [ "items", "truncated" ], "type": "object" } } }, "description": "Success" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "detail": { "maxLength": 512, "type": "string" }, "error": { "const": "invalid_input", "type": "string" } }, "required": [ "error" ], "type": "object" } } }, "description": "Malformed run id, cursor or limit, or a run id this tenant does not own" } }, "summary": "List the audit events one agent-session run produced (bounded, keyset-paginated). Each page is its own read-committed snapshot, so a write that commits after a page was read may be absent from that walk even if its id sorts earlier; treat one walk as a bounded observation, not the complete record of a run." } }, "/api/v1/agent-sessions/{sessionRunId}/triage-attempts": { "get": { "operationId": "listSessionTriageAttempts", "parameters": [ { "in": "path", "name": "sessionRunId", "required": true, "schema": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "count": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "items": { "items": { "anyOf": [ { "additionalProperties": false, "properties": { "armedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "attemptId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "finalizedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "outcome": { "enum": [ "completed", "expired", "overflowed" ], "type": "string" } }, "required": [ "attemptId", "armedAt", "finalizedAt", "outcome" ], "type": "object" }, { "additionalProperties": false, "properties": { "armedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "attemptId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } }, "required": [ "attemptId", "armedAt" ], "type": "object" } ] }, "maxItems": 50, "type": "array" }, "sessionRunId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "truncated": { "type": "boolean" } }, "required": [ "sessionRunId", "items", "count", "truncated" ], "type": "object" } } }, "description": "Success" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "detail": { "maxLength": 512, "type": "string" }, "error": { "const": "invalid_input", "type": "string" } }, "required": [ "error" ], "type": "object" } } }, "description": "Malformed run id, or a run id this tenant does not own" } }, "summary": "The run's interactive nudge attempts, oldest first: when each was armed and how it finished (completed with provenance, expired on a zero-write continuation, overflowed past the ceiling). An entry with no outcome was never finalized — in flight while the row is pending, abandoned otherwise. The log keeps the newest entries up to a bound; count is the true total and truncated says when they disagree." } }, "/api/v1/briefing": { "get": { "operationId": "briefing", "parameters": [ { "in": "query", "name": "kind", "required": true, "schema": { "enum": [ "all", "scope", "project", "scope_project" ], "type": "string" } }, { "in": "query", "name": "scope", "required": false, "schema": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" } }, { "in": "query", "name": "project", "required": false, "schema": { "maxLength": 256, "minLength": 1, "type": "string" } }, { "in": "query", "name": "includeUnscoped", "required": false, "schema": { "default": false, "description": "Also match memories in the scope written with NO project (project IS NULL). Default false: strict scope AND project intersection.", "type": "boolean" } }, { "in": "query", "name": "mode", "required": false, "schema": { "enum": [ "brief", "full" ], "type": "string" } }, { "in": "query", "name": "sections", "required": false, "schema": { "description": "Comma-separated subset of sections to compute (unique names from: commitments, overdue, blockers, staleCandidates, recentDecisions, preferences). Absent = all sections; un-requested sections are skipped and omitted from the result.", "type": "string" } }, { "in": "query", "name": "sectionLimit", "required": false, "schema": { "description": "Per-section item bound (1..100). Absent = the mode default (3 brief / 25 full).", "maximum": 100, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": true, "properties": { "appliedScope": { "description": "Scope your retrieval-scope policy applied to this unscoped call (mode default). Absent when nothing was narrowed.", "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "blockers": { "additionalProperties": true, "properties": { "count": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "hasMore": { "type": "boolean" }, "items": { "items": { "additionalProperties": true, "properties": { "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "memoryType": { "enum": [ "decision", "commitment", "blocker", "fact", "preference", "pattern", "note", "event" ], "type": "string" }, "project": { "anyOf": [ { "maxLength": 256, "minLength": 1, "type": "string" }, { "type": "null" } ] }, "recordedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "scope": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "topic": { "type": "string" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" } }, "required": [ "id", "memoryType", "topic", "scope", "project", "recordedAt", "updatedAt" ], "type": "object" }, "maxItems": 100, "type": "array" } }, "required": [ "count", "items", "hasMore" ], "type": "object" }, "commitments": { "additionalProperties": true, "properties": { "count": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "hasMore": { "type": "boolean" }, "items": { "items": { "additionalProperties": true, "properties": { "dueAt": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "memoryId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "overdue": { "type": "boolean" }, "owner": { "type": [ "string", "null" ] }, "project": { "anyOf": [ { "maxLength": 256, "minLength": 1, "type": "string" }, { "type": "null" } ] }, "scope": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "status": { "enum": [ "open", "waiting", "resolved", "expired" ], "type": "string" }, "topic": { "type": "string" } }, "required": [ "id", "memoryId", "topic", "status", "dueAt", "overdue", "owner", "scope", "project" ], "type": "object" }, "maxItems": 100, "type": "array" } }, "required": [ "count", "items", "hasMore" ], "type": "object" }, "generatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "mode": { "enum": [ "brief", "full" ], "type": "string" }, "overdue": { "additionalProperties": true, "properties": { "count": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "hasMore": { "type": "boolean" }, "items": { "items": { "additionalProperties": true, "properties": { "dueAt": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "memoryId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "overdue": { "type": "boolean" }, "owner": { "type": [ "string", "null" ] }, "project": { "anyOf": [ { "maxLength": 256, "minLength": 1, "type": "string" }, { "type": "null" } ] }, "scope": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "status": { "enum": [ "open", "waiting", "resolved", "expired" ], "type": "string" }, "topic": { "type": "string" } }, "required": [ "id", "memoryId", "topic", "status", "dueAt", "overdue", "owner", "scope", "project" ], "type": "object" }, "maxItems": 100, "type": "array" } }, "required": [ "count", "items", "hasMore" ], "type": "object" }, "preferences": { "additionalProperties": true, "properties": { "count": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "hasMore": { "type": "boolean" }, "items": { "items": { "additionalProperties": true, "properties": { "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "memoryType": { "enum": [ "decision", "commitment", "blocker", "fact", "preference", "pattern", "note", "event" ], "type": "string" }, "project": { "anyOf": [ { "maxLength": 256, "minLength": 1, "type": "string" }, { "type": "null" } ] }, "recordedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "scope": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "topic": { "type": "string" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" } }, "required": [ "id", "memoryType", "topic", "scope", "project", "recordedAt", "updatedAt" ], "type": "object" }, "maxItems": 100, "type": "array" } }, "required": [ "count", "items", "hasMore" ], "type": "object" }, "recentDecisions": { "additionalProperties": true, "properties": { "count": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "hasMore": { "type": "boolean" }, "items": { "items": { "additionalProperties": true, "properties": { "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "memoryType": { "enum": [ "decision", "commitment", "blocker", "fact", "preference", "pattern", "note", "event" ], "type": "string" }, "project": { "anyOf": [ { "maxLength": 256, "minLength": 1, "type": "string" }, { "type": "null" } ] }, "recordedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "scope": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "topic": { "type": "string" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" } }, "required": [ "id", "memoryType", "topic", "scope", "project", "recordedAt", "updatedAt" ], "type": "object" }, "maxItems": 100, "type": "array" } }, "required": [ "count", "items", "hasMore" ], "type": "object" }, "selector": { "oneOf": [ { "additionalProperties": true, "properties": { "kind": { "const": "all", "type": "string" } }, "required": [ "kind" ], "type": "object" }, { "additionalProperties": true, "properties": { "kind": { "const": "scope", "type": "string" }, "scope": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" } }, "required": [ "kind", "scope" ], "type": "object" }, { "additionalProperties": true, "properties": { "kind": { "const": "project", "type": "string" }, "project": { "maxLength": 256, "minLength": 1, "type": "string" } }, "required": [ "kind", "project" ], "type": "object" }, { "additionalProperties": true, "properties": { "includeUnscoped": { "default": false, "description": "Also match memories in the scope written with NO project (project IS NULL). Default false: strict scope AND project intersection.", "type": "boolean" }, "kind": { "const": "scope_project", "type": "string" }, "project": { "maxLength": 256, "minLength": 1, "type": "string" }, "scope": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" } }, "required": [ "kind", "scope", "project", "includeUnscoped" ], "type": "object" } ] }, "staleCandidates": { "additionalProperties": true, "properties": { "count": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "hasMore": { "type": "boolean" }, "items": { "items": { "additionalProperties": true, "properties": { "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "memoryType": { "enum": [ "decision", "commitment", "blocker", "fact", "preference", "pattern", "note", "event" ], "type": "string" }, "project": { "anyOf": [ { "maxLength": 256, "minLength": 1, "type": "string" }, { "type": "null" } ] }, "recordedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "scope": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "topic": { "type": "string" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" } }, "required": [ "id", "memoryType", "topic", "scope", "project", "recordedAt", "updatedAt" ], "type": "object" }, "maxItems": 100, "type": "array" } }, "required": [ "count", "items", "hasMore" ], "type": "object" } }, "required": [ "selector", "mode", "generatedAt" ], "type": "object" } } }, "description": "Success" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "detail": { "maxLength": 512, "type": "string" }, "error": { "const": "invalid_input", "type": "string" } }, "required": [ "error" ], "type": "object" } } }, "description": "Invalid briefing input; detail names retryable scopes when retrieval policy requires one" } }, "summary": "Session briefing over an explicit selector (mirrors the MCP briefing tool)" } }, "/api/v1/budget": { "get": { "operationId": "getBudget", "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "capUsdOverride": { "type": [ "number", "null" ] }, "consumedUsd": { "type": "number" }, "effectiveCapUsd": { "type": "number" }, "periodEnd": { "type": [ "string", "null" ] }, "periodStart": { "type": [ "string", "null" ] } }, "required": [ "effectiveCapUsd", "consumedUsd", "capUsdOverride", "periodStart", "periodEnd" ], "type": "object" } } }, "description": "Success" } }, "summary": "The caller's current budget status (effective cap + spend this cycle)" } }, "/api/v1/dashboard/search": { "post": { "operationId": "dashboardSearch", "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "asOf": { "additionalProperties": false, "properties": { "asKnownAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "validAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" } }, "type": "object" }, "cursor": { "minLength": 1, "type": "string" }, "limit": { "default": 25, "maximum": 25, "minimum": 1, "type": "integer" }, "memoryType": { "enum": [ "decision", "commitment", "blocker", "fact", "preference", "pattern", "note", "event" ], "type": "string" }, "project": { "maxLength": 256, "minLength": 1, "type": "string" }, "query": { "minLength": 1, "type": "string" }, "scope": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "status": { "enum": [ "active", "archived" ], "type": "string" } }, "required": [ "query" ], "type": "object" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "appliedScope": { "description": "Scope your retrieval-scope policy applied to this unscoped call (mode default). Absent when nothing was narrowed.", "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "count": { "maximum": 25, "minimum": 0, "type": "integer" }, "hasMore": { "type": "boolean" }, "hits": { "items": { "additionalProperties": false, "properties": { "commitmentStatus": { "enum": [ "open", "waiting", "resolved", "expired" ], "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "memoryType": { "enum": [ "decision", "commitment", "blocker", "fact", "preference", "pattern", "note", "event" ], "type": "string" }, "score": { "type": "number" }, "superseded": { "type": "boolean" }, "topic": { "type": "string" } }, "required": [ "id", "memoryType", "topic", "score", "superseded" ], "type": "object" }, "maxItems": 25, "type": "array" }, "nextCursor": { "type": "string" } }, "required": [ "hits", "count", "hasMore" ], "type": "object" } } }, "description": "Success" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "detail": { "maxLength": 512, "type": "string" }, "error": { "const": "invalid_input", "type": "string" } }, "required": [ "error" ], "type": "object" } } }, "description": "Invalid search input or continuation cursor; detail names retryable scopes when retrieval policy requires one" } }, "summary": "Dashboard search continuation with identity-only hits" } }, "/api/v1/export": { "get": { "operationId": "exportAccount", "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "account": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "email": { "format": "email", "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$", "type": "string" }, "emailVerifiedAt": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" } }, "required": [ "id", "email", "emailVerifiedAt", "createdAt", "updatedAt" ], "type": "object" }, "agentSessions": { "items": { "additionalProperties": false, "properties": { "activationEpoch": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "agent": { "type": "string" }, "briefedMemories": { "items": { "additionalProperties": false, "properties": { "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "status": { "type": "string" }, "topic": { "type": "string" } }, "required": [ "id", "topic", "status" ], "type": "object" }, "type": "array" }, "briefingDeliveredAt": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] }, "closedAt": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] }, "closerFailureCount": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "closerNextAttemptAt": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "lastMessageExcerpt": { "type": [ "string", "null" ] }, "lastSeenAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "lastTriagedEventIds": { "items": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "type": "array" }, "needsLook": { "type": "boolean" }, "openedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "project": { "type": [ "string", "null" ] }, "scope": { "type": [ "string", "null" ] }, "selector": {}, "sessionId": { "type": "string" }, "source": { "type": "string" }, "triageArmedAt": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] }, "triageAttemptCount": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "triageAttemptId": { "anyOf": [ { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, { "type": "null" } ] }, "triageAttemptLog": { "items": { "anyOf": [ { "additionalProperties": false, "properties": { "armedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "attemptId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "finalizedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "outcome": { "enum": [ "completed", "expired", "overflowed" ], "type": "string" } }, "required": [ "attemptId", "armedAt", "finalizedAt", "outcome" ], "type": "object" }, { "additionalProperties": false, "properties": { "armedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "attemptId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } }, "required": [ "attemptId", "armedAt" ], "type": "object" } ] }, "type": "array" }, "triageStatus": { "type": "string" } }, "required": [ "id", "agent", "sessionId", "source", "project", "scope", "selector", "openedAt", "closedAt", "lastSeenAt", "activationEpoch", "triageStatus", "triageAttemptId", "triageArmedAt", "triageAttemptLog", "triageAttemptCount", "lastTriagedEventIds", "briefingDeliveredAt", "briefedMemories", "lastMessageExcerpt", "needsLook", "closerFailureCount", "closerNextAttemptAt" ], "type": "object" }, "type": "array" }, "commitments": { "items": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "dueAt": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "lastResolutionReason": { "type": [ "string", "null" ] }, "memoryId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "nextSurfacingAt": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] }, "owner": { "type": [ "string", "null" ] }, "recurrence": {}, "resolvedAt": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] }, "status": { "type": "string" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" } }, "required": [ "id", "memoryId", "status", "owner", "dueAt", "recurrence", "nextSurfacingAt", "resolvedAt", "lastResolutionReason", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "counts": { "additionalProperties": false, "properties": { "agentSessions": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "commitments": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "edges": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "factProposals": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "facts": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "llmUsage": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "memories": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "memoryEvents": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "proposals": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "resolutionProposals": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "retentionProposals": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "scopes": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "userBudgets": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": [ "memories", "facts", "commitments", "scopes", "edges", "memoryEvents", "proposals", "factProposals", "resolutionProposals", "retentionProposals", "agentSessions", "userBudgets", "llmUsage" ], "type": "object" }, "edges": { "items": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "createdBy": { "type": "string" }, "edgeType": { "type": "string" }, "fromId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "sourceConsolidationProposalId": { "anyOf": [ { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, { "type": "null" } ] }, "sourceRetentionProposalId": { "anyOf": [ { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, { "type": "null" } ] }, "toId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } }, "required": [ "id", "fromId", "toId", "sourceConsolidationProposalId", "sourceRetentionProposalId", "edgeType", "createdBy", "createdAt" ], "type": "object" }, "type": "array" }, "exportedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "factProposals": { "items": { "additionalProperties": false, "properties": { "confidence": { "type": [ "number", "null" ] }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "decidedAt": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "memoryId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "memoryType": { "type": "string" }, "predicate": { "type": "string" }, "rationale": { "type": [ "string", "null" ] }, "status": { "type": "string" }, "subject": { "type": "string" }, "validFrom": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] }, "validTo": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] }, "value": { "type": "string" } }, "required": [ "id", "memoryId", "subject", "predicate", "value", "confidence", "validFrom", "validTo", "memoryType", "rationale", "status", "decidedAt", "createdAt" ], "type": "object" }, "type": "array" }, "facts": { "items": { "additionalProperties": false, "properties": { "confidence": { "type": [ "number", "null" ] }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "memoryId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "predicate": { "type": "string" }, "recordedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "sourceFactProposalId": { "anyOf": [ { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, { "type": "null" } ] }, "subject": { "type": "string" }, "validFrom": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "validTo": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] }, "value": { "type": "string" } }, "required": [ "id", "memoryId", "sourceFactProposalId", "subject", "predicate", "value", "confidence", "validFrom", "validTo", "recordedAt", "createdAt" ], "type": "object" }, "type": "array" }, "format": { "const": "3ngram.account-export.v1", "type": "string" }, "judgmentPolicy": { "anyOf": [ { "additionalProperties": false, "properties": { "mode": { "enum": [ "off", "on" ], "type": "string" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" } }, "required": [ "mode", "updatedAt" ], "type": "object" }, { "type": "null" } ] }, "llmUsage": { "items": { "additionalProperties": false, "properties": { "costUsd": { "type": [ "string", "null" ] }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "inputTokens": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "model": { "type": "string" }, "operation": { "type": "string" }, "outputTokens": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": [ "id", "operation", "model", "inputTokens", "outputTokens", "costUsd", "createdAt" ], "type": "object" }, "type": "array" }, "memories": { "items": { "additionalProperties": false, "properties": { "content": { "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "lastReviewedAt": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] }, "memoryType": { "type": "string" }, "project": { "type": [ "string", "null" ] }, "recordedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "scope": { "type": "string" }, "status": { "type": "string" }, "tags": { "items": { "type": "string" }, "type": "array" }, "topic": { "type": "string" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "validFrom": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "validTo": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "memoryType", "topic", "content", "scope", "project", "status", "tags", "validFrom", "validTo", "recordedAt", "createdAt", "updatedAt", "lastReviewedAt" ], "type": "object" }, "type": "array" }, "memoryEvents": { "items": { "additionalProperties": false, "properties": { "actorKind": { "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "eventKind": { "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "memoryId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "payload": {} }, "required": [ "id", "memoryId", "eventKind", "actorKind", "payload", "createdAt" ], "type": "object" }, "type": "array" }, "profile": { "anyOf": [ { "additionalProperties": false, "properties": { "aiTools": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "referralSource": { "type": [ "string", "null" ] }, "role": { "type": [ "string", "null" ] }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "useCase": { "type": [ "string", "null" ] } }, "required": [ "role", "useCase", "aiTools", "referralSource", "createdAt", "updatedAt" ], "type": "object" }, { "type": "null" } ] }, "proposals": { "items": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "decidedAt": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] }, "edgeType": { "type": "string" }, "fromId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "memoryType": { "type": "string" }, "rationale": { "type": [ "string", "null" ] }, "similarity": { "type": "number" }, "status": { "type": "string" }, "toId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } }, "required": [ "id", "fromId", "toId", "edgeType", "memoryType", "similarity", "rationale", "status", "decidedAt", "createdAt" ], "type": "object" }, "type": "array" }, "resolutionProposals": { "items": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "decidedAt": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "memoryId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "probability": { "type": "number" }, "sessionRunId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "status": { "type": "string" } }, "required": [ "id", "memoryId", "sessionRunId", "probability", "status", "decidedAt", "createdAt" ], "type": "object" }, "type": "array" }, "retentionProposals": { "items": { "additionalProperties": false, "properties": { "action": { "enum": [ "keep", "archive", "supersede", "conflict" ], "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "decidedAt": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "memoryId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "model": { "type": "string" }, "probabilities": { "additionalProperties": { "type": "number" }, "propertyNames": { "type": "string" }, "type": "object" }, "probability": { "type": "number" }, "relatedMemoryId": { "anyOf": [ { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, { "type": "null" } ] }, "status": { "enum": [ "proposed", "applied", "rejected", "dismissed" ], "type": "string" } }, "required": [ "id", "memoryId", "action", "relatedMemoryId", "probability", "probabilities", "model", "status", "decidedAt", "createdAt" ], "type": "object" }, "type": "array" }, "retrievalPolicy": { "anyOf": [ { "additionalProperties": false, "properties": { "defaultScope": { "anyOf": [ { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, { "type": "null" } ] }, "mode": { "enum": [ "off", "default", "require" ], "type": "string" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" } }, "required": [ "mode", "defaultScope", "updatedAt" ], "type": "object" }, { "type": "null" } ] }, "scopes": { "items": { "additionalProperties": false, "properties": { "aliases": { "items": { "type": "string" }, "type": "array" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "name", "aliases", "createdAt" ], "type": "object" }, "type": "array" }, "userBudgets": { "items": { "additionalProperties": false, "properties": { "capUsdOverride": { "type": [ "string", "null" ] }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "periodEnd": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] }, "periodStart": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" } }, "required": [ "id", "capUsdOverride", "periodStart", "periodEnd", "updatedAt" ], "type": "object" }, "type": "array" }, "writeScopePolicy": { "anyOf": [ { "additionalProperties": false, "properties": { "defaultScope": { "anyOf": [ { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, { "type": "null" } ] }, "mode": { "enum": [ "off", "default", "require" ], "type": "string" }, "updatedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" } }, "required": [ "mode", "defaultScope", "updatedAt" ], "type": "object" }, { "type": "null" } ] } }, "required": [ "format", "exportedAt", "account", "memories", "facts", "commitments", "scopes", "edges", "memoryEvents", "proposals", "factProposals", "resolutionProposals", "retentionProposals", "agentSessions", "userBudgets", "llmUsage", "profile", "retrievalPolicy", "writeScopePolicy", "judgmentPolicy", "counts" ], "type": "object" } } }, "description": "Success" } }, "summary": "Download the caller's complete data archive (GDPR Art. 20 portability)" } }, "/api/v1/facts": { "get": { "operationId": "getFacts", "parameters": [ { "in": "query", "name": "subject", "required": false, "schema": { "minLength": 1, "type": "string" } }, { "in": "query", "name": "predicate", "required": false, "schema": { "minLength": 1, "type": "string" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 50, "maximum": 200, "minimum": 1, "type": "integer" } }, { "in": "query", "name": "validAt", "required": false, "schema": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" } }, { "in": "query", "name": "asKnownAt", "required": false, "schema": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" } }, { "in": "query", "name": "from", "required": false, "schema": { "description": "Inclusive lower bound on valid_from (valid-time window). Use at most 3 fractional-second digits (millisecond precision). Must not be later than `to` when both are given.", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" } }, { "in": "query", "name": "to", "required": false, "schema": { "description": "Exclusive upper bound on the valid-time window [from, to). Use at most 3 fractional-second digits (millisecond precision). Must not be earlier than `from` when both are given.", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": true, "properties": { "count": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "facts": { "items": { "additionalProperties": true, "properties": { "confidence": { "type": [ "number", "null" ] }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "predicate": { "type": "string" }, "recordedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "subject": { "type": "string" }, "validFrom": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "validTo": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] }, "value": { "type": "string" } }, "required": [ "id", "subject", "predicate", "value", "confidence", "validFrom", "validTo", "recordedAt" ], "type": "object" }, "type": "array" } }, "required": [ "facts", "count" ], "type": "object" } } }, "description": "Success" } }, "summary": "Currently-valid facts, with optional bi-temporal time travel (mirrors the MCP get_facts tool)" } }, "/api/v1/me": { "get": { "operationId": "getMe", "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "email": { "format": "email", "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$", "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } }, "required": [ "id", "email" ], "type": "object" } } }, "description": "Success" } }, "summary": "The authenticated identity" } }, "/api/v1/memories": { "get": { "operationId": "listMemories", "parameters": [ { "in": "query", "name": "limit", "required": false, "schema": { "default": 25, "maximum": 100, "minimum": 1, "type": "integer" } }, { "in": "query", "name": "offset", "required": false, "schema": { "default": 0, "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, { "in": "query", "name": "type", "required": false, "schema": { "description": "Single memory type to match. Mutually exclusive with memoryTypes — pass one or the other, never both.", "enum": [ "decision", "commitment", "blocker", "fact", "preference", "pattern", "note", "event" ], "type": "string" } }, { "in": "query", "name": "scope", "required": false, "schema": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" } }, { "in": "query", "name": "project", "required": false, "schema": { "anyOf": [ { "maxLength": 256, "minLength": 1, "type": "string" }, { "items": { "maxLength": 256, "minLength": 1, "type": "string" }, "type": "array" } ] } }, { "in": "query", "name": "status", "required": false, "schema": { "enum": [ "active", "archived" ], "type": "string" } }, { "in": "query", "name": "memoryTypes", "required": false, "schema": { "anyOf": [ { "enum": [ "decision", "commitment", "blocker", "fact", "preference", "pattern", "note", "event" ], "type": "string" }, { "items": { "enum": [ "decision", "commitment", "blocker", "fact", "preference", "pattern", "note", "event" ], "type": "string" }, "maxItems": 8, "minItems": 1, "type": "array" } ], "description": "OR-set of memory types to match (repeat the param to pass several). Mutually exclusive with type — pass one or the other, never both." } }, { "in": "query", "name": "recordedAfter", "required": false, "schema": { "description": "Inclusive lower bound on recorded_at. Use at most 3 fractional-second digits (millisecond precision). Must not be later than recordedBefore when both are given.", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" } }, { "in": "query", "name": "recordedBefore", "required": false, "schema": { "description": "Inclusive upper bound on recorded_at. Use at most 3 fractional-second digits (millisecond precision). Must not be earlier than recordedAfter when both are given.", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "count": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "memories": { "items": { "additionalProperties": false, "properties": { "commitmentStatus": { "enum": [ "open", "waiting", "resolved", "expired" ], "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "memoryType": { "enum": [ "decision", "commitment", "blocker", "fact", "preference", "pattern", "note", "event" ], "type": "string" }, "project": { "anyOf": [ { "maxLength": 256, "minLength": 1, "type": "string" }, { "type": "null" } ] }, "recordedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "scope": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "status": { "enum": [ "active", "archived" ], "type": "string" }, "topic": { "type": "string" } }, "required": [ "id", "memoryType", "topic", "project", "scope", "status", "recordedAt", "createdAt" ], "type": "object" }, "type": "array" }, "total": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": [ "memories", "count", "total" ], "type": "object" } } }, "description": "Success" } }, "summary": "List memories (bounded; identity fields only, never content)" }, "post": { "operationId": "remember", "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "content": { "maxLength": 2000, "minLength": 1, "type": "string" }, "dueAt": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ], "description": "Commitments only: the explicit deadline, as a UTC ISO-8601 instant ending in Z (e.g. 2026-11-30T17:00:00Z) with at most 3 fractional-second digits. Past this instant the commitment reads as overdue in briefing. Omit (or null) for an undated commitment; never inferred from content." }, "facts": { "items": { "additionalProperties": false, "properties": { "cardinality": { "description": "How this value relates to other values of the same subject and predicate. \"one\" (default): it replaces the current value, which ends at this value's validFrom. \"many\": the fact holds several values at once, and nothing is closed.", "enum": [ "one", "many" ], "type": "string" }, "confidence": { "maximum": 1, "minimum": 0, "type": "number" }, "predicate": { "maxLength": 256, "minLength": 1, "type": "string" }, "subject": { "maxLength": 256, "minLength": 1, "type": "string" }, "validFrom": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ], "description": "Inclusive START of the fact’s valid-time window, as an ISO-8601 instant. Use at most 3 fractional-second digits (millisecond precision) — a finer instant is rejected, never truncated. Omit (or null) to leave it unset." }, "validTo": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ], "description": "Exclusive END of the fact’s valid-time window (requires validFrom), as an ISO-8601 instant. Use at most 3 fractional-second digits (millisecond precision) — a finer instant is rejected, never truncated. Omit (or null) to leave it unset." }, "value": { "maxLength": 2000, "minLength": 1, "type": "string" } }, "required": [ "subject", "predicate", "value" ], "type": "object" }, "maxItems": 16, "type": "array" }, "memoryType": { "enum": [ "decision", "commitment", "blocker", "fact", "preference", "pattern", "note", "event" ], "type": "string" }, "owner": { "description": "Commitments only: who owns the commitment, as a short label. Omit when unknown.", "maxLength": 256, "minLength": 1, "type": "string" }, "project": { "maxLength": 256, "minLength": 1, "type": "string" }, "scope": { "description": "Scope to file the memory under. Omitted: your write-scope policy decides (default 'personal').", "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "sessionRunId": { "anyOf": [ { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, { "type": "null" } ], "description": "Opaque id of the current agent session run. Pass through from SessionStart. Pass null to save without session attribution or session lifecycle changes. Omit to attach the single leased-open session for this project, if any. A run id not owned by this tenant fails the write." }, "tags": { "default": [], "items": { "maxLength": 64, "minLength": 1, "type": "string" }, "maxItems": 32, "type": "array" }, "topic": { "maxLength": 256, "minLength": 1, "type": "string" } }, "required": [ "memoryType", "topic", "content" ], "type": "object" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "additionalProperties": true, "properties": { "commitmentId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "embedded": { "enum": [ "pending", "done", "failed", "off" ], "type": "string" }, "factIds": { "items": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "type": "array" }, "memory": { "additionalProperties": true, "properties": { "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "memoryType": { "enum": [ "decision", "commitment", "blocker", "fact", "preference", "pattern", "note", "event" ], "type": "string" }, "project": { "anyOf": [ { "maxLength": 256, "minLength": 1, "type": "string" }, { "type": "null" } ] }, "scope": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "topic": { "type": "string" } }, "required": [ "id", "memoryType", "topic", "scope", "project" ], "type": "object" } }, "required": [ "memory", "embedded" ], "type": "object" } } }, "description": "Success" }, "409": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "error": { "enum": [ "duplicate_memory", "resource_limit_exceeded" ], "type": "string" } }, "required": [ "error" ], "type": "object" } } }, "description": "The content is already live or the live-memory resource limit has been reached" } }, "summary": "Append a new memory (mirrors the MCP remember tool)" } }, "/api/v1/memories/facets": { "get": { "operationId": "getMemoryFacets", "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "projects": { "items": { "maxLength": 256, "minLength": 1, "type": "string" }, "type": "array" }, "scopes": { "items": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "type": "array" } }, "required": [ "scopes", "projects" ], "type": "object" } } }, "description": "Success" } }, "summary": "Distinct scope and project values for the tenant (filter population)" } }, "/api/v1/memories/{id}": { "get": { "operationId": "getMemory", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "commitmentStatus": { "enum": [ "open", "waiting", "resolved", "expired" ], "type": "string" }, "content": { "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "memoryType": { "enum": [ "decision", "commitment", "blocker", "fact", "preference", "pattern", "note", "event" ], "type": "string" }, "project": { "anyOf": [ { "maxLength": 256, "minLength": 1, "type": "string" }, { "type": "null" } ] }, "recordedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "scope": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "status": { "enum": [ "active", "archived" ], "type": "string" }, "tags": { "items": { "type": "string" }, "type": "array" }, "topic": { "type": "string" }, "validFrom": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "validTo": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "memoryType", "topic", "content", "scope", "project", "status", "tags", "validFrom", "validTo", "recordedAt", "createdAt" ], "type": "object" } } }, "description": "Success" } }, "summary": "Inspect a single memory, including content" } }, "/api/v1/memories/{id}/archive": { "post": { "operationId": "archiveMemory", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "sessionRunId": { "anyOf": [ { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, { "type": "null" } ], "description": "Opaque id of the current agent session run. Pass through from SessionStart. Pass null to save without session attribution or session lifecycle changes. Omit to attach the single leased-open session for this project, if any. A run id not owned by this tenant fails the write." } }, "type": "object" } } }, "required": false }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "status": { "enum": [ "archived" ], "type": "string" } }, "required": [ "id", "status" ], "type": "object" } } }, "description": "Success" } }, "summary": "Archive an active memory of any type (operator form; the guarded agent form is revise kind: archive)" } }, "/api/v1/memories/{id}/history": { "get": { "operationId": "getMemoryHistory", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "auditEvents": { "items": { "additionalProperties": false, "properties": { "actorKind": { "enum": [ "user_dashboard", "user_api", "user_mcp", "worker", "importer", "system" ], "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "eventKind": { "enum": [ "create", "revise", "supersede", "resolve", "unresolve", "archive", "import", "embed_failed", "reaffirm" ], "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "payloadMetadata": { "additionalProperties": false, "properties": { "byteLength": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "jsonType": { "anyOf": [ { "enum": [ "object", "array", "string", "number", "boolean", "null" ], "type": "string" }, { "type": "null" } ] }, "present": { "type": "boolean" } }, "required": [ "present", "jsonType", "byteLength" ], "type": "object" }, "sessionRunId": { "anyOf": [ { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "eventKind", "actorKind", "createdAt", "payloadMetadata", "sessionRunId" ], "type": "object" }, "type": "array" }, "createdBySessionRunId": { "anyOf": [ { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, { "type": "null" } ] }, "directRelationships": { "additionalProperties": false, "properties": { "predecessors": { "items": { "additionalProperties": false, "properties": { "edge": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "createdBy": { "enum": [ "user_dashboard", "user_api", "user_mcp", "worker", "importer", "system" ], "type": "string" }, "edgeType": { "enum": [ "supersedes", "updates", "extends", "derives" ], "type": "string" }, "fromId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "toId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } }, "required": [ "id", "fromId", "toId", "edgeType", "createdBy", "createdAt" ], "type": "object" }, "memory": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "isCurrent": { "type": "boolean" }, "lifecycleState": { "enum": [ "current", "superseded", "archived", "historical" ], "type": "string" }, "memoryType": { "enum": [ "decision", "commitment", "blocker", "fact", "preference", "pattern", "note", "event" ], "type": "string" }, "project": { "anyOf": [ { "maxLength": 256, "minLength": 1, "type": "string" }, { "type": "null" } ] }, "recordedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "scope": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "status": { "enum": [ "active", "archived" ], "type": "string" }, "topic": { "type": "string" }, "validFrom": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "validTo": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "memoryType", "topic", "project", "scope", "status", "validFrom", "validTo", "recordedAt", "createdAt", "isCurrent", "lifecycleState" ], "type": "object" } }, "required": [ "memory", "edge" ], "type": "object" }, "type": "array" }, "successors": { "items": { "additionalProperties": false, "properties": { "edge": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "createdBy": { "enum": [ "user_dashboard", "user_api", "user_mcp", "worker", "importer", "system" ], "type": "string" }, "edgeType": { "enum": [ "supersedes", "updates", "extends", "derives" ], "type": "string" }, "fromId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "toId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } }, "required": [ "id", "fromId", "toId", "edgeType", "createdBy", "createdAt" ], "type": "object" }, "memory": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "isCurrent": { "type": "boolean" }, "lifecycleState": { "enum": [ "current", "superseded", "archived", "historical" ], "type": "string" }, "memoryType": { "enum": [ "decision", "commitment", "blocker", "fact", "preference", "pattern", "note", "event" ], "type": "string" }, "project": { "anyOf": [ { "maxLength": 256, "minLength": 1, "type": "string" }, { "type": "null" } ] }, "recordedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "scope": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "status": { "enum": [ "active", "archived" ], "type": "string" }, "topic": { "type": "string" }, "validFrom": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "validTo": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "memoryType", "topic", "project", "scope", "status", "validFrom", "validTo", "recordedAt", "createdAt", "isCurrent", "lifecycleState" ], "type": "object" } }, "required": [ "memory", "edge" ], "type": "object" }, "type": "array" }, "truncated": { "type": "boolean" } }, "required": [ "predecessors", "successors", "truncated" ], "type": "object" }, "eventsTruncated": { "type": "boolean" }, "lastResolutionReason": { "anyOf": [ { "maxLength": 500, "minLength": 1, "type": "string" }, { "type": "null" } ] }, "lineage": { "additionalProperties": false, "properties": { "edges": { "items": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "createdBy": { "enum": [ "user_dashboard", "user_api", "user_mcp", "worker", "importer", "system" ], "type": "string" }, "edgeType": { "enum": [ "supersedes", "updates", "extends", "derives" ], "type": "string" }, "fromId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "toId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } }, "required": [ "id", "fromId", "toId", "edgeType", "createdBy", "createdAt" ], "type": "object" }, "type": "array" }, "nodes": { "items": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "isCurrent": { "type": "boolean" }, "lifecycleState": { "enum": [ "current", "superseded", "archived", "historical" ], "type": "string" }, "memoryType": { "enum": [ "decision", "commitment", "blocker", "fact", "preference", "pattern", "note", "event" ], "type": "string" }, "project": { "anyOf": [ { "maxLength": 256, "minLength": 1, "type": "string" }, { "type": "null" } ] }, "recordedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "scope": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "status": { "enum": [ "active", "archived" ], "type": "string" }, "topic": { "type": "string" }, "validFrom": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "validTo": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "memoryType", "topic", "project", "scope", "status", "validFrom", "validTo", "recordedAt", "createdAt", "isCurrent", "lifecycleState" ], "type": "object" }, "type": "array" }, "truncated": { "type": "boolean" } }, "required": [ "nodes", "edges", "truncated" ], "type": "object" }, "memory": { "additionalProperties": false, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "isCurrent": { "type": "boolean" }, "lifecycleState": { "enum": [ "current", "superseded", "archived", "historical" ], "type": "string" }, "memoryType": { "enum": [ "decision", "commitment", "blocker", "fact", "preference", "pattern", "note", "event" ], "type": "string" }, "project": { "anyOf": [ { "maxLength": 256, "minLength": 1, "type": "string" }, { "type": "null" } ] }, "recordedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "scope": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "status": { "enum": [ "active", "archived" ], "type": "string" }, "topic": { "type": "string" }, "validFrom": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "validTo": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "memoryType", "topic", "project", "scope", "status", "validFrom", "validTo", "recordedAt", "createdAt", "isCurrent", "lifecycleState" ], "type": "object" }, "provenance": { "anyOf": [ { "additionalProperties": true, "properties": { "events": { "additionalProperties": true, "properties": { "items": { "items": { "additionalProperties": true, "properties": { "actorKind": { "enum": [ "user_dashboard", "user_api", "user_mcp", "worker", "importer", "system" ], "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "eventKind": { "enum": [ "create", "revise", "supersede", "resolve", "unresolve", "archive", "import", "embed_failed", "reaffirm" ], "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "sessionRunId": { "anyOf": [ { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, { "type": "null" } ] }, "sourceProposal": { "anyOf": [ { "additionalProperties": true, "properties": { "proposalId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "proposalKind": { "enum": [ "edge", "fact", "resolution", "retention" ], "type": "string" } }, "required": [ "proposalKind", "proposalId" ], "type": "object" }, { "type": "null" } ] } }, "required": [ "id", "eventKind", "actorKind", "createdAt", "sessionRunId", "sourceProposal" ], "type": "object" }, "maxItems": 50, "type": "array" }, "truncated": { "type": "boolean" } }, "required": [ "items", "truncated" ], "type": "object" }, "facts": { "additionalProperties": true, "properties": { "items": { "items": { "additionalProperties": true, "properties": { "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "sourceProposalId": { "anyOf": [ { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, { "type": "null" } ] }, "validFrom": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "validTo": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "validFrom", "validTo", "sourceProposalId" ], "type": "object" }, "maxItems": 25, "type": "array" }, "truncated": { "type": "boolean" } }, "required": [ "items", "truncated" ], "type": "object" }, "origin": { "anyOf": [ { "additionalProperties": true, "properties": { "actorKind": { "enum": [ "user_dashboard", "user_api", "user_mcp", "worker", "importer", "system" ], "type": "string" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "run": { "anyOf": [ { "additionalProperties": true, "properties": { "agent": { "description": "Reported by the session opener; not verified attribution.", "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "openedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" } }, "required": [ "agent", "openedAt" ], "type": "object" }, { "type": "null" } ] }, "sessionRunId": { "anyOf": [ { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, { "type": "null" } ] } }, "required": [ "actorKind", "createdAt", "sessionRunId", "run" ], "type": "object" }, { "type": "null" } ] }, "proposals": { "additionalProperties": true, "properties": { "items": { "items": { "additionalProperties": true, "properties": { "action": { "anyOf": [ { "enum": [ "keep", "archive", "supersede", "conflict" ], "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "decidedAt": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] }, "edgeType": { "anyOf": [ { "enum": [ "supersedes", "updates", "extends", "derives" ], "type": "string" }, { "type": "null" } ] }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "kind": { "enum": [ "edge", "fact", "resolution", "retention" ], "type": "string" }, "otherMemoryId": { "anyOf": [ { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, { "type": "null" } ] }, "produced": { "additionalProperties": true, "properties": { "edgeIds": { "items": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "maxItems": 50, "type": "array" }, "eventIds": { "items": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "maxItems": 50, "type": "array" }, "factIds": { "items": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "maxItems": 50, "type": "array" }, "truncated": { "type": "boolean" } }, "required": [ "edgeIds", "factIds", "eventIds", "truncated" ], "type": "object" } }, "required": [ "id", "kind", "edgeType", "action", "otherMemoryId", "createdAt", "decidedAt", "produced" ], "type": "object" }, "maxItems": 25, "type": "array" }, "truncated": { "type": "boolean" } }, "required": [ "items", "truncated" ], "type": "object" }, "supersession": { "additionalProperties": true, "properties": { "predecessors": { "items": { "additionalProperties": true, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "createdBy": { "enum": [ "user_dashboard", "user_api", "user_mcp", "worker", "importer", "system" ], "type": "string" }, "createdBySessionRunId": { "anyOf": [ { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, { "type": "null" } ] }, "depth": { "maximum": 24, "minimum": 1, "type": "integer" }, "edgeId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "edgeType": { "enum": [ "supersedes", "updates" ], "type": "string" }, "fromId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "memoryType": { "enum": [ "decision", "commitment", "blocker", "fact", "preference", "pattern", "note", "event" ], "type": "string" }, "project": { "anyOf": [ { "maxLength": 256, "minLength": 1, "type": "string" }, { "type": "null" } ] }, "recordedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "scope": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "sourceProposal": { "anyOf": [ { "additionalProperties": true, "properties": { "proposalId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "proposalKind": { "enum": [ "edge", "fact", "resolution", "retention" ], "type": "string" } }, "required": [ "proposalKind", "proposalId" ], "type": "object" }, { "type": "null" } ] }, "status": { "enum": [ "active", "archived" ], "type": "string" }, "toId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "topic": { "maxLength": 256, "type": "string" }, "validFrom": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "validTo": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "memoryType", "topic", "scope", "project", "status", "validFrom", "validTo", "recordedAt", "createdAt", "edgeId", "fromId", "toId", "edgeType", "createdBy", "depth", "sourceProposal", "createdBySessionRunId" ], "type": "object" }, "maxItems": 50, "type": "array" }, "successors": { "items": { "additionalProperties": true, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "createdBy": { "enum": [ "user_dashboard", "user_api", "user_mcp", "worker", "importer", "system" ], "type": "string" }, "createdBySessionRunId": { "anyOf": [ { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, { "type": "null" } ] }, "depth": { "maximum": 24, "minimum": 1, "type": "integer" }, "edgeId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "edgeType": { "enum": [ "supersedes", "updates" ], "type": "string" }, "fromId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "memoryType": { "enum": [ "decision", "commitment", "blocker", "fact", "preference", "pattern", "note", "event" ], "type": "string" }, "project": { "anyOf": [ { "maxLength": 256, "minLength": 1, "type": "string" }, { "type": "null" } ] }, "recordedAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "scope": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "sourceProposal": { "anyOf": [ { "additionalProperties": true, "properties": { "proposalId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "proposalKind": { "enum": [ "edge", "fact", "resolution", "retention" ], "type": "string" } }, "required": [ "proposalKind", "proposalId" ], "type": "object" }, { "type": "null" } ] }, "status": { "enum": [ "active", "archived" ], "type": "string" }, "toId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "topic": { "maxLength": 256, "type": "string" }, "validFrom": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "validTo": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "memoryType", "topic", "scope", "project", "status", "validFrom", "validTo", "recordedAt", "createdAt", "edgeId", "fromId", "toId", "edgeType", "createdBy", "depth", "sourceProposal", "createdBySessionRunId" ], "type": "object" }, "maxItems": 50, "type": "array" }, "truncated": { "type": "boolean" } }, "required": [ "predecessors", "successors", "truncated" ], "type": "object" } }, "required": [ "origin", "supersession", "events", "proposals", "facts" ], "type": "object" }, { "type": "null" } ] }, "sections": { "additionalProperties": false, "properties": { "events": { "enum": [ "ok", "unavailable" ], "type": "string" }, "lineage": { "enum": [ "ok", "unavailable" ], "type": "string" }, "provenance": { "enum": [ "ok", "unavailable" ], "type": "string" } }, "required": [ "lineage", "events" ], "type": "object" } }, "required": [ "memory", "lineage", "directRelationships", "auditEvents", "eventsTruncated", "createdBySessionRunId", "lastResolutionReason" ], "type": "object" } } }, "description": "Success" } }, "summary": "Inspect memory lineage, direct relationships, and audit metadata" } }, "/api/v1/memories/{id}/resolve": { "post": { "operationId": "resolve", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "reason": { "description": "Optional evidence for this transition, e.g. \"PR #123\" or \"superseded by \" (trimmed, 1-500 chars). Stored on the commitment and replaced by the next transition. Commitments only: rejected for a blocker.", "maxLength": 500, "minLength": 1, "type": "string" }, "sessionRunId": { "anyOf": [ { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, { "type": "null" } ], "description": "Opaque id of the current agent session run. Pass through from SessionStart. Pass null to save without session attribution or session lifecycle changes. Omit to attach the single leased-open session for this project, if any. A run id not owned by this tenant fails the write." }, "status": { "enum": [ "open", "waiting", "resolved", "expired" ], "type": "string" } }, "required": [ "status" ], "type": "object" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": true, "properties": { "commitmentId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "status": { "anyOf": [ { "enum": [ "open", "waiting", "resolved", "expired" ], "type": "string" }, { "enum": [ "archived" ], "type": "string" } ] } }, "required": [ "commitmentId", "status" ], "type": "object" } } }, "description": "Success" } }, "summary": "Transition the commitment riding a memory (mirrors the MCP resolve tool)" } }, "/api/v1/memories/{id}/revise": { "post": { "operationId": "revise", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "properties": { "kind": { "description": "archive: take each memory out of the active set (status archived). No successor; content, tags and dates untouched; recoverable with status: archived. Open commitments and blockers are rejected: settle those with resolve. reaffirm: record that each memory was reviewed and is still valid; nothing about it changes, it just stops being a stale candidate for a while.", "enum": [ "archive", "reaffirm" ], "type": "string" }, "sessionRunId": { "anyOf": [ { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, { "type": "null" } ], "description": "Opaque id of the current agent session run. Pass through from SessionStart. Pass null to save without session attribution or session lifecycle changes. Omit to attach the single leased-open session for this project, if any. A run id not owned by this tenant fails the write." } }, "required": [ "kind" ], "type": "object" }, { "additionalProperties": false, "properties": { "kind": { "const": "move", "description": "Refile in place: no successor, dates and content untouched.", "type": "string" }, "project": { "description": "New project. Omitted: unchanged. A project can be replaced, not cleared.", "maxLength": 256, "minLength": 1, "type": "string" }, "scope": { "description": "New scope. Omitted: unchanged.", "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "sessionRunId": { "anyOf": [ { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, { "type": "null" } ], "description": "Opaque id of the current agent session run. Pass through from SessionStart. Pass null to save without session attribution or session lifecycle changes. Omit to attach the single leased-open session for this project, if any. A run id not owned by this tenant fails the write." }, "tags": { "description": "New tag list, replacing the old one (order is significant). Omitted: unchanged.", "items": { "maxLength": 64, "minLength": 1, "type": "string" }, "maxItems": 32, "type": "array" } }, "required": [ "kind" ], "type": "object" }, { "additionalProperties": false, "properties": { "content": { "maxLength": 2000, "minLength": 1, "type": "string" }, "edgeIntent": { "default": "supersedes", "enum": [ "supersedes", "updates" ], "type": "string" }, "memoryType": { "enum": [ "decision", "commitment", "blocker", "fact", "preference", "pattern", "note", "event" ], "type": "string" }, "project": { "description": "Project of the successor. Omitted: inherited from the predecessor.", "maxLength": 256, "minLength": 1, "type": "string" }, "scope": { "description": "Scope of the successor. Omitted: inherited from the predecessor.", "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "sessionRunId": { "anyOf": [ { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, { "type": "null" } ], "description": "Opaque id of the current agent session run. Pass through from SessionStart. Pass null to save without session attribution or session lifecycle changes. Omit to attach the single leased-open session for this project, if any. A run id not owned by this tenant fails the write." }, "tags": { "description": "Tags of the successor. Omitted: inherited from the predecessor.", "items": { "maxLength": 64, "minLength": 1, "type": "string" }, "maxItems": 32, "type": "array" }, "topic": { "maxLength": 256, "minLength": 1, "type": "string" } }, "required": [ "memoryType", "topic", "content" ], "type": "object" } ] } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": true, "properties": { "embedded": { "enum": [ "pending", "done", "failed", "off" ], "type": "string" }, "memory": { "additionalProperties": true, "properties": { "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "memoryType": { "enum": [ "decision", "commitment", "blocker", "fact", "preference", "pattern", "note", "event" ], "type": "string" }, "project": { "anyOf": [ { "maxLength": 256, "minLength": 1, "type": "string" }, { "type": "null" } ] }, "scope": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "topic": { "type": "string" } }, "required": [ "id", "memoryType", "topic", "scope", "project" ], "type": "object" } }, "required": [ "memory", "embedded" ], "type": "object" }, { "additionalProperties": true, "properties": { "kind": { "enum": [ "archive", "reaffirm" ], "type": "string" }, "outcomes": { "items": { "additionalProperties": true, "properties": { "memoryId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "outcome": { "enum": [ "archived", "already_archived", "reaffirmed", "rejected" ], "type": "string" }, "reason": { "description": "Present only when outcome is rejected.", "enum": [ "not_found", "superseded", "open_commitment", "blocker", "archived" ], "type": "string" } }, "required": [ "memoryId", "outcome" ], "type": "object" }, "maxItems": 50, "type": "array" } }, "required": [ "kind", "outcomes" ], "type": "object" } ] } } }, "description": "Success" } }, "summary": "Supersede a memory with a corrected successor, refile it in place with kind: move, or archive it with kind: archive (mirrors the MCP revise tool)" } }, "/api/v1/prompts/debrief": { "get": { "operationId": "getDebriefPrompt", "parameters": [ { "in": "query", "name": "scope", "required": false, "schema": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" } }, { "in": "query", "name": "project", "required": false, "schema": { "maxLength": 256, "minLength": 1, "type": "string" } }, { "in": "query", "name": "agent", "required": false, "schema": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" } }, { "in": "query", "name": "sessionId", "required": false, "schema": { "maxLength": 256, "minLength": 1, "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "prompt": { "minLength": 1, "type": "string" } }, "required": [ "prompt" ], "type": "object" } } }, "description": "Success" }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "error": { "enum": [ "not_found" ], "type": "string" } }, "required": [ "error" ], "type": "object" } } }, "description": "A natural key was supplied but this tenant owns no session with it" } }, "summary": "Render the debrief prompt the MCP debrief registrar serves, so a Stop hook can inject it. Instructions are server-authored; the scope and project facets and the run's briefed commitments render as delimited data, never as imperative sentences." } }, "/api/v1/proposals": { "get": { "operationId": "listProposals", "parameters": [ { "in": "query", "name": "status", "required": false, "schema": { "enum": [ "proposed", "applied", "rejected" ], "type": "string" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 25, "maximum": 100, "minimum": 1, "type": "integer" } }, { "in": "query", "name": "cursor", "required": false, "schema": { "description": "Opaque continuation token from a previous page’s nextCursor. Omit for the first page. Keep status identical across pages of one walk.", "maxLength": 512, "minLength": 1, "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "count": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "hasMore": { "type": "boolean" }, "nextCursor": { "minLength": 1, "type": "string" }, "proposals": { "items": { "additionalProperties": true, "properties": { "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "decidedAt": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, { "type": "null" } ] }, "edgeType": { "enum": [ "supersedes", "updates", "extends", "derives" ], "type": "string" }, "fromId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "memoryType": { "enum": [ "decision", "commitment", "blocker", "fact", "preference", "pattern", "note", "event" ], "type": "string" }, "rationale": { "type": [ "string", "null" ] }, "similarity": { "type": "number" }, "status": { "enum": [ "proposed", "applied", "rejected" ], "type": "string" }, "toId": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } }, "required": [ "id", "fromId", "toId", "edgeType", "memoryType", "similarity", "rationale", "status", "decidedAt", "createdAt" ], "type": "object" }, "type": "array" }, "totals": { "additionalProperties": true, "properties": { "edge": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": [ "edge" ], "type": "object" } }, "required": [ "proposals", "count", "totals", "hasMore" ], "type": "object" } } }, "description": "Success" } }, "summary": "List consolidation proposals (bounded, cursor-paginated)" } }, "/api/v1/proposals/{id}/apply": { "post": { "operationId": "applyProposal", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "status": { "enum": [ "proposed", "applied", "rejected" ], "type": "string" } }, "required": [ "id", "status" ], "type": "object" } } }, "description": "Success" } }, "summary": "Accept a consolidation proposal" } }, "/api/v1/proposals/{id}/reject": { "post": { "operationId": "rejectProposal", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "rationale": { "maxLength": 2000, "minLength": 1, "type": "string" } }, "type": "object" } } }, "required": false }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "status": { "enum": [ "proposed", "applied", "rejected" ], "type": "string" } }, "required": [ "id", "status" ], "type": "object" } } }, "description": "Success" } }, "summary": "Reject a consolidation proposal" } }, "/api/v1/scopes": { "get": { "operationId": "listScopes", "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "count": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "scopes": { "items": { "additionalProperties": false, "properties": { "aliases": { "items": { "type": "string" }, "type": "array" }, "createdAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "name", "aliases", "createdAt" ], "type": "object" }, "type": "array" } }, "required": [ "scopes", "count" ], "type": "object" } } }, "description": "Success" } }, "summary": "List the tenant's registered scope names" } }, "/api/v1/search": { "post": { "operationId": "search", "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "asOf": { "additionalProperties": false, "properties": { "asKnownAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "validAt": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" } }, "type": "object" }, "limit": { "default": 5, "maximum": 25, "minimum": 1, "type": "integer" }, "memoryType": { "enum": [ "decision", "commitment", "blocker", "fact", "preference", "pattern", "note", "event" ], "type": "string" }, "project": { "maxLength": 256, "minLength": 1, "type": "string" }, "query": { "minLength": 1, "type": "string" }, "scope": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "status": { "enum": [ "active", "archived" ], "type": "string" } }, "required": [ "query" ], "type": "object" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": true, "properties": { "appliedScope": { "description": "Scope your retrieval-scope policy applied to this unscoped call (mode default). Absent when nothing was narrowed.", "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "count": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "hits": { "items": { "additionalProperties": true, "properties": { "commitmentStatus": { "enum": [ "open", "waiting", "resolved", "expired" ], "type": "string" }, "content": { "maxLength": 600, "type": "string" }, "contentLength": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "id": { "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" }, "memoryType": { "type": "string" }, "project": { "anyOf": [ { "maxLength": 256, "minLength": 1, "type": "string" }, { "type": "null" } ] }, "scope": { "maxLength": 64, "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" }, "score": { "type": "number" }, "superseded": { "type": "boolean" }, "topic": { "type": "string" }, "truncated": { "type": "boolean" } }, "required": [ "id", "memoryType", "topic", "content", "contentLength", "truncated", "score", "superseded", "scope", "project" ], "type": "object" }, "maxItems": 25, "type": "array" } }, "required": [ "hits", "count" ], "type": "object" } } }, "description": "Success" }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "detail": { "maxLength": 512, "type": "string" }, "error": { "const": "invalid_input", "type": "string" } }, "required": [ "error" ], "type": "object" } } }, "description": "Invalid search input; detail names retryable scopes when retrieval policy requires one" } }, "summary": "Unified semantic + keyword retrieval (mirrors the MCP search tool)" } }, "/api/v1/settings/judgment": { "get": { "operationId": "getJudgmentPolicy", "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "mode": { "enum": [ "off", "on" ], "type": "string" }, "updatedAt": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, { "type": "null" } ] } }, "required": [ "mode", "updatedAt" ], "type": "object" } } }, "description": "Success" } }, "summary": "The caller's judgment opt-in (off unless set): whether derived text may be sent to the judgment provider" }, "put": { "operationId": "setJudgmentPolicy", "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "mode": { "description": "on = this tenant opts in to typed judgments by the judgment provider; off = never.", "enum": [ "off", "on" ], "type": "string" } }, "required": [ "mode" ], "type": "object" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "mode": { "enum": [ "off", "on" ], "type": "string" }, "updatedAt": { "anyOf": [ { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", "type": "string" }, { "type": "null" } ] } }, "required": [ "mode", "updatedAt" ], "type": "object" } } }, "description": "Success" } }, "summary": "Set the caller's judgment opt-in (off or on). The setting alone sends nothing; the deployment must also configure a judgment provider" } }, "/api/v1/stats": { "get": { "operationId": "getStats", "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "activeMemories": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "archivedMemories": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "commitmentsByStatus": { "additionalProperties": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "propertyNames": { "type": "string" }, "type": "object" }, "memoriesByType": { "additionalProperties": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "propertyNames": { "type": "string" }, "type": "object" }, "supersededMemories": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": [ "memoriesByType", "activeMemories", "supersededMemories", "archivedMemories", "commitmentsByStatus" ], "type": "object" } } }, "description": "Success" } }, "summary": "Bounded count aggregates (counts only, never content)" } }, "/api/v1/version": { "get": { "operationId": "getVersion", "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "version": { "minLength": 1, "type": "string" } }, "required": [ "version" ], "type": "object" } } }, "description": "Success" } }, "summary": "The running server build (deploy verification)" } } }, "security": [ { "apiKey": [] }, { "sessionBearer": [] } ], "servers": [ { "description": "3ngram platform", "url": "https://api.3ngram.ai" } ] }