Memory API: schemas

The request and response bodies of the operations in this API.

AppendEntryBodyDto

PropertyTypeRequiredDescription
entrystringyesMarkdown body of the new ledger entry. The server stamps the timestamp.
pathstringyes

CreateMemoryBodyDto

PropertyTypeRequiredDescription
fileTextstringyesFull markdown body for the new memory file.
pathstringyes

MaintenanceProposalResponseDto

PropertyTypeRequiredDescription
appliedAtobject or nullno
createdAtstringyes
idstring (uuid)yes
kindone of "MERGE", "PRUNE", "RENAME", "SUMMARY_REFRESH", "FLAG_EMPTY_ORPHAN"yes
payloadobjectyes
reasonobject or nullno
runIdstring (uuid)yes
statusone of "PROPOSED", "APPLIED", "SKIPPED_DIGEST_GATE", "SKIPPED_HASH_MISMATCH", "FAILED", "REVERTED"yes

MaintenanceProposalResponseDtoDataEnvelope

PropertyTypeRequiredDescription
dataMaintenanceProposalResponseDtoyes

MaintenanceRunDetailDto

PropertyTypeRequiredDescription
completedAtobject or nullno
idstring (uuid)yes
modeone of "DRY_RUN", "APPLY"yes
orgIdstring (uuid)yes
proposalsarray of MaintenanceProposalResponseDtoyes
serviceActorstringyes
startedAtstringyes
statusone of "RUNNING", "SUCCEEDED", "FAILED"yes
totalsmap of number or nullnoAggregated counters once the run completes. { merged, pruned, renamed, summariesRefreshed, flagged, skippedDigestGate, skippedHashMismatch }.

MaintenanceRunDetailDtoDataEnvelope

PropertyTypeRequiredDescription
dataMaintenanceRunDetailDtoyes

MaintenanceRunResponseDto

PropertyTypeRequiredDescription
completedAtobject or nullno
idstring (uuid)yes
modeone of "DRY_RUN", "APPLY"yes
orgIdstring (uuid)yes
serviceActorstringyes
startedAtstringyes
statusone of "RUNNING", "SUCCEEDED", "FAILED"yes
totalsmap of number or nullnoAggregated counters once the run completes. { merged, pruned, renamed, summariesRefreshed, flagged, skippedDigestGate, skippedHashMismatch }.

MaintenanceRunResponseDtoDataArrayEnvelope

PropertyTypeRequiredDescription
dataarray of MaintenanceRunResponseDtoyes

MemoryDetailDto

PropertyTypeRequiredDescription
contentstringyesFull markdown body, including YAML frontmatter and ledger entries.
createdAtstring (date-time)yes
createdByAgentstringyes
createdBySurfaceMemorySurfaceyes
idstring (uuid)yes
kindMemoryKindyes
ownerSpaceUristringyesCanonical owner Space URI, e.g. xema://orgs/<orgId>.
pathstringyesCanonical path, e.g. /memories/project/lesson/foo.md.
projectSlugstringnoProject slug when the owner Space is a project. The list endpoint surfaces this so the UI can render cross-project read results next to the canonical path.
slugstringyes
summarystringyes≤1024-char auto-generated abstract.
summaryModelstringnoModel slug that produced the current summary (Model Resolution Matrix decision).
summaryUpdatedAtstring (date-time)no
tagsarray of stringyes
updatedAtstring (date-time)yes

MemoryDetailDtoDataEnvelope

PropertyTypeRequiredDescription
dataMemoryDetailDtoyes

MemoryKind

Type: one of "LESSON", "PATTERN", "CORRECTION", "PREFERENCE"

MemoryListResponseDto

PropertyTypeRequiredDescription
memoriesarray of MemorySummaryDtoyes
visibleScopesarray of stringyesOwner-tier segments visible to the caller.

MemoryListResponseDtoDataEnvelope

PropertyTypeRequiredDescription
dataMemoryListResponseDtoyes

MemoryProjectDto

PropertyTypeRequiredDescription
namestringyes
projectIdstring (uuid)yes
rolestringyes
slugstringyes

MemoryProjectListResponseDto

PropertyTypeRequiredDescription
projectsarray of MemoryProjectDtoyes

MemoryProjectListResponseDtoDataEnvelope

PropertyTypeRequiredDescription
dataMemoryProjectListResponseDtoyes

MemorySearchDegradedReason

Why vector search was not used, or null when it was. embedding_provider_unavailable is transient and recovers on its own; embedding_not_configured is permanent until an org admin picks an embedding model, so a "try again" banner is the wrong response to it.

Type: one of "embedding_not_configured", "embedding_provider_unavailable"

MemorySearchResponseDto

PropertyTypeRequiredDescription
degradedbooleanyesTrue when the response was produced by the keyword-similarity fallback rather than by vector search. Read degradedReason to decide what to tell the user — the two causes need opposite messages.
degradedReasonMemorySearchDegradedReason or nullyesWhy vector search was not used, or null when it was. embedding_provider_unavailable is transient and recovers on its own; embedding_not_configured is permanent until an org admin picks an embedding model, so a "try again" banner is the wrong response to it.
memoriesarray of MemorySummaryDtoyes
querystringyesEchoed search query.
visibleScopesarray of stringyesOwner-tier segments visible to the caller.

MemorySearchResponseDtoDataEnvelope

PropertyTypeRequiredDescription
dataMemorySearchResponseDtoyes

MemorySummaryDto

PropertyTypeRequiredDescription
createdByAgentstringyes
createdBySurfaceMemorySurfaceyes
idstring (uuid)yes
kindMemoryKindyes
ownerSpaceUristringyesCanonical owner Space URI, e.g. xema://orgs/<orgId>.
pathstringyesCanonical path, e.g. /memories/project/lesson/foo.md.
projectSlugstringnoProject slug when the owner Space is a project. The list endpoint surfaces this so the UI can render cross-project read results next to the canonical path.
slugstringyes
summarystringyes≤1024-char auto-generated abstract.
tagsarray of stringyes
updatedAtstring (date-time)yes

MemorySummaryDtoDataEnvelope

PropertyTypeRequiredDescription
dataMemorySummaryDtoyes

MemorySurface

Type: one of "AGENT_SESSION", "WORKFLOW"

OrgAdminStartRunBodyDto

PropertyTypeRequiredDescription
modeone of "DRY_RUN", "APPLY"yesDRY_RUN produces proposals without applying; APPLY mutates state through the writer.

RenameMemoryBodyDto

PropertyTypeRequiredDescription
newPathstringyes
oldPathstringyes

StartMaintenanceRunResponseDto

PropertyTypeRequiredDescription
partitionsarray of stringyesPre-resolved candidate lists per (ownerSpaceKind, kind) partition. Already digest-gated — every entry needs LLM judgement (or, for SUMMARY_REFRESH, an actual summarize call).
runMaintenanceRunResponseDtoyes

StartMaintenanceRunResponseDtoDataEnvelope

PropertyTypeRequiredDescription
dataStartMaintenanceRunResponseDtoyes

StrReplaceBodyDto

PropertyTypeRequiredDescription
newStrstringyes
oldStrstringyes
pathstringyes