guide
guide8 min read

A framework for orchestrating ML, Quality and Observability agents together

Who detects, who decides, who acts, and what happens when one agent fails

To orchestrate ML, Quality and Observability agents together, give each agent one verb and let a coordinator route between them: Observability detects, Quality decides whether the data is trustworthy, and ML acts on models and features once the data question is settled. Every agent is an MCP server, so the handoffs are ordinary tool calls described in the MCP spec, and the context each agent passes on is explicit rather than implied.

Key Takeaways

  • •Split the shared job by verb: Observability detects, Quality decides, ML acts on models and features. An agent that does all three is a single-agent framework with extra steps.
  • •Most model drift alerts are upstream data problems. Route every drift signal through Quality and Observability before anyone retrains.
  • •Each handoff carries a small structured payload: the affected asset, the evidence, the lineage slice and what has already been ruled out.
  • •Approval points belong before any write: retraining, backfills, feature-store changes and threshold edits.
  • •A failed agent should degrade the run to a human-readable report, never silently skip a step.

How we approach orchestrating ML, Quality and Observability agents together

The three agents share one job: keep a model's inputs and outputs trustworthy between deploys. A model can go wrong in three different places. The pipeline can be late or broken, the data can arrive on time but wrong, or the data can be fine and the world can have moved. Each of those has a different owner, and a team that treats them as one alert usually retrains a model to fix a broken join.

Our Observability Agent owns the first case: freshness SLAs, lineage traversal and correlating logs, metrics and traces. Our Quality Agent owns the second. It wraps rule-based checks, dbt tests, Great Expectations suites and anomaly detection. Our ML Agent owns the third: drift detection, feature store integration and experiment tracking in tools such as MLflow. The Orchestration Agent sits above all three and decides who is called next.

Who detects, who decides, who acts

We assign roles by verb, not by domain. Detection is cheap and should be noisy. Deciding is where context matters. Acting is where risk lives. Keeping these separate is what lets you put an approval gate in exactly one place.

  • •Detect: the Observability Agent watches freshness and volume, and the ML Agent watches feature and prediction distributions. Either can open a run.
  • •Decide: the Quality Agent is the arbiter. It answers one question: is the input data valid, yes or no, and for which columns and partitions.
  • •Act: the ML Agent proposes retraining, feature recomputation or rollback to a prior model version. The Observability Agent proposes pipeline reruns. Neither executes without the approval policy for that domain.

This is our opinion, not a standard: we put the Quality Agent in the middle because it is the cheapest way to stop the most expensive mistake, which is retraining on bad data.

The handoff table

HandoffFrom → ToContext passedApproval point
1. Drift or freshness signalML Agent or Observability Agent → Orchestration AgentAsset name, metric, window, baseline used, first-seen timestampNone (read-only)
2. Trace upstreamOrchestration Agent → Observability AgentAffected feature or model, requested lineage depthNone (read-only)
3. Validate inputsObservability Agent → Quality AgentLineage slice, recent pipeline runs, partitions that changedNone (read-only)
4. VerdictQuality Agent → Orchestration AgentValid or invalid, failing checks, affected columns and partitions, confidenceNone (read-only)
5a. Data is invalidOrchestration Agent → Observability AgentFailing partitions, suspected upstream node, proposed rerun or backfillRequired before any write
5b. Data is validOrchestration Agent → ML AgentQuality verdict, drift evidence, candidate feature setRequired before retraining or rollback
6. Close outML Agent or Observability Agent → Orchestration AgentAction taken, before and after metrics, experiment run referenceReviewer notified

Two design choices matter here. First, every read-only handoff is automatic, so the investigation costs a human nothing. Second, the verdict in step 4 is a typed result, not prose. The coordinator branches on it, which keeps routing deterministic.

What context each handoff has to carry

The failure we see most in multi-agent setups is a handoff that passes a sentence instead of evidence. "Drift detected on the churn model" forces the next agent to rediscover everything. A useful payload is small and structured: the asset identifier, the metric and its baseline, the time window, the lineage slice already traversed, and a list of hypotheses already ruled out.

