Skip to content

remember

remember

Store data in semantic memory. A remember step persists information (text, embeddings, structured data) to a vector store or memory collection so it can be retrieved later with recall. This is a governed effect: the runtime checks memory permissions, records the operation in the behavioral ledger, and mediates the write through the governance interpreter.

When to use

Use remember when you need to:

  • Store documents, facts, or conversation history for later retrieval
  • Build a knowledge base from processed data
  • Save LLM outputs for future reference or learning
  • Persist embeddings with metadata for semantic search

Use compute for in-memory data transformation (no persistence). Use action ... db for structured database writes. Use remember specifically for semantic/vector storage that pairs with recall.

Syntax

remember <name>
content: <expression>
collection: "<collection_name>"
metadata: { <key>: <value>, ... }
namespace: "<namespace>"
ttl: <duration>

Configuration

ConfigRequiredDescription
contentYesThe text or data to store. Automatically embedded using the collection’s embedding model.
collectionYesTarget collection name. Created automatically if it does not exist.
metadataNoKey-value pairs attached to the stored entry. Used for filtering during recall.
namespaceNoLogical partition within the collection. Useful for per-user or per-session isolation.
ttlNoTime-to-live. Entry is automatically removed after this duration (e.g., "30d", "24h").

Examples

Store a document

machine knowledge_ingester
accepts
document as text, is required
source_url as text, is required
category as text
implements
ask extract_key_points, using: "anthropic:claude-haiku-4"
with task "Extract the 3-5 most important facts from this document.\n\nDocument: ${input.document}"
returns
key_points as list
summary as text
assuming
key_points: ["Point 1", "Point 2"]
summary: "A brief summary"
remember store_document
content: input.document
collection: "knowledge_base"
metadata: {
source: input.source_url,
category: input.category,
summary: steps.extract_key_points.summary,
ingested_at: now()
}

Store conversation memory for an agent

machine conversation_logger
accepts
user_message as text, is required
assistant_response as text, is required
session_id as text, is required
implements
compute build_entry
{
combined: "User: " + input.user_message + "\nAssistant: " + input.assistant_response,
turn_metadata: {
session: input.session_id,
timestamp: now()
}
}
remember save_turn
content: build_entry.combined
collection: "conversations"
namespace: input.session_id
metadata: build_entry.turn_metadata
ttl: "90d"

Store with classification metadata

machine feedback_collector
accepts
feedback as text, is required
customer_id as text, is required
implements
ask classify_feedback, using: "anthropic:claude-haiku-4"
with task "Classify this feedback as bug, feature_request, praise, or complaint.\n\nFeedback: ${input.feedback}"
returns
category as text
sentiment as text
urgency as text
assuming
category: "feature_request"
sentiment: "neutral"
urgency: "low"
remember store_feedback
content: input.feedback
collection: "customer_feedback"
metadata: {
customer_id: input.customer_id,
category: steps.classify_feedback.category,
sentiment: steps.classify_feedback.sentiment,
urgency: steps.classify_feedback.urgency
}

Governance

Every remember step is governed:

  1. Permission check: the machine must have memory capability (declared in ensures > permissions)
  2. Write mediation: the governance interpreter mediates the storage operation
  3. Behavioral ledger: the collection, namespace, and metadata keys (not content) are recorded
  4. Cost tracking: embedding generation costs are tracked per execution

In test mode, remember steps are recorded as executed but do not write to the actual vector store. Tests can verify that a remember step ran and check its metadata without side effects.

Translations

LanguageKeyword
Englishremember
Spanishmemoriza
Frenchretient
Germanmerkt
Japanese記憶
Chinese记住
Korean기억

See also

  • recall - Retrieve data from semantic memory
  • ask … using - Often used to process data before storing
  • implements - The section where remember steps live
  • ensures - Permission declarations for memory capability