Back to Projects
Agents & Tools

AI Blog Writing Agent

Autonomous multi-agent system that researches the web and writes comprehensive, structured blog posts — powered by LangGraph, Groq (LLaMA 3), and Tavily Search

93% relevancy
Eval Score
< 5 min
Latency
Web-scale
Dataset
~$0.00 (Groq)
Cost/call
System Overview

An autonomous, multi-agent blog writing pipeline that takes a single topic as input and produces a fully-written, research-backed blog post — automatically. Unlike a simple prompt-to-text setup, this system uses a graph-based multi-agent workflow powered by LangGraph where specialized agents collaborate.

The Router agent decides whether the topic needs live web research via Tavily Search API or can be answered from LLM knowledge. The Orchestrator plans the complete blog structure — title, sections, tone, target audience, and word-count targets. Multiple Worker agents then write each section simultaneously using LangGraph's fan-out pattern, and a Reducer stitches them into a final polished post.

The result is a production-quality blog post with a one-click Markdown download option. All past blogs are instantly accessible in a ChatGPT-style sidebar history — every generation is stored independently via SQLite-backed LangGraph checkpointing so there's no context bleed between posts. The entire pipeline is fully observable with LangSmith tracing.

Architecture
START
  │
  ▼
┌─────────┐
│  Router │  ← Decides: research needed? (yes/no)
└─────────┘
  │         \
  ▼           ▼ (if no research needed)
┌──────────┐   │
│ Research │   │  ← Tavily real-time web search
└──────────┘   │
  │             │
  └──────┬──────┘
         ▼
  ┌─────────────┐
  │ Orchestrator│  ← Plans blog sections
  └─────────────┘
         │
    (fan-out to N parallel workers)
         │
  ┌──────┴──────┐
  ▼   ▼   ▼   ▼
[W1][W2][W3][W4]   ← Workers (each writes one section)
  └──────┬──────┘
         ▼
  ┌─────────┐
  │ Reducer │  ← Merges all sections into final blog
  └─────────┘
         │
        END
Tech Stack
LangGraphLangChainLangSmithGroq (LLaMA 3)Tavily APIStreamlitPydantic v2SQLitePython
Key Highlights
Intelligent routing — auto-detects if the topic needs live web research
Parallel section writing via LangGraph fan-out (Send) pattern
Full LangSmith observability — every agent step traced end-to-end
SQLite-backed persistent checkpoint history (survives server restarts)
One-click Markdown download of any generated blog
ChatGPT-style sidebar with all past blog sessions
Structured blog planning by Orchestrator (title, sections, word targets)
Ultra-fast inference via Groq (LLaMA 3.1-8b)
Evaluation Metrics
93%
relevancy
88%
faithfulness
LATENCY< 5 min end-to-end
[01]Agents occasionally produced overlapping sections — fixed by adding explicit section boundary instructions to the orchestrator prompt
[02]Research worker hallucinated citations — fixed by forcing Tavily search-grounded outputs and adding a citation validation step
[03]State corruption on long sessions — fixed by implementing LangGraph checkpoint-based state recovery
What I Learned
[01]Workflow of Agentic AI — moving beyond linear prompts into robust, stateful node-based pipelines
[02]Building agents with LangGraph — defining nodes, edges, state schemas, and conditional routing in a StateGraph
[03]Parallel Execution / Fan-out Pattern — using Send to dynamically dispatch work to parallel worker agents simultaneously
[04]Orchestrator Pattern — having a manager agent plan execution and dynamically generate steps for worker agents
[05]Tool Calling (Tavily) — connecting LLMs to live external APIs to retrieve context dynamically
[06]LangGraph Checkpointing — preserving full persistent history into SQLite, allowing users to scroll through past blogs
[07]LangSmith Tracing — implementing full LLM observability to study rate limits, execution speeds, and inner-thought prompts
[08]Advanced Prompt Engineering — crafting precise system prompts that yield structured, reliable programmatic output using Pydantic schemas
Project Preview
screenshot 1
1 / 4
thumb 1
thumb 2
thumb 3
thumb 4