agentfootprint
Version:
The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.
26 lines • 1.09 kB
JavaScript
;
/**
* MemoryRecorder — forwards `agentfootprint.memory.*` emits to the dispatcher.
*
* Pattern: Factory over EmitBridge.
* Role: Bridges memory-layer events (strategy_applied, attached,
* detached, written) emitted by consumer memory adapters.
* The library does not ship a memory implementation; consumers
* plug in their own store and emit these events where relevant
* (e.g., before/after sliding-window summarization).
* Emits: agentfootprint.memory.strategy_applied / attached /
* detached / written
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.memoryRecorder = void 0;
const EmitBridge_js_1 = require("./EmitBridge.js");
function memoryRecorder(options) {
return new EmitBridge_js_1.EmitBridge({
id: options.id ?? 'agentfootprint.memory-recorder',
prefix: 'agentfootprint.memory.',
dispatcher: options.dispatcher,
getRunContext: options.getRunContext,
});
}
exports.memoryRecorder = memoryRecorder;
//# sourceMappingURL=MemoryRecorder.js.map