Articles on AI engineering
Deep dives on how AI agents actually work — the loop, the tools, the evals, and the architecture decisions real production tools made. No hype, working code.

Prompt caching and what an AI agent actually costs
Your agent resends the entire conversation on every single turn, so cost grows quadratically with steps. Prompt caching fixes most of it — but only if your prefix is stable. Here are the four rules, the mistake that silently triples your bill, and why caching and context trimming pull against each other.
Claude Code vs. Grok CLI: how two production coding agents talk to their models
A source-level comparison of two shipping AI coding agents — which API shape each uses, why Grok speaks OpenAI's wire format on its own servers, and the multi-backend abstraction that lets one client target three APIs.
Chat Completions vs. the Responses API: a practical migration guide
The mental-model shift from messages to items, a field-by-field migration map, tool calling with call_id, conversation state, and how the same code runs through the OpenAI SDK, a gateway, and LangChain.
Most AI agent failures aren't model failures — they're tool design failures
Better models won't fix badly designed tools. Task-oriented tools over raw APIs, fewer tools over more, designing for the model rather than the human, high-signal returns, and evaluating the tool interface itself.
What is an agent loop, really? (It's about 40 lines of code)
Agent frameworks make the loop look complicated. It isn't. Here is the whole thing in Python and TypeScript — the exchange, the stop rule, the step limit, and why writing it yourself changes how you debug everything else.
Context engineering: the highest-leverage skill in AI engineering
The model has no memory — everything it knows on any turn is something you put in the request. How to assemble a system prompt, budget tokens, load project rules, and compact long sessions without losing what matters.
Why your AI agent needs evals (and how to build them in an afternoon)
You never ship an improvement you haven't measured. Golden datasets, deterministic scorers vs LLM-as-judge, negative test cases, and the data flywheel that turns every user correction into a regression test.
Want to build this, not just read about it?
The 12-week mentorship takes you from an empty file to a complete AI coding agent you built yourself.