https://github.com/abdelrahman-amen/agentic_sqlite_explorer_using_agno
This project demonstrates the integration of Agentic AI with SQLite, creating an intelligent assistant that interacts with the Chinook database. It leverages advanced AI capabilities to execute natural language queries, retrieve data, and simplify database management for users.
https://github.com/abdelrahman-amen/agentic_sqlite_explorer_using_agno
agentic-ai agno api dotenv groq gui llama3 llm python sqlite
Last synced: 3 months ago
JSON representation
This project demonstrates the integration of Agentic AI with SQLite, creating an intelligent assistant that interacts with the Chinook database. It leverages advanced AI capabilities to execute natural language queries, retrieve data, and simplify database management for users.
- Host: GitHub
- URL: https://github.com/abdelrahman-amen/agentic_sqlite_explorer_using_agno
- Owner: Abdelrahman-Amen
- Created: 2025-06-02T15:15:09.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-06-02T16:37:48.000Z (4 months ago)
- Last Synced: 2025-06-03T06:33:52.958Z (4 months ago)
- Topics: agentic-ai, agno, api, dotenv, groq, gui, llama3, llm, python, sqlite
- Language: Python
- Homepage:
- Size: 4.48 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π Agentic AI and SQLite Database Interaction
## π€ What is Agentic AI?
Agentic AI represents a groundbreaking approach to artificial intelligence, blending advanced language models with actionable capabilities. These AI agents can interact with various tools, manage databases, execute workflows, and respond to natural language queries. This paradigm shift enables a more seamless integration of AI into everyday tasks and complex operations.This project leverages **Agentic AI** to create an intelligent interface for managing a SQLite database. The agent can execute queries, retrieve data, and provide insights with minimal human guidance, making database exploration more accessible and intuitive.
---

## π About This Project
This project showcases the power of Agentic AI by creating an interactive SQLite database agent. The **Chinook** database, a sample SQLite database commonly used for learning and demonstration, serves as the data source. Users can query the database in natural language, and the agent processes these queries using the **Groq language model**.
### π§ Features
- **Secure Environment**: Manage API keys and sensitive data using a `.env` file.
- **SQL Integration**: Interact with the Chinook SQLite database using `SQLTools`.
- **Powerful AI Model**: Utilize the `Groq llama-3.3-70b-versatile` model for understanding and processing queries.
- **Playground Application**: A user-friendly interface to test agent capabilities and visualize interactions.
- **Markdown Responses**: Well-formatted, easy-to-read outputs from the agent.---
## π οΈ How It Works
### 1οΈβ£ Environment Setup
- **Environment Variables**: API keys and sensitive configurations are securely loaded from a `.env` file:
```env
GROQ_API_KEY=your_groq_api_key
AGNO_API_KEY=your_agno_api_key
```### 2οΈβ£ Agent Initialization
The agent is initialized with:
- **Name**: `chinook SQLite agent`
- **Model**: `Groq llama-3.3-70b-versatile`
- **Tool**: `SQLTools` linked to the Chinook SQLite database
- **Advanced Configurations**: Markdown support, visibility of tool calls, and message history.### 3οΈβ£ Playground Interaction
A playground application is set up to allow interactive testing of the agent. Use `serve_playground_app()` to launch the server and access a local interface to explore database queries.---
## π Example Queries
Here are some sample queries to demonstrate the agentβs capabilities:1. **Database Structure**
- "How many tables are in the database?"
2. **Table Details**
- "List the columns in the Album table and mention their names."
3. **Specific Records**
- "Find the album ID and artist ID for the title 'Out Of Exile'."
4. **Data Statistics**
- "How many rows and columns are there in the Artist table?"
5. **Retrieve Data**
- "Show the first ten rows in the Track table."---
## π Running the Application
### Prerequisites
Ensure you have Python installed and a basic understanding of SQLite.### Steps
1. Clone the repository:
```bash
git clone
```2. Install required Python packages:
```bash
pip install -r requirements.txt
```3. Create a `.env` file and add your API keys:
```env
GROQ_API_KEY=your_groq_api_key
AGNO_API_KEY=your_agno_api_key
```4. Run the application:
```bash
python .py
```5. Access the local playground to test the agentβs capabilities.
---
## π Repository Structure
```
βββ Chinook_Sqlite.sqlite # SQLite database file
βββ playground.py # Main script to run the application
βββ requirements.txt # Python dependencies
βββ .env # Environment variables
βββ README.md # Project documentation
```---
# Demo π½
Below is a demonstration of how the application works:
