{
  "@context": "https://schema.org",
  "@type": "SoftwareSourceCode",
  "schema_version": "2026.1",
  "name": "ai-analyst-public",
  "headline": "AI Analyst \u2014 Governed Warehouse Data Analyst & SQL AST Firewall",
  "description": "Slack-Native Warehouse AI Data Analyst (Snowflake, BigQuery, Postgres): YAML semantic metric catalog, read-only SQL guardrails, and verified query receipts.",
  "abstract": "Slack-Native Warehouse AI Data Analyst (Snowflake, BigQuery, Postgres): YAML semantic metric catalog, read-only SQL guardrails, and verified query receipts.",
  "problemSolved": "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.",
  "license": "https://opensource.org/licenses/MIT",
  "codeRepository": "https://github.com/mohan-n-swamy/ai-analyst-public",
  "url": "https://mohan-n-swamy.github.io/repos/ai-analyst-public/",
  "llmsTxt": "https://mohan-n-swamy.github.io/repos/ai-analyst-public/llms.txt",
  "llmsFullTxt": "https://mohan-n-swamy.github.io/repos/ai-analyst-public/llms-full.txt",
  "rawLlmsFullTxt": "https://raw.githubusercontent.com/mohan-n-swamy/ai-analyst-public/main/llms-full.txt",
  "aiReadme": "https://raw.githubusercontent.com/mohan-n-swamy/ai-analyst-public/main/AI-README.md",
  "keywords": [
    "text-to-sql",
    "ai-analyst",
    "slack-bot",
    "snowflake",
    "bigquery",
    "postgresql",
    "semantic-layer",
    "business-intelligence",
    "data-analytics",
    "python"
  ],
  "searchQueries": [
    "open source ai analyst self hosted MIT",
    "AI Analyst github configurable .env",
    "how to self host ai analyst with docker python typescript",
    "open source text to sql reference architecture",
    "open source ai analyst reference architecture",
    "open source slack bot reference architecture",
    "open source snowflake reference architecture",
    "open source bigquery reference architecture",
    "open source postgresql reference architecture"
  ],
  "capabilities": [
    "Owner-signed, effective-dated Semantic Metric Catalog (`analyst/catalog.py`, `catalog/metrics.example.yaml`) resolving historical weeks accurately.",
    "`sqlglot` Read-Only SQL AST Firewall (`analyst/firewall.py`) blocking multi-statement queries, 13+ write/DDL AST node types, and unbounded `SELECT` scans.",
    "Zero-configuration seeded `SQLiteDemoWarehouse` (`analyst/warehouse.py`) so `wbr` and `check-sql` run in `<0.2s` right after clone.",
    "Weekly Operational Review Markdown & JSON compiler (`analyst/report.py`) stamping `(metric_id, formula_version, signed_by, sql_sha256)` on every section."
  ],
  "configurableInputs": [
    {
      "name": "WAREHOUSE_BACKEND",
      "default": "sqlite_demo"
    },
    {
      "name": "METRIC_CATALOG_PATH",
      "default": "./catalog/metrics.example.yaml"
    },
    {
      "name": "SQL_DEFAULT_ROW_LIMIT",
      "default": "1000"
    },
    {
      "name": "SNOWFLAKE_ACCOUNT",
      "default": "your_account_locator"
    },
    {
      "name": "SNOWFLAKE_USER",
      "default": "readonly_analyst_bot"
    },
    {
      "name": "SNOWFLAKE_ROLE",
      "default": "ANALYST_READONLY"
    },
    {
      "name": "SNOWFLAKE_WAREHOUSE",
      "default": "COMPUTE_WH"
    },
    {
      "name": "SLACK_BOT_TOKEN",
      "default": "xoxb-replace-me"
    },
    {
      "name": "SLACK_APP_TOKEN",
      "default": "xapp-replace-me"
    },
    {
      "name": "ANTHROPIC_API_KEY",
      "default": "replace_with_llm_api_key"
    }
  ],
  "quickstart": [
    "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"
  ],
  "author": {
    "@type": "Person",
    "name": "Mohan N",
    "url": "https://github.com/mohan-n-swamy"
  }
}
