Writing

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.

Featured
AI EngineeringAgentsLearning

Andrew Ng is right about coding agents. Here's the fastest way to build the mental model he's talking about.

Ng's AI Engineering Skills Map names 'using coding agents' as one of four core skills — and says it requires a good mental model of how agents work. You can borrow that model from blog posts, or you can build it by building the agent. We argue for building.

· 7 min read
Claude CodeGrokDeepSeek

Claude Code vs. Grok Build vs. DeepSeek Harness: the third data point

We read a third production coding agent at the source level — DeepSeek Harness, a 219-package plugin system with no terminal UI, event-sourced sessions, and a fail-closed sandbox. Three teams, three architectures — and where all three agree, you're looking at load-bearing engineering.

· 15 min read
AgentsWeb SearchRAG

How to give your agent web search (without building a scraper)

A model's knowledge stops at its training cutoff — web search closes the gap. The two ways to wire it up through a gateway: provider-agnostic search tools that work with any model, and native tools from Anthropic, OpenAI, Google and xAI. Code, citations, cost, and how to choose.

· 9 min read
Four stacked bars showing an agent's context growing each turn, with the large cached prefix dimmed and only a small new segment highlighted
AgentsCostPrompt Caching

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.

· 9 min read
Claude CodeGrokAgents

Grok Build vs. Claude Code: two production coding agents, opposite engineering bets

A source-level walk through two shipping AI coding agents — xAI's Rust-based Grok Build and Anthropic's TypeScript Claude Code. Same job, opposite instincts on language, UI, sandbox, sessions and editing — and, underneath, the same machine: one loop, one tool contract, compaction at 85%.

· 14 min read
OpenAIResponses APIAgents

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.

· 12 min read
AgentsTool DesignEvals

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.

· 7 min read
More articles

Six tools and a lot of caution: reading Claude Code's tool layer

Your agent's six tools are 600 lines. Claude Code's are thousands — and the whole difference is edge cases somebody watched break. Fail-closed defaults, an A/B test they ran and reverted, curly quotes, why Bash(python:*) is an off switch, and the tool list that's sorted for the cache.

Claude CodeTool DesignAgentsPermissions
15 min

Sandboxing: where your agent's code is allowed to run

Letting the model write code is the highest-leverage tool you can give an agent — twelve tool calls collapse into one. It also turns text your agent read into a program running in your process. Thirty lines of node:vm, and the one idea that survives every upgrade to real isolation.

AgentsSecuritySandboxingPrompt Injection
11 min

Reading the real Claude Code: six files that teach you the REPL

Claude Code's REPL is 5,005 lines. You should not read it. Here are six small files — streaming, slash commands, abort trees, cancellation, and the cost meter — that carry the actual lessons, with the code inline and every line linked.

Claude CodeTypeScriptCLIStreaming
14 min

Durable execution: how an agent survives its own crash

Your agent is a for-loop holding all its state in a local variable. Kill the process at tool call six and the run is gone — or worse, the retry re-sends the email. Workflows, steps, and replay: the pattern behind DBOS, Temporal, Restate and the rest.

Durable ExecutionAgentsDBOSTemporal
12 min

Where did the frontend jobs go? A year of Jobinja listings, measured

Frontend postings on Jobinja fell 30% in one year — three times faster than their category and seven times faster than the market — while AI postings grew 41%. Here's the data, the method, and the caveats.

Job marketFrontendData analysisIran tech
6 min

The OpenAI Agents SDK: what it actually does for you

You can write the agent loop yourself in forty lines. So what does OpenAI's Agents SDK buy you? A clear-eyed tour of agents, tools, handoffs, guardrails, sessions, and tracing — and exactly which hand-rolled problem each one replaces.

OpenAIAgents SDKAgentsTools
9 min

What a $500K–$850K evals role actually asks for

Anthropic is hiring a Research Engineer for Model Evaluations at $500K–$850K. The qualifications aren't exotic — they're the fundamentals of eval engineering, done at scale. Here's the exact list, decoded, and how to build toward every line of it.

EvalsCareersAI EngineeringAnthropic
8 min

Context management: keeping an agent sharp over a long session

A finite context window is the one resource every long-running agent runs out of. The four moves that keep it from degrading — write, select, compress, isolate — and how to know which one a symptom is asking for.

Context ManagementAgentsMemorySub-agents
9 min

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.

AgentsAgent LoopPythonTypeScript
8 min

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.

Context EngineeringPrompt EngineeringAgentsTokens
9 min

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.

EvalsTestingAgentsLLM-as-judge
8 min

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.