guide
guide9 min read

Agentic data quality monitoring vs rule-based tests: what each catches and where each stops

What each approach catches, where each stops, and how to decide which one your pipelines need

Agentic data quality monitoring is a setup where an AI agent watches your data continuously, flags deviations nobody wrote a rule for, and investigates the cause instead of only raising an alert. Rule-based tests do one narrower job: they check conditions a human defined in advance, such as not-null, uniqueness, accepted values and row-count thresholds. In our opinion, the two are complements. Tests encode what you know, and agents cover what you don't know yet.

Key Takeaways

  • •Rule-based tests catch known failure modes with zero ambiguity: a test either passes or fails, and the result is easy to audit.
  • •Agentic data quality monitoring adds coverage for unknown failure modes, such as a metric drifting 8% with every individual test still green.
  • •Rules stop at the edge of what someone thought to write down. Agents stop at the edge of the context they can reach: lineage, schema history and ownership.
  • •The expensive part of an incident is rarely detection. In our experience it is the diagnosis and the fix, and that is where an agent changes the economics.
  • •The practical default is both: keep tests as contracts on critical tables, and let an agent handle drift, triage and root-cause work.

Agentic data quality monitoring: what it adds to rule-based tests

A rule-based test is a deterministic assertion. You write customer_id is not null or order_total >= 0, the framework runs it after each build, and it reports pass or fail. That determinism is a feature. Everyone understands why a test failed, a failure can block a deploy, and the rule itself documents an expectation about the data.

Agentic monitoring changes the question. Instead of asking whether a specific condition holds, it asks whether the data looks the way it normally does, and if not, why. The agent learns baselines for volume, freshness, distributions and relationships. When something departs from them, it uses connected context to investigate: what changed upstream, which schema moved, which deploy landed, who owns the table.

We build this as the Quality Agent at Data Workers. It is one of fifteen agents, each exposed as an MCP server, so you can ask it questions like "Why did data quality score drop below SLA?" from a terminal-based coding agent or any other MCP-compatible client. The protocol is documented in the MCP specification.

What rule-based tests catch well

We want to be fair to tests, because they do several things better than any model-driven system.

  • •Hard invariants: primary key uniqueness, referential integrity, non-null required fields, accepted enumerations. These are binary and should never be probabilistic.
  • •Business rules with a clear definition: refunds never exceed the original charge, a shipped order always has a ship date.
  • •Contracts between teams: a test on a published table is a promise to downstream consumers that you can enforce in CI.
  • •Audit and compliance evidence: a named, versioned rule with a pass history is simple to show an auditor.
  • •Deterministic gating: a failing test can stop a pipeline run before bad data reaches a dashboard.

If the failure condition can be written as a clear predicate, write the test. An agent adds nothing to a check that a one-line assertion expresses exactly.

Where rule-based tests stop

Tests have four structural limits, and none of them is a flaw in the tooling. They follow from how rules work.

  • •Coverage follows authorship. A test exists only if someone predicted the failure. Silent failures are the ones nobody predicted.
  • •Thresholds go stale. A row-count floor set last spring may be too loose now or too tight after a seasonal shift. Someone has to keep retuning it.
  • •Tests check conditions, not trends. A column can pass every assertion while its mean slides for three weeks.
  • •A failed test says what broke, not why. The engineer still traces lineage, reads recent deploys and checks the upstream schema by hand.

The last limit costs the most. Our own framing is that detection is table stakes and the gap between "something is wrong" and "it's fixed" is still filled by human labor. A test failure at 2 a.m. is the start of a diagnosis, not the end of one.

What agentic monitoring catches that tests miss

The clearest cases are the questions engineers ask after something already looked strange: "Why did row counts drop 40% overnight?" or "Why is the nightly pipeline 3x slower this week?" No rule was violated in either case, but a person with context would immediately call it an incident.

  • •Silent drift: distributions, null rates or cardinalities that move gradually without crossing any fixed threshold.
  • •Semantic breaks: a column keeps its type and name, but its meaning changed after an upstream migration, so a join like customer_id looks fine and returns the wrong rows.
  • •Correlated anomalies: three small deviations across three tables that only matter when seen together.
  • •Freshness and volume deviations relative to learned patterns, including weekday and seasonal behavior, rather than a single static SLA.
  • •Unowned problems: issues in tables with no tests at all, which is where most unexpected breakage lives.

