Skip to content

MessageStore

Defined in: packages/core/src/stores/types.ts:22

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.messagessave. 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.

Configure via createAdlRuntime({ stores: { message } }) or per-agent adl.createAgent({ memory: { store } }).

readonly optional kind?: string

Defined in: packages/core/src/stores/types.ts:28

Inspector-facing backend id. Built-ins set "in-memory" or "sqlite". Custom stores may set any string; inspectMessageStoreKind reports "custom" when this is omitted.

delete(memoryScope): Promise<void>

Defined in: packages/core/src/stores/types.ts:37

Drop the transcript for this scope.

string

Promise<void>


listScopes(): Promise<string[]>

Defined in: packages/core/src/stores/types.ts:40

Memory scopes that have a saved transcript (for inspector rebuild).

Promise<string[]>


load(memoryScope): Promise<ModelMessage[]>

Defined in: packages/core/src/stores/types.ts:31

Full transcript for this scope (empty array when new).

string

Promise<ModelMessage[]>


save(memoryScope, messages): Promise<void>

Defined in: packages/core/src/stores/types.ts:34

Replace the transcript after the runner merges new messages.

string

ModelMessage[]

Promise<void>