This is a simple AI-powered research assistant I built using Groq + LangChain. The idea is straightforward — you ask a question, and the agent tries to give a clean, structured answer, even using the web when needed.
- Answer general questions
- Search the web for up-to-date info
- Return responses in a structured format (not messy text)
- Keep things fast using Groq (LLaMA models)
- Python
- LangChain
- Groq API
- Pydantic
python-ai-agent/
│
├── main.py
├── requirements.txt
├── .gitignore
└── .env (not included)git clone https://github.com/MAHADEVAN-007/python-ai-agent.git
cd python-ai-agentpython -m venv venv
venv\Scripts\activatepip install -r requirements.txtCreate a .env file and add:
GROQ_API_KEY=your_api_key_herepython main.pyInput:
What is ransomware?
Output (simplified):
Topic: Ransomware
Summary:
A type of malware that locks or encrypts data and demands money to unlock it.
Sources:
- FBI
- Microsoft
- You enter a query
- The agent decides if it needs to search the web
- It generates an answer
- The response is formatted into a clean structure
- Add memory (chat history)
- Build a web interface
- Add more tools (APIs, calculator, etc.)
- Improve response quality
Raman Mahadevan GitHub: https://github.com/MAHADEVAN-007
If you find this useful, feel free to ⭐ the repo.