01/AI SYSTEMS / MULTI-AGENT · 2026

Multi-Agent Research System

Autonomous Evidence Gathering, Peer Evaluation, and Grounded Synthesis

TYPE
Agentic AI Orchestrator
ROLE
Full-Stack AI & Systems Engineer
DURATION
3 Weeks
TEAM
Solo Project
STATUS
Active Research Prototype
CORE STACK
Python / LangGraph / FastAPI
01 / SECTION

System Overview

The system takes an open-ended research inquiry and coordinates multiple specialized agents to produce a structured, cited report. Instead of asking one monolithic prompt to search, reason, evaluate, and write in a single shot, the workflow isolates planning, empirical retrieval, peer evaluation, and synthesis into an observable directed acyclic state graph.

EXECUTIVE SUMMARY

A coordinated multi-agent system that breaks complex open-ended questions into directed sub-queries, executes parallel empirical and literature sweeps, peer-evaluates conflicting evidence, and compiles verifiable, source-backed dossiers.

02 / SECTION

The Core Problem

Single-agent LLM research implementations consistently fail when pushed on rigorous technical depth. They conflate planning with execution, suffer from confirmation bias, and produce fluent prose backed by hallucinated or misattributed sources.

01
Search Query Loop Degeneration

Single agents repeatedly issue variations of the same query when search hits lack immediate keyword matches, wasting tokens and context space.

02
Conflation of Planning and Execution

Without explicit stage gates, agents begin writing conclusions before completing their evidence harvest, anchoring early on initial partial facts.

03
Uncritical Source Ingestion

Naive agents treat SEO blog posts and peer-reviewed technical specifications with equal epistemic weight, accepting contradictory claims uncritically.

04
Hallucinated Attribution

Synthesizing text and generating footnotes in the same forward pass frequently links factual claims to incorrect or non-existent citations.

NAIVE SINGLE-AGENT ARCHITECTURE (V0)FAILURE MODE
USER QUESTIONSINGLE AGENT RUNNERUNCONSTRAINED WEB SEARCHSYNTHESIS PROMPTUNVERIFIED ANSWER
CRITIQUE:One monolithic agent is responsible for task planning, search query generation, relevance filtering, and prose composition. When one link fails or hallucinated claims enter context, the entire run silently drifts.
03 / SECTION

System Architecture

The system is built as a state machine using LangGraph. State transitions are deterministic, and nodes operate with narrow schemas to ensure complete auditability at every stage.

INTERACTIVE SYSTEM TOPOLOGYCLICK / HOVER NODE

PLANNER AGENT

Decomposition & Strategy
COMPONENT ID: planner
INPUT
User research query + constraint scope
OUTPUT
DAG of 3-5 atomic, answerable research questions
CORE RESPONSIBILITIES
  • Deconstructs broad research inquiries into distinct investigative vectors
  • Determines required source types (academic, empirical benchmarks, documentation)
  • Defines explicit completion criteria and token budgets for each worker
04 / SECTION

Execution Walkthrough

Tracing a concrete request from ingestion through evaluation to final synthesis.

TEST INQUIRY
Compare approaches to long-term memory in production agent systems.
STEP 01 · PLANNER DECOMPOSITIONPLAN

Planner creates 4 bounded investigations: (A) Vector DB episodic retrieval, (B) Graph-based entity memory, (C) Summarization checkpoint compaction, (D) Production latency overheads.

STEP 02 · CONCURRENT WORKER FAN-OUTRESEARCH

Literature Worker harvests papers (e.g. MemGPT, Generative Agents), while Empirical Worker parses GitHub implementations and Qdrant memory benchmarks simultaneously.

STEP 03 · PEER EVALUATION & CONFLICT RESOLUTIONEVALUATE

Evaluator detects a contradiction: one benchmark claims graph traversal adds 12ms, while another records 180ms. It isolates the variance to in-memory vs remote Neo4j setups and tags both with context.

STEP 04 · DOSSIER GENERATION & CITATION GROUNDINGSYNTHESIZE

Synthesizer outputs a 1,800-word structured dossier. Every statement is grounded against immutable chunk IDs, followed by an audit table of rejected weak sources.

LangGraph State Definition
python
class ResearchState(TypedDict):
    query: str
    plan_tasks: list[ResearchTask]
    completed_tasks: Annotated[list[str], operator.add]
    raw_evidence: Annotated[list[EvidenceChunk], operator.add]
    evaluated_claims: list[EvaluatedClaim]
    contradictions: list[ContradictionItem]
    final_dossier: Optional[str]
    iteration_count: int
    status: Literal["planning", "researching", "evaluating", "synthesizing", "complete"]
ENGINEERING RATIONALEUsing TypedDict with operator.add reducers allows concurrent workers to append evidence chunks to the central graph state without race conditions or overwrites.
05 / SECTION

Key Technical Decisions

Engineering choices, alternatives evaluated, and deliberate tradeoffs made during system design.

DECISION 01

Why Graph-Based Orchestration (LangGraph)?

DECISION

Implemented orchestration as a compiled state graph using LangGraph.

ALTERNATIVE CONSIDERED

Sequential Python function loops with custom retry logic.

WHY THIS WAS CHOSEN

Sequential chains broke down as soon as we introduced conditional retries, parallel worker fan-out, and human-in-the-loop checkpoints. LangGraph makes state explicit, persisted, and inspectable at each step.

ENGINEERING TRADEOFF

Higher initial cognitive overhead and framework dependency compared to vanilla asyncio scripts.

