MCPcopy Index your code
hub / github.com/decisionbox-io/decisionbox-platform

github.com/decisionbox-io/decisionbox-platform @v0.12.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.12.0 ↗ · + Follow
7,455 symbols 30,457 edges 726 files 2,734 documented · 37%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

DecisionBox

License: AGPL v3 Go CI Docker Build Coverage Latest Release Issues PRs Welcome Docs

Autonomous AI data discovery on your data warehouse. DecisionBox connects to your warehouse, runs an agent that decides what to investigate, writes and executes SQL, and ships validated insights and ranked recommendations — without you asking a single question.

Built for any team that makes decisions on data. Every finding is re-queried against your warehouse before it reaches you. Every SQL query, reasoning step, and decision logged and visible.

DecisionBox — insights, agent reasoning, recommendations, and Ask Insights

Why DecisionBox

  • Autonomous, not a copilot. The agent picks what to investigate. 50–100+ SQL queries per discovery run, unattended.
  • Every number re-queried. Independent verification queries confirm each claim against your warehouse before it ships. Nothing hallucinated, nothing unchecked.
  • Full transparency. Every SQL query, every reasoning step, every decision logged and visible. Audit the agent the way you'd review an analyst.
  • Your infra, your data. Open source, AGPL v3, self-hostable. Works with any major warehouse and any LLM — including local models via Ollama.
  • Tuned to your industry. Swap or author domain packs without touching core code. E-commerce, social, and gaming shipped; bring your own for anything else.

How It Works

Your Data Warehouse             DecisionBox Agent            Dashboard
(BigQuery, Redshift,      →    (AI explores your data)  →   (Insights & Recommendations)
 Snowflake, PostgreSQL,
 Databricks, MSSQL)
                                 writes SQL, validates
                                 findings, generates
                                 actionable advice
  1. Connect your data warehouse (BigQuery, Redshift, Snowflake, PostgreSQL, Databricks, Microsoft SQL Server)
  2. Configure your project (domain pack, profile, LLM provider)
  3. Run discovery — the AI agent autonomously explores your data
  4. Review insights — severity-ranked findings with confidence scores
  5. Act on recommendations — specific, numbered action steps

Features

Discovery

  • Autonomous agent loop — AI writes and executes SQL, iterates on results, and produces insights + ranked recommendations without prompts or questions
  • Insight validation — Independent verification queries re-check every claim against your warehouse before it ships
  • Live progress — Watch the agent explore in real time with phase tracking, step details, and expandable SQL
  • Cost estimation — Estimate LLM tokens + warehouse query costs before running
  • Selective discovery — Run specific analysis areas on demand
  • Feedback loop — Like/dislike insights and recommendations; the agent learns from feedback on the next run

Search & Ask

  • Semantic search — Vector search over insights and recommendations (Qdrant + HNSW), with cross-project scope
  • Ask Insights — RAG-powered Q&A across your discoveries with citations, multi-turn sessions, and 90-day search history
  • Spotlight (Cmd+K) — Fast navigation and search across projects from anywhere in the dashboard
  • Knowledge sources hook — Plug in your own retrieval (docs, runbooks, policies) to enrich exploration, analysis, and /ask prompts

Reading UX

  • Bookmark lists — Save insights and recommendations into named lists with inline notes
  • Read tracking — Per-user read state across devices, with reduced-opacity rows and "mark unread" action
  • Technical details toggle — SQL queries and exploration steps collapsed by default; one click to reveal the engine internals
  • Related items sidebar — Sticky right-column TOC with related recommendations, related insights, and semantic matches
  • Recommendation ↔ insight cross-linking — Every recommendation carries the insight IDs it's grounded in

Domain Packs

  • Built-in packs — E-commerce, social, and gaming. Each domain ships with sub-categories so the agent's analysis areas, prompts, and profile schema match how a specific kind of product actually behaves — e-commerce, for example, covers many sub-categories because a fashion marketplace, a grocery store, and a digital-goods shop have fundamentally different funnels, retention curves, and margin structures, and a single generic "e-commerce" prompt would miss what matters for each. Gaming, similarly, covers match-3, idle/incremental, and casual/hyper-casual. New packs — SaaS, fintech, content/media, education, health, and more — ship weekly.
  • Dynamic packs — Create, edit, import, and export packs from the dashboard (stored in MongoDB, no code changes)
  • Portable JSON format — Share packs across projects and environments
  • System-test pack — Diagnostic pack (env-gated) for validating warehouse connectivity and type mapping

Warehouses

  • BigQuery — ADC or Service Account Key, with dry-run cost estimation
  • Redshift — Serverless + provisioned; IAM Role, Access Keys, or Assume Role with external ID for cross-account
  • Snowflake — Username/password or Key Pair (JWT)
  • PostgreSQL — Username/password or connection string, SSL configurable
  • Databricks — Unity Catalog via Personal Access Token or OAuth M2M (service principal)
  • Microsoft SQL Server — SQL Server 2016+ and Azure SQL Database, SQL login or full connection string
  • Read-only enforcement + schema-aware SQL self-heal — Each provider ships a tuned SQL-fix prompt for its dialect
  • More warehouses ship weekly — request one on GitHub Issues to fast-track it

LLM Providers

Claude (direct API), OpenAI, Ollama (local), Vertex AI (Claude + Gemini on GCP), AWS Bedrock, Azure AI Foundry. Per-project configuration; editable prompts; per-model max output token limits.

Embedding Providers

OpenAI, Vertex AI, Bedrock, Azure OpenAI, Voyage AI, Ollama. Used for insight/recommendation embeddings, semantic search, and /ask.

Secrets

Per-project credentials, encrypted. MongoDB (AES-256-GCM default), GCP Secret Manager, AWS Secrets Manager, Azure Key Vault.

Notifications

Webhook notifications on discovery completion: Slack, generic HTTP, or email — configurable per-project with templated payloads.

Deployment

  • Docker Compose for local dev and single-server installs
  • Helm charts (API + Dashboard + optional MongoDB + Qdrant subcharts); public chart repo at https://decisionbox-io.github.io/decisionbox-platform
  • Terraform modules for GCP (GKE), AWS (EKS), and Azure (AKS), with Workload Identity / IRSA wiring
  • Interactive setup wizard (terraform/setup.sh) for GCP, AWS, or Azure with auth, resume, and destroy support
  • Optional IP allowlist for GKE / EKS / AKS control-plane and dashboard ingress
  • Multi-arch Docker images (linux/amd64 + linux/arm64)

Extensibility

  • Plugin architecture — providers register via init() + RegisterWithMeta()
  • Warehouse middleware (warehouse.RegisterMiddleware()) — wrap providers with logging, metrics, or access controls
  • HTTP middleware (apiserver.RegisterGlobalMiddleware()) — wrap all API requests (audit logging, custom auth)
  • Custom builds via apiserver.Run() / agentserver.Run() with blank imports

Use Cases

DecisionBox works with any queryable data. Point it at your data source and it discovers insights specific to your domain.

E-commerce"Cart abandonment spikes 40% when shipping cost exceeds 8% of cart value. Free shipping threshold at $75 would recover an estimated 1,200 orders/month."

SaaS"Teams that don't use the dashboard feature within 14 days of signup have 3x higher churn. An onboarding email on Day 3 highlighting dashboards could improve activation."

Fraud Detection"Accounts created in the last 48 hours with 5+ high-value transactions account for 82% of chargebacks. Flagging this pattern would prevent $34K/month in losses."

Social Network"Posts published between 6–8 PM with images get 3.2x more shares, but only 12% of creators post during this window. A scheduling nudge could boost platform-wide engagement."

SQL Performance"The top 10 slowest queries consume 62% of warehouse compute. 7 of them scan full tables where a partition filter would reduce cost by ~$4,800/month."

Gaming"Players who fail level 12 more than 3 times have 68% higher Day-7 churn. Consider adding a hint system or difficulty adjustment at this stage."

These are examples — create a domain pack for any industry and DecisionBox adapts its analysis accordingly.

Quick Start

Prerequisites: Docker and Docker Compose

# Clone the repository
git clone https://github.com/decisionbox-io/decisionbox-platform.git
cd decisionbox-platform

# Start MongoDB + Qdrant + API + Dashboard
docker compose up -d

# Open the dashboard
open http://localhost:3000

The dashboard will guide you through creating your first project. You'll need: - A data warehouse connection (BigQuery project ID, Redshift workgroup, Snowflake account, PostgreSQL host, Databricks workspace, or SQL Server host) - An LLM API key (Anthropic, OpenAI, or configure Vertex AI / Bedrock / Azure AI Foundry)

For detailed setup instructions, see the Installation Guide.

Deployment

Method Use case Guide
Docker Compose Local dev, single server Docker
Kubernetes (Helm) Production on any K8s cluster Kubernetes
Terraform (GCP) Automated GKE provisioning Terraform GCP
Terraform (AWS) Automated EKS provisioning Terraform AWS
Terraform (Azure) Automated AKS provisioning Terraform Azure
Setup Wizard One-command GKE/EKS/AKS + Helm deploy Setup Wizard

