nivakaran's picture
Upload 12 files
308b241 verified

๐Ÿค– Agentic AI Blog Generator

This is an Agentic AI-powered blog generation system built using the uv framework and FastAPI. It supports multilingual blog generation in English, Tamil, and Sinhala, based on simple JSON input.

โœจ Features

  • ๐ŸŒ Generates blog content in English, Tamil, or Sinhala.

  • โšก FastAPI backend to handle blog requests.

  • ๐Ÿ”ง Built using LangGraph and LangChain.

  • ๐Ÿ“ Supports two separate Agentic Graphs:

    • One for English blogs.
    • One for Tamil and Sinhala blogs.
  • ๐Ÿ“ฆ Easily configurable via .env file.

  • ๐Ÿ“ƒ Cleanly managed with requirements.txt and uv for dependency management.


๐Ÿ”ง How to Use

โœ… Step 1: Clone the Repository

git clone https://github.com/yourusername/agentic-blog-generator.git
cd agentic-blog-generator

๐Ÿ” Step 2: Install Dependencies

Ensure you have uv installed, then run:

uv add -r requirements.txt

๐Ÿ” Step 3: Set Up Environment Variables

Create a .env file and include the following:

GROQ_API_KEY=your_groq_api_key
LANGCHAIN_API_KEY=your_langchain_api_key

โš–๏ธ Step 4: Launch LangGraph Studio

To open the graph in LangGraph Studio, run:

langgraph dev

There are 2 graphs available:

  • English Blog Graph
  • Tamil & Sinhala Blog Graph

Modify the ./src/graphs/graph_builder.py file to select which graph to open.


๐Ÿš€ Run the App

After setting up your environment, start the FastAPI server with:

python app.py

โœ๏ธ API Usage

Send a POST request to /blogs endpoint with one of the following formats:

โœ‰๏ธ English Blog Generation

{
  "topic": "The Future of Artificial Intelligence"
}

๐Ÿ‡น๐Ÿ‡ญ/๐Ÿ‡ต๐Ÿ‡ฌ Tamil or Sinhala Blog Generation

{
  "topic": "เฎ•เฏเฎฑเฎฟเฎฉเฏ เฎฎเฏˆเฎคเฏเฎคเฏเฎคเฏเฎคเฏ เฎ‰เฎฐเฏเฎจเฏเฎค เฎฎเฏเฎฉเฏเฎฉเฏˆ",
  "language": "tamil"
}
{
  "topic": "เท€เท™เถปเท’เถฉ เถšเถงเทเถปเถฑเทŠเทƒเถปเทŠเถถเท’เถฑ เท€เถปเทเท€เถปเถบ",
  "language": "sinhala"
}

๐Ÿ–ผ๏ธ Graph Visuals

English Blog Graph

English Graph

Tamil & Sinhala Blog Graph

Tamil Sinhala Graph


๐Ÿšœ Project Structure

.
โ”œโ”€โ”€ app.py                         # Main FastAPI app
โ”œโ”€โ”€ requirements.txt              # Dependencies
โ”œโ”€โ”€ .env                          # API keys (GROQ and LangChain)
โ”œโ”€โ”€ src
โ”‚   โ””โ”€โ”€ graphs
โ”‚       โ””โ”€โ”€ graph_builder.py      # Modify to open selected LangGraph
โ””โ”€โ”€ assets
    โ”œโ”€โ”€ english_graph.png
    โ””โ”€โ”€ tamil_sinhala_graph.png

๐Ÿ“… Built With


๐ŸŒŸ Credits

Created with โค๏ธ by Nivakaran S. โ€” built for multi-lingual blog automation.


โœŠ Contribute

Feel free to fork, star, and contribute!


โš ๏ธ License

This project is licensed under the MIT License.