guide
guide9 min read

Orchestrating Streaming, Schema and Observability Agents Together

Who detects, who decides and who acts when a streaming contract changes, and what each agent hands to the next

To orchestrate a Streaming, Schema and Observability agent together, give each one a single verb: the Streaming Agent detects broker-side change, the Schema Agent decides whether the change is safe, and the Observability Agent confirms the effect downstream, with the Orchestration Agent carrying context between them. The decision step is not trivial: the Confluent Schema Registry docs define seven compatibility types, and the right one differs per topic.

Key Takeaways

  • •Split the job by verb: the Streaming Agent detects, the Schema Agent decides, the Observability Agent verifies, and the Orchestration Agent only routes context.
  • •Each handoff carries a typed payload (topic, subject, schema versions, consumer groups, SLA), so the next agent never re-derives what the last one already knew.
  • •Kafka's log.retention.hours default is 168 hours, so a consumer that lags past that window loses data; lag-versus-retention is the clearest cross-agent signal.
  • •Anything that writes to a broker or registry sits behind an approval point; the open-source edition is read-only by default.
  • •When one agent fails, the others degrade to read-only reporting and escalate to a person instead of acting on partial context.

The shared job: a streaming contract change that must not become a stale dashboard

The three agents share one job: when something about a streaming contract changes, keep every consumer correct and every freshness SLA met. A contract here means the topic, its schema registered under a subject, its retention, and the consumers that depend on it. Changes arrive from producers, from a registry update, or from an operator editing topic configuration. Without coordination, each change is noticed by whichever team owns the nearest tool, and the engineer becomes the integration layer between them.

This framework is deliberately narrower than our other orchestration write-ups. The schema, quality and incidents framework starts from a column change in a warehouse table and ends at a broken pipeline. This one starts at the broker. The trigger is a topic, a subject or a consumer group, and the failure mode is a consumer that silently reads the wrong shape or falls off the end of retention. Different trigger, different evidence, different handoffs.

We keep the roles separate because the signals really are separate. Broker metadata, registry history and pipeline freshness live in different systems with different owners. One agent trying to hold all three would carry too much context and would be hard to audit. Three narrow agents, each exposing its own MCP tools, let a person see exactly which agent said what, and let us turn autonomy up or down per step.

Which agent detects, which decides, which acts

The Streaming Agent detects. Its scope is topic governance for Kafka, Pulsar and Kinesis, schema registry state and exactly-once monitoring, as described in the platform docs. It watches for new schema versions, changed topic configuration, consumer lag and transactional anomalies. It does not judge whether a change is acceptable. It emits an event: this subject got version 7, this topic's retention changed, this consumer group is falling behind.

The Schema Agent decides. It takes the event, compares the new schema against the previous version, classifies the change (additive, removing a field, changing a type), and projects which downstream consumers and tables are affected. Its output is a verdict: safe, safe with a migration, or blocked, plus a generated migration when one is needed. It decides on evidence from the registry and the consumer list, not on lag, which keeps its reasoning easy to review.

The Observability Agent verifies, and acts only in a narrow sense. After a change ships it checks pipeline freshness against the SLA, traverses lineage to the affected tables, and correlates logs, metrics and traces to see whether the change did harm. If freshness degrades it reports back with evidence. The write actions in this loop, such as applying a migration or changing a topic setting, belong to the Streaming and Schema agents and sit behind the approval points described below.

The handoff table

Every handoff in this framework is a typed message, not a free-text summary. The table lists the four that matter: the sender, the receiver, the context that must travel, and the condition that triggers it. If a payload is missing a field, the receiving agent asks for it rather than guessing, which is the single most useful rule for keeping multi-agent chains honest.

HandoffFrom → ToContext passedTriggerApproval needed
1. Change eventStreaming → SchemaTopic, subject, old and new schema versions, producer, consumer groupsNew registry version or topic config changeNo (read-only)
2. VerdictSchema → OrchestrationCompatibility class, affected consumers, generated migration if anySchema Agent finishes classificationYes, if a migration or registry write follows
3. Verification requestOrchestration → ObservabilityAffected tables, freshness SLAs, time of change, expected impactChange applied, or verdict is blocked and a baseline is neededNo (read-only)
4. Outcome reportObservability → OrchestrationFreshness delta, lineage path, correlated logs and traces, pass or failVerification window closes or SLA breachesEscalates to a person on fail

Notice that the Streaming and Observability agents never talk to each other directly. The Orchestration Agent sits between them, and every message passes through it. That costs one hop, and it buys a single place to log the chain, apply policy and stop the flow. When something goes wrong, there is one trace to read.

We also keep the payloads small on purpose. The Observability Agent does not need the full schema diff; it needs the affected tables and the SLA. The Schema Agent does not need log lines; it needs the subject and the consumer list. Passing only what the next step needs is how we avoid the pattern where more context makes an agent less accurate.

Worked example: retention versus a lagging consumer

