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
Build This
Copy this prompt and paste it into Claude Code, OpenCode, Codex, or Cursor to build this recipe.
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
Ship multi-agent research system in production with 4M Labs
4M Labs designs and ships applied AI systems -- connected to your tools, secured for your team, deployed with monitoring.
- 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
Frequently Asked Questions
- Can I use this recipe in production?
- Yes. Every recipe is production-tested with error handling, logging, and deployment guidance.
- Which LLM providers are supported?
- Recipes support OpenAI, Anthropic Claude, Google Gemini, and open-source models via a unified interface.
- How do I customize these recipes?
- Each recipe includes a configuration section. Override model selection, API keys, and parameters without changing core logic.