Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎓 EduHaiku Agent 🤖🌿

A command-line AI agent that detects the topic of any educational question and responds in haiku format using Gemini API (OpenAI-compatible interface).


✨ Features

  • 🧠 Topic detection using Gemini
  • 📜 Poetic answers in 5-7-5 haiku style
  • 💻 Minimal CLI interface
  • 🚀 Fast Gemini-2.0 Flash model
  • 🧪 Tested across 20+ educational topics

🛠️ Setup Instructions

1. Clone the repository

git clone https://github.com/muhammadwaheedairi/eduhaiku-agent.git
cd eduhaiku-agent

2. Create a virtual environment using uv

uv venv

3. Activate the virtual environment

🪟 Windows:

.venv\Scripts\activate

🐧 Mac/Linux:

source .venv/bin/activate

4. Install dependencies

uv pip install -r requirements.txt

🔐 Setup API Key

  1. Create a .env file in the root folder
  2. Paste your Gemini API key:
GEMINI_API_KEY=your-real-gemini-api-key-here

See .env.example for reference


🚀 Run the Agent

python main.py

💬 You'll be prompted to ask an educational question.


🧪 Sample Output

Ask your educational question: What is gravity?

📚 Detected Topic: Physics

🎓 Haiku Response:

A force unseen pulls,  
Objects drawn to center mass,  
Earth's gentle embrace.

📂 Project Structure

eduhaiku-agent/
├── main.py
├── .env
├── .env.example
├── requirements.txt
├── .gitignore
└── README.md

🤝 Credits

Built with ❤️ by Muhammad Waheed Follow the journey: @muhammadwaheedairi


About

A CLI AI Agent that replies to educational questions in Haiku format using Gemini API.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages