AI Agents · 1 min read
ContentAgent: I Built a Multi-Agent Blog Writer in a Day
ContentAgent is a FastAPI pipeline with router, search, writer, critic, and formatter steps that produces technical content from a single prompt using Gemini 2.5 Flash.

TL;DR
ContentAgent is a FastAPI backend with a sequential pipeline: router, search, writer, critic, formatter. It produces technical blog posts from a single prompt using Gemini 2.5 Flash. The router decides whether web search is needed, search uses Tavily, the critic rewrites the draft once, and the formatter extracts title, description, tags, reading time, and word count.
The Problem
Writing technical content requires deep research and multiple drafts. A single prompt to an LLM often produces generic, surface-level content. I needed a system that researches, drafts, critiques, and formats in a fixed pipeline.
Workflow
- Router: Asks Gemini whether web search is needed.
- Search: Uses Tavily with two queries and up to 7 sources.
- Writer: Drafts a Markdown post.
- Critic: Always rewrites the draft in one pass.
- Formatter: Extracts title, description, tags, reading time, and word count.
Results
I used ContentAgent to write part of this portfolio's content. It maintains a consistent technical tone and handles complex multi-step reasoning that a single-prompt LLM would fail at.
← Previous
AI Code Reviewer: I Built a Self-Hostable GitHub PR Reviewer with FastAPI, Redis, and Docker
Next →
Optimix: AI-Powered SEO Analyzer