By Sagar Shankaran, Founder of CallSphere
Without a schema registry, your AI event consumers break every time the producer adds a field. Confluent or Karapace plus Avro/Protobuf/JSON Schema gives you compatibility checks, evolution, and zero-surprise rollouts.
Key takeaways
TL;DR — Schema registry is the boring infrastructure that prevents 90% of event-driven outages. Confluent Schema Registry is the canonical implementation; Karapace is the API-compatible Apache 2.0 alternative. Pair it with Avro, Protobuf, or JSON Schema and your AI event producers and consumers evolve independently without a war room.
Producer team adds a field. Consumer team didn't get the memo. Production breaks. The fix: a schema registry between producers and consumers that checks every new schema against compatibility rules (BACKWARD, FORWARD, FULL). Producers can't ship an incompatible schema; consumers know the schema by reference instead of guessing from bytes.
flowchart LR
Prod[Producer<br/>writes Avro/Proto/JSON-SR] -->|register| SR[(Schema Registry<br/>Confluent or Karapace)]
SR -->|schema id 42| Prod
Prod -->|magic byte + id 42 + payload| K[(Kafka)]
K --> Cons[Consumer]
Cons -->|GET schema 42| SR
SR --> Cons
SR -.compat check.-> Block[Reject incompatible schema]
Each event carries a 4-byte schema ID prefix. Consumers fetch and cache the schema by ID. Compatibility rules ensure new schemas don't break old consumers (BACKWARD) or new consumers don't break on old data (FORWARD).
Hear it before you finish reading
Talk to a live CallSphere AI voice agent in your browser — 60 seconds, no signup.
CallSphere uses Karapace (open-source, Apache 2.0) for our internal Kafka topics across Real Estate OneRoof, Healthcare, IT Services, Salon, After-hours, and Sales. We picked Avro because compactness matters at our event volume. The CloudEvents envelope (post #12) wraps Avro-encoded data referenced via dataschema. After-hours and the simpler Bull/Redis paths use JSON Schema for readability. CI rejects PRs that change a schema without a compat declaration. 37 agents · 90+ tools · 115+ DB tables · 6 verticals · pricing $149/$499/$1499 · 14-day trial · 22% affiliate. Browse /pricing or take a demo.
from confluent_kafka import Producer
from confluent_kafka.serialization import SerializationContext, MessageField
from confluent_kafka.schema_registry import SchemaRegistryClient
from confluent_kafka.schema_registry.avro import AvroSerializer
schema_str = """
{
"type": "record",
"name": "CallCompleted",
"namespace": "ai.callsphere",
"fields": [
{"name": "callId", "type": "string"},
{"name": "durationSec", "type": "int"},
{"name": "outcome", "type": "string"},
{"name": "verticalId", "type": ["null","string"], "default": null}
]
}
"""
sr = SchemaRegistryClient({"url": "http://karapace:8081"})
ser = AvroSerializer(sr, schema_str)
p = Producer({"bootstrap.servers": "kafka:9092"})
p.produce(
topic="call.completed",
key="abc",
value=ser({"callId": "abc", "durationSec": 142, "outcome": "booked",
"verticalId": "real-estate"},
SerializationContext("call.completed", MessageField.VALUE)),
)
p.flush()
# CI compat check via REST
curl -X POST -H "Content-Type: application/json" \
--data '{"schema": "...", "schemaType": "AVRO"}' \
"http://karapace:8081/compatibility/subjects/call.completed-value/versions/latest"
Confluent vs Karapace? Karapace is API-compatible and Apache 2.0; Confluent is managed and paid. Pick by ops appetite.
Avro vs Protobuf vs JSON Schema? Avro for compactness + evolution; Proto for gRPC alignment; JSON Schema for readability and JSON-native pipelines.
Still reading? Stop comparing — try CallSphere live.
CallSphere ships complete AI voice agents per industry — 14 tools for healthcare, 10 agents for real estate, 4 specialists for salons. See how it actually handles a call before you book a demo.
BACKWARD vs FORWARD? BACKWARD: new schema readable by old consumers. FORWARD: old schema readable by new consumers. FULL: both. Default to BACKWARD.
How does CallSphere expose schemas? Internal — but our outbound webhooks reference public CloudEvents dataschema URLs. See /pricing and /demo.
Does it work for non-Kafka? Karapace is Kafka-flavored, but you can use schemas anywhere via REST.
Written by
Sagar Shankaran· Founder, CallSphere
Sagar Shankaran is the founder of CallSphere, where he builds production AI voice and chat agents deployed across healthcare, hospitality, real estate, and home services. He writes about agentic AI, LLM engineering, and shipping voice agents that handle real calls in production.
See how AI voice agents work for your industry. Live demo available -- no signup required.
Compare gRPC and REST for inter-service communication in AI agent architectures. Understand protobuf schemas, streaming capabilities, code generation, and when to choose each protocol.
Where Claude Code, MCP, and multi-agent systems are taking GTM engineering next, and how to prepare your team now for standing and multi-agent workflows.
Where Claude Cowork and the Claude agent ecosystem are heading next — standing agents, MCP, skills as a moat — and the concrete moves to prepare your team now.
The metrics, leading signals, and anti-metrics that prove Claude Cowork is working — acceptance rate, time-to-outcome, and why usage counts mislead.
Shipping an agentic GTM workflow is easy; proving it works is hard. The metrics, signals, and eval loops that show a Claude Code rebuild is paying off.
A realistic end-to-end Claude Cowork use case: a quarterly vendor-spend review from vague ask to shipped deliverable, with every agentic step shown.
© 2026 CallSphere LLC. All rights reserved.