MessageStore
Defined in: packages/core/src/stores/types.ts:29
Persistent or in-process storage for a conversation transcript keyed by
memoryScope on AgentRunInput.
Role: supplies ModelMessage[] to the model on the next agent.run.
Separate from WorkflowStore (run/step observability). Do not rebuild
agent memory by replaying run events.
The agent runner: load → append user / response.messages → save.
On a new memoryScope, the resolved system prompt is stored as the first
message; later episodes reuse that pinned text (also passed via system).
context on agent.run() is not stored here.
Supported shape: one ModelMessage[] per scope, grown only by append.
load returns that full list and save replaces it. Step retry writes the
saved list onto the new attempt. The inspection UI attributes turns by the
list’s length at each commit. A store that summarizes, drops, reorders, or
is not a replaceable list is outside this contract — those models break
retry restore and the transcript UI.
Configure via createAdlRuntime({ stores: { message } }) or per-agent
adl.createAgent({ memory: { store } }).
Properties
Section titled “Properties”
readonlyoptionalkind?:string
Defined in: packages/core/src/stores/types.ts:35
Inspector-facing backend id. Built-ins set "in-memory" or "sqlite".
Custom stores may set any string; inspectMessageStoreKind reports
"custom" when this is omitted.
Methods
Section titled “Methods”copy()
Section titled “copy()”copy(
fromScope,toScope):Promise<void>
Defined in: packages/core/src/stores/types.ts:48
Copy fromScope’s saved transcript onto toScope.
toScope must not already have a transcript. Same-scope is a no-op.
Throws when fromScope has no saved transcript.
Parameters
Section titled “Parameters”fromScope
Section titled “fromScope”string
toScope
Section titled “toScope”string
Returns
Section titled “Returns”Promise<void>
delete()
Section titled “delete()”delete(
memoryScope):Promise<void>
Defined in: packages/core/src/stores/types.ts:51
Drop the transcript for this scope.
Parameters
Section titled “Parameters”memoryScope
Section titled “memoryScope”string
Returns
Section titled “Returns”Promise<void>
listScopes()
Section titled “listScopes()”listScopes():
Promise<string[]>
Defined in: packages/core/src/stores/types.ts:54
Memory scopes that have a saved transcript (for inspector rebuild).
Returns
Section titled “Returns”Promise<string[]>
load()
Section titled “load()”load(
memoryScope):Promise<ModelMessage[]>
Defined in: packages/core/src/stores/types.ts:38
Full transcript for this scope (empty array when new).
Parameters
Section titled “Parameters”memoryScope
Section titled “memoryScope”string
Returns
Section titled “Returns”Promise<ModelMessage[]>
save()
Section titled “save()”save(
memoryScope,messages):Promise<void>
Defined in: packages/core/src/stores/types.ts:41
Replace the transcript after the runner merges new messages.
Parameters
Section titled “Parameters”memoryScope
Section titled “memoryScope”string
messages
Section titled “messages”Returns
Section titled “Returns”Promise<void>