aegis-dq/aegis-dq

๐Ÿ“Š Data Platforms
0 Views
0 Installs

๐Ÿ ๐Ÿ  ๐ŸŽ ๐ŸชŸ ๐Ÿง - Agentic data quality framework that runs structured rules against warehouses (DuckDB, BigQuery, Athena, Databricks, Postgres), diagnoses failures with LLM root cause analysis, and proposes SQL remediations. Every LLM decision is audit-logged with cost and latency.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "aegis-dq-aegis-dq": {
      "command": "npx",
      "args": [
        "-y",
        "aegis-dq-aegis-dq"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

Aegis DQ

CI PyPI Downloads Python License GitHub Marketplace Glama Open in Colab

The open-source agentic data quality framework. Point it at your policy docs and warehouse โ€” it generates rules, validates your data, diagnoses every failure with LLM root-cause analysis, and proposes SQL fixes. Run from the CLI, Airflow, GitHub Actions, or conversationally via Hermes.

Real-world result: 12 AML policy docs โ†’ 55 rules generated โ†’ 11 BSA/OFAC violations detected โ†’ all diagnosed โ†’ $0.01 total LLM cost.

  • 31 rule types โ€” completeness, uniqueness, validity, referential integrity, statistical, ML anomaly detection
  • 6 warehouse adapters โ€” DuckDB, Postgres/Redshift, BigQuery, Databricks, AWS Athena, Snowflake
  • Pluggable LLMs โ€” Anthropic Claude, OpenAI, Ollama (local), AWS Bedrock
  • Agentic pipeline โ€” plan โ†’ parallel validation โ†’ LLM diagnose โ†’ RCA โ†’ SQL remediate โ†’ report
  • Hermes + MCP โ€” run full pipelines conversationally; listed on Glama.ai

GitHub Actions โ€” Quick Start

Add a data quality gate to any workflow in under 2 minutes:

# .github/workflows/data-quality.yml
name: Data Quality

on: [push, pull_request]

jobs:
  data-quality:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Validate data quality
        uses: aegis-dq/aegis-dq@v0.7.0
        with:
          rules-file: rules.yaml
          db: data/warehouse.duckdb
          anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}

The step fails the job automatically when any rules fail, blocking broken data from reaching production. Set fail-on-failure: 'false' to report without blocking.

Offline mode (no API key required):

      - name: Validate data quality (offline)
        uses: aegis-dq/aegis-dq@v0.7.0
        with:
          rules-file: rules.yaml
          db: data/warehouse.duckdb
          no-llm: 'true'

Action inputs

InputDefaultDescription
rules-filerules.yamlPath to rules YAML
db:memory:DuckDB file path
warehouseduckdbduckdb ยท postgres ยท redshift
pg-dsnโ€”PostgreSQL / Redshift connection DSN
no-llmfalseSkip LLM โ€” free offline validation
llmanthropicanthropic ยท openai ยท ollama
llm-model(provider default)Override the default model
fail-on-failuretrueFail the step when rules fail
version(latest)Pin a specific aegis-dq version
anthropic-api-keyโ€”Required when llm: anthropic
openai-api-keyโ€”Required when llm: openai

Action outputs

OutputDescription
rules-checkedTotal rules evaluated
passedRules that passed
failedRules that failed
pass-ratePass rate as a decimal (e.g. "91.67")
report-jsonAbsolute path to the full JSON report

Using outputs in downstream steps:

      - name: Validate data quality
        id: dq
        uses: aegis-dq/aegis-dq@v0.7.0
        with:
          rules-file: rules.yaml

      - name: Post summary
        run: echo "Pass rate: ${{ steps.dq.outputs.pass-rate }}%"

Demo

Aegis DQ Demo

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ Aegis DQ  โ€”  RetailCo E-commerce Demo                โ”‚
โ”‚ LLM: amazon.nova-pro-v1:0 via AWS Bedrock            โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

โœ“ Pipeline complete in 7.1s ยท 12 rules ยท $0.0056 LLM cost

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Validation Summary โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚  Rules checked  โ”‚  12                               โ”‚
โ”‚  Passed         โ”‚  1   โ”‚  Failed  โ”‚  11             โ”‚
โ”‚  Pass rate      โ”‚  8%  โ”‚  Cost    โ”‚  $0.005576      โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

LLM Diagnoses
  orders_customer_fk  โ†’  Order placed with customer_id=99 that does not exist.
                         Likely cause: customer deleted or test record not cleaned up.

  products_sku_unique โ†’  Duplicate SKU-001 โ€” two products share the same identifier.
                         Likely cause: duplicate import from supplier feed.

Remediation SQL (LLM-generated)
  orders_status_valid          UPDATE orders SET status = 'SHIPPED' WHERE status = 'DISPATCHED';
  products_price_positive      UPDATE products SET price = ABS(price) WHERE price < 0;
  products_stock_non_negative  UPDATE products SET stock_quantity = 0 WHERE stock_quantity < 0;

Hermes integration โ€” conversational data quality

Aegis DQ integrates with Hermes via MCP. Point Hermes at your context and your warehouse โ€” it handles the rest.

You (Hermes chat)
     โ”‚
     โ–ผ
Hermes โ€” memory, scheduling, multi-channel delivery
     โ”‚  MCP
     โ–ผ
Aegis DQ โ€” rules engine, LLM diagnosis, audit trail
     โ”‚
     โ–ผ
Your warehouse + Your LLM

Setup (2 steps):

pip install aegis-dq

Add to ~/.hermes/config.yaml:

mcp_servers:
  aegis:
    command: aegis
    args: [mcp]
    env:
      ANTHROPIC_API_KEY: "${ANTHROPIC_API_KEY}"

Define a pipeline manifest once:

# pipeline.yaml
name: orders-dq
rules: ./rules.yaml
database: ./warehouse.duckdb
kb:
  - ./policy.md     # business rules, SLAs, compliance docs
  - ./schema.md
goal: |
  Run all rules. For every failure explain the business impact,
  likely root cause, and a concrete remediation step.

Then just ask:

Load the pipeline at pipeline.yaml and run it.

Hermes calls load_pipeline โ†’ run_validation โ†’ returns a structured report. No flags, no re-explaining context on every run.

Full setup guide: aegis-dq.dev/integrations/hermes ยท MCP listing: glama.ai/mcp/servers/aegis-dq/aegis-dq


Why Aegis?

Aegis DQGreat Expectations / SodaMonte Carlo / Anomalo
Open sourceโœ… Apache 2.0โœ…โŒ Commercial
Agentic LLM diagnosis + RCAโœ…โŒโœ… Proprietary
SQL auto-fix proposalsโœ…โŒโŒ
Audit trail (per-decision log)โœ…Partialโœ… Proprietary
Pluggable LLM (Anthropic, OpenAI, Bedrock, Ollama)โœ…โŒโŒ
dbt integrationโœ…โœ…Partial
Portable open rule standardโœ…PartialโŒ
ML anomaly detectionโœ… built-inโŒโœ… Proprietary

Install

pip install aegis-dq
ExtraWhat it adds
aegis-dq[bigquery]BigQuery adapter
aegis-dq[databricks]Databricks adapter
aegis-dq[athena]AWS Athena adapter
aegis-dq[postgres]PostgreSQL / Redshift adapter
aegis-dq[snowflake]Snowflake adapter
aegis-dq[rest]REST API server (FastAPI + uvicorn)
aegis-dq[openai]OpenAI LLM provider
aegis-dq[airflow]Airflow AegisOperator
aegis-dq[mcp]MCP server for Hermes, Claude Desktop, and any MCP-compatible agent
aegis-dq[ml]scikit-learn anomaly detection

5-minute quickstart

Step 1 โ€” Install

pip install aegis-dq

Step 2 โ€” Seed a demo database

import duckdb

con = duckdb.connect("demo.db")
con.execute("""
    CREATE TABLE orders AS
    SELECT i AS order_id, 'placed' AS status, i * 9.99 AS revenue
    FROM range(1, 10001) t(i)
""")
# introduce some bad data
con.execute("UPDATE orders SET order_id = NULL WHERE order_id % 200 = 0")
con.execute("UPDATE orders SET revenue = -5.00 WHERE order_id % 500 = 0")
con.close()

Step 3 โ€” Generate rules from your schema (no hand-writing)

export ANTHROPIC_API_KEY=sk-ant-...

# Generate rules from table schema alone
aegis generate orders --db demo.db --output rules.yaml

# Or point it at a policy doc and get business validation rules too
aegis generate orders --db demo.db --kb docs/orders_policy.md --output rules.yaml

The LLM introspects your schema and generates not_null, accepted_values, between, and custom_sql rules automatically. Generated rules are stamped status: draft โ€” review and promote to active.

Step 4 โ€” Run

aegis run rules.yaml --db demo.db

Run without an API key (pass/fail only, no LLM diagnosis):

aegis run rules.yaml --db demo.db --no-llm

Pipeline

Every aegis run passes your data through a LangGraph pipeline:

rules (Python / YAML)
    โ”‚
    โ–ผ
  plan โ”€โ”€โ–บ parallel_table โ”€โ”€โ–บ reconcile โ”€โ”€โ–บ remediate โ”€โ”€โ–บ report
                 โ”‚
         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
         โ”‚  per table:      โ”‚
         โ”‚  execute         โ”‚
         โ”‚  classify        โ”‚
         โ”‚  diagnose        โ”‚  โ† concurrent across all tables
         โ”‚  rca             โ”‚
         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
  • plan โ€” parse and validate rules, build an execution graph
  • parallel_table โ€” concurrently fans out per table: execute all rules, classify failures by severity, diagnose with LLM, and trace root causes
  • reconcile โ€” compare results against expected thresholds
  • remediate โ€” LLM proposes a targeted SQL fix for each diagnosed failure
  • report โ€” structured JSON + optional Slack notification

Rule types (31 total)

CategoryTypes
Completenessnot_null not_empty_string null_percentage_below
Uniquenessunique composite_unique duplicate_percentage_below
Validitysql_expression between min_value_check max_value_check regex_match accepted_values not_accepted_values no_future_dates column_exists
Referentialforeign_key conditional_not_null
Statisticalmean_between stddev_below column_sum_between
Timelinessfreshness date_order
Volumerow_count row_count_between custom_sql
Cross-tablereconcile_row_count reconcile_column_sum reconcile_key_match
ML / Anomalyzscore_outlier isolation_forest learned_threshold

Example rule:

rules:
  - apiVersion: aegis.dev/v1
    kind: DataQualityRule
    metadata:
      id: orders_revenue_non_negative
      severity: critical
      owner: revenue-team
      tags: [revenue, validity]
    scope:
      warehouse: duckdb
      table: orders
    logic:
      type: sql_expression
      expression: "revenue >= 0"

Generate rules with the LLM

Instead of writing rules by hand, let Aegis introspect your table schema and generate a draft rules file:

# Schema-aware structural rules (not_null, between, unique, accepted_values...)
aegis generate orders --db warehouse.duckdb --output orders_rules.yaml

Add a --kb document โ€” any plain text or markdown file describing your business logic โ€” and the LLM generates business validation rules alongside structural ones:

aegis generate orders \
  --db warehouse.duckdb \
  --kb docs/orders_policy.md \
  --output orders_rules.yaml

What goes in a KB file? Anything your team knows about the data:

# orders_policy.md
- status must be one of: placed, confirmed, shipped, delivered, cancelled
- amount must be greater than 0; refunds are handled in a separate table
- customer_id must reference a valid customer (no test accounts: id > 1000)
- order_date must not be in the future
- discount_pct must be between 0 and 0.5 (max 50% discount)

The LLM turns these into accepted_values, sql_expression, between, and foreign_key rules automatically. Generated rules are stamped status: draft โ€” review, promote to active, and commit.

All aegis generate options:

FlagDefaultDescription
--dbโ€”DuckDB file for schema introspection
--kbโ€”Business-context file (text/markdown)
--outputrules.yamlOutput YAML file
--max-rules20Cap on number of rules generated
--no-verifyfalseSkip SQL verification of generated rules
--save-versionsfalsePersist rules to version store
--provideranthropicLLM provider
--model(default)Override model

Warehouse adapters

AdapterInstallStatus
DuckDBbuilt-inโœ… GA
BigQueryaegis-dq[bigquery]โœ… GA
Databricksaegis-dq[databricks]โœ… GA
AWS Athenaaegis-dq[athena]โœ… GA
Postgres / Redshiftaegis-dq[postgres]โœ… GA
Snowflakeaegis-dq[snowflake]โœ… GA

LLM providers

ProviderInstallDefault model
Anthropic (Claude)built-inclaude-haiku-4-5
OpenAIaegis-dq[openai]gpt-4o-mini
Ollama (local)aegis-dq[ollama]llama3.2
AWS Bedrockpip install boto3amazon.nova-pro-v1:0

Switch providers at the CLI:

aegis run rules.yaml --llm openai --llm-model gpt-4o
aegis run rules.yaml --llm ollama --llm-model llama3.2
aegis run rules.yaml --llm bedrock --llm-model amazon.nova-pro-v1:0

Integrations

IntegrationWhat it does
GitHub ActionCI/CD gate โ€” fails the job when rules fail
aegis-dq[rest]REST API server โ€” aegis serve
aegis-dq[airflow]AegisOperator โ€” drop-in Airflow task
aegis-dq[mcp]MCP server for Hermes, Claude Desktop, Cursor, and any MCP-compatible agent
aegis dbt generateConvert dbt manifest.json to Aegis rules

CLI reference

CommandDescription
aegis initGenerate a starter rules.yaml
aegis validate <config>Check YAML syntax + schema (no warehouse needed)
aegis generate <table>LLM-generate rules from table schema
aegis run <config>Run validation, diagnose failures, produce a report
aegis rules listBrowse built-in rule templates
aegis audit trajectory <run-id>Inspect the LLM decision trail for a past run
aegis audit search <query>Full-text search across audit logs
aegis dbt generate <manifest>Convert a dbt manifest to Aegis rules
aegis mcpStart the MCP server for Hermes, Claude Desktop, or any MCP client

aegis run flags:

FlagDefaultDescription
--db:memory:DuckDB file path
--llmanthropicLLM provider
--llm-model(provider default)Override model name
--no-llmfalseSkip LLM diagnosis entirely
--output-json(none)Write full JSON report to file
--notify(none)Slack webhook URL
--notify-onfailuresWhen to notify: all ยท failures ยท critical

Roadmap

PhaseVersionItemsStatus
Foundationv0.1Core agent, DuckDB, CLI, audit trailโœ… Done
Differentiatev0.5BigQuery, Databricks, Athena, Airflow, Ollama, RCA, ShareGPT export, FTS5 search, dbt, MCPโœ… Done
Qualityv0.7SQL verification pipeline, rule versioning, aegis generate (LLM + KB), GitHub Action, ML anomaly detectionโœ… Done
Maturev1.0Postgres, REST API, parallel subagents, VS Code extension, eval suite, banking/healthcare packs๐Ÿšง In progress

Full issue tracker: github.com/aegis-dq/aegis-dq/issues


Contributing

Contributions are welcome. See CONTRIBUTING.md to get started.

Good first issues: label:good first issue

License

Apache 2.0

Related MCP Servers

1luvc0d3/metabase-mcp

๐Ÿ“‡ ๐Ÿ  - MCP server connecting Claude to Metabase with 28 tools for natural language data analysis, dashboard management, SQL queries, and automated insights. Features SQL guardrails, rate limiting, and audit logging.

๐Ÿ“Š Data Platforms0 views
alanpcf/brasil-data-mcp

๐Ÿ“‡ ๐Ÿ  ๐ŸŽ ๐ŸชŸ ๐Ÿง - Brazilian public data for AI agents โ€” companies (CNPJ), addresses (CEP), banks (BACEN), national holidays โ€” via BrasilAPI. No auth, no API key. Install: npx -y brasil-data-mcp.

๐Ÿ“Š Data Platforms0 views
Alessandro114/scala-mcp-server

๐Ÿ“‡ โ˜๏ธ ๐ŸŽ ๐ŸชŸ ๐Ÿง - Search and enrich data from 250M+ companies across 50+ countries. Company lookup by name, VAT, or ID, NACE sector search, and financial data from official EU business registries. Free tier: 50 lookups/month. Install: npx scala-mcp-server.

๐Ÿ“Š Data Platforms0 views
alkemiai/alkemi-mcp

๐Ÿ“‡ โ˜๏ธ - MCP Server for natural language querying of Snowflake, Google BigQuery, and DataBricks Data Products through Alkemi.ai.

๐Ÿ“Š Data Platforms0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

Last checked: 7/28/2026, 5:30:33 AM

Unclaimed listing (imported or pending owner verification). Claim it โ†’
โ˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.