Long-Term Memory
PilotDeck Agent Series
PilotDeck's long-term memory is provided by Recall, Index and Dream Composed of three stages. Recall retrieves relevant knowledge for the current task, Index converts conversation experience into lasting memory, and Dream organizes and updates existing memories. The three together form a closed loop of continuous learning and reuse, allowing project experience to continue across sessions.
1. Core Competencies
- Recall on demand: Select relevant knowledge based on the current task to provide background for the model
- Experience accumulation: Extract project knowledge, feedback rules and user information from conversations
- Continuously organize: Merge related memories, revise content, and maintain the consistency of knowledge
- White box management: Save memories in readable files, support viewing, editing and tracking
2. Three-Stage Working Mechanism
The three stages have different running rhythms: Recall is executed on demand while preparing model requests, Index and Dream are run through background maintenance or manual operations. They work together around the same long-term memory, rather than requiring all stages to be completed simultaneously in each conversation.
| stage | input | core processing | output |
|---|---|---|---|
| Recall · Memories | Current queries, recent conversations, and workspaces | Determine the scope of knowledge required, select and read relevant memories | Memory context used for this model request |
| Index · Index | Pending original conversation | Extract reusable information, classify it and write it into memory | New or updated file memory |
| Dream · Organize | Existing memory and project meta-information | Relate topics, merge duplicate content, revise memory organization | Organized memories, change tracking and snapshots |
2.1 Recall: Recall on Demand
Recall starts from the current user request and recent conversations to determine whether long-term memory is required and whether user personas, project knowledge, or both should be read. For project knowledge, the system first checks the memory directory and item description, then selects the relevant file to read the text, and organizes the results into background information for this request.
General WorkSpace uses the current project as the search scope; General can select related projects from known workspaces. No memory is injected when there is no relevant content to prevent irrelevant knowledge from occupying the context.
2.2 Index: Experience Storage
Index transforms experiences gained from interactions into knowledge that can be reused over the long term. After each round of dialogue, the system first saves the original record and its conversation, time and source information, and then the indexing process processes the content to be refined.
The index combines conversational semantics to refine project status, decisions, and facts, records work rules in user feedback, and classifies stable user information into identity notes. The results are saved in classified file memory for subsequent Recall to read. Raw conversation capture is input preparation for this stage; searchable knowledge is formed after indexing is complete.
2.3 Dream: Memory Organization
As conversations accumulate, multiple memories may be formed on the same topic, and project status and user preferences may change. Dream organizes existing memories as a whole: identifying topics with overlapping or conflicting content, organizing and merging entries by association, revising project meta-information, and summarizing user identity notes to update portraits.
The content to be indexed will be processed before sorting. Then the revision results are generated in the temporary copy, and then submitted to the official memory database, and the snapshot before change tracking and consolidation is saved. The organized knowledge continues to participate in subsequent Recall, allowing long-term memory to remain available as the project progresses.
3. Memory Organization and Storage
Long-term memory is organized by purpose, not just by conversation time:
| Type | content | range |
|---|---|---|
| Project | Project background, status, facts and decisions | Save by workspace |
| Feedback | Corrections, constraints and working methods proposed by users | Save by workspace |
| User Identity | Stable user background and preferences | global sharing |
Markdown files store readable and editable knowledge, and memory directories and project metainformation help Recall locate content. SQLite saves the original conversation, processing status and execution trace, providing the basis for Index and Dream to run. The default data directory is <PilotHome>/memory, each workspace uses independent path identification to organize project data.
4. Collaboration with Context
Memory and session context bear long-term knowledge and current task information respectively. The relevant knowledge read by Recall is encapsulated by the context system and added to System Prompt as a supplementary background; the user's current request and session history continue to constitute the main input of the task.
Explicit instructions in the current request take precedence over historical memory. After the user proposes new rules or corrections, these interactions will become the input of subsequent Index and Dream, so that the memory is gradually updated.
4.1 Memory Life Cycle in Requests

Background maintenance schedules Index and Dream according to configured intervals and pending content. When memory retrieval times out or temporarily fails, the task can continue to use the existing session context; diagnostic information is used for subsequent troubleshooting.
5. Activation and Scheduling
in pilotdeck.yaml Enable Memory in and set the run interval for indexing and collation. The intervals below are sample configurations that can be adjusted based on conversation volume and model cost:
memory:
enabled: true
provider: edgeclaw
captureStrategy: last_turn
includeAssistant: true
maxMessageChars: 6000
retrievalTimeoutMs: 30000
schedule:
autoIndexIntervalMinutes: 30
autoDreamIntervalMinutes: 240
captureStrategy optional last_turn or full_session, controls the capture scope of the original conversation.retrievalTimeoutMs Controls how long a request waits for memory retrieval. The two maintenance intervals control automatic indexing and automatic collation respectively; actual execution also depends on whether there is any pending content.
Memory can be passed model Specify the model pool provider/model, the Agent default model is used when not specified. No Memory or settings configured enabled: false , the built-in memory service is shut down.
6. Observability and Management
The memory management interface provides file viewing and editing, abandonment and recovery, manual indexing and organization, as well as import and export. The trace records of Recall, Index and Dream respectively show how the knowledge is read, how it is formed and how it is revised, making it easy to check whether the memory is consistent with the actual project.
When the new conversation has not yet been reflected in the memory, you can view the records to be indexed and perform manual indexing; when the existing memories are duplicated or need to be reorganized, you can execute Dream and check the results of the changes. Original records, documentary memory, and stage tracking together provide an examineable progression from conversation to knowledge.