Skip to main content

record_memory

Writes a new observation or memory into your memory for persistent storage. This triggers background distillation: BaseLayer’s dream engine will extract entities and facts from the content asynchronously.

Parameters

ParameterTypeRequiredDefaultDescription
contentstringYesThe text content of the memory or observation
attach_to_entitystringNo"user"Entity slug to attach this memory to. Accepts bare slug ("myproject"), type/slug ("project/myproject"), or full URI ("baselayer://project/myproject")
metadatastringNonullOptional JSON string of metadata

Read-only

No. This tool writes to your memory.

Example usage

{
  "content": "Decided to use WebSocket for real-time sync instead of polling. Reason: polling caused 2s latency spikes under load. Trade-off: more complex connection management.",
  "attach_to_entity": "project/my-api"
}
{
  "content": "User prefers dark mode in all IDEs and terminal applications.",
  "attach_to_entity": "user"
}
{
  "content": "Integration tests must hit a real database, not mocks. Why: prior incident where mock/prod divergence masked a broken migration. How to apply: any test that touches persistence."
}

When to use

  • After a significant decision or discovery
  • When the user says “remember this”
  • When you learn preferences, roles, or working style
  • To save corrections or behavioral feedback for future sessions
For behavioral feedback, structure as: Rule then Why (the reason) then How to apply (when and where this guidance kicks in). This format makes it easy for future AIs to apply the correction correctly.

record_memory vs. vault_fact

  • record_memory is for general notes and observations. Content is distilled asynchronously by the dream engine into entities and facts.
  • vault_fact is for precise, immediate facts linking two entities. The fact appears in the graph right away.
Use record_memory when you have a general observation. Use vault_fact when you know the exact source entity, target entity, and relationship.
A decision you don’t record is a decision the next session will re-make from scratch. When in doubt, record it.