Back to all posts

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.

By Malahim HaseebUpdated
ContentAgent: I Built a Multi-Agent Blog Writer in a Day
FastAPIPythonGeminiNext.js

Ask an AI about this post

Open this page with a prefilled prompt.

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

  1. Router: Asks Gemini whether web search is needed.
  2. Search: Uses Tavily with two queries and up to 7 sources.
  3. Writer: Drafts a Markdown post.
  4. Critic: Always rewrites the draft in one pass.
  5. 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.

Related posts