Ng's Three Loops for Building 0-to-1 Products With Agents
- Source
- x.com
- Publisher
- Andrew Ng
- Date
“Loop engineering” is a hot buzzphrase after mentions of it by Boris Cherny (Claude Code’s creator) and Peter Steinberger (OpenClaw's creator) went viral on social media. Loops are now a key part of how we get AI agents to iterate at length to build software. In this letter, I’d like to share my 3 key loops, shown in the image below, for building 0-to-1 products. These loops guide not just how I build software, but also how I decide what software to build. Agentic coding loop: Given a product specification and optionally a set of evals (that is, a dataset against which to measure performance), we can have an AI agent write code, test its work, and keep iterating until the code is bug-free and meets its specification. This idea of closing the loop took off around the end of last year, and it has been a game changer in enabling coding agents to work longer productively without human intervention. For example, over the weekend, I was building an app for my daughter to practice typing, and my coding agent could easily work for around an hour, using a web browser to check what it had built multiple times before getting back to me, without needing my intervention. The engineering loop…

Context
Coding agents can now check their own work against a specification, and Andrew Ng argues that this frees developers from bug hunting for product decisions an cannot make. In a June 2026 letter, Ng describes three loops he uses to build new products from scratch. In the fastest, an agent writes code, tests it and repeats until the code meets a specification and, optionally, a set of (a dataset used to measure performance). Ng says this cycle can produce a new version every few minutes. On a typing app he built for his daughter, his agent worked for about an hour, checking its output in a web browser, before it needed him.
The two slower loops supply what the agent lacks. In the developer feedback loop, which Ng puts at tens of minutes to hours, a person reviews the product and revises the spec. Last year, he writes, developers including himself spent much of that time finding bugs for their agents; now that agents test their own code, the time goes to decisions about features, interface and user flow. The external feedback loop, from friends, alpha testers or A/B tests in production, takes hours to weeks and shapes the developer's vision of the product. Ng's reason for keeping a person in the middle is what he calls a advantage: people know more than the AI about the users and the setting the product must work in, and as long as that holds, someone has to put that knowledge into the spec.
The framework is Ng's account of his own practice, illustrated by one weekend project, and not a measured comparison of ways of working. The letter refers to a diagram of the loops that was not available for this explanation, though the text describes each loop and how they feed one another. Its practical claim concerns engineers: as agents speed up coding, more of them take on part of a product manager's role, and Ng says the hardest part is balancing work on the spec against gathering the user feedback that changes it.
- Agent — A system in which a model repeatedly chooses operations, a harness carries them out, and the results return to the model to inform its next choice.
- eval — A repeatable test for AI quality — a set of tasks plus scoring — used the way software teams use test suites, because model output is too variable to judge by eyeballing.
- Context and context window — Context is the information available for a generation; the context window is the capacity available to hold it.






