Wink Pings

Karpathy Spent Half a Year at Anthropic. Almost No One Has Opened These Two Resources.

During Andrej Karpathy's six months at Anthropic, a knowledge-graph cookbook and an autoresearch loop have already been made public. The former gives the agent a memory; the latter lets it run experiments on its own. This breaks down the loop and graph designs behind them, and why building only a loop is not enough.

Andrej Karpathy spent half a year at Anthropic. If you want to reproduce that kind of loop, two things are already public—and almost no one has opened them.

One is Anthropic's cookbook: using Claude to turn documents into a knowledge graph—extracting entities and relationships so the model can reason along those relationships. The other is Karpathy's autoresearch loop: it ran 700 experiments in two days and found 20 optimizations, with no one watching the whole time.

The former gives the agent a memory it can reason with; the latter lets it keep working while you sleep. Hanako plugged the graph into their own stack, and the first response changed: Claude no longer gave a standard answer; instead, it worked through the question.

Behind these two resources is the same design approach. Hanako's long article “Loops and Graphs” breaks it down.

A loop makes one unit of work correct. A graph decides which units exist and in what order.

The core of a loop is checks. Without a check that can fail, you just have a scheduler. Checks need to be written as something a program can evaluate: the test suite exits with code 0, every claim has a source line, and the diff touches only the files in the plan. But “looks good,” “the model is confident,” and “no errors were reported” do not count as checks. No errors does not equal correct.

A graph is the shape of the work: nodes are units of work, and edges are dependencies. A common mistake is treating “then” as an edge. For example, “summarize the file, then check the weather”: checking the weather does not consume the summary, so there is no edge between them. If you cannot name the variable that crosses from one to the other, that edge is wasted.

The dimension you split along also matters. Split by folder, and four workers will re-review the same set of files; split by impact scope, and each worker sees things the others cannot see.

There are only four kinds of nodes: splitter, worker, code node, and gate. The splitter splits; the worker does the work; the code node runs deterministic code; the gate decides whether to let work through. If a transformation can be written as code, use code—merging, deduplication, and sorting do not need a model. The model should do only the parts that require reasoning.

Loops and graphs are nested, not an either-or choice. Loops run inside nodes; graphs run between nodes. A graph without loops will generate a pile of unverified results in parallel; a loop without a graph only does one step very well, but no one has designed the entire queue.

A graph that can evolve has two return paths. The short one is the correction edge: a unit is rejected by a gate, and the current failure is fixed. The long one is the learning edge: accepted results become constraints and flow back to the splitter, affecting all future splits. Most people build only the first, so the system quickly gets fast but never gets smarter.

When returning work, return only the failing unit, not the entire batch. If one of four slices fails, sending the whole batch back means three correct slices get rewritten—and the rewritten versions are merely different, not better. Include scope: this time fix only this one file; do not touch the other slices. If correction fails three times in a row, the problem is the plan, not the unit.

A gate should not open or close based on confidence. Confidence is the one input the model can influence. What matters is blast radius: how hard it is to undo if a change is wrong. Let through first what is reversible and low-impact; check more heavily what has broad impact but is reversible; for work that writes production data, moves money, or runs migrations—irreversible work—no matter how high the score, you should not open the gate.

Where do humans step in? At the single point with the highest consequence and lowest reversibility: approving a merge, choosing which fixes go live. Not reviewing intermediate outputs, not confirming every step. Once a human stands in the middle of the graph, they become the slowest node, and the entire system runs only as fast as reading speed.

At the end of the article, Hanako leaves three lines: measure the path, not just the answer; a verdict that does not change the next action is just a report; a failure that does not become a permanent constraint will be encountered again.

Most people keep tuning a loop and call it a system. Those who have drawn a graph are running an entire fleet.

If you want to see a more complete five-layer breakdown, the article is at agent-layers.vercel.app.

发布时间: 2026-11-24 15:09