An AI-powered Blog Writing Agent built using LangGraph, LangChain, Google Gemini, and Tavily Search. This project demonstrates the evolution of a blog-writing agent from a basic implementation to a research-enhanced, image-capable workflow while also providing a frontend and backend application for generating high-quality blog content.
- π Generate complete blog articles from a topic
- π Research-powered content generation using Tavily Search
- π§ Multi-step agent workflow with LangGraph
- π― Improved prompting techniques for better outputs
- πΌοΈ AI-assisted image generation support
- π Interactive frontend application
- β‘ Backend API for blog generation
- π Progressive learning notebooks demonstrating agent development
LangGraph-Blog-Writing-Agent/
β
βββ bwa_frontend.py
βββ bwa_backend.py
β
βββ 1_bwa_basic.ipynb
βββ 2_bwa_improved_prompting.ipynb
βββ 3_bwa_research.ipynb
βββ 4_bwa_research_fine_tuned.ipynb
βββ 5_bwa_image.ipynb
β
βββ tavily_test.ipynb
β
βββ ai_unpacked_the_weeks_top_developments_in_funding_research_and_regulation_may_24-31_2026.md
β
βββ requirements.txt
βββ .gitignore
βββ README.md
File: 1_bwa_basic.ipynb
- Introduction to LangGraph
- Basic blog generation workflow
- Single-agent content creation
File: 2_bwa_improved_prompting.ipynb
- Advanced prompt engineering
- Better structure and readability
- Enhanced blog quality
File: 3_bwa_research.ipynb
- Integrates external research
- Uses search tools for fact gathering
- Produces more informative content
File: 4_bwa_research_fine_tuned.ipynb
- Improved research pipeline
- Better source utilization
- Higher quality article generation
File: 5_bwa_image.ipynb
- Adds image generation capabilities
- Creates richer blog content
- Demonstrates multimodal workflows
- LangGraph
- LangChain
- Google Gemini
- Tavily Search API
- Streamlit
- Python
- Python Dotenv
- Requests
git clone https://github.com/KA18202005/LangGraph-Blog-Writing-Agent.git
cd LangGraph-Blog-Writing-Agentpython -m venv venvvenv\Scripts\activatesource venv/bin/activatepip install -r requirements.txtCreate a .env file in the project root:
GOOGLE_API_KEY=your_google_api_key
TAVILY_API_KEY=your_tavily_api_keypython bwa_backend.pystreamlit run bwa_frontend.pyOpen the local Streamlit URL displayed in the terminal.
User Topic
β
βΌ
Planning Agent
β
βΌ
Research Agent
β
βΌ
Content Generation Agent
β
βΌ
Refinement Agent
β
βΌ
Image Generation
β
βΌ
Final Blog Output
The repository includes an example generated article:
ai_unpacked_the_weeks_top_developments_in_funding_research_and_regulation_may_24-31_2026.md
This demonstrates the quality and structure of the generated blog content.
By exploring this project, you'll learn:
- LangGraph fundamentals
- Agent-based workflow design
- Prompt engineering techniques
- Research-Augmented Generation (RAG)
- Search tool integration
- AI content creation pipelines
- Streamlit application development
- Multiple LLM support
- SEO optimization module
- Blog export to PDF/DOCX
- Citation generation
- Multi-language blog generation
- Publishing directly to CMS platforms
Contributions are welcome.
- Fork the repository
- Create a feature branch
git checkout -b feature-name- Commit your changes
git commit -m "Add feature"- Push to GitHub
git push origin feature-name- Open a Pull Request
If you found this project helpful:
- β Star the repository
- π΄ Fork the repository
- π Share it with others
Kavya Agarwal
GitHub: https://github.com/KA18202005
Built with β€οΈ using LangGraph, LangChain, Gemini, and Tavily Search.