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.
How it works
Section titled “How it works”Observations
Section titled “Observations”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
Section titled “Reflections”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.
Memory viewer
Section titled “Memory viewer”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.
Configuration
Section titled “Configuration”All memory settings are found in Settings → Memory.
| Setting | Default | Description |
|---|---|---|
memoryEnabled | true | Master switch. When off, no observations are extracted and no reflections run. |
reflectionsEnabled | true | Whether to run reflection passes. Observations still accumulate when this is off. |
syncIntervalMinutes | 10 | How often (in minutes) to sync memory during a live session. |
memoryRetentionDays | 90 | Number of days to keep observations before they are automatically pruned. |
memoryMaxSizeMb | 50 | Maximum total disk space (in MB) the memory store may use. Older entries are pruned when the limit is reached. |
reflectionIntervalMinutes | 120 | How often (in minutes) to run a reflection pass. |
observationSystemPrompt | null | Custom system prompt for the observation LLM. null uses the built-in default. |
reflectionSystemPrompt | null | Custom system prompt for the reflection LLM. null uses the built-in default. |
Custom system prompts
Section titled “Custom system prompts”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.
Storage
Section titled “Storage”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.
Disabling memory
Section titled “Disabling memory”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.