Skip to content
PACKAGES

agenticMemoryRecordUseGateBundle()

Create one real exact-use lifecycle for a bounded stream of complete inputs (D789).

Every projection preserves scoped occurrence identity. Governed consumers must correlate their query with this gate’s allowedRecords occurrence, never raw records. Permission errors are per-use invalid DATA. Malformed/conflicting occurrence identity rejects the invocation synchronously; an upstream ERROR terminates the lifecycle and all projections. Neither failure permits continued use of a previously emitted authorization as a new occurrence’s authority.

import { agenticMemoryRecordUseGateBundle } from "@graphrefly/ts/solutions/agentic-memory";
function agenticMemoryRecordUseGateBundle(
graph: Graph,
opts: AgenticMemoryRecordUseGateBundleOptions<TJson>,
): AgenticMemoryRecordUseGateBundle<TJson>
ParameterTypeDescription
graphGraphGraph owning the gate and its projections.
optsAgenticMemoryRecordUseGateBundleOptions<TJson>Complete occurrences, retention bound and optional stable name.

Snapshot and declared, identity-preserving authorization projections.

import { agenticMemoryRecordUseGateBundle } from "@graphrefly/ts/solutions/agentic-memory";
// completeUses: Node<AgenticMemoryRecordUseOccurrence>
const gate = agenticMemoryRecordUseGateBundle(graph, {
occurrences: completeUses,
maxOccurrences: 30,
});
// Match the query to the exact gate.allowedRecords occurrence before retrieval.

packages/ts/src/solutions/agentic-memory/record-use.ts