Build Log: Multi-Agent Research Pipeline with OpenClaw
I was spending 2-3 hours per research article: searching sources, cross-referencing facts, analyzing data, and writing the final draft β all manually. Each piece required switching between 5-6 browser tabs, a notes app, and a text editor.
The bottleneck wasn't writing. It was research.
So I built a multi-agent research pipeline using OpenClaw's concurrent sub-agent system. Here's exactly what I built, the tools, the data on what changed, and the lessons learned.
The Problem
Build Log Review 2026
Research-intensive writing follows a predictable but tedious pattern:
- Search phase β find 5-10 sources per topic
- Extract phase β pull key facts, stats, and quotes from each source
- Verify phase β cross-reference claims across sources
- Structure phase β organize findings into an outline
- Write phase β turn the outline into prose
Doing these in sequence, manually, takes 2-3 hours for a 1,500-word article. The problem is that phases 1-4 are mechanical β perfect for automation β but they're typically done by the same person (you) in a linear workflow.
What I Built
A multi-agent research pipeline with four specialized agents, each with a focused role:
| Agent | Role | Tools | Model |
|---|---|---|---|
| Scout | Searches and discovers sources | Web search, Brave, Tavily | DeepSeek V4 Flash |
| Analyst | Extracts facts, identifies patterns | Read, File write | Claude Sonnet 4.6 |
| Verifier | Cross-checks claims across sources | Web search, Read | DeepSeek V4 Flash |
| Writer | Produces structured output | File write | Claude Sonnet 4.6 |
The agents run concurrently using OpenClaw's sub-agent spawning. Scout and Analyst work in parallel on different sources. Verifier runs after both complete. Writer runs last, consuming the verified data.
Pipeline Architecture
class="language-text">User Request
β
βΌ
βββββββββββββββ βββββββββββββββ
β Scout β β Scout β
β (source 1) β β (source 2) β β concurrent
ββββββββ¬βββββββ ββββββββ¬βββββββ
β β
βΌ βΌ
βββββββββββββββββββββββββββββββββββ
β Analyst β
β (extract facts from sources) β
ββββββββββββββββ¬βββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββ
β Verifier β
β (cross-reference + validate) β
ββββββββββββββββ¬βββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββ
β Writer β
β (produce final structured doc) β
βββββββββββββββββββββββββββββββββββ
Implementation
The pipeline is driven by a single OpenClaw cron job that triggers the Scout agent. Scout spawns sub-agents β one per source URL found. Each runs independently and reports back to the main agent, which passes results to Analyst.
Key configuration:
class="language-yaml"># The concurrent sub-agent spawning
agents:
defaults:
tools:
- web_search
- read
- write
list:
- id: scout
model: deepseek/deepseek-v4-flash
tools: [web_search, read]
- id: analyst
model: anthropic/claude-sonnet-4.6
tools: [read, write]
- id: verifier
model: deepseek/deepseek-v4-flash
tools: [web_search, read]
- id: writer
model: anthropic/claude-sonnet-4.6
tools: [write]
Tools Used
| Tool | Role in Pipeline |
|---|---|
| OpenClaw | Agent orchestration, cron scheduling, sub-agent spawning |
| DeepSeek V4 Flash | Scout and Verifier agents (cheap, fast, good for search/verify) |
| Claude Sonnet 4.6 | Analyst and Writer agents (stronger reasoning, better prose) |
| OpenRouter | Unified API routing across both model providers |
| Brave Search API | Web search for source discovery |
| systemd timers | Backup and recovery triggers |
Data and Results
Over 8 articles processed through this pipeline:
| Metric | Before (Manual) | After (Pipeline) | Improvement |
|---|---|---|---|
| Time per 1,500-word article | 2-3 hours | 25-40 minutes | 4x faster |
| Sources consulted | 4-6 | 8-12 | 2x more coverage |
| Factual errors per article | 1-3 | 0-1 | ~80% reduction |
| Time spent on research vs writing | 70% research, 30% writing | 40% research, 60% writing | Inverted ratio |
| Articles published per week | 2-3 | 5-7 | 2x throughput |
The most impactful change wasn't speed β it was coverage. With manual research, I'd stop after 4-6 sources because the marginal effort of finding more wasn't worth it. With the pipeline, Scout finds 8-12 sources before I make any effort, and the concurrency means the cost in time is roughly the same.
Cost Per Article
| Agent | Tokens (avg) | Model Cost | Time |
|---|---|---|---|
| Scout | ~15K input / ~2K output | ~$0.005 | ~15s |
| Analyst (per source, x8) | ~8K / ~3K each | ~$0.05 total | ~30s total |
| Verifier | ~25K / ~4K | ~$0.008 | ~20s |
| Writer | ~20K / ~8K | ~$0.10 | ~25s |
| Total per article | ~$0.16 | ~90s agent time |
At roughly $0.16 per article in API costs, the pipeline pays for itself many times over in time saved.
Lessons Learned
1. Concurrent sub-agents are the key, not the model
The biggest speedup came from running Scout as parallel sub-agents, not from using a faster model. Serial processing of 8 sources would take 8x as long. Concurrent processing takes roughly 1x with a small overhead.
2. Sonnet beats Flash for writing, Flash beats Sonnet for searching
Claude Sonnet 4.6 produces noticeably better prose and more accurate data extraction. DeepSeek V4 Flash is faster and cheaper for search β and since search doesn't need strong reasoning, it's a perfect fit. The cost saving is roughly 5x per search call.
3. The verifier agent eliminated the most errors
Adding a dedicated verification step reduced factual errors by ~80%. The Verifier agent catches hallucinated citations, misattributed quotes, and contradictory claims that Analyst or Writer would let through. This single agent was the highest-ROI addition to the pipeline.
4. Agent handoff requires structured data
The pipeline fails if agents pass unstructured text. Each agent writes to a structured JSON format that the next agent can parse reliably. This was the biggest early failure mode βagents producing free-form text that the next agent couldn't understand.
5. Cron scheduling enables overnight processing
By attaching the pipeline to an OpenClaw cron job, the entire research loop runs overnight. I wake up to a structured brief waiting for me, saving the 30-minute "warm-up" time of manually reorienting to a task.
What's Next
The current pipeline handles research articles well, but it's article-specific. The next version will add:
- Dynamic agent selection based on task type (research vs. analysis vs. creative)
- Source quality scoring to prioritize high-authority sources
- Automated citation formatting in multiple styles (APA, MLA, Chicago)
- Feedback loop where Writer's output quality metrics influence Scout's search strategy
This pipeline is itself described using the workflow it automates β Scout informed the structure, Analyst extracted the key findings, and Writer produced the final draft.
Frequently Asked Questions
How does OpenClaw handle concurrent sub-agents?
OpenClaw spawns sub-agents as isolated sessions using sessions_spawn or cron-based delegation. Each runs independently, and the parent agent collects results via file reads or structured output.
Is $0.16 per article accurate?
Yes, using DeepSeek V4 Flash ($0.10/M input) for search/verify and Claude Sonnet 4.6 ($3/M input) for analysis/writing. Costs will vary with article length, source count, and model selection.
Can this replace human writers entirely?
No. The pipeline produces a strong first draft, but human review is still essential for tone, voice, and editorial judgment. Think of it as a research assistant that delivers a structured brief, not a replacement for the writer.
Can I adapt this for my own workflow?
Yes. The pipeline is model-agnostic. Swap in any OpenClaw-compatible provider, adjust the agent roles to match your task, and set a cron schedule that fits your rhythm.
β Back to all posts