Skip to main
Andrew Blake / operators / agentic-rag-pipeline

agentic-rag-pipeline

Stateful agentic RAG with citation-grounded synthesis.

Shipped operators v0.4.2

What it is

A multi-agent retrieval pipeline I built for fun, used daily. A lead session runs a backend pre-flight, spawns five specialist teammates in parallel over a custom MCP server, and hands off to an aggregator that runs a 7-stage pipeline. Three retrievers cover dense-vector, knowledge-graph, and external-API modes; a synthesizer commits the final output to a persistent local wiki. Citation validation happens through a separate MCP, and the lead independently re-verifies every write.

Problem it removes

Most RAG stacks are single-shot — one retriever, one prompt, one answer. Hard questions need multi-agent orchestration with hybrid retrieval, citation-grade validation, resumable state, and dedup arbitration. The stacks I tried shipped one or two of those, not all five. So I built one.

How it works

The lead session generates session identifiers and a request ID, runs a four-target backend pre-flight (vector store, graph store, external API, validation MCP), and spawns five named teammates in parallel via a single message. The aggregator runs a seven-stage pipeline — dedup, decompose, dispatch, merge, validate, synthesize, verify — dispatching retrievers on per-sub-query budgets via SendMessage, deduping candidates in-merge, validating citations through a DOI MCP with multi-pass match criteria, and dispatching the synthesizer to commit the brief. The lead independently re-verifies the wiki write and owns exactly one final retry. Shutdown is choreographed across all five teammates; stuck teammates escalate to a structured manual-cleanup path rather than looping forever.


Adjacent projects