In the new world of AI agents,

context is everything

I make sure agents get the right context at the right time, turning OK into amazing

I'm William “Billy” Bratz, a senior software engineer focused on context engineering: what production agents are handed when they answer, and what coding agents know when they write code.

The rule reaches the agent the moment it opens the file it governs, and it corrects course before anything ships.

Measured, not claimed

−65%

Retrieval latency for a live agent, with 100% identical answers.

47% less

Cost per accepted PR when coding agents get domain context: $7.79 down to $4.12.

9 → 0

Blocker and major bugs in coding agent PRs, without vs with domain context.

0 → 6 of 8

Coding agent implementations done to our coding standards. Each rule pops up the moment the agent starts editing a file it applies to.

The problem

Most agent failures are context failures

The model could have done it. It got the context too late, got too much of it, got the wrong piece, or never got the one fact that mattered. Each one has a better fix than a bigger model.

  • Too slow

    Context arrives after the user stopped waiting

    Have it ready before it’s asked for

    I predict the context an agent will need and load it ahead of time, with priority lanes so background loading can’t crowd out a live conversation.

    −65% retrieval latency · identical answers

  • Too much

    Bloat buries the signal and burns money

    Trace every token to its source

    I find out what the model actually receives before cutting anything, so the savings come from real waste instead of guesses.

    99%+ of a runaway request traced to one cause

  • Wrong

    The agent sends the question to the wrong tool

    Never send a question to the wrong tool

    The wrong tool means a confident, wrong answer. I make routing measurable, so any change to a tool, a prompt, or the model can be scored on whether every question still lands in the right place, before a customer finds out.

    routing measurable across every tool

  • Missing

    The one rule or past decision that would have changed the answer

    Deliver knowledge at the moment it applies

    A memory layer that files every rule where it’s needed and hands it to the agent the instant it touches the code that rule covers.

    right rule read first · 95% of runs

Production agents

The right context, at the right moment, at the right cost

A customer-facing agent has a few seconds and a token budget per turn. I'm focused on the layer between the model and the systems it calls: how fast context arrives, how much of it the model carries, and how tools tell the model what they do.

  • Faster retrieval, same answers

    65% faster at the median, with 100% identical output.

  • Context bloat, taken apart

    A runaway token bill turned out to be over 99% inherited conversation history, already there before any tool ran.

  • Measure before you cut

    Forwarding full tool schemas looked expensive. Measured: 0% more input tokens.

  • Tools the model can read

    Output schemas on every tool, plus example questions that test whether an agent picks the right one.

Coding agents

Give a coding agent your team's context, and it writes your team's code

Claude Code can program. It doesn't know why your system is shaped the way it is, which decisions are settled, or which mistakes already hurt you. I built The Vault to tell it, and proved the difference with blind tests on real tickets.

  • Agents with the Vault push back on tickets that ask for something that already exists. Without it, none did.
  • An ontology layer files each rule where it applies. Agents read the right rule before their first edit 95% of the time, vs 76% without it.

With the Vault vs without

+45%

accepted changes

Zero

blocker or major bugs

−47%

cost per accepted change

−29%

time per ticket

Same model, same real tickets, blind judges.

Dogfooding

I use AI to make AI better, and I check its work

Agents review agent code

Every change I push gets two fresh AI reviewers, never a fork of my own session, because a fork already agrees with me.

Blind judges, real review standards

My A/B tests grade agent PRs with blind model judges, scorecards built from 1,277 real human review comments, and two ranking passes in different orders.

The model proposes, code decides

Models extract and judge. Plain code writes the files, checks every citation, and overrules an “approved” verdict when the build is red.

When inefficiencies arise, test and correct

A blind test flagged a workflow step that doubled cost without improving results. Cutting it halved the cost.

Writing

Ideas about context, with the evidence behind them

Open source

Context tools you can run

The Vault

Persistent context for people and coding agents. Sources stay untouched, a nightly compile turns them into linked pages, and each agent session loads the smallest map that fits its task. In blind tests it raised accepted changes 45% and cut cost per accepted change 47%.

Billy's AI Skills

Recursive Language Model plugins for Claude Code and Codex. An agent reasons over sources far bigger than its context window by sending focused questions over chunks, with budgets and dry runs.

Hugo

Context curation for people. A Slack assistant that ranks technical RSS with Claude and posts a short daily digest instead of a firehose.

Also: Neverending Story Pointer, free planning poker, and How Unique Is a GUID?, an interactive probability explainer.

Let's compare notes

Building agents that need better context?

I'm open to remote senior and staff roles in context engineering, agent platforms, and MCP infrastructure, and always up for comparing notes.