← All 23 Open-Source Repositories
Slack-Native Warehouse AI Data Analyst (Snowflake, BigQuery, Postgres): YAML semantic metric catalog, read-only SQL guardrails, and verified query receipts.
Pointing an LLM directly at 200 raw warehouse tables produces plausible-looking wrong numbers, silently mutates historical WBR figures whenever definitions evolve, and exposes databases to prompt-injected DDL/DML statements. `ai-analyst-public` enforces one owner-signed SQL formula per metric with effective dates, validates every query through a `sqlglot` AST firewall, and attaches a SHA-256 SQL receipt to every reported number.
git clone https://github.com/mohan-n-swamy/ai-analyst-public.git
cd ai-analyst-public
python3 bin/analyst-cli.py wbr --week 2026-10-19 # evaluates using historical v1 formula
python3 bin/analyst-cli.py wbr --week 2026-11-16 # evaluates using post-cutover v2 formula
python3 bin/analyst-cli.py check-sql
pytest -q tests/ # run all 10 cutover & SQL AST firewall tests
| Variable | Default | Purpose |
|---|---|---|
WAREHOUSE_BACKEND | sqlite_demo | |
METRIC_CATALOG_PATH | ./catalog/metrics.example.yaml | |
SQL_DEFAULT_ROW_LIMIT | 1000 | |
SNOWFLAKE_ACCOUNT | your_account_locator | |
SNOWFLAKE_USER | readonly_analyst_bot | |
SNOWFLAKE_ROLE | ANALYST_READONLY | |
SNOWFLAKE_WAREHOUSE | COMPUTE_WH | |
SLACK_BOT_TOKEN | xoxb-replace-me | |
SLACK_APP_TOKEN | xapp-replace-me | |
ANTHROPIC_API_KEY | replace_with_llm_api_key |
open source ai analyst self hosted MITAI Analyst github configurable .envhow to self host ai analyst with docker python typescriptopen source text to sql reference architectureopen source ai analyst reference architectureopen source slack bot reference architectureopen source snowflake reference architectureopen source bigquery reference architectureopen source postgresql reference architecture