Awesome Loop Engineering

Design loops, not just prompts.

Build the recurring system around the agent: discover work, delegate it, verify the result, persist state, and decide what happens next.

Verify: gate completion with tests, evals, traces, or review.

Loop Engineering is the practice of designing recurring systems that discover work, delegate it to agents, verify results, persist state, decide next actions, and run again on a cadence, event, or until a verifiable goal is reached.

The engineering stack: prompt, context, and harness engineering improve one agent run; Loop Engineering governs recurring work over time.
509curated entries
15operational patterns
15loop contracts
6runnable templates
8languages

Every reliable loop names the same parts.

The contract turns a recurring prompt habit into a reviewable operating system. Use the JSON schema and 15 validated examples to make each decision explicit.

Loop Contract: objective, trigger, intake, workspace, context, delegation, verification, state, budget, escalation, exit, and next action.
A reviewable specification for recurring agent work.

Verifiable by design

Tests, typechecks, evals, traces, or reviewers decide done. The acting agent never approves itself.

State outside the model

Progress files, issues, checkpoints, and traces survive context resets and the next run.

Budgeted and bounded

Retries, runtime, and concurrency are capped, with a clear path to human judgment.

Evidence moves the loop forward.

A deterministic gate checks the work. The result and its receipts persist outside the model. The next action is retry, escalate, or exit.

Loop Engineering lifecycle: Intake, Delegate, Act, Verify, Persist, Decide; then retry with evidence, escalate to a human, or exit when the goal is met.
One pass of a recurring, stateful, verified loop.

Climb one level at a time.

A reliable Level 3 loop with durable state and deterministic checks is more useful than a Level 5 loop with vague goals.

Loop Maturity Model progressing from manual prompting through scripted retry, scheduled, stateful, self-verifying, multi-agent, and production-supervised loops.
State and deterministic checks form the reliability foundation.
00Manual promptingA human reads state and writes the next prompt.
01Scripted retryA script feeds failures back to an agent.
02Scheduled loopThe agent runs on a cadence and reports findings.
03Stateful loopProgress survives through files, issues, checkpoints, or traces.
04Self-verifying loopDeterministic checks or evaluator agents gate completion.
05Multi-agent loopSpecialists split discovery, implementation, review, and judgment.
06Production-supervised loopObservability, budgets, approvals, rollback, and escalation are first-class.

Find the evidence for your next decision.

Search 509 audited sources by goal, lifecycle stage, artifact type, and evidence class. Every result preserves its curated annotation and links directly to the canonical source.

Loading resource index...

Loading audited resources...

Bring a source or a real loop.

Add a vetted source with a specific annotation, or document a loop you actually run. Both paths have a checklist.

Loop Engineering, answered.

Short answers to the questions people ask first.

What is loop engineering?

Loop Engineering is the practice of designing recurring AI agent and coding-agent systems that discover work, delegate it, verify the result, persist state outside the model, decide what happens next, and run again.

How is it different from prompt, context, and harness engineering?

Prompt, context, and harness engineering improve one agent run. Loop Engineering governs how agent work repeats, verifies, persists state, and escalates over time.

When should you use an agent loop?

Use a loop when work recurs and a deterministic check can decide success. If a task is one-off, or done depends only on human judgment, a single agent run is usually enough.

What belongs in a loop contract?

Objective, trigger, intake, workspace, context, delegation, a verification gate, durable state, budget, escalation, and an exit condition.

Which runtimes can run agent loops?

The same loop can run as a Claude Code loop or scheduled task, a Codex automation, a GitHub agentic workflow, a shell or cron wrapper, or a durable-execution runtime.