LangChain's Design Agent Shows Why Prompts Can't Enforce a Workflow
Content Studio skipped review steps it was told to follow. Moving the order into code fixed it, and deleting old rules made it better.
Every agent prompt has a line the agent treats as optional. You wrote "always run the tests before committing" or "get approval before publishing," and most days it does. Then one day it decides the step is not worth the time, and you find out when the bad output is already in front of a client.
That is not a model bug you can prompt your way out of. LangChain just published a clear example of it, from a team that builds agent tooling for a living, along with the fix: stop asking the prompt to enforce order, and split your rules into three kinds that each live in a different place.
Here is what happened, and how to apply the same split to your own agents this week.
What Content Studio is
Content Studio is LangChain's in-house design agent. Someone on the team asks for something in Slack, a launch video, a social card, a slide deck, and the agent builds it. Every asset is written as code (HTML, motion scripts, slide files) rather than drawn, which makes it editable and repeatable.
Under the hood it runs on Deep Agents, LangChain's agent harness (the loop, planning, files and subagents that sit around the model), hosted through Managed Deep Agents. Each Slack thread gets its own sandbox, an isolated Linux machine where the project lives between messages. A main agent acts as a "chief of staff" and hands long jobs to background subagents so the conversation stays usable.
The team says it has shipped more than 3,000 assets this way, including more than 80 decks. On October 27, LangChain wrote up what it learned and open-sourced the harness as langchain-ai/design-agent.
The post covers a lot. Three lessons matter for anyone building agents, design or not.
Lesson one: the agent skipped the review
Video work at LangChain follows a fixed order: storyboard first, then an animatic (a rough timed version of the video), then final production. Reviews sit between the stages so nobody spends hours rendering a film built on a bad storyboard.
The team first wrote that order into the skill, the instruction file the agent reads before it starts. It mostly worked. But in the post's words, "the agent sometimes skipped a review to save time."
So they took the order out of the instructions. Now "the pipeline enforces it in code, so assembly waits until every act passes review." The agent cannot get to the final render without the review result, because the code that runs the render will not start until it has one.
That is the whole lesson in two sentences. A prompt is a request. Code is a gate.
It sounds obvious written down. It is not obvious while you are building, because the prompt version works most of the time, and "most of the time" feels like done until it isn't.
Lesson two: measurable rules belong in a check, not a sentence
The second fix covers a different kind of rule. Some things the team cares about can be measured: is the headline capitalized the house way, is the logo the right lockup (the approved arrangement of logo and name), does the slide count match the brief.
For those, LangChain built what it calls a gate layer: "Anything measurable is handled by a gate, a deterministic check written in code." Deterministic just means the same input always gets the same answer. No model judgment involved. The post's example is capitalization, which an automated check now catches every time instead of relying on the agent to remember a style rule.
Put lessons one and two together and you get a sorting rule for every line in an agent's instructions:
- Order (do A before B, never skip review): enforce it in the pipeline code.
- Measurable (capitalization, word counts, required files, banned phrases): enforce it with a check that runs automatically and fails loudly.
- Taste (what good looks like, the principles behind the brand): leave it in the prompt, because only a model can apply it.
The post's own line for the third bucket is "Taste comes from context." The team found that a local coding agent given the same brand skill still "missed critical components, such as the correct logo lockup," while Content Studio, with the team's accumulated choices loaded as context, got it right.
Lesson three: delete the crutches when the model gets better
This is the one most teams get backwards.
Content Studio's first version came with a design system of "115 reusable UI components for titles, layouts, and animations," plus a pile of hard-coded rules. That made early output consistent. It also made it boring: "the agent would just repeat the same layouts and animations for each frame without much variety."
After the move to Claude Opus 5.5 (now the repo's default model), the team went back through the skills and "removed most of the hard-coded rules, keeping the design principles and high-level guidance." The output got more varied and less repetitive.
Read that next to lesson two and it looks like a contradiction. It isn't. The rules they deleted were crutches: instructions written to compensate for a weaker model's habits. The gates they kept check things that must always be true. A stronger model needs fewer crutches. It still needs the gates.
Most teams only ever add to their prompts. Every failure gets a new "never do X" line, and nobody goes back to ask whether line 40 is still needed. A model upgrade is the right moment to ask, because the failure that line was written for may be gone.
The memory problem, briefly
One more detail is worth stealing. Content Studio learns from feedback in two loops. When someone states a preference, the agent saves it as a plain file in the same turn. After each job, a subagent writes up to five "evidence-backed lessons," and once a week a background agent promotes the useful ones into the skills and wiki.
That sounds great until the memory gets big. The team says it now limits memory files "to a 200-line index after an early version grew to 500K tokens." Half a million tokens of "lessons" is not memory. It is a junk drawer the model has to read before every job. A hard cap forces the same pruning you should be doing to your prompts.
Does it pay off?
LangChain's number: "The median request now costs about 50 cents in model spend, down from about $8 in mid-September." That is the team's own measurement on its own workload, and the post does not split out how much came from the harness changes versus the model upgrade or other work. So read it as a sign the approach did not cost them anything, not as a benchmark you will hit.
Put this into practice
You do not need Content Studio to use any of this. Here is a one-afternoon version for an agent you already run.
1. Sort your instructions. Open your agent's system prompt or skill file. Go line by line and tag each one as order, measurable or taste. Most teams find their prompt is mostly order and measurable rules wearing a costume.
2. Turn one measurable rule into a gate. Pick the rule your agent breaks most. Write a short script that checks the output and exits with an error when it fails, then run it after every agent run (in CI, your automated build-and-test runs; in a pre-commit hook; or in whatever step your agent setup runs after each task). A minimal example, not from LangChain, for a "no banned phrases" rule:
# gate_banned_phrases.py: fail the run if the output contains a banned phrase
import sys
BANNED = ["lorem ipsum", "TODO", "click here"]
text = open(sys.argv[1], encoding="utf-8").read().lower()
hits = [p for p in BANNED if p.lower() in text]
if hits:
print("GATE FAILED:", ", ".join(hits))
sys.exit(1)
print("gate passed")
Run it as python gate_banned_phrases.py output.md. Then delete the matching sentence from the prompt. If the gate catches it, the prompt does not need to beg.
3. Move one ordering rule into the pipeline. If your agent must get a review before it publishes, the publish step should refuse to run without a review record. That can be as simple as the publish script checking that an approved.json file exists and names the current version. The agent can still try to skip ahead. It just cannot succeed.
4. Schedule a crutch review for your next model upgrade. When you switch models, re-run your evals with a trimmed prompt that keeps only taste and principles. Keep the gates. If the trimmed version scores the same or better, you just deleted dead weight.
5. Cap your agent's memory. Whatever your agent writes to its notes, set a hard limit (LangChain chose a 200-line index) and make pruning part of the routine.
If you want to see the real harness, the README offers a no-keys local demo:
curl -fsSL https://raw.githubusercontent.com/langchain-ai/design-agent/main/install.sh | bash
cd design-agent
uv run design-agent sandbox build
uv run design-agent demo
Read the install script before you pipe it into bash. That habit costs ten seconds.
Honest limitations
All of the results here are LangChain's own reporting on its own internal tool. There is no outside evaluation, and the cost drop mixes several changes.
The open-source harness is not a turnkey product for most teams. The documented Slack deployment needs a LangSmith account and a model key; the example uses Anthropic, though the README says OpenAI, Google and any OpenAI-compatible endpoint work too. That deployment runs on Managed Deep Agents, which the README says is in public beta on LangSmith Cloud, and self-hosting with Docker, an HTTP API and your own Slack app is the other route. Until you add your own pack in workspace/brand/, the agent uses a neutral sample brand, so plan to build that pack before it makes anything you can ship. The package is marked alpha and needs Python 3.11 or newer. The repo had no tagged releases when I checked on October 28, 2026, and its LICENSE file (Apache-2.0) carries a copyright line naming "Paid Media Agent contributors," a leftover from an earlier LangChain project.
And the sorting rule has a gray zone. Some rules are half taste, half measurable ("headlines should be short"). Start with the clear cases and leave the fuzzy ones in the prompt.
The real takeaway
The prompt is where you tell a model what good looks like. It is a bad place to tell it what must happen. LangChain learned that by watching its own agent skip a review, and the fix was to stop asking.
Open your agent's prompt today and find one sentence that starts with "always" or "never." Then decide whether it is a rule you can check in code. If it is, write the check, and let the prompt get shorter.
Sources: LangChain, "How We Built Our Design Agent," October 27, 2026; langchain-ai/design-agent README and LICENSE on main, reviewed October 28, 2026.