Skip to main content

Memory

Memory lets an Expert retain useful context across sessions. It stores scoped knowledge in the shared virtual filesystem (VFS), so future sessions can apply established preferences, conventions, and lessons without relying on the current conversation. An Expert’s memory belongs to its team and is separated by a scope appropriate to the workflow. Repository-based Experts typically use one scope per repository, while other Experts can use a global, channel, project, or user-specific scope. Memory can be shared with an organization or kept within a user’s VFS, depending on the Expert’s visibility. Memory is enabled for all Template Experts. When you create a custom Expert with Cosmos Advisor, the Advisor also wires in lightweight memory by default unless you explicitly ask it not to.

How memory works

Memory has a write path and a read path:
  • Capture: A memory-enabled Expert identifies durable information that could change a future decision. In interactive sessions, it tells you when it remembers something so you can correct or veto it.
  • Store: The Expert writes the information as readable Markdown under its own VFS directory. Each Expert team owns and maintains its memory rather than modifying another team’s curated knowledge.
  • Load: At the start of relevant work, the Expert loads memory for the current scope. It applies matching guidance and flags discrepancies when current evidence conflicts with a remembered rule.

Memory models

Cosmos supports two models depending on the quality and volume of the signals:
  • Simple memory is the default. It writes explicit, high-quality human feedback directly to a curated knowledge file. This works well for preferences and standing rules that are authoritative on their own.
  • Noisy memory uses an evidence log plus a curated knowledge file. It combines weaker signals over time and promotes a learning only after the evidence is strong enough. Code Review Memory uses this model because review comments, reactions, agent observations, and change outcomes carry different levels of confidence.
Both models expose the same curated knowledge view to readers. The difference is how that view is produced: simple memory records trusted facts directly, while noisy memory distills repeated evidence before presenting it to future sessions.

Best practices

  • Use the narrowest stable scope that matches the workflow, such as a repository for code review or a channel for feedback triage.
  • Save information only when it could change a future decision or area of focus.
  • Prefer simple memory unless the workflow genuinely needs repeated, weighted evidence.
  • Treat memory as evolving context, not an unquestionable rule. Experts should surface contradictions rather than ignore current evidence.
  • Use skills or Expert instructions for explicit workflows; use memory for context learned through ongoing work.

See Also