The following example is illustrative: the numbers are chosen to make the arithmetic easy, not measured from a customer. Take a topic that receives 2,000 messages per second. That is 7.2 million messages per hour (2,000 × 3,600). Kafka's broker setting log.retention.hours defaults to 168, which is seven days, per the Apache Kafka broker configuration docs. A consumer group is 42 hours behind, so it holds about 302 million unread messages (7.2M × 42) and has 126 hours before the oldest ones are deleted.

Here is how the chain runs. The Streaming Agent detects that lag is growing and flags the group. It hands the Schema Agent the subject and the consumer group, because a recent schema version is a common cause of a consumer that has started failing to deserialize and retrying. The Schema Agent finds that version 7 removed an optional field the consumer still reads, classifies the change as breaking for that consumer, and proposes a migration that restores the field as optional.

The Observability Agent then reports what it sees on the pipeline side: the table fed by this consumer is 41 hours stale against a 1-hour SLA, and lineage shows two dashboards and one downstream model depend on it. With a person approving the migration, the chain closes: the fix is applied, lag drains, and the Observability Agent confirms freshness is back inside the SLA. The alert threshold in this example, flagging lag once it reaches a quarter of the retention window, is an example policy a team might set. It is not a product default, and your own value should come from your recovery time.

Approval points and the autonomy dial

The open-source edition (dw-claw) is Apache 2.0, runs locally and is read-only by default, so out of the box this whole framework can detect, classify and verify but cannot change anything. Writes, approval workflows and audit trails arrive in Pro. The getting started docs cover the open-source setup, and the platform docs describe the editions in more detail.

We place approvals at the steps that change shared state. Registering a new schema version, applying a generated migration, and altering topic configuration such as retention or partitions all require sign-off. Detection, classification and verification do not. This follows the way the MCP specification treats tool use: the Model Context Protocol specification recommends that clients keep a human able to deny tool invocations, and our approval gates build on that.

The Autonomous Data Conductor exposes autonomy as a dial per domain. A team can leave topic configuration at approve-every-change while letting additive, backward-compatible schema changes proceed automatically. Dial settings should follow evidence: widen autonomy only after the audit trail shows the agents' verdicts matched the ones your engineers would have made.

What happens when one agent fails

Assume any agent can be unavailable, time out or return something malformed. The rule we use is that a failed agent never gets replaced by a guess. If the Streaming Agent fails, no change events arrive, so the Observability Agent's freshness checks become the backstop: the stale table still trips the SLA, only later. The Orchestration Agent marks the chain degraded and tells a person that broker-side detection is down.

If the Schema Agent fails mid-chain, the change is treated as unclassified, and unclassified is handled as blocked. The Streaming Agent keeps reporting, the Observability Agent keeps measuring, and nothing is written. If the Observability Agent fails after a fix is applied, the chain cannot confirm success, so it reports applied but unverified and keeps the incident open instead of closing it.

Two further safeguards apply to all three failures. First, every handoff has a timeout, and a timeout is a failure, not a pause. Second, partial context is labelled as partial in the message, so a person reading the trace can see which facts were observed and which were missing. We would rather page someone with an honest gap than close an incident on an assumption.

What is documented and what is our design choice

Some of this framework rests on public documentation and some on our own design. The documented parts are the registry's compatibility model, which the Confluent docs describe as seven types (BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE and NONE), and Kafka's retention behavior. The Schema Agent's verdicts map onto those types; the choice of type per subject stays with your team.

The design choices are ours. Routing every handoff through the Orchestration Agent is a choice, made for traceability. So is having the Observability Agent read freshness and lineage from the pipeline and warehouse side rather than from the broker. That keeps its evidence independent of the Streaming Agent's, so a broker-side blind spot does not blind the verification step too. Another team could wire it differently, and we would expect them to argue for their reasons.

We make no claim that this exact split is the only workable one. It is the one that has kept our traces readable. Use the handoff table as a template, rename the payload fields to match your registry and topic naming, and test it against a recent incident from your own history before you give any agent write access.

Frequently Asked Questions

Can the Streaming Agent change a topic's retention by itself?

Not by default. The open-source edition is read-only, so it can only recommend a change. With Pro, writes are possible but sit behind an approval workflow, and each approved change is recorded in the audit trail. Teams that want fewer interruptions can raise autonomy for low-risk domains through the per-domain dial, but retention changes are a sensible place to keep a human in the loop for a long time.

Why not let one agent handle streaming, schema and freshness?

One agent would have to hold broker metadata, registry history and pipeline lineage in the same context, which makes its reasoning harder to audit and its failures harder to contain. Three narrow agents have three narrow tool sets, and a person can read which agent claimed what. The cost is a coordinated handoff, which the Orchestration Agent absorbs.

Which clients can drive this chain?

Every agent is an MCP server, so any MCP-compatible client can invoke the chain, including Claude Code, Cursor, Windsurf, VS Code and GitHub Copilot. Setup steps for each client are in the client setup docs. You can ask in plain language, for example: What changed in the orders schema since last deploy? Or: What is the blast radius if I drop this column?

What should I test first?

Replay a past incident where a schema change broke a consumer and check three things: did detection fire with the right topic and subject, did the verdict match what your engineers concluded, and did the verification step report the freshness impact you remember. If all three line up in read-only mode, you have the evidence to consider enabling the first approved write.