Skip to content

Memory

Magia’s memory system gives the AI agent persistent knowledge that carries over between sessions. It works in two layers: observations extracted after each session, and reflections that periodically distill those observations into a more compact long-term memory.

After a session ends (or at a configurable interval during a live session), the memory system runs an LLM summarization pass over the conversation. It extracts facts, decisions, preferences, and context that are likely to be useful in future sessions. Each extracted item is stored as an observation.

The observation pass uses the model and provider configured in Settings → Memory → Observation model. You can customize the instructions sent to that model by providing a custom system prompt.

Reflections are a second-pass distillation that runs periodically. The reflection process reads all recent observations and synthesizes them into a smaller, higher-quality long-term memory. This prevents unbounded growth: as observations accumulate, the reflections layer consolidates them.

The reflection interval is configurable. By default, reflections run every 2 hours. You can disable reflections entirely while keeping observations active.

Open Settings → Memory to see all stored observations and reflections. From there you can:

  • Browse the full memory contents
  • Delete individual entries
  • Clear all memory
  • Trigger a reflection pass manually

The /memory slash command in the chat panel opens the CLAUDE.md file editor, which lets you directly view and edit the agent’s project-level memory file.

All memory settings are found in Settings → Memory.

SettingDefaultDescription
memoryEnabledtrueMaster switch. When off, no observations are extracted and no reflections run.
reflectionsEnabledtrueWhether to run reflection passes. Observations still accumulate when this is off.
syncIntervalMinutes10How often (in minutes) to sync memory during a live session.
memoryRetentionDays90Number of days to keep observations before they are automatically pruned.
memoryMaxSizeMb50Maximum total disk space (in MB) the memory store may use. Older entries are pruned when the limit is reached.
reflectionIntervalMinutes120How often (in minutes) to run a reflection pass.
observationSystemPromptnullCustom system prompt for the observation LLM. null uses the built-in default.
reflectionSystemPromptnullCustom system prompt for the reflection LLM. null uses the built-in default.

You can supply your own instructions for how observations and reflections are generated. This is useful if you want the memory system to focus on particular kinds of information (e.g., “always extract API endpoints and their authentication requirements”) or to format the output in a specific way.

Set observationSystemPrompt or reflectionSystemPrompt to a non-null string in Settings. Your prompt replaces the built-in default entirely, so include any general instructions you still want to preserve.

Memory is stored locally on disk in the Magia application data directory:

  • macOS: ~/Library/Application Support/sh.magia.com/memory/

Nothing is sent to a remote server. The memory store is private to your machine.

To turn off memory entirely, set memoryEnabled to false in Settings → Memory. The agent will no longer accumulate or use observations and reflections. Existing memory data is not deleted; re-enabling memory will pick up where it left off.

To wipe all stored memory, use the Clear all memory button in the memory viewer.