Back to Recipes

Multi-Agent Research System

Deploy multiple AI agents to research a topic in parallel, each with a different focus, then synthesize their findings.

Best for: Researchers, analysts, content creators who need comprehensive topic coverage

What You Get

  • -Parallel agent research execution
  • -Specialized focus areas per agent
  • -Cross-referencing and conflict detection
  • -Synthesized executive summary
  • -Source citation and verification

Step by Step

1. Define research focus areas

Create a focus area planner that takes a research topic and breaks it into 3-5 distinct angles: e.g., historical context, current state, key players, controversies, future outlook. Each area gets a custom system prompt with specific instructions.

2. Create specialized agents

For each focus area, instantiate an agent with: a custom system prompt tailored to that angle, web search tools (Playwright or Brave Search API), a PostgreSQL connection to save findings, and a 60-second timeout.

3. Run parallel research

Execute all agents concurrently using Promise.allSettled. Each agent searches the web, extracts relevant information, rates confidence, and saves findings with source URLs to PostgreSQL. Log agent status (running, completed, failed) in real time.

4. Cross-reference findings

After all agents complete, a cross-referencing agent reads all findings and detects: supporting evidence (same claim from multiple agents), conflicting claims, unique insights (claimed by only one agent), and gaps (important angles not covered).

5. Generate the synthesis report

A synthesis agent compiles everything into a structured report: executive summary (3 paragraphs), key findings with evidence strength, conflicting viewpoints and their sources, recommendations, and methodology notes.

Stack

OpenAI/ClaudePlaywrightPostgreSQLNext.jsSquish (memory)

Build This

Copy this prompt and paste it into Claude Code, OpenCode, Codex, or Cursor to build this recipe.

Build me a multi-agent research system. It should: 1) Accept a research topic and break it into 3-5 focus areas (e.g., history, current state, key players, controversies, future outlook). 2) Spawn a specialized agent for each focus area with a custom system prompt and web search tools. 3) Run all agents in parallel using Promise.allSettled with 60-second timeout per agent. 4) Each agent saves its findings to a PostgreSQL database with source URLs and confidence scores. 5) After all agents complete, a synthesis agent reads all findings, cross-references for conflicts, and generates a structured report with executive summary, key findings, conflicting viewpoints, and recommendations. 6) Include a dashboard showing agent status, sources found, and synthesis progress.

Common Failure Modes

  • !Agents produce contradictory information
  • !Web search rate limiting slows research
  • !Synthesis becomes too verbose
  • !Source verification is unreliable

Implementation Notes

Use Squish memory so agents can share findings. Set strict timeouts per agent. The synthesis agent should flag conflicts rather than trying to resolve them automatically.

Related skill: multi agent orchestrator

Want multi-agent research system running in your business?

4M Labs can deploy multi-agent research system as a production workflow:

  • Connected to your tools and data sources
  • Secured for your team with proper access controls
  • Deployed with monitoring and error handling
  • Documented for handoff and future maintenance
Book an Implementation Sprint