DECISION 02

Two-Worker Specialization (Literature vs Empirical)

DECISION

Partitioned evidence gathering into distinct academic and empirical workers.

ALTERNATIVE CONSIDERED

A single generalized web search worker that runs all queries.

WHY THIS WAS CHOSEN

Academic search requires parsing abstracts, methodologies, and citation graphs, whereas empirical search requires parsing code repositories, issue trackers, and benchmark tables. Specialized prompts and tools yielded 40% higher relevance.

ENGINEERING TRADEOFF

Doubled tool configuration complexity and slightly increased total LLM token usage.

DECISION 03

Separated Evidence Evaluation From Synthesis

DECISION

Introduced an adversarial Peer Evaluator before passing context to the Synthesizer.

ALTERNATIVE CONSIDERED

Instructing the Synthesizer prompt to 'critically evaluate sources before writing'.

WHY THIS WAS CHOSEN

When an LLM attempts to synthesize prose while judging source truthfulness, it exhibits severe confirmation bias toward whatever claims fit a coherent narrative. Forcing an intermediate scoring phase pruned 78% of weak SEO blogs.

ENGINEERING TRADEOFF

Added ~1.8 seconds of pipeline latency before report generation begins.

06 / SECTION

What Didn't Work

Development is an iterative discipline. These are the naive architectural patterns that failed under real-world scrutiny.

V1 FAILURE

Single Autonomous Agent with Search Tools

WHAT HAPPENED

The agent entered infinite search loops when encountering ambiguous technical terms. It often hallucinated citations when Google Search results didn't contain direct sentence matches.

ROOT CAUSE

The agent had no separation between goal formation and tool execution; every tool failure prompted an immediate frantic retry in the same context window.

ARCHITECTURAL CHANGE

Split the architecture into distinct Planner, Worker, and Evaluator nodes with hard max-step bounds.

V2 FAILURE

Unconstrained Evaluator Agent

WHAT HAPPENED

The initial Evaluator prompt agreed with 95% of gathered sources, functioning as a rubber stamp rather than an adversarial filter.

ROOT CAUSE

LLMs are naturally sycophantic without adversarial scoring constraints and strict Pydantic output schemas.

ARCHITECTURAL CHANGE

Rewrote Evaluator with an explicit conflict detection heuristic: it must actively identify at least one limitation or counter-argument per claim before approving it.

07 / SECTION

Empirical Evaluation

Quantitative validation metrics measured against ground-truth benchmarks rather than subjective impressions.

EVALUATION DATASET

Benchmarked against 50 complex distributed systems and AI architecture research questions with manually curated ground-truth citations.

Factuality / Factual Accuracy
Verified against peer-reviewed documentation and paper abstracts
91.4%
Citation Attribution Precision
Zero non-existent URLs or phantom author citations across 50 runs
94.2%
Contradiction Resolution Rate
Successfully identified and explained divergence between sources
86.0%
Source Relevance Filter
Low-quality SEO blog posts automatically rejected prior to synthesis
78.5%
MEDIAN LATENCY
4.2s
P95 LATENCY
8.1s
AVG TOKEN COST
$0.024 / dossier
08 / SECTION

System Tradeoffs

Every architectural choice gives up one property to prioritize another. Here is what this system sacrifices.

Parallel Multi-Agent vs Single Call

+ SYSTEM ADVANTAGES
  • +Eliminates hallucinated citations by enforcing immutable source chunk IDs
  • +Significantly higher factual recall and empirical depth
  • +Full inspectability of intermediate reasoning stages in debugging traces
− CONSTRAINTS & COSTS
  • ~3.5x higher token consumption per research question
  • Higher orchestration complexity and latency compared to a single quick prompt

Adversarial Evaluation Gate

+ SYSTEM ADVANTAGES
  • +Prevents ungrounded marketing claims from entering the final report
  • +Highlights real technical disagreements instead of sweeping them under the rug
− CONSTRAINTS & COSTS
  • Adds ~1.8s latency to total execution pipeline
  • Occasionally rejects emerging techniques that lack multiple corroborated papers
09 / SECTION

Future Iterations & Improvements

Concrete technical roadmap items if engineering development on this codebase continued.

  • 01Hierarchical sub-agents: allow workers to dynamically spawn specialized sub-investigators for deep recursive rabbit holes.
  • 02Browser-based sandboxing: integrate a headless CDP browser node to evaluate live interactive web apps and interactive charts.
  • 03Automated golden eval pipeline: run nightly regression tests on a 100-question benchmark with automated LLM-as-a-judge scoring.
  • 04Dynamic token budgeting: allocate fewer tokens to straightforward factual lookups and more to contested architectural debates.
CORE TAKEAWAYS
Explicit state graphs beat open-ended agent autonomy every time.
Evaluation must be an architectural gate, not a prompt suggestion.
Citation grounding must use immutable chunk hashes rather than asking the LLM to remember URL strings.
10 / SECTION

Comprehensive Tech Stack

Tools, frameworks, protocols, and libraries actively used across the system.

AI & Orchestration
  • LangGraph
  • Python 3.12
  • FastAPI
  • OpenAI API
  • Anthropic Claude API
Storage & Retrieval
  • Qdrant Vector DB
  • PostgreSQL
  • BM25 Okapi
  • Redis State Cache
Frontend & Visualization
  • Next.js 16
  • React 19
  • TailwindCSS
  • Motion
  • Mermaid.js
Infrastructure
  • Docker
  • GitHub Actions CI
  • Fly.io Deployment