Memory Rule
This page is auto-generated from the formations OpenAPI spec. Do not edit manually — run
pnpm generate-formations-resource-docsto regenerate.
Declares what a memory store accepts from completed agent turns: a selector, an event, and a handler. With neither agent_id nor tool_id the built-in extractor runs, configurable through prompt, ai_provider_id and model. See the Memory Rules section of the Memories module docs.
Syntax
type: memory_rule
properties:
memory_store_id: String
on: String
source_agent_ids: String[]
agent_id: String
tool_id: String
action: String
preset_parameters: Object
prompt: String
ai_provider_id: String
model: String
enabled: Boolean
Output
The physical resource ID is the public ID of the created resource. Reference it from other resources with a ref expression:
some_field:
ref: MyMemoryRule
Properties
memory_store_id
Public ID of the destination memory store
Required: Yes Type: String
on
generations.completed (once per completed turn, and the only event the built-in extractor may bind to) or conversation_messages.generated (per persisted assistant reply, custom handlers only).
Required: Yes Type: String
source_agent_ids
Agents whose turns this rule reads; null is every agent in the project
Required: No Type: Array of String Nullable: Yes
agent_id
Handler agent ID (mutually exclusive with tool_id)
Required: No Type: String Nullable: Yes
tool_id
Handler tool ID (mutually exclusive with agent_id)
Required: No Type: String Nullable: Yes
action
Operation id, for a tool handler
Required: No Type: String Nullable: Yes
preset_parameters
Merged into a tool handler's input before invocation
Required: No Type: Object Nullable: Yes
prompt
Replaces the built-in extractor's task instructions (no handler only)
Required: No Type: String Nullable: Yes
ai_provider_id
Provider override for the built-in extractor (no handler only)
Required: No Type: String Nullable: Yes
model
Model override for the built-in extractor (no handler only)
Required: No Type: String Nullable: Yes
enabled
A disabled rule is kept and never fires
Required: No Type: Boolean