Resources: Helm charts | Terraform modules | Helm values reference

Development

Run locally without Docker (recommended for development):

# Start MongoDB + Qdrant only
docker compose up -d mongodb qdrant

# Terminal 1: Run the API
make dev-api

# Terminal 2: Run the Dashboard
make dev-dashboard

# Open http://localhost:3000

Build binaries:

make build              # Build agent + API binaries
make build-dashboard    # Build dashboard

Run tests:

make test               # All tests (Go + UI)
make test-go            # Go unit tests only
make test-integration   # Integration tests (needs Docker)
make test-llm           # LLM provider tests (needs API keys)

Extending DecisionBox

DecisionBox is built on a plugin architecture. You can add:

Domain Packs

Domain packs define how the AI analyzes data for a specific industry. A domain pack includes: - Analysis areas (what to look for) - Prompt templates (how the AI reasons) - Profile schemas (what context users provide)

Domain packs are stored in MongoDB and managed from the dashboard. Built-in packs (e-commerce, social, gaming) are seeded on first startup. Create your own from the dashboard or import a portable JSON file — no code changes needed.

See Creating Domain Packs.

LLM Providers

Add support for any LLM by implementing the llm.Provider interface (one method: Chat).

See Adding LLM Providers.

Warehouse Providers

Add support for any SQL warehouse by implementing the warehouse.Provider interface.

See Adding Warehouse Providers.

Middleware Hooks

Wrap warehouse providers or HTTP handlers with custom logic using the middleware registration system:

  • Warehouse middlewarewarehouse.RegisterMiddleware() wraps the warehou

Extension points exported contracts — how you extend this code

BookmarkListRepo (Interface)
BookmarkListRepo abstracts bookmark list operations for handler unit testing. [8 implementers]
services/api/database/interfaces.go
LLMClient (Interface)
LLMClient is the subset of services/agent/internal/ai.Client the verifier needs. Declared as an interface so unit tests [24 …
services/agent/internal/validation/verifier/agent.go
ModelLister (Interface)
ModelLister is an optional capability interface: providers that can list the models available under the caller's credent [12 …
libs/go-common/llm/provider.go
ProviderLike (Interface)
(no doc)
ui/dashboard/src/components/ProviderCredentialsPhase.tsx
Runner (Interface)
Runner spawns and manages agent processes for discovery runs. [9 implementers]
services/api/internal/runner/runner.go
StepIndexer (Interface)
StepIndexer captures one step's worth of "ship this to the run- scoped vector index" work. Defined as an interface so th [16 …
services/agent/internal/ai/exploration.go
TokenCounterProvider (Interface)
TokenCounterProvider is an optional capability interface. A Provider that can construct a TokenCounter for a given model [7 …
libs/go-common/llm/tokencounter.go
CredentialsPhaseValue (Interface)
(no doc)
ui/dashboard/src/components/ProviderCredentialsPhase.tsx

Core symbols most depended-on inside this repo

Fatal
called by 850
services/agent/internal/log/compat.go
Error
called by 787
services/api/internal/log/log.go
String
called by 307
services/api/internal/runner/docker.go
Error
called by 307
services/agent/internal/log/compat.go
writeError
called by 291
services/api/internal/handler/response.go
Set
called by 247
libs/go-common/secrets/provider.go
Close
called by 220
providers/warehouse/mssql/client.go
Run
called by 211
services/api/internal/runner/runner.go

Shape

Function 4,818
Method 1,674
Struct 719
Interface 197
TypeAlias 25
FuncType 18
Class 4

Languages

Go94%
TypeScript6%

Modules by API surface

services/api/database/interfaces.go108 symbols
services/api/internal/handler/schema_index_test.go86 symbols
ui/dashboard/src/lib/api.ts78 symbols
services/api/internal/handler/search_test.go70 symbols
providers/warehouse/mssql/provider_test.go69 symbols
services/api/internal/handler/mock_test.go60 symbols
services/api/internal/handler/projects_test.go56 symbols
services/api/internal/runner/docker_test.go52 symbols
services/api/internal/handler/asktokens_test.go52 symbols
services/api/integration_test.go51 symbols
services/agent/internal/ai/schema_retrieve/retrieve_test.go50 symbols
providers/warehouse/snowflake/provider_test.go50 symbols

Datastores touched

ask_sessionsCollection · 1 repos
projectsCollection · 1 repos
secretsCollection · 1 repos
discoveriesCollection · 1 repos
insightsCollection · 1 repos
recommendationsCollection · 1 repos
bookmarksCollection · 1 repos
discovery_runsCollection · 1 repos

For agents

$ claude mcp add decisionbox-platform \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact