A beginner-friendly Retrieval-Augmented Generation (RAG) and Tool-Calling project.
This project demonstrates how to build an AI support agent that can read a static knowledge base (like an IT policy document) to answer user questions, and use basic tools to interact with a local ticket database.
- Basic RAG (Retrieval-Augmented Generation): The agent reads from
policy.txtusing ChromaDB to understand company rules before answering support questions. - Simple Tool Calling: The agent can execute basic Python functions to interact with a local SQLite database (
tickets.db), allowing it to check ticket statuses or log new issues. - Agent Memory: Uses local storage (
agent_storage.db) to remember conversation history and user details across sessions. - Fast Orchestration: Powered by the Groq Inference API for near-instantaneous LLM responses.
- Framework: Python 3
- AI Orchestration: Agno (formerly Phidata)
- LLM: Llama 3 (via Groq)
- Vector Database: ChromaDB (Local)
- Relational Database: SQLite (Local)
- Package Manager: uv
AGENTIC_HELPDESK/
├── policy.txt # The text file serving as the Knowledge Base for RAG
├── agent.py # Base agent setup file
├── agent_v2.py # Iteration 2 of the agent setup
├── final_helpdesk.py # Finalized agent implementation script
├── finance_agent.py # Additional test agent for finance queries
├── helpdesk_app.py # Main application script to run the helpdesk
├── main.py # Alternative entry point / API testing
├── playground.py # Agno Playground UI script
├── team_agent.py # Additional test agent for team queries
├── ticket_system.py # Python tools (SQL CRUD) for the agent to use
├── pyproject.toml # Project metadata and uv build configuration
├── uv.lock # Locked dependencies for perfect reproducibility
├── requirement.txt # Python dependencies list
└── .env # Environment variables (API Keys - Git Ignored)
The vector database(s) will also be stored within this project folder.
This project utilizes uv for lightning-fast package management.
git clone [https://github.com/YOUR_USERNAME/agentic-it-helpdesk.git](https://github.com/YOUR_USERNAME/agentic-it-helpdesk.git)
cd agentic-it-helpdeskCreate a .env file in the root directory. You will need a free API key from Groq.
Ini, TOML
GROQ_API_KEY=gsk_your_groq_api_key_here
Set up the virtual environment and install the required packages:
Bash
# Using uv (Recommended)
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv pip install -r requirement.txt(Note: standard python -m venv venv and pip install -r requirement.txt works as well if you are not using uv).
To interact with the agent in your terminal or via the Agno UI, run the primary application file:
python helpdesk_app.pyIf you want to view the agent in a web browser using the Phidata/Agno playground:
python playground.pyThe terminal will provide a localhost link (typically http://localhost:7777). Open this in your browser.
Once the agent is running, try asking it a combination of knowledge-based and action-based questions:
- RAG Test: "My laptop screen is broken. What is the IT policy for a replacement?"
- Tool Test: "Can you check the status of ticket 102?"
- Combined Test: "Please create a new high-priority ticket for my broken laptop. My manager is John Doe."