The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Aegis Dq listing page.
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.
Add a data quality gate to any workflow in under 2 minutes:
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):
| Input | Default | Description |
|---|---|---|
rules-file | rules.yaml | Path to rules YAML |
db | :memory: | DuckDB file path |
warehouse | duckdb | duckdb · postgres · redshift |
pg-dsn | — | PostgreSQL / Redshift connection DSN |
no-llm | false | Skip LLM — free offline validation |
llm | anthropic | anthropic · openai · ollama |
llm-model | (provider default) | Override the default model |
fail-on-failure | true | Fail 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 |
| Output | Description |
|---|---|
rules-checked | Total rules evaluated |
passed | Rules that passed |
failed | Rules that failed |
pass-rate | Pass rate as a decimal (e.g. "91.67") |
report-json | Absolute path to the full JSON report |
Using outputs in downstream steps:

Aegis DQ integrates with Hermes via MCP. Point Hermes at your context and your warehouse — it handles the rest.
Setup (2 steps):
Add to ~/.hermes/config.yaml:
Define a pipeline manifest once:
Then just ask:
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
| Aegis DQ | Great Expectations / Soda | Monte 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 |
| Extra | What 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 |
Step 1 — Install
Step 2 — Seed a demo database
Step 3 — Generate rules from your schema (no hand-writing)
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
Run without an API key (pass/fail only, no LLM diagnosis):
Every aegis run passes your data through a LangGraph pipeline:
| Category | Types |
|---|---|
| Completeness | not_null not_empty_string null_percentage_below |
| Uniqueness | unique composite_unique duplicate_percentage_below |
| Validity | sql_expression between min_value_check max_value_check regex_match accepted_values not_accepted_values no_future_dates column_exists |
| Referential | foreign_key conditional_not_null |
| Statistical | mean_between stddev_below column_sum_between |
| Timeliness | freshness date_order |
| Volume | row_count row_count_between custom_sql |
| Cross-table | reconcile_row_count reconcile_column_sum reconcile_key_match |
| ML / Anomaly | zscore_outlier isolation_forest learned_threshold |
Example rule:
Instead of writing rules by hand, let Aegis introspect your table schema and generate a draft rules file:
Add a --kb document — any plain text or markdown file describing your business logic — and the LLM generates business validation rules alongside structural ones:
What goes in a KB file? Anything your team knows about the data:
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:
| Flag | Default | Description |
|---|---|---|
--db | — | DuckDB file for schema introspection |
--kb | — | Business-context file (text/markdown) |
--output | rules.yaml | Output YAML file |
--max-rules | 20 | Cap on number of rules generated |
--no-verify | false | Skip SQL verification of generated rules |
--save-versions | false | Persist rules to version store |
--provider | anthropic | LLM provider |
--model | (default) | Override model |
| Adapter | Install | Status |
|---|---|---|
| DuckDB | built-in | ✅ GA |
| BigQuery | aegis-dq[bigquery] | ✅ GA |
| Databricks | aegis-dq[databricks] | ✅ GA |
| AWS Athena | aegis-dq[athena] | ✅ GA |
| Postgres / Redshift | aegis-dq[postgres] | ✅ GA |
| Snowflake | aegis-dq[snowflake] | ✅ GA |
| Provider | Install | Default model |
|---|---|---|
| Anthropic (Claude) | built-in | claude-haiku-4-5 |
| OpenAI | aegis-dq[openai] | gpt-4o-mini |
| Ollama (local) | aegis-dq[ollama] | llama3.2 |
| AWS Bedrock | pip install boto3 | amazon.nova-pro-v1:0 |
Switch providers at the CLI:
| Integration | What it does |
|---|---|
| GitHub Action | CI/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 generate | Convert dbt manifest.json to Aegis rules |
| Command | Description |
|---|---|
aegis init | Generate 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 list | Browse 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 mcp | Start the MCP server for Hermes, Claude Desktop, or any MCP client |
aegis run flags:
| Flag | Default | Description |
|---|---|---|
--db | :memory: | DuckDB file path |
--llm | anthropic | LLM provider |
--llm-model | (provider default) | Override model name |
--no-llm | false | Skip LLM diagnosis entirely |
--output-json | (none) | Write full JSON report to file |
--notify | (none) | Slack webhook URL |
--notify-on | failures | When to notify: all · failures · critical |
| Phase | Version | Items | Status |
|---|---|---|---|
| Foundation | v0.1 | Core agent, DuckDB, CLI, audit trail | ✅ Done |
| Differentiate | v0.5 | BigQuery, Databricks, Athena, Airflow, Ollama, RCA, ShareGPT export, FTS5 search, dbt, MCP | ✅ Done |
| Quality | v0.7 | SQL verification pipeline, rule versioning, aegis generate (LLM + KB), GitHub Action, ML anomaly detection | ✅ Done |
| Mature | v1.0 | Postgres, REST API, parallel subagents, VS Code extension, eval suite, banking/healthcare packs | 🚧 In progress |
Full issue tracker: github.com/aegis-dq/aegis-dq/issues
Contributions are welcome. See CONTRIBUTING.md to get started.
Good first issues: label:good first issue