Stanford CS146S: How always-on agents work
@leerob
Lee Robinson, speaking from the team behind Grok Bot, takes a Stanford class from the week-one harness (a model calling tools in a loop, which dies when you close the laptop) to an agent that keeps working for days. The architecture is a thick server and a thin client joined by a single send_to_user tool: the agent loop runs as a durable workflow on Temporal, so a crash resumes at step three instead of replaying from step one, and it borrows a Firecracker VM that is snapshotted and put to sleep between jobs because “there’s not enough computers in the world” to keep one running for everyone. Most of the talk is context engineering: tool search instead of every schema in the prompt, sub-agents so the main conversation stays sparse, compaction while the prompt cache is still warm, and memory kept in three layers (core facts, dated logs, and scratch notes meant to expire). He is candid about what isn’t solved. Prompt injection from untrusted email is still open, the line between helpful and annoying proactivity isn’t drawn yet, and he names Moltbook and the Hugging Face incident as the ways multi-agent systems go wrong. His sharpest question is one the field has no answer to: how do you evaluate an agent that runs for a month when a new model ships every month?