Inspiration
Writing a high-quality technical or educational blog is not just about generating paragraphs with an LLM. A good article usually requires understanding the topic, deciding what the reader needs, researching supporting information, creating a logical structure, writing each section, improving clarity, and finally checking SEO and consistency.
We wanted to turn that repetitive workflow into an actual AI-driven process instead of a single prompt-to-text generation step.
The idea behind the Autonomous Blog Writing Agent was to treat blog creation as a sequence of specialized tasks. Rather than asking one model to “write a blog,” we built a workflow where different stages handle planning, research, writing, SEO improvement, and editing before producing the final article.
What it does
The user starts with a single topic and can specify requirements such as writing style, audience, article length, complexity, number of sections, and SEO level.
The system then runs the topic through an automated workflow:
Topic & Requirements
↓
Topic / Intent Analysis
↓
Research & Context Gathering
↓
Article Planning & Outline
↓
Section-by-Section Writing
↓
SEO Optimization
↓
Editing & Proofreading
↓
Final Markdown Article
The final result is a structured, publish-ready Markdown article rather than raw model output.
The system also supports asynchronous generation. A long-running blog generation task can run as a background job while the frontend displays its current progress and eventually retrieves the completed result.
How we built it
We built the backend with Python and FastAPI and used LangChain and LangGraph to orchestrate the multi-step generation workflow.
The frontend was built using React, TypeScript, and Vite, with Markdown rendering for displaying the generated article.
The main generation pipeline separates the responsibilities of the workflow into stages such as:
- Research and context gathering
- Blog planning and outline generation
- Content drafting
- SEO optimization
- Editing and refinement
For LLM execution, we implemented provider routing using OpenRouter as the primary option with fallback support and Ollama for local generation. This allowed us to experiment with different models while keeping the workflow independent of a single provider.
We also implemented two generation approaches through the API:
- A synchronous generation endpoint for direct requests
- An asynchronous background-job workflow for longer generations
The asynchronous API exposes job status, progress, and the final result, which makes the generation process visible to the user instead of leaving them waiting on a single request.
Challenges we ran into
One of the biggest challenges was making the system behave like a workflow rather than a collection of independent LLM calls.
A blog can become inconsistent when different sections are generated without enough shared context. We therefore had to design the workflow so that planning and previous context could guide subsequent writing stages.
Another challenge was handling long-running generation requests. A complete article involves multiple model calls, so treating the entire process as one synchronous API request was not ideal. We addressed this by introducing background jobs and progress tracking.
We also had to deal with differences between cloud and local models. Model availability, response quality, latency, and resource requirements are not identical across providers. The OpenRouter-to-Ollama fallback approach helped us make the system more resilient during development and testing.
Finally, generating text was only one part of the problem. We needed the final output to have a useful structure, consistent formatting, readable sections, and SEO-oriented elements rather than simply being a long block of generated text.
Accomplishments that we're proud of
We are most proud of turning a simple idea—“generate a blog with AI”—into a working multi-stage agentic workflow.
Instead of relying on one large prompt, the project separates the writing process into meaningful stages and coordinates them through LangGraph.
We also built a complete application around the workflow rather than only a backend prototype:
- React-based user interface
- FastAPI backend
- LangGraph workflow orchestration
- Configurable generation parameters
- Synchronous and asynchronous generation
- Background job tracking
- Live generation progress
- Markdown-based final output
- Multiple LLM provider support
- Local-model support through Ollama
This gave us a much better understanding of what it takes to move an LLM workflow from an experiment into an application that a user can actually interact with.
What we learned
The biggest lesson was that agentic AI is not simply about adding more LLM calls.
The quality of an agent depends heavily on how the workflow is designed: what information each stage receives, what each stage is responsible for, how context is preserved, and how failures are handled.
We also learned that application engineering becomes particularly important when working with LLMs. API design, asynchronous processing, state management, fallbacks, structured outputs, and frontend feedback are just as important as prompt engineering.
Most importantly, we learned to think of content generation as a pipeline that can be measured, controlled, and improved, rather than as a single generative response.
What's next for Blog Writing Agent
The next step is to expand the system from an autonomous blog writer into a broader content automation engine.
The existing generation workflow provides the foundation for turning one source of information into multiple forms of content. We want to extend it toward:
- Social-media content generation from completed blogs
- LinkedIn posts and X threads from the same source material
- YouTube and short-form video scripts
- Automated content calendars
- Cover images and visual content generation
- Multilingual content generation
- CMS publishing integrations
- Content-performance and SEO analytics
The long-term goal is to move from “AI that writes a blog” toward “AI that takes an idea, develops the content, repurposes it across channels, and helps automate the publishing workflow.”
Built With
- agentic-ai
- ai-agents
- async-processing
- background-jobs
- content-automation
- fastapi
- gemini-api
- generative-ai
- langchain
- langgraph
- llm
- markdown
- natural-language-processing
- ollama
- openrouter
- prompt-engineering
- python
- react
- rest-api
- typescript
- vite

Log in or sign up for Devpost to join the conversation.