superset-ai
A Python library and LangGraph agent for managing Apache Superset via natural language.
Features
- 16 chart types: bar, line, pie, table, big number (KPI), area, big number with trendline, timeseries bar, bubble, funnel, gauge, treemap, histogram, box plot, heatmap
- Full CRUD: create, read, update, delete for charts and dashboards
- Tabbed dashboards: organize charts into named tabs
- Native filters: add/remove/list interactive filters (select, range, time, etc.)
- Color schemes: 12 built-in color schemes for dashboards
- Dataset management: find or create datasets, list columns, discover databases/schemas/tables
- Automatic asset reuse: finds existing datasets and charts when possible
- Session-based memory: multi-turn conversations with context (agent mode)
Quick Start
# Create virtual environment
python3.13 -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install -e ".[dev]"
# Start Superset (Docker required)
docker-compose up -d
# Configure environment
cp .env.example .env
# Edit .env with your settings
# Test connection
superset-ai test-connection
# Start chatting (requires agent extras)
superset-ai chat
LangChain Agent
Embed the Superset agent in your Python application:
from superset_ai.agent.graph import create_graph
from superset_ai.agent.tools import set_tool_context
# Create the agent graph
graph = create_graph()
# Set tool context (provides service instances)
set_tool_context(your_context)
# Invoke the agent
result = await graph.ainvoke({"messages": [("user", "Create a bar chart of sales by region")]})
CLI
# Interactive chat mode (requires superset-ai[agent])
superset-ai chat
# Test Superset connection
superset-ai test-connection
# List available databases
superset-ai list-databases
Configuration
All settings use the SUPERSET_AI_ environment variable prefix:
| Variable | Default | Description |
|---|---|---|
SUPERSET_AI_SUPERSET_BASE_URL |
http://localhost:8088 |
Superset instance URL |
SUPERSET_AI_SUPERSET_USERNAME |
admin |
Superset username |
SUPERSET_AI_SUPERSET_PASSWORD |
admin |
Superset password |
SUPERSET_AI_LLM_PROVIDER |
copilot |
LLM provider (copilot or openai) |
SUPERSET_AI_COPILOT_MODEL |
gpt-4o |
Model for GitHub Copilot provider |
SUPERSET_AI_OPENAI_API_KEY |
— | OpenAI API key (when using openai provider) |
SUPERSET_AI_OPENAI_MODEL |
gpt-4o |
Model for OpenAI provider |
SUPERSET_AI_REQUEST_TIMEOUT |
30 |
HTTP request timeout (seconds) |
SUPERSET_AI_MAX_RETRIES |
3 |
Max retry attempts |
SUPERSET_AI_LOG_LEVEL |
INFO |
Log level |
Architecture
Agent tools (agent/tools.py) ──→ operations/ ──→ api/ ──→ Superset REST API
api/— HTTP client and service classes that talk to the Superset REST APIschemas/— Chart/dashboard payload builders and layout generatorsoperations/— Shared business logic (pure functions, no side effects)agent/— LangChain@toolwrappers with session caching and asset trackingcore/— Configuration, authentication, exceptionscli/— Typer CLI application
Development
# Run tests
pytest
# Type checking
python -m pyright src/superset_ai/
# Linter
ruff check src/
License
MIT
Metadata
Release files for superset-ai 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| superset_ai-0.2.1.tar.gz | 62.2 kB | Without provenance | Details for superset_ai-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| superset_ai-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for superset_ai-0.2.1-py3-none-any.whl |
Total release size: 137.5 kB
Release files / superset_ai-0.2.1.tar.gz
| Download URL | superset_ai-0.2.1.tar.gz |
|---|---|
| Size | 62.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9c2001ae1cf61060c833f64ced5cdb5d7a1d08ff7ce34a2886159d7be051afa4
|
|
BLAKE2b-256 checksum How to use checksums |
8186898fde0f012064d17b72e2e453242edaf4babc7f42a386a1922be3ea3daf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / superset_ai-0.2.1-py3-none-any.whl
| Download URL | superset_ai-0.2.1-py3-none-any.whl |
|---|---|
| Size | 75.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e68c887823e0fde0b4ce13bdeb1bceb9e04cffaed3c2b60c756bf1b80b259ac9
|
|
BLAKE2b-256 checksum How to use checksums |
a101968aeee9ad60fd2ba3920b1af49c09bd6955085aa4138a2ea6c7c1fb6fe5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Security for superset-ai 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.