The open-source framework for autonomous database agents.
Project description
The Agentic Database Command Center
An open-source framework for orchestrating autonomous database agents, integrating seamless Text-to-SQL pipelines with a powerful Full-Stack Workspace & Observability Dashboard.
🚀 What is Arivu?
Arivu bridges the gap between your raw data warehouses and Large Language Models (LLMs). It isn't just a wrapper; it's a dual-layer infrastructure:
- Python SDK & MCP: A streamlined toolkit (
arivu-ai) to embed text-to-SQL pipelines, manage database connections, integrate seamlessly with IDEs via the Model Context Protocol (MCP), and deploy conversational agents across communication channels. - Full-Stack Workspace: A locally deployable Next.js dashboard that provides an interactive chat interface, custom generative dashboards, DB explorer, automations, and granular pipeline tracing in real-time.
✨ Core Features
- Multi-Dialect Federation: Securely connect and query across PostgreSQL, MySQL, SQLite, Databricks, and Snowflake using natural language.
- Dynamic LLM Routing: Hot-swap between OpenAI, Anthropic, Groq, DeepSeek, Ollama, and Hugging Face directly from your code or the dashboard.
- Agentic Chat & Generative UI: Generate optimized SQL, auto-correct syntax errors, and instantly render interactive charts and data tables via the chat workspace.
- Workspace Tools: Inspect schemas with the DB Explorer, curate Saved Queries, and pin insights to custom Dashboards.
- Automations & Channels: Schedule automated reports and dispatch agents to Slack, Discord, Telegram, or Email using built-in adapters.
- MCP Native: Expose your entire database seamlessly to AI editors like Cursor and Windsurf using our built-in Model Context Protocol server.
- End-to-End Tracing: Visually debug agent reasoning, token usage, and execution latency right from the observability tab.
⚡ Quickstart
Install the core Python SDK via pip:
pip install arivu-ai
1. Connect to Your Database
Arivu.connect() takes explicit host/port/user/password/dbname parameters — not a connection URL string. Choose between user (read-only) and admin (DML with approval gate) modes:
from arivu import Arivu
# Connect in read-only user mode
db = Arivu.connect(
host="your-db-host", # e.g. "db.example.supabase.com"
port=5432,
user="your-db-user",
password="your-db-password",
dbname="your-db-name",
mode="user", # "user" (read-only) or "admin" (DML allowed)
ttl=3600, # schema cache TTL in seconds
dialect="postgresql", # "postgresql", "mysql", or "sqlite"
)
For SQLite (zero infrastructure):
sqlite_db = Arivu.connect(
dialect="sqlite",
dbname="/path/to/your/local.db",
mode="user",
)
2. Run the Agentic Pipeline
Use db.query() to prepare the pipeline input, then pass it to run_pipeline():
from arivu.pipeline import run_pipeline
pipeline_input = db.query("Show me the top 10 customers by total spend")
result = run_pipeline(pipeline_input)
print(result.response) # Natural language answer
print(result.sql) # The generated SQL
print(result.success) # True / False
print(result.trace_events) # Per-node latency trace
3. Admin Mode — Destructive SQL Approval Gate
In admin mode, destructive operations (DROP, DELETE) are paused for human approval before execution:
db_admin = Arivu.connect(
host="localhost", port=5432, user="admin",
password="admin_secret", dbname="ecommerce",
mode="admin",
)
result = run_pipeline(db_admin.query("drop the temp_staging table"))
if result.pending_approval:
print("Waiting for human approval...")
print(f"SQL to approve: {result.sql}")
# Admin approves via Telegram /approve or REST API
4. Deploy to a Channel
Connect Arivu to Telegram, WhatsApp, or expose it as a REST API:
from arivu.integrations import TelegramIntegration, WhatsAppIntegration, RESTIntegration
# Telegram bot
telegram_bot = TelegramIntegration(
db=db,
token="YOUR_TELEGRAM_BOT_TOKEN",
admin_user_ids=[123456789], # your numeric Telegram user ID
)
telegram_bot.start() # blocking — runs until Ctrl+C
# REST API (FastAPI)
rest_api = RESTIntegration(db=db)
rest_api.start(host="0.0.0.0", port=8000)
# WhatsApp (via Twilio)
whatsapp_bot = WhatsAppIntegration(
db=db,
admin_numbers=["+91XXXXXXXXXX"],
)
whatsapp_bot.start(host="0.0.0.0", port=8000)
5. Memory & Session History
Arivu persists every interaction automatically. You can query the memory layer directly:
from arivu.memory import load_session_history, get_pipeline_traces, get_rlhf_log
# Load a session's conversation history
history = load_session_history("sess-demo-001")
# Retrieve per-node pipeline traces for observability
traces = get_pipeline_traces(session_id="sess-demo-001", limit=5)
# View RLHF feedback log
log = get_rlhf_log(limit=10)
💻 The Full-Stack Workspace
Arivu ships with a stunning, no-code visual interface that acts as your complete command center. It provides Chat, Dashboards, DB Explorer, Saved Queries, Automations, and full pipeline tracing.
Recommended: Docker Compose
The easiest way to launch the entire workspace is using Docker:
# Clone the repository
git clone https://github.com/AtharshKrishnamoorthy/ARIVU.git
cd ARIVU
# Launch the backend and frontend simultaneously
docker compose up -d --build
Visit http://localhost:3000 to start visually interacting with your databases!
Manual Installation (Development)
If you prefer to run the services manually without Docker:
1. Start the Backend:
git clone https://github.com/AtharshKrishnamoorthy/ARIVU.git
cd ARIVU
pip install -r requirements.txt
python -m arivu.dashboard.backend --port 8000
2. Start the Frontend: Open a new terminal window:
cd ARIVU/arivu/dashboard/frontend
npm install
npm run dev
Visit http://localhost:3000.
📖 Documentation
For detailed guides, API references, architecture diagrams, and more SDK examples, check out our official documentation.
🤝 Contributing
We welcome contributions! Whether it's adding a new database dialect, extending the dashboard UI, or improving prompt resolution:
- Fork the repo and create your branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please read our Contributing Guidelines for details on code style and testing.
📄 License
Arivu is open-source software licensed under the MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file arivu_ai-0.3.0-py3-none-any.whl.
File metadata
- Download URL: arivu_ai-0.3.0-py3-none-any.whl
- Upload date:
- Size: 92.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b58a520907ef1a449ba08ac4f43f3e5b70ea17d787ad85c1ad52edf6a0cc4e3f
|
|
| MD5 |
72b938ffdd6e9c2ece50b8e62987a78d
|
|
| BLAKE2b-256 |
6b1c4e3233bff0146a17b920be546506961486253202a5c0692f63bf678f5b69
|