Architecture and Production Practice of a Multi-Agent Deep Research Framework

    A practical guide to designing multi-agent deep research systems: workflow layers, shared evidence state, verification loops, human checkpoints, private knowledge bases, deployment, safety, and cost control.

    Traditional LLM Q&A usually covers only one slice of research: explaining a concept, summarizing existing material, or drafting an outline. Real research also requires scoping the problem, finding sources, judging them, checking data, and turning conclusions into deliverable output.

    A multi-agent deep research framework is an engineering way to organize those sequential tasks. It combines model understanding and generation with retrieval, web parsing, controlled code execution, and other tools, and coordinates specialized execution units through a workflow. Research then becomes a staged, inspectable, recoverable task chain instead of a one-shot answer.

    Calling tools does not make findings reliable, and a short setup path does not mean a production system needs no maintenance. Architecture boundaries, quality control, and safety matter more than demos.

    What a multi-agent system actually solves

    An “agent” here is an execution unit around a goal. It typically has task instructions, model calls, tool permissions, and necessary context state.

    Multi-agent does not require many different models, or a separately deployed process per role. One model can plan, retrieve, and write under different constraints. What matters is clear duty boundaries, structured handoffs, and system-controlled execution.

    Deep research fits this pattern for three reasons.

    First, research is staged. Problem breakdown, collection, evidence checks, and report writing need different inputs and outputs. Mixing them in one prompt drops steps.

    Second, tools differ. Search finds sources, parsers extract text, code execution computes and transforms, knowledge-base retrieval finds internal documents. Call conditions, failure modes, and safety requirements are not the same.

    Third, conclusions need review. Fluent text can still be under-supported. Separating evidence assembly from writing helps catch cases where the material does not support the claim.

    The core value is not the number of roles, but splitting complex work into verifiable intermediate results.

    Overall architecture: constrain model behavior with a workflow

    A general deep research system can be split into five layers.

    1. Interaction layer

    It takes the user question, shows the plan, requests confirmation, and presents stage results. For long-running jobs, the UI should show the current stage, completed steps, and errors so users are not stuck waiting for a final answer.

    2. Orchestration layer

    It defines nodes, order, branches, and stop rules. A typical flow:

    user question → scope → plan → collect sources → verify evidence → analyze → generate report → user confirmation

    This is not a one-way pipeline. If verification finds missing key evidence, the flow should return to collection instead of inventing a plausible conclusion.

    3. Agent execution layer

    Planning, retrieval, analysis, and writing live here. Permissions should be explicit. A writing unit may read verified material but should not freely rewrite original evidence. A compute unit may process data but should not, by default, have the open internet or access to sensitive files.

    4. Tools and data layer

    This includes public search, page extraction, document reading, private knowledge-base access, and sandboxed code. A unified result shape—content, source, timestamps, error state—reduces leakage of tool-specific details into upper layers.

    5. Governance layer

    Access control, execution logs, cost accounting, timeouts, security audit, and quality evaluation. This layer decides whether a demo can become a system you keep running.

    Workflows are often directed graphs: nodes are steps, edges are transition conditions. That makes retries, human confirmation, and extra retrieval explicit instead of leaving all control to a model’s next token.

    Shared state: pass evidence, not another chat transcript

    If every agent only sees a chat log, you get duplication, context bloat, and drifting conclusions. Prefer a structured task state, at least:

    • Research goal: the question that must be answered
    • Scope constraints: time, region, objects, exclusions
    • Plan: sub-questions, order, completion criteria
    • Evidence records: location, excerpt, fetch time, supported claim
    • Open issues: missing sources, conflicts, unconfirmed assumptions
    • Execution info: node status, failure reasons, resource use
    • Output requirements: audience, length, format, citation style

    A technology-selection study should not store only “option A is better.” It should store fit conditions, supporting material, and unmet requirements.

    Keep raw sources, evidence summaries, and final conclusions in layers. Summaries help the model; originals support audit; conclusions are the deliverable. Summaries alone lose the audit trail; originals alone blow up context.

    Research loop: each stage needs a checkable artifact

    Planning: define done

    “Research an industry” is not a task. Identify the purpose: basics, investment risk, or market-entry strategy.

    If the question is too broad, ask for the binding constraints instead of expanding search without limit. A plan should include sub-questions, priority, evidence types, and stop conditions. Comparing technical options can be organized around functional fit, deployment complexity, operations cost, and security.

    Collection: cover different evidence types

    Do not rely on one source class. Formal docs, public research, statistics, and experiential articles have different uses and limits.

    Deduplicate, keep source and time, and check fit to the current scope. Similar pages may share one original; they are not independent evidence.

    Parsing can miss body text, fail on dynamic pages, misalign tables, or hit access limits. Record incomplete extraction; do not treat fragments as a full document.

    Verification: does the conclusion have support?

    Check three levels:

    • Sources are explicit and traceable
    • Content directly supports the claim
    • Metrics and time windows are comparable

    Two “growth rates” cannot sit in one table if one is annual and one is quarterly. On conflict, explain the difference; do not pick the number that matches the expected story.

    Analysis: let code do deterministic work

    For tables, metrics, and simple statistics, sandboxed code is usually better than mental arithmetic by the model. Correct code still needs correct inputs, units, and definitions.

    Keep data lineage, processing steps, and key assumptions. Complex calculations can emit intermediates for human review. The model explains; deterministic programs compute.

    Writing: separate facts, inference, and recommendations

    Mark verified facts, inferences from material, and action advice. Gaps should be labeled as uncertainty or to-verify.

    Long form, summaries, comparison tables, and slide outlines should share one evidence base so formats do not disagree.

    Human-in-the-loop: confirm at high-value nodes

    People should not only comment after the job. Confirmation is part of control.

    Typical pause points:

    • Scope is unclear and further work would drift
    • The plan expands and spend would exceed budget
    • Key sources conflict and cannot be auto-resolved
    • Sensitive internal material is required
    • External write, send, or publish is about to run

    Routine search should not wait at every step. Pause by risk: low-risk reads can proceed; high-risk actions need explicit authorization.

    If the user changes direction, invalidate or re-verify affected plans and conclusions; do not silently reuse old results.

    Private knowledge bases: retrieval plus access control

    Enterprise research often mixes internal policy, project docs, and history. Typical pipeline: parse, chunk, index, retrieve snippets, then generate.

    Retrieval is not authorization. Access control must cover both search and returned snippets so users only see what they may see.

    Document handling also needs:

    • Preserve titles, sections, and table structure
    • Keep version and update time to avoid stale cites
    • Link snippets back to original locations
    • Treat OCR errors as errors, not ground truth
    • Separate internal facts from public sources so reports do not mix them

    RAG improves use of private material; it does not guarantee correctness. Missing indexes, bad chunks, or irrelevant hits still produce wrong answers. Evaluate retrieval quality separately.

    Deployment: lower start cost without skipping runtime conditions

    Auto-install, isolation, and containers reduce setup work. They do not justify “zero config” or “runs anywhere.”

    A usable environment usually needs:

    Model access, credentials, and network. Secrets belong in a secure config path, not in code, logs, or public repos.

    Dev vs. runtime. Pin dependency versions and check runtime compatibility so upgrades do not silently change behavior.

    Durable state for long jobs. Deep research spans stages; process memory is not enough. After restart, completed steps should resume instead of starting search from zero.

    Where request timeouts are short, decouple submit from execute with a queue and workers. Choose based on duration, concurrency, and tool limits—not only how easy the first start is.

    Timeouts, retries, and resource caps on external calls. Retry only recoverable failures; do not repeat side-effecting operations.

    Safety and cost: limit what agents can do

    Once the system can fetch pages, read docs, and run code, risks include instruction injection, data leaks, and resource abuse—not only wrong answers.

    Text from external sources is data to analyze, not system instructions. A page that asks to upload internal files, change the goal, or invoke a tool must not grant extra privileges.

    Run code in isolation with limits on filesystem, network, time, memory, and output size. Validate tool arguments and check file access; do not rely on the model to obey.

    Cost spans model calls, retrieval, storage, and compute. Cap iterations, retrieval volume, and budget. At the limit, return what you have and list unfinished work instead of looping forever.

    Start with a minimum viable version

    You do not need many agents first. A practical start is three logical roles: planning, collection and verification, and report writing. Even on one model, keep I/O boundaries sharp.

    The first version can support one research type, one source intake, and one report format. After the loop works, add code analysis, private knowledge bases, and more formats. That makes it easier to see whether failures come from planning, retrieval, generation, or tools.

    Do not score only fluency. Check:

    • Whether key questions are fully answered
    • Whether citations support the claims
    • Whether sources are real and traceable
    • Whether unknowns and conflicts are stated
    • Whether time and resource use are acceptable
    • Whether the job can resume after failure

    Compare single-shot Q&A, a fixed workflow, and a multi-agent design on a set of topics with human reference answers. Extra orchestration is worth it only if quality, traceability, or coverage of hard tasks actually improves.

    Conclusion: automation should assist judgment

    A multi-agent deep research framework organizes models, tools, evidence, and human review into a controlled loop. It is a good fit for discovery, organization, repetitive calculation, and first drafts. Direction, hard tradeoffs, and high-risk decisions still need people.

    The capabilities worth investing in are not more personas or longer prompts, but clear task boundaries, a reliable evidence chain, recoverable execution, and measurable quality. Those foundations turn a demo convenience into a system you can run for the long term.