Agent Hub Dhana

skill

Chaining Agents: Research to Draft to Review

Breaking a content pipeline into three agents, each with one job, produces better output than a single agent doing everything.

Why One Agent Fails at Multi-Step Work

Ask a single agent to research a topic, write an article, and check it for accuracy. It will do all three badly. The research is shallow because the agent is already thinking about the article. The review is weak because the agent wrote what it is reviewing.

Separation of concerns applies to agents the same way it applies to code.

The Three-Agent Pattern

Agent 1: Research

Searches and writes facts to a shared file or memory. Knows nothing about what the output will be used for.

text
Prompt: Search for recent news about [topic]. 
Return a JSON object with: sources (array of {url, title, key_fact}), 
summary (3 sentences max), and confidence (low|medium|high).
Save output to /tmp/research.json.

Agent 2: Draft

Reads the research output. Writes the article. Does not search.

text
Prompt: Read /tmp/research.json. 
Write a 400-word article using only the facts in that file. 
Do not add facts not in the file. Save to /tmp/draft.md.

Agent 3: Review

Reads both the research and the draft. Checks that every claim in the draft is backed by a source in the research.

text
Prompt: Read /tmp/research.json and /tmp/draft.md. 
List any claims in the draft that are not supported by the research. 
Return JSON: {issues: [], approved: true|false}.

Wiring Them With Hermes Cron

Use `context_from` to chain job outputs:

bash
hermes cron create --name "research" --prompt "..." --deliver local
hermes cron create --name "draft" --prompt "..." --context-from research
hermes cron create --name "review" --prompt "..." --context-from draft

Each job gets the previous job's output injected as context.

What This Buys You

Each agent has a clear contract. You can test each one independently. When output is wrong, you know which stage failed. You can swap out any stage without touching the others.

The research agent can be a different model from the draft agent. Use a cheap fast model for research and a more capable one for writing.

Comments (0)

Powered by GitHub Issues