You have probably seen this failure. A chain of AI agents edits your media, and across twenty turns the brand quietly walks off: the blue shifts, the logo loses its safe area, the type changes, the framing wanders. We wrote up why that happens in a companion piece on why agents forget your brand between turns. The short version is that the model has no memory, a long prompt rots, and the seam between agents drops whatever you do not deliberately carry across.

This post is the other half. Not why it drifts, but what to actually build so it stops. Three concrete patterns do most of the work: a machine-readable brand spec your agents read, a validation step that catches off-brand output before it ships, and one shared brand-state object every hop reads and writes. Full disclosure, Layermetry is one surface that carries these patterns for you, so we will show how to build each one and where adopting a ready surface fits, then let you decide.

Write your brand as data, not a PDF an agent has to interpret

The first pattern is the foundation for the other two. Stop handing agents a brand book to read and start handing them values to apply.

A brand book is for humans, but an agent needs exact values

A PDF brand guide is written for a designer who can interpret it. An agent reads prose literally, so a vague instruction like "use our brand blue" leaves it to pick a reasonable default that is not yours. As one 2026 guide on design tokens for agents puts it, the fix is to replace that vague instruction with the precise value the agent can apply, so the system prompt carries Primary color: #1d4ed8 rather than a paragraph the model has to parse. The point is to remove the interpretation step entirely.

Use design tokens so the name carries intent

The clean way to write those values is design tokens, the same machine-readable variables engineering teams already use. A token is a named value: color.brand.primary, font.heading, spacing.logo.safe-area. The name matters as much as the value, because it tells the agent what the value is for, not just what it is. There is now a settled format to write them in. The Design Tokens Community Group, working under the W3C, reached a first stable version of its token format in October 2025, with support for modern color spaces and multi-brand theming. It is a vendor-neutral JSON format, so you write your identity once and many tools and agents can read the same file.

Pair the values with a short note on why

Exact values stop an agent picking the wrong color. They do not stop it using the right color in the wrong place. That is why the better formats keep a thin layer of human-readable rationale next to the data. A recent open-sourced format from a major search company's design lab pairs machine-readable tokens in a structured front matter with a short Markdown body that explains the design rationale, on the principle that tokens give an agent exact values while the prose tells it why those values exist and how to apply them.

You do not need a heavy document. A line per rule is enough: the accent color is used sparingly, at most once per visual; the logo always keeps its safe area; the subject sits left of center. The agent reads the value and the intent together.

Prose an agent guesses at
"Use our brand blue and keep the logo clear of other elements. Frame shots the way we usually do."
Which blue? How much clearance? Framed how? The agent fills the gaps with defaults that are not yours.
Tokens an agent applies
color.brand.primary = #1d4ed8
spacing.logo.safe-area = 24px
framing.subject = left-third
Exact values, plus one line of intent each. Nothing left to guess.

To keep this tight, this is the crux distinction the rest of the post leans on, not a full lesson on tokens or agents. If the terms model, agent, and agentic workflow are new, the primer on LLMs, agents, and frontier models covers them in plain language first.

Validate the output before it flows to the next agent

A spec tells an agent what to do. It does not guarantee the agent did it. The second pattern is a check that sits between hops and refuses to pass off-brand work down the chain.

Check the result, do not trust the instruction

Even with perfect tokens, a generation step can drift. The 2026 design-token guidance is direct about this: after an agent produces output, run a validation step that checks whether the output adheres to your brand tokens. The principle is the same one engineering teams already use, where a lint pass scans for hardcoded colors instead of approved tokens and blocks the change before it merges. You are doing that for media output rather than code.

How you check depends on what the agent produced

For structured output, such as a layout spec or anything where the styles are written down, validation is a direct comparison: parse the values the agent used and check them against your tokens. For an image, you cannot diff text, so you need a vision step that scores the result against brand criteria. Did it use the brand colors, keep the logo and its safe area, hold the approved framing? That review can itself be a model with a checklist, the same shape as the structured feedback loop we describe in why media SDKs need an evaluator step. The output an agent returns has to be something the next step can judge, not just look at.

Fail closed, so small drifts cannot compound

The reason to validate between hops rather than only at the end is that drift compounds. One slightly-off edit feeds the next agent, which drifts a little more from there. A check at the seam catches it while it is still one step, not twenty. When the check fails, the output gets corrected or held rather than flowing on, the same fail-closed discipline that matters at any seam between two agents. And because the check runs on the agent's behalf, it belongs inside the same scoping you already apply to what an agent is allowed to do for your users.

Keep one shared brand-state object the whole chain reads and writes

The spec and the validator both need something to point at. That something is one place the brand state lives, addressable by every agent in the chain.

