A smart multi-tool AI research assistant that reads PDFs, searches the web, queries Wikipedia, solves math, and explains every step it takes โ all using LangChain Agents and Mistral-7B via OpenAI.
โ Built with:
LangChain,Streamlit,Mistral-7B,Tavily,PyMuPDF,Wikipedia,PythonREPL
- ๐ Summarize PDFs
- ๐ Search the Web using Tavily
- ๐ Get facts from Wikipedia
- ๐งฎ Solve math with Python REPL
- ๐ Custom reverse tool
- ๐ฌ Multi-turn memory
- ๐ช Shows Chain-of-Thought (Thought โ Action โ Result)
- โ Tool usage checklist
- ๐จ Clean Streamlit UI
# 1. Clone this repo
git clone https://github.com/Rakshath66/Assistant-Research-Agent-LangChain.git
cd Assistant-Research-Agent-LangChain
# 2. Create virtual environment (optional but recommended)
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
# 3. Install dependencies
pip install -r requirements.txt
# 4. Add your API keys in .env
echo "OPENAI_API_KEY=your_openai_key" >> .env
echo "TAVILY_API_KEY=your_tavily_key" >> .env
# 5. Launch the app
streamlit run src/streamlit_app.pyAssistant-Research-Agent-LangChain/
โโโ src/
โ โโโ streamlit_app.py # Main UI and agent setup
โ โโโ agent_tools.py # Custom LangChain tools
โโโ requirements.txt # All Python dependencies
โโโ .env.example # Sample env format
โโโ README.md
Create a .env file (or set in Streamlit Secrets):
OPENAI_API_KEY=your_openai_key
TAVILY_API_KEY=your_tavily_key
If you're using Streamlit Cloud, paste this into Settings โ Secrets:
OPENAI_API_KEY = "sk-..."
TAVILY_API_KEY = "tvly-..."- โWhat projects did Rakshath work on in the uploaded PDF?โ
- โSummarize Wikipedia on LangChain.โ
- โWho is Elon Musk? Square the number of years since his birth.โ
- โReverse the string โLangChain Rocks!โโ
We welcome contributions! Here's how you can help:
- Fork this repository
- Clone your fork:
git clone https://github.com/Rakshath66/Assistant-Research-Agent-LangChain.git - Create a new branch:
git checkout -b feature/my-feature - Make your changes, commit, and push:
git commit -m "Add: my feature"git push origin feature/my-feature - Open a Pull Request with a description of your changes
๐ Please write clean readable code, add docstrings if needed, and test your features!
MIT License ยฉ Rakshath U Shetty
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software... [rest of MIT license]
It helps others discover it, and motivates me to build more free AI tools. Also, feel free to open issues, request features, or contribute.
๐งโ๐ป Built by Rakshath U Shetty
- Open source forever
- Designed for learning, research, and practical use
- Reach out via issues or PRs โ ideas welcome!
What Next? This project is just the beginning. Weโre building a production-ready RAG Agent that evolves over time. Here's the full roadmap after completing the basic agent.
- ๐ง Chain-of-Thought Agent using LangChain
- ๐ง Tools: PDF summarization, Web search (Tavily), Wikipedia, Calculator
- ๐งฎ Built-in Memory
- ๐ก Reasoning trace (Thought โ Action โ Result)
- ๐จ Streamlit UI with tool checklist
Let the agent auto-chain steps like:
โSummarize top 3 news articles about XYZโ
โถ Search โ Pick top links โ Read + Summarize โ Combine insights
summarize_urlโ Read and summarize a web pagemulti_url_summaryโ Loop over list of URLs and extract key infoweb_search_chainโ Combined search + read + summarize
Let the agent remember facts about the user or previous answers.
Example:
โWho is the CEO of Tesla?โ
โ Even tomorrow, it remembers your earlier query.
๐งฐ Tools & Techniques:
- LangChainโs
VectorStoreRetrieverMemory - Store structured Q&A facts or timelines
- Indexed long-term memory support
Enhance document summarization:
- ๐ Show exactly which chunks from the PDF were used in the answer
- ๐ Highlight matching text in context
- ๐๏ธ Support multi-PDF ingestion with separate memory per doc
Turn this logic into a production API backend:
- ๐ Framework:
FastAPIorLitestar - ๐ง Endpoint:
/askโ returns final answer + trace - ๐ฌ Useful for building your own chatbot or research SaaS
Make the agent smarter at real-world decisions:
- ๐ Use LangGraph or LCEL to handle branching logic
- ๐ค Tools like:
YouTubeTranscriptToolGoogle Scholar ReaderNews Aggregator
- ๐ง Agent decides:
- Should I search?
- Should I summarize?
- Can I skip?
โญ Want to contribute to any phase? Fork the repo, build a feature, and submit a PR! The roadmap is open for collaboration.
Let me know if you want:
- `LICENSE` file (MIT version)
- A matching `.env.example` file
- `demo/screenshot.png` placeholder
- `contributing.md` file
All of this helps boost your open-source visibility!