That last field is the one teams skip. If the Observability Agent has already confirmed that the upstream table landed on time, the Quality Agent should not spend a run checking freshness again. We covered how the shared context layer keeps this state current in a separate post on our context engineering approach, and the same layer is what lets an agent resume a run another agent started.

A worked example

Take a reader question we hear often: "Why did row counts drop 40% overnight?" On a model-serving team, that question usually arrives as a drift alert on a downstream model, not as a row count alert.

  • •The ML Agent flags that a categorical feature has shifted sharply against its baseline and opens a run.
  • •The Orchestration Agent asks the Observability Agent to traverse lineage from that feature. It finds that an upstream ingestion job completed on time but wrote far fewer rows.
  • •The Quality Agent validates the changed partitions and returns invalid: a volume check and a not-null check on the join key both fail.
  • •The Orchestration Agent routes to the Observability Agent for a backfill proposal and holds the ML Agent. No retraining is proposed.
  • •A human approves the backfill. After it lands, the Quality Agent re-validates and the ML Agent confirms the feature distribution returned to baseline.

Had the Quality Agent returned valid, the same signal would have gone to the ML Agent with evidence that the shift is real, and retraining would have been the correct proposal. The topology is identical. Only the verdict changes the path.

Approval points and the autonomy dial

Reads are free; writes are gated. In the open-source edition, agents are read-only by default, so the investigation half of this framework runs locally with no approval machinery at all. In Pro, writes and approval workflows are added, and the audit trail records which agent proposed what and who approved it.

We recommend setting the dial per domain rather than per agent. A team might auto-approve pipeline reruns for a low-risk bronze layer, require one reviewer for feature recomputation, and require two for retraining a customer-facing model. This is the idea behind our Autonomous Data Conductor: data ops work shrinks toward zero as you raise the dial domain by domain, not all at once.

What happens when one agent fails

Treat agent failure as a normal state with a defined fallback. We use three rules.

  • •Observability Agent unavailable: the run continues, but the verdict is marked "lineage unverified" and any write proposal requires human approval regardless of the domain's dial setting.
  • •Quality Agent unavailable: the run stops before step 5. Without a verdict, neither a rerun nor a retrain is safe to propose. The coordinator emits the evidence collected so far as a report.
  • •ML Agent unavailable: data-side remediation proceeds normally, and the model-side follow-up is queued with the evidence attached.

The principle is that a missing verdict never defaults to "valid." Fail closed on writes, fail open on reading. Every one of these outcomes is logged, so the audit trail shows what the swarm could not check as well as what it did.

Where this runs

Because each agent is an MCP server, you can invoke any step from Claude Code, Cursor or any MCP-compatible client, and the coordinator does not need a separate dashboard. Our Incidents Agent can also consume the closed-out run, which is how the same investigation becomes an incident record when the issue is more than a drift alert. Our pilot figures on incident handling are our own, from early pilot testing, and we treat them as preliminary.

Frequently Asked Questions

Why not let the ML Agent handle drift end to end? A drift signal does not say why the distribution moved. If the cause is a broken upstream job, retraining bakes the bug into the model. Routing through the Quality and Observability agents first separates "the data is wrong" from "the world changed" before anyone spends compute.

Do I need all three agents to get value? No. The Quality Agent alone covers validation, and the Observability Agent alone covers freshness and lineage. The three-agent loop pays off when model inputs cross several pipelines, because that is where the root cause is rarely in the system that raised the alert.

Where should the human approval go in a multi-agent loop? Before any write: pipeline reruns, backfills, feature-store changes and retraining. Reads, lineage traversal and validation should run without approval. Setting the approval level per domain is more useful than setting it per agent.

What should an agent do when its dependency agent is down? Fail closed on writes. Without a Quality verdict, no write is proposed, and the coordinator returns the evidence gathered so far so a human can decide. Silent skipping is the failure mode to design against.

Can we run this from Claude Code? Yes. Each agent is an MCP server, so you can invoke the loop from Claude Code, Cursor or any MCP-compatible client with a question such as "Why did data quality score drop below SLA?" and let the Orchestration Agent route the rest.