The agent's other advantage is what happens after detection. Our Observability Agent traverses lineage and correlates logs, metrics and traces, and the Quality Agent chains with the Schema Agent to map blast radius. Asking "What's the blast radius if I drop this column?" returns the downstream tables and dashboards that would be affected, not just a failing assertion.

Where agentic monitoring stops

We would not recommend replacing tests with an agent, and here is why.

  • •It is probabilistic. An anomaly detector will produce false positives and false negatives. Anything that must be exactly right belongs in a deterministic rule.
  • •It is bounded by context. An agent that cannot see lineage, schema history or ownership can flag a problem but not explain it. Context access matters more than model quality.
  • •It needs a trust model. An agent that can write fixes needs approvals, audit trails and a limit on what it may change on its own.
  • •It cannot know intent. Whether a 15% revenue jump is a bug or a successful promotion is a business question the agent can surface but not settle.

This is why we ship the open-source edition (dw-claw, Apache 2.0) read-only by default. Investigation needs read access. Writes, approval workflows and audit trails are a separate decision, and we think teams should make it deliberately.

How the two approaches compare in practice

We keep the trade-offs in prose rather than a scorecard, because the right answer depends on the table. On detection scope, tests cover exactly what is written and agents cover deviations from learned behavior. On determinism, tests are exact and agents are statistical. On maintenance, tests need people to add and retune rules, while agents need people to review and tune the autonomy they have been given. On diagnosis, tests give a pass or fail, while an agent with lineage access gives a ranked hypothesis about cause.

The SRE book's chapter on monitoring makes a related point for software systems: alert on symptoms users feel, and keep a way to find causes quickly. Data pipelines fit the same pattern. Tests are good symptom checks for known contracts, and an investigating agent shortens the path to the cause.

A practical split: what to test and what to hand to an agent

We suggest dividing the work by how well the failure can be specified.

  • •Keep as tests: primary keys, referential integrity, required fields, accepted values and any rule you would be comfortable defending in an audit.
  • •Hand to an agent: drift, freshness anomalies, volume changes, unexplained score drops and the first pass of root-cause analysis.
  • •Do both on critical tables: a contract test as the gate and an agent as the second line that looks for what the contract missed.
  • •Give the agent a limited autonomy dial: start at recommend-only, move to act-with-approval for low-risk fixes, and widen per domain as trust builds.

That last point is how we think about the Autonomous Data Conductor: autonomy is set per domain, not globally. Finance tables might stay at approval-required while a sandbox domain runs fully autonomous.

In early pilot testing, 60% of incidents auto-resolved before human notification. That is our own pilot data, not an industry benchmark, and results will vary with how clean your lineage and ownership metadata are.

How to start without a rewrite

You don't need to retire existing tests. Connect the agent read-only, point it at your warehouse and orchestration metadata, and ask it the questions you already ask by hand: "Show freshness scores for all gold tables" or "What tables haven't been queried in 90 days?" Compare what it flags against what your tests caught over a few weeks. The gap between the two lists is the coverage you were missing.

We covered how Data Workers keeps context current across the catalog in a separate post, and our guide to the Autonomous Data Conductor explains how the per-domain autonomy dial works. Both pair naturally with this one, since monitoring is only as good as the context behind it.

Frequently Asked Questions

What is agentic data quality monitoring? It is continuous monitoring in which an AI agent learns normal behavior for your data, detects deviations without hand-written rules, and investigates likely causes using lineage, schema history and ownership context. It differs from plain anomaly detection mainly in the investigation step.

Does agentic monitoring replace rule-based tests? No. Tests remain the right tool for hard invariants, contracts and audit evidence, because they are deterministic. We recommend tests for what you can specify and an agent for what you can't.

Where does agentic monitoring fail? It can produce false positives, it cannot judge business intent, and it is only as informative as the context it can read. Without lineage and schema history it can flag a problem but struggles to explain it.

Is it safe to let an agent fix data quality issues on its own? It depends on the domain. We suggest starting read-only, moving to approval-gated fixes for low-risk changes, and keeping audit trails on every action. Autonomy should widen per domain as the agent earns trust.

How does Data Workers approach this? Our Quality Agent monitors quality and anomalies, chains with the Observability, Schema and Incidents agents for diagnosis and blast radius, and runs inside any MCP-compatible client. The open-source edition is read-only by default, and data never leaves your infrastructure.