One source of truth, fetched fresh each run

Do not copy the brand into each agent's prompt and hope the copies stay in sync. Keep a single source of truth and have every run fetch the current version before it generates, so a brand update lands everywhere on the next run with no prompt editing. The 2026 guidance makes this explicit: a single brand update should propagate to every agent automatically, and each run should pull the live spec rather than a stale cached copy. One file, read fresh, read by all.

A typed state object that survives a fresh context window

The brand spec is the stable part. The work in flight is the moving part, and it needs to ride alongside it. Modern multi-agent setups already handle this with a typed shared state object that flows through the chain, where the orchestrator passes only the relevant fields to each worker instead of replaying the whole history. The durable version of that idea is a living specification: a machine-readable artifact that lives outside any one agent and, as 2026 orchestration write-ups note, survives a complete context replacement.

That is exactly what you want for brand. When an agent gets a fresh context window, it reads the brand state from the shared object instead of starting blind, so identity propagates through every hop because it never depended on one agent holding it.

Three patterns, one loop per hop
1. Read spec 2. Agent edits 3. Validate 4. Write back
↑   every hop reads then writes the same object   ↓
Shared brand state  ·  tokens (colors · logo & safe area · type · framing) + work in flight
Validation between hops means a small drift gets caught at step three, not after twenty turns.

Build these three yourself, or adopt a surface that carries them

That is the whole pattern: a spec to read, a validator at each seam, and a shared object that survives a context reset. The real question is who builds and maintains it, and that is genuinely your call.

Building it yourself: full control, standing upkeep

You can build all three. A token file in the stable open format, a validator per output type with a vision step for images, and a shared store with a firm convention that every agent reads and writes it. The win is real: total control over the shape of your brand data and no dependency on anyone else. The cost is the part teams underestimate. The store, the per-type validation, the handoff artifacts that survive a context reset, and the observability to catch drift before it ships are all standing work, not a one-time setup. Change one agent or one model and the chain can behave differently, which is why the observability to catch that is never a one-time setup.

Adopting a surface: speed and lower maintenance, one dependency

The other path is to adopt a surface that already carries the spec, the validation, and the shared state, so your agents read and write a stable identity without you building the plumbing. You trade some control for speed, lower maintenance, and observability that is built in rather than assembled. Layermetry is one such surface. It holds the brand state your chain reads and writes and runs the checks at each hop, so visual identity stays steady across the chain. It is extensible too, so you can ship your own tools alongside the native ones rather than being boxed in. The honest tradeoff is the dependency, and you should weigh that the way you weigh any infrastructure you buy instead of own.

Whichever path you take, the agent primitives in /docs show how shared, addressable state anchors a full agentic media pipeline.

Frequently asked questions

What is a machine-readable brand spec for AI agents?

It is your visual identity written as structured data instead of a PDF, so an agent can read exact values rather than interpret prose. It pairs design tokens, the named colors, type, spacing, and logo rules, with short notes on intent, so a token like color.brand.primary carries what the value is for, not just the hex. Because the token format reached a stable version in late 2025, you can write this once and have many tools and agents read the same file. The agent reads the relevant slice before it acts, which removes the guessing.

How do I validate that an agent's output stayed on brand?

Add a check after the agent produces its result and before the next one runs. For structured output you compare the values it used against your tokens, the way design teams lint code for hardcoded colors. For an image you need a vision step that scores the result against brand criteria, such as the right colors, the logo with its safe area, and the approved framing. If the check fails, the output gets corrected or held instead of flowing to the next hop, so a small drift cannot compound across the chain.

Should I build the brand-state layer myself or adopt a surface that has it?

Both are valid and it is your decision. Building it yourself gives total control and no dependency, and a first version is reachable: a shared store, a schema, a validator, and a convention that every agent reads and writes it. The cost is the upkeep, because the store, the validation, the handoff artifacts, and the drift observability all keep working only as long as you maintain them. Adopting a surface that already carries the state trades some control for speed and lower maintenance. Layermetry is one such surface, and it is extensible, so you can ship your own tools alongside its native ones rather than being locked in.

Put the brand somewhere the chain can't lose it

The instinct is to write a better prompt and hope the agents hold the line. They will not, because no single agent is where your brand should live. Give the chain three things instead: a spec it reads as data, a check at every seam, and one shared object it hands forward. Do that and a fresh context window stops meaning a fresh guess.

Decide which path fits you. Build these patterns and own every part, or adopt a surface that already carries them and spend your effort on the agentic work that sets you apart. Either way the rule holds: keep your visual identity in one place the whole chain reads, writes, and checks against. The agent primitives in /docs are a good next step on either path.