Loops vs Graphs: Why Agent Architecture Needs Both (and a Compiler Between Them)
The False Dichotomy The agent ecosystem is split into two camps: Camp Loops (Boris Cherny, OpenAI Agents SDK, LangGraph): > "Agents are loops. Plan → act → observe → repeat. The loop is the atomic unit." Camp Graphs (Steve Yegge, Gas Town, LangGraph DAGs, CrewAI): > "Agents are graphs. Nodes are agents/tools. Edges are handoffs. The graph is the architecture." Both are right. Both are incomplete. What Loops Get Right Loops capture temporal behavior — the iterative, self-correcting nature of agent work: - Replanning on failure (AdaPlanner, ReAct) - Budget enforcement (token caps, step limits, cost ceilings) - Verification gates (process reward models, extraction floors) - Learning loops (feedback → lessons → advisory → suppress) A loop is a control structure. It says: keep going until condition X. What Graphs Get Right Graphs capture structural composition — how capabilities connect: - Handoffs (peer-to-peer control transfer) - Parallel execution (swarms, polecats, fan-out/fan-in) - Supervision trees (Erlang/OTP-style restart strategies) - Provenance (who called whom, with what context) A graph is a dependency structure. It says: A feeds B, B feeds C, C can restart A. The Missing Layer: A Compiler Between Repos and Runtime Here's what neither camp addresses: Where do the nodes come from? Today: - You find a repo on GitHub - You hope it implements what it claims - You wire it into your graph/loop - You pray it works There's no verification layer. No SBOM. No attestation. No provenance. HURCULES: The Compiler Between Repos and Runtime HURCULES sits between the repository and the agent runtime: GitHub Repository → HURCULES → Verified Capability Package → Agent Runtime (Loop or Graph) It doesn't care if your runtime is a loop or a graph. It produces verified capabilities that work in either. What HURCULES Compiles | Input | Output | |-------------------------------|---------------------------------------------------| | Raw repo (any language) | Deterministic map (file tr