Multi-Agent Research Automation
A webhook-driven multi-agent research workflow that checks service health, gathers parallel evidence from four sources, scores and indexes context in Qdrant, enforces a reviewer quality gate with revision loops, and persists structured output in PostgreSQL.

What the system needed to solve
Single-prompt research pipelines fail silently when upstream scrapers go down, mix low-quality sources with primary evidence, and deliver unverified drafts without retry or audit mechanisms.
What I engineered and owned
Designed the end-to-end n8n orchestration, FastAPI health and scraping services, parallel source fallback logic, Qdrant vector ingestion, multi-agent review/revision loop, PostgreSQL persistence, and error alerting.
A webhook intake validates the payload and verifies FastAPI service health before dispatching parallel source queries.
Tavily, a FastAPI scraper, Jina AI Reader, and Semantic Scholar gather evidence with automatic fallback merging.
Passages are deduplicated, scored for relevance, and ingested into Qdrant for grounded retrieval.
Orchestrator, Researcher, Reviewer, Revision, and Synthesis agents collaborate behind an explicit quality-score threshold.
Validated structured output is persisted to PostgreSQL and returned to the caller, backed by a dedicated failure-notification workflow.
Production impact & verification
- Parallel multi-source retrieval with health checks and graceful fallbacks
- Evidence deduplication, relevance scoring, and Qdrant vector indexing
- Reviewer quality threshold with controlled agent revision loop
- PostgreSQL persistence and isolated error-notification routing
CONTROL POINT / ILLUSTRATED ROUTING
An inadequate draft takes the revision branch.
- Collect evidenceMerge sources, deduplicate, and score.
- Review draftEvaluate the draft at the quality gate.
- Below threshold?Route to revision, then review again.
- Validate + persistDeliver structured output through the success path.
The reviewer route gives the workflow a place to reject weak synthesis before delivery. Source fallbacks and a separate error path handle different failure modes; they do not substitute for the quality gate. This diagram explains the workflow logic; it is not a captured execution result.