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
new ProceduralMemory(args): ProceduralMemory;Defined in: packages/memory/src/tiers/procedural-memory.ts:49
Parameters
| Parameter | Type |
|---|---|
args | { store: MemoryStoreAdapter; tracer: Tracer; } |
args.store | MemoryStoreAdapter |
args.tracer | Tracer |
Returns
ProceduralMemory
Methods
activate()
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
| Parameter | Type |
|---|---|
scope | SessionScope |
context | RuleActivationContext |
Returns
Promise<readonly Rule[]>
define()
define(scope, input): Promise<Rule>;Defined in: packages/memory/src/tiers/procedural-memory.ts:55
Persist a rule. Returns the stored record.
Parameters
| Parameter | Type |
|---|---|
scope | SessionScope |
input | RuleInput |
Returns
Promise<Rule>
list()
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
| Parameter | Type |
|---|---|
scope | SessionScope |
Returns
Promise<readonly Rule[]>
remove()
remove(
scope,
ruleId,
reason?): Promise<void>;Defined in: packages/memory/src/tiers/procedural-memory.ts:82
Soft-delete a rule.
Parameters
| Parameter | Type |
|---|---|
scope | SessionScope |
ruleId | string |
reason? | string |
Returns
Promise<void>