You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unlike a standard LLM that only knows what it was trained on, this agent has access to "tools" (Web Search and a Calculator) and possesses "memory" to remember your conversation history. It runs locally in your terminal but uses the powerful Llama 3.3 70B model via the Groq Cloud.
⚡ Why uv instead of pip?
You will notice I used uv for this project. If you haven't used it before: uv is a modern, extremely fast Python package manager (written in Rust).
It's Fast: It installs packages almost instantly compared to standard pip.
It's Clean: It handles virtual environments automatically.
It's Simple: No more python -m venv ... or pip freeze.
Install the uv
Windows (Recommended)
Open PowerShell and run:
PowerShell
powershell -ExecutionPolicy ByPass -c
"irm https://astral.sh/uv/install.ps1 | iex"
🛠️ Tech Stack & Libraries Used
Here is what makes this agent tick:
Python 3.12+:
The core language.
LangGraph:
The "brain" logic. It allows the AI to decide: "Should I answer directly, or do I need to use a tool first?"
LangChain:
The framework that connects the AI to the tools.
Groq API (Llama 3.3 70B):
The intelligence engine. We use the 70B model because it is significantly better at following tool instructions than smaller models.
DuckDuckGo Search:
The "Eyes." Lets the agent search the live internet for real-time info (like stock prices or news).
Custom Calculator:
The "Brain Extension." A specific Python tool I wrote because LLMs are notoriously bad at math. It uses Python's math library for precision.
MemorySaver:
The RAM. Keeps track of the conversation so you don't have to repeat yourself.
🚀 How to Run This Project
1. Clone the Repository
git clone <your-repo-url-here>
cd <your-repo-name>
2. Install Dependencies (Using uv)
If you don't have uv installed, get it first: pip install uv (ironic, I know) or via their official guide.
Then, simply run:
uv sync
This will read the pyproject.toml (or you can manually add the packages below):