guide
guide8 min read

Orchestrating Schema, Quality and Incidents Agents Together: A Handoff Framework

Who detects, who decides and who acts when a column change breaks a pipeline

To orchestrate Schema, Quality and Incidents agents together, give each one a single verb and let a coordinator pass context between them: the Schema Agent detects, the Quality Agent judges, the Incidents Agent diagnoses and proposes, and a human approves any write. Each agent exposes its tools over the Model Context Protocol, so a coordinator, or your own Claude Code session, can chain them without custom glue. This post is our framework for those handoffs. It is our design opinion, not a benchmark.

Key Takeaways

  • •One shared job: when an upstream column changes, find what it touches, decide whether the data is still trustworthy, and either fix it or hand a human a ready diagnosis.
  • •Separate the verbs: Schema detects and projects impact, Quality decides whether the change is a problem, Incidents diagnoses root cause and proposes the fix.
  • •Every handoff carries structured context (the change, the affected assets, the evidence) so the next agent never re-derives what the previous one already knew.
  • •Writes are the approval boundary. Reads, diagnosis and proposals can run unattended; migrations and deploys need an explicit approval point.
  • •A failed agent should degrade the chain, not stop it: the coordinator records the gap and escalates with whatever evidence it has.

Why orchestrating Schema, Quality and Incidents agents together beats three separate tools

A single column rename usually trips three different alarms. A drift detector sees the type change, a test framework fails a not-null check, and the orchestrator marks a task as failed. Three tools, three notifications, and the on-call engineer becomes the integration layer, reading each alert and reconstructing the story by hand.

When the same three jobs are done by agents that share context, the alarms collapse into one thread. The change is detected once, assessed once and diagnosed once, and the person who gets paged receives a single summary instead of three fragments. That is the whole argument for a swarm over point tools, and it only holds if the handoffs are explicit. The rest of this post is about those handoffs.

We describe the broader swarm model on the Data Workers agent swarm page. Here we narrow to three agents and one scenario.

The shared job and the scenario

The shared job is keeping a downstream table correct when an upstream contract moves. Take a concrete, illustrative case: an upstream team changes orders.customer_id from integer to string. Nothing has failed yet, but a join downstream is about to silently drop rows. Engineers will recognize the questions this raises, the same ones our users ask in a terminal: "What changed in the orders schema since last deploy?", "Is the customer_id join safe after the migration?" and "What's the blast radius if I drop this column?"

Answering them takes three different skills. Seeing the change is a diff problem. Deciding whether it matters is a data-validation problem. Working out why a run failed, and what to change, is a lineage-and-logs problem. We assign one agent to each.

Which agent detects, which decides, which acts

  • •Detects: the Schema Agent compares column-level state between deploys, flags drift, projects downstream impact through lineage and can draft a safe migration. It does not judge whether the data is still good.
  • •Decides: the Quality Agent runs the checks that tell us whether the change actually hurt. It wraps Great Expectations suites, dbt tests and anomaly detection, so a row-count drop or null spike on an impacted table becomes evidence rather than a hunch.
  • •Acts: the Incidents Agent traces root cause across lineage, logs and queries, then proposes a fix. Proposing is not applying: the write goes through an approval point.
  • •Coordinates: the Orchestration Agent routes work between the three and holds the shared context, so no agent has to know the others' internals.

We use "decides" deliberately narrowly. The Quality Agent decides whether the data is trustworthy, not whether the migration ships. The decision to apply a change belongs to a human or to a policy you have explicitly set.

The handoff table

HandoffFrom → ToContext passedApproval point
1. Drift detectedSchema Agent → Quality AgentChanged column, old and new type, deploy reference, list of downstream assets from lineageNone. Read-only.
2. Impact assessedQuality Agent → Incidents AgentWhich checks failed or passed on impacted assets, anomaly scores, affected row rangesNone. Read-only.
3. Root cause foundIncidents Agent → Schema AgentFailing query or task, the exact join or cast that breaks, evidence from logsNone. Read-only.
4. Fix proposedSchema Agent → humanDraft migration, blast radius, rollback plan, linked evidence from all three agentsRequired. Writes need approval.
5. Fix verifiedQuality Agent → humanRe-run results on the same checks that failed beforeRequired if the result is ambiguous.

Two design rules sit behind the table. First, every handoff passes the evidence, not just a conclusion, so the receiving agent can disagree. Second, the loop closes: the Quality Agent that raised the concern is the one that confirms the fix, which keeps detection and verification honest.

Approval points and the autonomy dial

Most of this chain is reading. Diffing schemas, running checks, tracing lineage and writing a diagnosis all leave your systems unchanged, which is why the open-source edition (dw-claw, Apache 2.0) runs locally and is read-only by default. The only step that changes anything is handoff 4, applying a migration or deploying a fix.

In Pro, writes are available with approval workflows and audit trails, so each applied change records who or what approved it. Our Autonomous Data Conductor adds a per-domain autonomy dial on top: a domain such as finance reporting can stay at "propose and wait", while a low-risk internal domain can be allowed to apply reviewed fix types on its own. We think autonomy should be set per domain and raised only as a team's trust in the proposals grows. Check the product docs for the exact modes available in your edition before you rely on them.

What happens when one agent fails

Agents fail: a warehouse connection times out, a check suite errors, a lineage graph is stale. The framework should assume this and define behavior in advance.

  • •Schema Agent unavailable: the chain starts from the failed run instead. The Incidents Agent still traces the failure, but the blast-radius section of the report is marked missing rather than guessed.
  • •Quality Agent unavailable: the proposal goes out flagged as unverified. The human sees that no checks backed the conclusion and decides whether to wait.
  • •Incidents Agent unavailable: the Schema and Quality evidence is bundled and sent as is. The human gets detection and assessment without a root-cause narrative.
  • •Orchestration Agent unavailable: the agents still work individually through MCP, and an engineer can chain them by hand from Claude Code or Cursor.

The principle is that a missing agent produces a labeled gap, never a silent assumption. A report that says "no quality evidence available" is more useful than one that quietly omits it.

Running the chain from your terminal

Because every agent is an MCP server, you do not need a new dashboard. Register the servers once in Claude Code's MCP configuration and ask in plain language, for example: "Why did row counts drop after the orders deploy?" The client calls the Schema, Quality and Incidents tools as needed and returns one answer. The same servers work in Cursor, Windsurf, VS Code and any MCP-compatible client.

We covered the self-healing pipeline pattern, which this three-agent chain implements in part, in our solutions library, and the schema change management page covers the drift half in more depth. Treat both as companions to this framework.

Frequently Asked Questions

Do the three agents have to run together?

No. Each is a standalone MCP server and is useful alone. The Schema Agent is worth running just for drift detection and impact projection. Orchestrating them together pays off when one change triggers several symptoms and you want one diagnosis instead of three alerts.

Which agent should have write access?

We recommend none by default. The open-source edition is read-only, and in Pro we would grant write access to the Schema Agent's migration step first, behind an approval workflow, since a migration is the most contained write in this chain.

How is this different from adding alerts between tools?

An alert tells the next tool that something happened. A handoff tells the next agent what happened, what was affected and what evidence supports it, so it can act without starting from zero. Alerts move notifications. Handoffs move context.

What if the agents disagree?

Disagreement is a signal. If the Quality Agent finds the data healthy while the Schema Agent projects broken joins, the coordinator reports both with their evidence and escalates to a human instead of picking a winner.