Skip to content
providerkit
GitHub

MemoryStore

Defined in: agents/src/memory.ts:85

Host-owned storage. Authenticate outside this interface; ids alone grant nothing. All mutations are atomic, including version checks and erasure-generation checks. Never reuse a record version, including after delete/recreate. Delete derived data too.

access(scope, call): Promise<MemoryAccess>;

Defined in: agents/src/memory.ts:86

Parameter Type
scope MemoryScope
call MemoryCall

Promise<MemoryAccess>


delete(request, call): Promise<{
deleted: number;
}>;

Defined in: agents/src/memory.ts:99

Parameter Type
request { access: MemoryAccess; notes: readonly object[]; }
request.access MemoryAccess
request.notes readonly object[]
call MemoryCall

Promise<{ deleted: number; }>


erase(person, call): Promise<void>;

Defined in: agents/src/memory.ts:105

All sessions and namespaces for exactly this tenant and person. Invalidates old accesses, including in-flight writes/ingestion, and removes their receipts and derived data.

Parameter Type
person { tenantId: string; userId: string; }
person.tenantId string
person.userId string
call MemoryCall

Promise<void>


get(request, call): Promise<MemoryRecord[]>;

Defined in: agents/src/memory.ts:87

Parameter Type
request { access: MemoryAccess; keys: readonly string[]; }
request.access MemoryAccess
request.keys readonly string[]
call MemoryCall

Promise<MemoryRecord[]>


optional ingest(request, call): Promise<MemoryIngestReceipt>;

Defined in: agents/src/memory.ts:109

Optional pair. Atomically commit notes AND a receipt keyed by (access, runId). The same request returns the original receipt; different content under that key must conflict. Do not perform paid extraction here: an interrupted call has an unknown outcome.

Parameter Type
request MemoryIngest
call MemoryCall

Promise<MemoryIngestReceipt>


optional receipt(request, call): Promise<
| MemoryIngestReceipt
| null>;

Defined in: agents/src/memory.ts:111

Read-only reconciliation after an unknown ingestion result.

Parameter Type
request { access: MemoryAccess; runId: string; }
request.access MemoryAccess
request.runId string
call MemoryCall

Promise< | MemoryIngestReceipt | null>


save(request, call): Promise<MemoryRecord[]>;

Defined in: agents/src/memory.ts:95

Parameter Type
request { access: MemoryAccess; notes: readonly MemoryInput[]; }
request.access MemoryAccess
request.notes readonly MemoryInput[]
call MemoryCall

Promise<MemoryRecord[]>


search(request, call): Promise<MemoryRecord[]>;

Defined in: agents/src/memory.ts:91

Parameter Type
request { limit: number; query: string; scopes: readonly MemoryAccess[]; }
request.limit number
request.query string
request.scopes readonly MemoryAccess[]
call MemoryCall

Promise<MemoryRecord[]>