In February 2025, Andrej Karpathy coined the term "vibe coding".

This February, he popularized "agentic engineering."

In this post I will share some of what I've learned about building agents at Meshi over the past year.

If you haven't already, I would highly recommend reading Anthropic's posts on agent engineering to get up to speed on some of the concepts I'll be discussing.

But first, a moment of silence for the world we are leaving behind: writing actual code, resolving merge conflicts by hand, spending days to resolve a single bug...

...

The era of micromanaging and owning every diff is sadly fading for the many of us developers who involuntarily desire to stay economically relevant. The capability of the latest frontier AI models is such that they can write their own harnesses, tests, evals, and even whole CI/CD pipelines if you wanted them to. 10x faster than you, and probably better.

Unless every line of code truly matters for your use case, time is likely better spent on system design, deciding what "good" means, and proving that the agent you build is actually "good." A swarm of superintelligent agents can, in theory, implement any system to address any requirements, but what is the right system, the right requirements?

Vibe coding vs. agentic engineering

It's trivial to build agents that demo well. One-shotting an agent usually works until you have actual users, at which point you find you have no idea whether the agent does what your landing page says it does.

If you want to graduate from vibe coding to agentic engineering, be sure you can clearly define what "better" means for your use case. Preferably in a form that can be verified. This is most of the "human" work now.

For the past year I've been working on an agent (working name: Wingman), whose telos is to be your supergenius buddy that knows everyone and everything about the event you're going to, and for some reason you can only reach via text or whatsapp. Early on we had some promising prototypes, but it was clear reliability was greatly lacking. So, I thought it would be simple to start doing some evals (like Anthropic's Demystifying evals for AI agents) to improve our agent and backend reliability (spoiler: it was not simple).

1. Don't climb the wrong hill

A coding agent will happily climb whatever hill you give it, so a wrong eval is worse than no eval at all.

Suspect when the right answer should be no answer

One of our first forays into evals was testing various search providers for our backend agent. One key workflow we had involved an agent whose sole task was to use search results to identify a person's LinkedIn based on name and employer. In this case, I wanted to make sure the search results themselves were good even before they got to the LLM.

When the person actually had a LinkedIn, the top three providers all performed well and were basically tied. I thought we were off to a great start... but we still kept getting reports of people with the wrong profiles. What's the deal? Turns out, when we looked at real failure cases in prod, the LinkedIn was wrong, because the person wasn't on LinkedIn to begin with! So we added a new eval to search for people who genuinely had no LinkedIn profile at all (I checked). Two of the engines, Exa and Parallel, returned a profile anyway, every single time. Google also did most of the time.

A search API that can't say "I don't know" hands your agent a stranger instead, and we all know how good agents are at not being overly confident. So, we added a step after search whose whole job is to say "no match" (full breakdown).

Suspect your answer key

A year ago, many of our backend processes used LLMs for tasks which could be likely replaced with a smaller specialized model. For example, once we have a list of search results, which one is actually relevant to the specific task at hand? So we ran some experiments training several small models: a logistic regression, two small encoders and a fine-tuned language model. What was odd was that all four got stuck at about the same error rate.

Models with such different architectures rarely agree on anything, so it was suspicious that they all agreed on which answers to get "wrong". The one thing they had in common was our answer key, which had some bad records. Simple mistake in hindsight - we really should have double checked our test data instead of finding that out through ML eval results.

If your answer key is wrong, no model can score past it. Even famous benchmarks have this problem.

Suspect your AI judges

LLM judges look consistent until you actually compare them. We found this out after running an experiment where I had two LLM councils score the same set of match candidates. When comparing both, they agreed barely better than chance.

So which panel was right? To find out, we gave the more generous council a completely random shuffle of candidates. It rated over 80% of them as good matches (turns out LLMs are still very bad at understanding the people behind the profiles, though that's a whole other topic). Those judges would have been happy with almost anything. Now imagine pointing an autoresearch agent at that judge overnight.

Quick tests before you trust an LLM judge: Give it some random test data and make sure it scores badly, in addition to making sure it can tell apart obviously good results from obviously bad ones (full breakdown).

Suspect your sandbox

At one point we were deciding whether to move Wingman to a faster model, and how much reasoning effort to give it. When we tested our agent on a "low" reasoning level, we discovered the agent was saying that a user's goal was "locked in" without actually saving anything, about a quarter of the time. At first I thought it was the "low" reasoning setting.

Turns out, a line of code for our test sandbox had blocked the tool (instead of mocking it) that saves goals in the first place! When we tested on our real deployed runtime with the real tool, the model saved the goal every single time. The "lying" was a product of our test setup, not the fault of "low" reasoning.

The real runtime also turned up a problem that was real. At the lowest reasoning setting, about one in seven tool calls came back malformed, even though the replies themselves read perfectly well. One notch up, the problem almost went away.

If your test setup is different from production, you're mostly testing your test setup.

The agentic engineering loop: 1. Define the hill (real and synthetic scenarios, including cases where the right answer is no answer). 2. Suspect the hill (give judges a random shuffle, check labels when different models get stuck). 3. Let agents climb (run evals in the deployed runtime with the real tools). 4. Weigh the trade-offs (quality, what the user waits for, and cost together).

2. Now climb

Everything so far has been about not fooling yourself. The fun part is what’s possible once you trust the evals.

Replacing the big models

Remember the small ML models we tried training to identify the best search result? After fixing the answer key, two small models cleared the bar. The best was a 150M parameter model that cost ~$8 to train. We put it in front of Gemini to handle the easy cases and pass the uncertain ones to Gemini.

On the test data, it answered in milliseconds, instead of seconds. For identifying the best search result, this setup would cut our Gemini spend by more than half.

Measure what actually matters to the user

The first time we evaluated our response time, we were only measuring the time it took for individual calls to our models. Then we measured how long each reply took across a month’s worth of real text conversations, from message received to reply sent. It took a whopping 47 seconds on average. And a good chunk of that time was spent in the gaps between our timed steps.

Another example: We wanted to use an LLM to rerank the results from our attendee search tool. The top suggestions were nearly twice as good but each search took almost 10 seconds. Too long for a texting conversation.

Before running the eval, we decided on the largest acceptable drop in quality. We tested a model that was up to 25 times cheaper and saw a drop about twice that. Easy decision!

When to do a response time / quality tradeoff eval: You want to measure response time for a full conversation, including delays between model calls. You want to improve quality with reranking but it makes search too slow for texting. You want to evaluate a cheaper model. Before running the eval, decide what quality drop is “good enough.”

Conclusion

Coding agents can climb basically any hill you define for them. Whether that means anything depends on you.

If you’re going to agentically engineer agents, be suspicious of your own evals first and the model second.

They say the models are starting to improve themselves. Somebody still has to decide what “improved” means, for basically most non-STEM applications of these models. We hope that "Somebody" continues to be a human.

Go deeper