datavisualization_langgraph  by DhruvAtreja

Agent for natural language to data visualization

created 10 months ago
293 stars

Top 91.2% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This project provides an AI agent that translates natural language questions into data visualizations, targeting users who need to explore datasets without writing SQL. It leverages LangGraph to orchestrate a multi-step process, enabling users to upload SQLite or CSV files and receive visual insights from their data.

How It Works

The agent uses LangGraph to manage a sequence of nodes: parsing the user's question against the database schema, extracting unique noun values from relevant columns for query precision, generating and validating SQL, executing the query, and finally selecting an appropriate visualization type and formatting the results. This modular, state-driven approach allows for clear inspection of the agent's internal workings and facilitates experimentation.

Quick Start & Requirements

  • Install: Follow LangGraph Studio setup, install Docker, setup SQLite Server (cd sqlite_server && yarn install && yarn start), configure backend (backend_py/.env with OPENAI_API_KEY and DB_ENDPOINT_URL=http://host.docker.internal:3001), start Studio with backend_py/my_agent, configure frontend (frontend/.env with LANGGRAPH_API_URL), and start frontend (cd frontend && yarn install && yarn dev).
  • Prerequisites: Docker, Node.js (for SQLite server and frontend), Python (for backend), OpenAI API key.
  • Data: SQLite or CSV files under 1MB for upload.
  • Links: LangGraph Studio, Blog Post

Highlighted Details

  • Orchestrates a complex AI agent workflow using LangGraph.
  • Includes specific nodes for query analysis, noun extraction, SQL validation, and visualization selection.
  • Provides a frontend with pre-built graph templates and streaming API integration.
  • Allows inspection of agent traces and internal states via LangGraph Studio.

Maintenance & Community

  • Contributions are welcome via Pull Requests.
  • No specific community channels (Discord/Slack) or notable contributors are mentioned in the README.

Licensing & Compatibility

  • The README does not explicitly state a license.

Limitations & Caveats

  • File uploads are limited to under 1MB.
  • Requires specific setup involving Docker, LangGraph Studio, and separate backend/frontend configurations.
  • Relies on OpenAI API keys, implying associated costs and potential vendor lock-in.
Health Check
Last commit

9 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
49 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.