Memory & Context
AgentOS keeps memory in plain Markdown files you can read and edit, and compacts it automatically as the context window fills up.
The three memory files
| File | What it holds | Loaded |
|---|---|---|
BRAIN.md | Workspace identity: purpose, goals, preferences, trust level. You write it, and the agent may add notes. | Every request |
MEMORY.md | Running conversation memory, organized by day under memories/ | Recent history; compacted over time |
DURABLE.md | Lasting facts that survive compaction | Every request |
Teaching the agent lasting facts
Just say "remember":
Remember that I prefer TypeScript over JavaScript for new files.
Remember that our API base URL is https://api.myapp.com/v2.
Facts like these go into DURABLE.md. For richer, standing context, edit BRAIN.md directly.
Automatic compaction
AgentOS tracks how full the model's context window is. At 80% by default, it summarizes older memory with the model, archives the original, and continues with the compressed version. You can change the threshold and how much of the beginning and end is kept in detail in Global Settings, or compact manually:
/compact
Inspecting and resetting memory
/memory show recent memory and durable facts
/memory compact compact now
/memory reset today clear only today's memory
/memory reset all clear all memory files
Semantic memory (optional)
For long-lived agents, the vector-memory plugin connects a workspace to a vector-graph MCP server. Relevant memories are retrieved only when a question calls for them, so they don't take up prompt space the rest of the time.