Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/memory / / ProceduralMemory

Class: ProceduralMemory

Defined in: packages/memory/src/tiers/procedural-memory.ts:45

ProceduralMemory — standing orders activated when the agent's current context matches the rule's predicate. The activation rules are deterministic so the agent runtime + ContextEngine can render the active set into the system prompt every step.

Stable

Constructors

Constructor

ts
new ProceduralMemory(args): ProceduralMemory;

Defined in: packages/memory/src/tiers/procedural-memory.ts:49

Parameters

ParameterType
args{ store: MemoryStoreAdapter; tracer: Tracer; }
args.storeMemoryStoreAdapter
args.tracerTracer

Returns

ProceduralMemory

Methods

activate()

ts
activate(scope, context?): Promise<readonly Rule[]>;

Defined in: packages/memory/src/tiers/procedural-memory.ts:110

Return the rules active under context. Rules without a condition are always active; the bundled predicate vocabulary supports the literals 'always', 'topic=<topic>', and 'tag=<tag>'. Anything outside that grammar is treated as always-active so callers do not silently lose rules.

Parameters

ParameterType
scopeSessionScope
contextRuleActivationContext

Returns

Promise&lt;readonly Rule[]&gt;


define()

ts
define(scope, input): Promise<Rule>;

Defined in: packages/memory/src/tiers/procedural-memory.ts:55

Persist a rule. Returns the stored record.

Parameters

ParameterType
scopeSessionScope
inputRuleInput

Returns

Promise&lt;Rule&gt;


list()

ts
list(scope): Promise<readonly Rule[]>;

Defined in: packages/memory/src/tiers/procedural-memory.ts:95

List every active (non-deleted) rule for the supplied scope.

Parameters

ParameterType
scopeSessionScope

Returns

Promise&lt;readonly Rule[]&gt;


remove()

ts
remove(
   scope, 
   ruleId, 
reason?): Promise<void>;

Defined in: packages/memory/src/tiers/procedural-memory.ts:82

Soft-delete a rule.

Parameters

ParameterType
scopeSessionScope
ruleIdstring
reason?string

Returns

Promise&lt;void&gt;