agent-architecture-lens
Agent Architecture Lens
The ReAct loop (reason, act, observe, repeat) is the atom of every agent and is correct until the task outgrows it. A loop is a graph with one node and one edge back to itself. Architecture follows the shape and duration of the task, never the elegance of the diagram.
Two leitwörter anchor every pass; state them by name as you review. A graph is not an upgrade: structure answers a requirement the task actually has, and without one the loop stays. The ledger, not the transcript: progress that must survive anything lives in a durable artifact, never in the message history the model hopes to remember.
The six signals
Before recommending structure, state which of the six signals fire, by number, with evidence:
- State exceeds one context window.
- The run must survive crashes: losing it costs minutes of work, real spend, or a waiting user.
- Human approval is required mid-run, possibly hours later.
- The workflow has parallel branches that are genuinely independent.
- Multiple models or agents must coordinate, with different models, tools, or permissions per step.
- Execution must be replayable and auditable after the fact.
Zero signals: "No signal fires; this stays a loop. A graph is not an upgrade." Stop there. Otherwise each fired signal names the mechanism the design owes, and only the checks for those mechanisms apply.