Use Cases
- Store user preferences, long-lived facts, and personalization that remain valid across conversations.
- Preserve project background, interim conclusions, business rules, and reusable context.
- Record user feedback, corrections, and later changes to answer style or business wording.
- Allow administrators to directly view, edit, and audit agent memory content.
Memory Types
File memory is divided into four categories by purpose. Each Xpert has its own isolated memory space.File Structure
File memory is organized per Xpert. A typical structure is:MEMORY.mdis the memory index, used to quickly browse and recall candidate memories.user/,feedback/,project/, andreference/store topic files for each memory category..dream/stores Dreaming run state, run records, signals, and score caches. By default, it is not foreground memory content.
usage statistics. The body stores the concrete content that the agent can read.
How Agents Use File Memory
After the Xpert file memory middleware is enabled, the agent receives these memory tools:
The system automatically prepares memory indexes and summaries before the conversation. The agent only needs to call
memory_search or memory_get when summaries are insufficient, memories conflict, the user asks for sources, or body-level details are required.
File memory is auxiliary context and does not override the userโs current input. If the current input conflicts with memory, the agent should prioritize the current input and explain when a memory may be outdated.
Automatic Recall Configuration
The file memory middleware supports automatic recall of related memories and injects selected content into the current model context.
When memories are searched, read, or written, the system records usage signals and updates the
usage statistics in topic files and the .dream/scorecards/index.json score cache.
Automatic Writeback
If a conversation turn does not explicitly callmemory_write, the system triggers automatic writeback after the conversation ends. Automatic writeback reads the recent conversation and determines whether it contains information worth storing long term.
Automatic writeback is suitable for stable facts, explicit preferences, project state, and reusable conclusions. Temporary small talk, unconfirmed guesses, and raw conversation transcripts are not suitable for long-term memory.
File Memory Management Page
After entering the digital expert memory page, choose โFileโ to manage file memory. The left side of the page is the file workspace, where you can viewMEMORY.md, the four memory directories, and individual topic files. It supports opening, editing, saving, uploading, and deleting files.
When manually editing memory files, follow these rules:
- Keep
MEMORY.mdas a concise index and do not write long body content into the index. - Put topic files in the correct type directory.
- Keep
type,scopeId,status,title, andsummaryin frontmatter valid. - Use
status: archivedfor archived content instead of deleting memories that still have value.
Dreaming Configuration
The top of the file memory page provides Dreaming configuration.
โMemory organization agent keyโ is not an external API key. It is the identifier of an Agent inside the Dreamer Xpert. The system uses that Agent to read Dreaming evidence, organize memory files, and generate reports.
Running a Dream
Clicking the โDreamโ button creates a manual Dream run. The system immediately returns a run ID and continues execution in the background. A Dream run completes the following work:- Create a run record.
- Acquire the Dream lock for the current Xpert to avoid multiple Dreams running for the same Xpert at the same time.
- Evaluate Dream gate conditions and mark the run as
skippedif they are not met. - Prepare evidence files, including memory inventory, signals, score cache, conversation snippets, and instructions.
- Run the configured Dreamer Xpert.
- Validate organized memory files and
MEMORY.md. - Generate the Dream report, validation, changed files, and
DREAMS.mdrecord.
Dream Run Status
Dreams for the same Xpert run serially. If a run is already in progress, a new trigger reuses or enters a waiting state. Dreams for different Xperts can run independently.
Viewing Dream Results
The right side of the file memory page shows the Dream runs list. After selecting a run, you can view:- Run status, start time, end time, changed file count, and issue count.
- Gate decision result, new or updated memory count, related session count, and skip reason.
- Preflight report.
- Dream report, including organization summary, changed files, and unresolved conflicts.
- Validation result.
- Run artifacts, including
status.json,request.json,evidence/,gate.json,dream-report.json,validation.json, andchanged-files.json.
partial, first review validation and unresolved conflicts, then fix frontmatter, index links, duplicate titles, or other issues according to the prompts.
Current Validation Rules
After Dreaming completes, the system validates the memory file structure. Current coverage includes:- Whether the Xpert scope in topic file frontmatter matches the current Xpert.
- Whether duplicate titles exist.
- Whether there are topic files that cannot be parsed.
- Whether
MEMORY.mdlinks point to valid memory paths. - Whether
MEMORY.mdreferences missing, duplicate, or archived topic files. - Whether
MEMORY.mdcontains overly long index entries or content that looks like body text.
succeeded. When issues exist, the run status is partial, and the page displays the items that need handling.
Related APIs
The file memory page uses these APIs:Recommendations
- Store stable, reusable information in file memory and avoid saving temporary small talk.
- Keep each topic file focused on a single topic, with a clear title and summary.
- After bulk imports or multi-turn conversations, manually run Dream to organize memories.
- When a Dream report contains conflicts, fix the issues listed in validation before running the next Dream.
- Prefer saving key business wording in
referenceorprojectmemory for easier later retrieval and auditing.