DEV Community

Vivekanand Malakar
Vivekanand Malakar

Posted on

I built a 3-agent Python + Claude pipeline: RSS ingestion AI scoring Gmail MCP email drafts. Repo inside.

Multi-Agent Job Outreach Pipeline — Supervisor/Worker Pattern in Python + Claude

Wanted to share a multi-agent pattern I've been running — it's a supervisor/worker architecture that maps cleanly to n8n if anyone wants to port it.

Multi-agent pipeline architecture


The Pipeline

Agent 1 — Ingestion + Scoring

  • Pulls from Remotive API, WeWorkRemotely RSS, and Upwork RSS (all free, no keys needed)
  • Each item goes to Claude with a structured scoring prompt (1–10 against defined criteria)
  • Only items scoring ≥ 6 pass through to the next agent
  • Output: items_YYYY-MM-DD.json with score, reason, pain point, and pitch angle per item

Agent 2 — Context-aware Email Drafter

  • Reads the scored items JSON
  • For each item: Claude reads the full source text and writes a personalised email that references specific details — stack, stated problems, their own wording
  • No templates. Every draft is generated fresh against the actual source content
  • Output: drafts_YYYY-MM-DD.json — human reviews before anything is sent

Agent 3 — Gmail MCP Send

  • Approved drafts sent via Gmail MCP directly from inbox
  • Full send log maintained in JSON

Why This Pattern Is Interesting Technically

The scoring step is the key. Without it, you're passing 60+ low-signal items to an LLM and burning tokens on noise. With a Claude scoring gate, only ~10–15% of raw items make it through — and those are the ones worth spending a full generation on.

The other thing worth noting: keeping state in flat JSON files rather than a DB is underrated for single-user pipelines at this scale. Simple to inspect, easy to debug, no infra overhead.


n8n Equivalent of Each Agent

Agent n8n Implementation
Agent 1 Schedule trigger + HTTP Request nodes + AI Agent node (scoring prompt) + Filter node
Agent 2 Manual trigger + Loop over items + AI Agent node (drafting prompt) + Write file
Agent 3 Manual trigger + Gmail node with approval gate

Stack

  • Claude claude-sonnet-4-6
  • Python 3.12 + httpx
  • Gmail MCP
  • JSON for state

Repo

https://github.com/vivekanandtech/ai-outreach-agent

Happy to share the scoring prompt or the drafter prompt in the comments — took ~20 iterations to get both right.

Anyone built something similar with native n8n nodes?


I build systems like this for agencies and ops-heavy businesses. Portfolio at flowvanta.dev

Top comments (0)