A simple LangChain-based AI agent powered by Groq using the openai/gpt-oss-120b model, with real-time web search via Tavily.
This repository provides everything needed to install, configure, and run the agent locally.
- Groq-powered LLM (openai/gpt-oss-120b)
- LangChain agent
- Real-time web search using Tavily
- Easy setup with requirements.txt
- Python 3.9+
- Groq API key
- Tavily API key
- Clone the repository
git clone https://github.com/Sujit224/langchain-groq-search-agent
cd langchain-groq-search-agent
- Create a virtual environment
python -m venv venv
source venv/bin/activate # macOS / Linux
venv\Scripts\activate # Windows
- Install dependencies
pip install -r requirements.txt
Create a .env file in the project root:
LANGCHAIN_AGENT_KEY=your_groq_api_key_here
TAVILY_API_KEY=your_tavily_api_key_here
Run the agent: python main.py Enter a query when prompted.
Provider: Groq Model: openai/gpt-oss-120b Temperature: 0.3
This agent uses Tavily to fetch real-time information from the web when needed.
The model has a knowledge cutoff (June 2024) Web search is used to retrieve up-to-date information Output quality depends on search availability