Protocol Buffers logo
Schema Standardsstandard

Connect Protocol Buffers

Carry reserved field numbers with the meaning, not only with the .proto file.

How CoreModels works with Protocol Buffers

Field numbers are the contract. Names are commentary. Teams still treat .proto as documentation and regenerate other schemas by hand, dropping reserved ranges along the way.

CoreModels decodes Protobuf into the neutral model, including numbers and reservations. The proto-to-Avro conversion recipe exists because that is a common place for numbers to become names and for history to die. Generate-back and audits keep the next “free” number from being a landmine.

Use this when multiple languages and pipelines compile against the same messages — and compatibility incidents show up as quietly wrong values, not as compile errors.

Recipes

No recipes yet for Protocol Buffers. The articles below still describe the problem this connector is built to close.

Uses

Problems this connector fixes

Articles that explain the gap, then point at the recipe that closes it.

Problem

The Field Number Nobody Wrote Down

A team retires a field. It has been dead for a year, nothing reads it, and the pull request that removes it is three lines long and gets approved in under a minute. Months later somebody adds a new field and takes the next number that looks free — the same one. Both changes were correct on their own. Together they mean an older client and a newer one now disagree about what a stretch of bytes says, and the disagreement surfaces as a value that is quietly wrong somewhere nobody is watching.

Outcomes

What Your Service Team Stops Being Asked

Every team that owns a `.proto` file also owns an unpaid second job: being the interpreter for it. The requests arrive individually, each one reasonable, each one costing an afternoon. Can we get the order model as tables? The partner needs this as JSON Schema by Thursday. Which of these fields are actually required? Can you add a discount field without breaking the mobile clients?

Governance

Put the Generated .proto in a Pull Request

That is the test. Not a feature list, not a pipeline diagram — a reviewer, a diff, and a wire contract other people's clients depend on. If a governance layer cannot survive that moment, everything upstream of it is decoration.

Ecosystem

Good Neighbors: proto3 Among the Formats It Has to Live With

Protocol Buffers was designed for a conversation between two running programs. Everything distinctive about it follows from that: the compactness, the field numbers, the fanatical attention to what happens when one side upgrades before the other. It is a contract about bytes in flight, and it is very good at being one.

Agents

Fluent, Confident, and Wrong: Grounding Agents in Real proto3

Ask a capable model to write the `.proto` for your order service and you will get a file that compiles. Idiomatic names, an enum with a zero-valued `UNSPECIFIED` member because that is the convention, a `google.protobuf.Timestamp` for the placed-at field, numbers counting up from one. It will look like something a good engineer wrote on a good day.

Quickstart

Ten Minutes With proto3: Your First CoreModels Transform

You have a `.proto` file. It is the truth for a service, and now somebody outside that service needs the same shape — as JSON Schema for a validation step, as a data contract for a review, as a table for analytics. The usual answer is to retype it. This article replaces the retyping with one HTTP call, and then spends most of its length on the part that matters more: reading what the conversion cost you.

API

The Transform API for proto3: Four Routes, Both Directions

Most schema converters are one-way. You can get *out* of the format or *into* it, rarely both, and the documentation usually leaves you to discover which by trying. So let us answer the direction question for Protocol Buffers first and in one sentence: **proto3 decodes and encodes.** The key `protobuf` (alias `proto`) appears in both the decode list and the encode list, so it is valid as a source and as a target on every route below.

MCP

Handing proto3 to an Agent: transform_schema over MCP

"Take our telemetry `.proto` and give me the Postgres table for it — and tell me what we lose."

Automation

Deterministic proto3 Pipelines: The Plan Is the Artifact

A conversion you run once is a favor. A conversion you run on every commit is infrastructure, and infrastructure needs two properties that one-off tooling never has to prove: the second run must produce the same bytes as the first, and when the input changes in a way the conversion cannot honor, the pipeline must stop rather than quietly produce something different.

Deep dive

Inside the proto3 Coder: The IR Mapping, the Extras, and Every Lossiness Record

Proto3 has fifteen scalar types. A neutral intermediate representation that also hosts JSON Schema, SQL, Avro, LinkML, OWL, and half a dozen other formats cannot afford fifteen distinct numeric primitives, and any tool that claims otherwise is hiding something. The arithmetic settles the question up front: some proto3 facts map structurally, some ride alongside as preserved detail, and some are declared as loss. This is the complete account, in that order.