Build AgentWriter AI with LangGraph, FastAPI and Ollama

Learn to build a multi-agent blog writer with parallel section generation, Ollama's Llama 3.1 8B model and PostgreSQL checkpoints.

Player not loading? Watch on YouTube

This tutorial builds AgentWriter AI, a blog writing application with a LangGraph workflow and a FastAPI backend. A router decides whether a topic needs web research. The planner creates an outline, workers draft sections in parallel, and a reducer combines them into a Markdown article. The browser interface shows progress and lets users preview, copy or download the result.

The implementation starts in Jupyter notebooks with a basic planning and writing workflow. Later steps add detailed prompts, structured Pydantic schemas and Tavily research with source links. A separate reducer subgraph handles content assembly and optional image generation through Gemini 2.5 Flash Image.

For the local LLM path, the presenter switches from Groq to Ollama after encountering API limits. He uses Llama 3.1 8B, describes its download as about 4 GB, and connects through localhost port 11434. Setup uses Python 3.11. PostgreSQL stores checkpoints, with the demonstrated database hosted on Render and inspected through pgAdmin; LangSmith handles tracing.

The demonstrated application also uses external services. Gemini produces no images during the final test because the presenter says his free allowance is exhausted. Medium publishing remains manual. He recommends paid model APIs for more detailed output, but the session does not establish a general quality limit for local inference. Cloud deployment is left to another tutorial.