AI Jason

I was building loops wrong...

Published 2026-07-13 · Duration 14:07

Summary

The video details the architecture and implementation of 'loops'—autonomous AI systems designed for continuous development and operations. These loops move beyond simple agent prompting by establishing a structured system where an agent can independently decide on work, execute tasks, verify results, and self-improve over time. The core structure involves defining a Loop Contract (Goal, Boundaries, SOP), maintaining State/Logs, utilizing specific Trigger mechanisms, and employing multi-role agents with mandatory verification steps.

Download summary

Key takeaways

  1. The Anatomy of an AI Loop 3:30

    Every internal loop is structured around a markdown file containing the 'Loop Contract' (Goal, Boundaries, SOP), 'State' (current hypothesis/backlogs), and 'Logs' (append-only record). This serves as the living documentation for the system.

  2. Advanced Trigger Mechanisms 6:30

    Beyond standard continuous (`while` loop) or cron job triggers, effective loops often use 'Event-based' (reactive to external events like new emails/incidents) or 'Combo/Workflow' triggers. The latter is highly efficient as it programmatically checks data sources (e.g., Intercom updates) before waking the agent, preventing unnecessary runs.

  3. The Evolve Loop Concept 10:30

    Loops are designed to improve themselves. An 'Evolve Loop' is a dedicated session where the AI analyzes its own past run state, logs, and configuration to suggest improvements—such as optimizing triggers or refining the SOP—making the system self-optimizing.

Technical details

  • Loop Contract Components 240s

    The contract defines three critical elements: 1) The Goal (what success looks like), 2) Boundaries (what the agent can do autonomously vs. what requires human escalation), and 3) Standard Operating Procedures (SOPs).

  • Agent Architecture for High-Stakes Tasks 490s

    For complex tasks, the agent structure is broken down into roles: an Orchestrator (planning/research), multiple Sponsor Agents (isolated work trees for parallel execution), Executors, and a Verifier. The Verifier is crucial for quality assurance, testing results, and attaching evidence to PRs.

  • Verification Systems 540s

    To ensure high-quality output, the process requires verification. Tools like Playwright or CRI are used to allow agents to test work and record video/image evidence, while remote sandboxes (e.g., Crabbox) prevent local resource limitations.

  • Example: React Doctor Loop 280s

    A practical example is the 'react-doctor' loop, which runs an open-source CRI tool on the codebase daily. The loop identifies critical issues and automatically attempts to fix the most severe one, following defined boundaries and verification processes.

Mentioned resources

Channel & topics

Watch on YouTube · Back to latest

This independent, AI-assisted summary is provided for commentary and informational purposes. It may contain errors or omit important context. Please watch the original video for the creator's complete presentation. Video, thumbnail, and related copyrights belong to their respective owners.