Skip to content

Repository files navigation

Enterprise Agentic Data Analyst

An asynchronous multi-agent platform for data analysis, cleaning, mutation, visualization, and modeling. Powered by LangGraph, Django Ninja, and Chainlit.

Architecture

The platform uses an orchestrator-worker topology to safely execute agent-generated code inside isolated sandboxes:

  • Orchestrator Node: Uses Gemini 2.5 Flash to evaluate the user query against the dataset schema and generate a structured execution plan.
  • Worker Node: Generates Python code via a local Qwen 2.5 Coder model.
  • Docker Sandbox: Executes generated code in an isolated Docker container, returning console logs, exit codes, and output artifacts.
  • Data Validation Loop: Evaluates data quality metrics post-execution (e.g., ensuring zero null values remain after imputation). If validation fails, it triggers self-healing.
  • Session State Persistence: Stores conversation logs and completed tasks inside dataset-specific folders, allowing multi-turn operations.
  • Resilient Model Strategy: Automatically rotates multiple Gemini API keys. If all keys hit rate limits or fail, it falls back to a local Ollama instance running Qwen 2.5 Coder.

Running with Docker Compose

Running the entire stack with Docker Compose is the recommended way to set up the system.

Configuration

Create a .env file in the root directory:

GEMINI_API_KEY=your_key_1,your_key_2
SECRET_KEY=django-insecure-local-mvp-key-change-this-in-production
DEBUG=True

Launching the Stack

  1. Start the containers:
    docker-compose up --build
  2. Pull the required model on the Ollama container:
    docker exec -it da-agent-ollama-1 ollama pull qwen2.5-coder:1.5b
  3. Access the Chainlit user interface at http://localhost:8001. The Django backend is running at http://localhost:8000.

Local Development Setup

Prerequisites

  • Python 3.12+
  • Docker (with the daemon running)
  • Ollama running Qwen 2.5 Coder 1.5B (qwen2.5-coder:1.5b via ollama pull qwen2.5-coder:1.5b)

Installation

  1. Initialize the virtual environment:
    python -m venv .venv
    source .venv/bin/activate
    pip install -r req.txt
  2. Run database migrations:
    python manage.py migrate

Running the Application

  1. Start the Django backend server:
    python manage.py runserver 8000
  2. Start the Chainlit frontend chat server:
    chainlit run frontend/app.py --port 8001
  3. Open http://localhost:8001 in your browser.

About

An autonomous, self-healing multi-agent data analytics platform executing securely within resource-constrained local environments.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages