Memory Agent Architecture: A Practical Guide to Deep Research Engineering
Memory agents help deep research systems retain evidence, avoid repeated work, and reuse research strategies. This guide explains a manager–planner–executor architecture, the distinction between external memory and model parameters, and practical approaches to memory design, trajectory compression, planning, evidence-driven feedback, evaluation, and security governance.
1. Why Deep Research Needs Memory Agents
Deep research is not a single search followed by an answer. It is an iterative process of asking questions, gathering material, verifying evidence, identifying gaps, and adjusting direction.
For example, assessing whether a technology is suitable for enterprise deployment requires examining its underlying principles, deployment constraints, resource costs, operational risks, and limits of applicability. These questions also have dependencies: without understanding workload characteristics, it is difficult to judge whether a system configuration is appropriate; without checking how current a source is, its conclusions cannot safely be adopted.
When an agent relies only on its current context, three problems tend to emerge as research progresses:
- Repeated exploration: The system may search for questions it has already answered or retry retrieval paths that have already failed.
- Context growth: Continuously adding raw materials, tool outputs, and analysis notes increases processing costs and makes important information harder to identify.
- Limited transfer of experience: Effective methods developed during one task may not reliably benefit later tasks unless they are organized and retained.
The core value of a memory agent is to turn research experience into manageable, retrievable, reusable knowledge and strategies. Memory should capture not only “what was found,” but also “why this approach was chosen,” “which paths failed,” and “under what conditions the experience can be reused.”
2. A Three-Role Architecture: Separate Memory Management from Task Execution
A manager–planner–executor architecture supports this goal. These are logical responsibilities, not necessarily separate models or services. Whether to deploy them independently depends on task scale, latency requirements, and operational complexity.
Manager: Maintain External Memory, Not a Growing Transcript
The manager maintains non-parametric memory: information stored outside model parameters that can be read and updated independently. Examples include structured records, document summaries, and indexes of previous tasks.
Its responsibilities include selecting, organizing, and compressing research trajectories while preserving necessary links to sources. It should distinguish between:
- Research objectives and applicable constraints.
- Verified facts and provisional hypotheses.
- Effective actions and failed attempts.
- Current conclusions and unresolved questions.
Compression is not simply shortening text. It means removing redundancy while retaining information that affects subsequent decisions. A conclusion’s applicability conditions, source date, and counterexamples may matter more than the conclusion itself and should not disappear during summarization.
Planner: Use Experience to Develop Action Strategies
The planner breaks research objectives into executable steps and uses prior experience to determine priorities, dependencies, and stopping conditions.
In this architectural framing, the planner is described as a parametric memory agent. Parametric memory generally refers to knowledge or behavioral patterns encoded in model parameters through training. It is suitable for relatively stable task decomposition methods, analytical habits, and strategy-selection capabilities. It is not an appropriate substitute for a factual database that needs frequent updates, individual deletions, or precise source attribution.
Two boundaries are essential:
- Reading external memory does not mean the planner’s model parameters have been updated.
- Writing historical experience to storage does not constitute model training.
If experience needs to be incorporated into model parameters, that requires a separate data-selection, training, and evaluation process. Online memory writes and parameter learning should not be treated as the same operation.
Executor: Search, Analyze, and Return Evidence
The executor follows the plan to retrieve information, read materials, compare evidence, and perform analysis. It returns structured results to the planner.
Its output should be more than a fluent answer. It should identify completed steps, supporting evidence, conflicts, and unresolved questions. Where information is insufficient, it should explicitly mark uncertainty rather than fill factual gaps with speculation.
The basic interaction is:
Research objective → Planner creates a plan → Executor gathers and analyzes evidence→ Manager organizes memory → Planner revises the plan
This loop turns research from a linear “search, then answer” workflow into a process that continuously adjusts its direction based on evidence.
3. Memory Design: Preserve Conclusions, Evidence, and Action Experience
An implementation can divide memory into within-task memory and cross-task experience.
Within-task memory supports the current investigation. It includes retrieved materials, interim findings, hypotheses awaiting verification, and unfinished steps. Its priorities are completeness and continuity, enabling interrupted work to resume and intermediate results to be reviewed.
Cross-task experience supports future investigations and should undergo stricter selection. Research methods, problem-decomposition patterns, common causes of failure, and applicability conditions are suitable for reuse. Unverified factual conclusions are not. Internal enterprise data and personal information should not enter shared cross-task memory by default.
An illustrative memory record might contain:
Task objective: Assess whether a class of systems is suitable for deployment under specified constraintsApplicability conditions: Data scale, update frequency, and resource limitsKey findings: Confirmed facts and supporting evidenceAction history: Retrieval approaches used and their outcomesFailure causes: Outdated sources, overly broad questions, or insufficient evidenceOpen questions: Issues requiring further verificationReuse guidance: Useful steps and situations where they do not applyVersion information: Record timestamp, revision reason, and supersession relationships
These fields are a general design example, not a product-specific interface or fixed protocol.
Research conclusions and research strategies should be stored separately where practical. “This technology meets the current requirements” is a conclusion. “Check resource constraints before analyzing performance” is a strategy. The former may become invalid as conditions change, while the latter may have broader reuse value.
4. Trajectory Compression: Reduce Context Without Losing Evidence
Raw research trajectories often contain substantial low-value material: repeated queries, similar sources, irrelevant passages, and intermediate guesses that were not adopted. The manager can organize these records into layers to reduce interference with later reasoning.
- Evidence layer: Preserve original evidence or references that allow it to be located for auditing and re-verification.
- Fact-summary layer: Record the key information supporting conclusions, including applicability conditions and conflicting evidence.
- Strategy-summary layer: Capture which research actions succeeded or failed, and why.
This structure prevents a highly compressed summary from becoming the sole source of truth. Before reusing important experience, the planner can revisit the underlying evidence according to the level of risk.
Compression quality should be checked along at least three dimensions:
- Factual consistency: Does the summary accurately represent the original material without broadening its scope?
- Completeness of conditions: Are relevant dates, environments, assumptions, and limitations preserved?
- Evidence traceability: Can important judgments be traced to supporting materials?
Conflicting sources should not be compressed into an artificially definitive conclusion. Instead, the memory should preserve the points of disagreement and identify what needs further verification.
5. Planning: Move Beyond a Search Checklist
A useful research plan specifies objectives, steps, and decision criteria—not just a list of search terms.
The planner should first translate the user’s objective into answerable questions. For example, “assess deployment feasibility” can be broken down into functional fit, data constraints, resource requirements, failure recovery, and security requirements.
It should then identify dependencies and schedule checks of foundational conditions before comparing solutions. This avoids detailed analysis built on incorrect assumptions.
Each step should specify an expected output and a completion criterion. An output might be “a source-backed list of constraints,” rather than the vague “understand the background.” A completion criterion might be “key constraints are supported by evidence or explicitly marked as unknown.”
Historical memory should be reused based on relevance. Similar topics do not necessarily imply similar conditions. The planner needs to compare task objectives, environmental constraints, source freshness, and risk levels before adopting an existing research path.
Plans should also include stopping conditions. A research stage may end when:
- Core questions have sufficient supporting evidence.
- Remaining uncertainty would not change the conclusion.
- Further investigation would exceed the available budget.
Stopping conditions prevent open-ended searching, but they should not be used to conceal missing critical evidence.
6. Execution Feedback: Iterate Around Evidence Gaps
After receiving a plan, the executor should work through its steps and return structured status information. Status categories can include completed, partially completed, unable to complete, and requiring replanning.
When sources conflict, the executor should first check their dates, definitions, and applicable environments rather than adopt whichever claim appears most often.
If retrieved material is poorly aligned with the task objective, the executor should report why the search has drifted. The planner can then revise the question or retrieval scope.
High-impact conclusions can be cross-checked against independent sources, with direct evidence clearly distinguished from indirect inference. Multiple pages derived from the same original material do not count as independent evidence.
Execution feedback should not automatically become long-term memory in its entirety. Unverified content can remain in temporary within-task storage until it has been checked and is suitable for promotion into reusable experience. This reduces the risk of erroneous information being repeatedly retrieved and amplified.
7. Quality Evaluation: Assess Memory, Plans, and Results Separately
Evaluating a system only by the fluency of its final article makes architectural problems difficult to detect. A layered evaluation is more useful.
Memory Layer
Assess summary accuracy, evidence preservation, identification of stale content, and the ability to delete or revise incorrect experience.
Planning Layer
Assess question coverage, step dependencies, the suitability of reused experience, and resource allocation.
Execution Layer
Assess retrieval relevance, source reliability, handling of conflicting evidence, and the accuracy of reported completion status.
System Level
Assess whether research results are more reliable, repeated exploration decreases, and the additional costs of reading and maintaining memory are justified.
Workflows with and without memory can be compared, but task conditions should remain consistent. Isolated outcomes should not be interpreted as evidence of universal benefits.
Updates to parametric capabilities also require a separate validation set to check whether the model has developed transferable planning ability rather than merely memorized training examples.
8. Engineering Implementation and Security Governance
A practical rollout can begin with limited within-task memory and gradually introduce cross-task experience. Establishing reliable recording, retrieval, revision, and traceability mechanisms before pursuing automated learning makes system complexity easier to control.
The storage layer should support versioning and source associations. The orchestration layer should allow tasks to pause, retry, and resume. The observability layer should record plan changes, execution failures, and the reasons for memory reads and writes.
Repeated runs of the same task also need controls to prevent large volumes of duplicate memory.
From a security perspective, both external materials and historical memory should be treated as inputs requiring validation. They must not automatically acquire instruction authority above system rules. Operational requests embedded in source material should not be executed directly, especially when they involve sending data externally, changing permissions, or accessing sensitive resources.
Implementations should also provide access controls, sensitive-information handling, and retention policies. Memory belonging to different users or business contexts needs clear isolation. Deletion requests should cover associated summaries and indexes, not just original records.
Human review can be added for high-risk conclusions, long-term memory writes, and collection of data intended for parametric training.
9. Conclusion
The purpose of a memory agent is not to retain unlimited history. It is to establish a closed loop of experience organization, strategy planning, evidence-based execution, and feedback-driven revision.
The manager maintains external memory that can be updated and traced to its sources. The planner combines stable strategic capabilities with current evidence to define a research path. The executor performs retrieval and analysis while making uncertainty visible.
Memory becomes a reliable research capability only when facts are separated from strategies, summaries remain linked to evidence, online memory is distinguished from parameter updates, and the conditions for reusing experience are continually evaluated.
