Skip to main content

let it loop (LIL)

let it loop (LIL)

Autonomous macro-task orchestration & verification control loop for AI coding agents: 2ms WAL crash durability, source-span AST self-evolution, and deterministic proof gates.

PyPI version CI Matrix GitHub Marketplace Benchmark Python 3.11+ License: MIT

ArchitectureQuickstartMarketplace ActionCrash BenchmarkWorker AdaptersCookbook


The LetItLoop Tripartite Ecosystem

LetItLoop solves the central failure mode of autonomous AI coding agents: the lack of deterministic verification, uncatchable mid-task SIGKILL crashes, and destructive whole-file rewrites.

graph TD
    subgraph "The Tripartite Ecosystem"
        LL["<b>letitloop</b> (Core Engine)<br/>Deterministic WAL plumbing, AST node splicer and FastSandbox"]
        LLA["<b>letitloop-action</b> (Marketplace)<br/>Drop-in CI gate signing proof bundles on Pull Requests"]
        ADB["<b>agent-durability-bench</b> (DCP-1.0)<br/>Open benchmark measuring agent recovery under SIGKILL faults"]
    end

    LL -.->|"bridges to"| ADB
    LL -.->|"scaffolds"| LLA
  1. letitloop: The core engine providing sub-2ms Write-Ahead Logging (WAL) state journals, source-span AST node splicing (0% comment loss), in-memory Zero-Copy fast sandboxing, and deterministic verification gates.
  2. letitloop-action: Standalone GitHub Action for CI that validates AI pull requests, enforces strict AST signatures, and posts machine-verifiable proof bundles directly to PR comments.
  3. agent-durability-bench: An open benchmark suite implementing Durability Challenge Protocol 1.0 (DCP-1.0) with zero-API synthetic simulation to measure how well agents recover from uncatchable SIGKILL crashes.

Key Capabilities

  • Source-Span AST Node Splicer: Replaces targeted functions and class methods with surgical precision. 0% Comment Loss: Guarantees module docstrings, file comments, licensing headers, and class indentation are never stripped or altered.
  • In-Memory Fast Sandbox: Zero-Copy sys.modules evaluation and Windows Job Object containment that verifies code hypotheses in-memory before writing anything to disk.
  • Fault-Tolerant WAL Supervisor Loop: State journal with WAL (Write-Ahead Logging), crash recovery, atomic Win32/POSIX file locking, and bounded 3-strike retries with strategy mutation.
  • Cognitive Feasibility Gate & Multi-Source Research: Deliberates whether a refactor is safe to perform autonomously or requires background research across arXiv, GitHub, and DuckDuckGo.
  • Human-in-the-Loop Proposal Ledger: Automatically stages deferred, high-risk architectural proposals as structured markdown artifacts (PROP-*.md) for human review rather than executing unverified mutations.
  • Zero-Trust Verification Engine: Deterministic acceptance check kinds (AST syntax parsers, command exit-code assertions, regex matchers, file validators, size bounds, and undeclared output detectors).
  • 12 Pluggable Worker Adapters: Native interfaces for Claude Code, OpenAI Codex, Google Antigravity (agy), OpenCode, Hermes Agent, Cline, Aider, Docker Sandboxes, Local LLMs (Ollama/vLLM), Omniroute gateways, local scripts, and direct LLMs.
  • Native Model Context Protocol (MCP) Server & Client: 8 stdio JSON-RPC tools connecting directly with Claude Code, OpenAI Codex, Cursor, Google Antigravity, and Hermes Agent.
  • Cross-Platform Process Orphan Guard: Windows Job Objects (win32job) and POSIX session process-group containment ensuring complete cleanup of child/grandchild processes.
  • Prometheus Observability & Signed Webhooks: Native Prometheus metrics exporter, lifecycle event bus, SSE streaming, and HMAC-SHA256 signed webhook dispatcher.

Quickstart

1. Installation

# Install letitloop core engine
pip install letitloop

# Or install with all development and worker dependencies
pip install "letitloop[dev]"

2. Basic CLI Usage

# Propose a contract DAG from a natural language objective
lil propose "Build a rate limiter middleware with unit tests" --run

# Bridge to the agent durability benchmark
lil bench --steps 5

# Scaffold a production GitHub Action PR verification workflow
lil action --init

# Inspect live supervisor status, WAL journal, and active checkpoints
lil status

# Run deterministic reconciliation audit across workspace files
lil reconcile <goal_id>

Supported Worker Adapters & Gateways

Worker Adapter Identifier Description Tier
Google Antigravity CLI antigravity-cli Invokes the official agy agent runner safely Tier-1 (Core)
Claude Code CLI claude-code Autonomous task execution via Claude Code CLI Tier-1 (Core)
OpenAI Codex CLI codex Autonomous task execution via OpenAI Codex CLI Tier-1 (Core)
Mock Worker mock Deterministic simulation worker for CI and offline tests Tier-1 (Core)
OpenCode CLI opencode Autonomous execution via OpenCode agent CLI Tier-2 (Contrib)
Hermes Agent CLI hermes Autonomous execution via Nous Research Hermes agent CLI Tier-2 (Contrib)
Cline CLI cline Headless execution via Cline autonomous coding runner Tier-2 (Contrib)
Aider Pair Programmer aider Pair programming execution via Aider CLI Tier-2 (Contrib)
Docker Sandbox Worker docker Isolated execution inside container runtime with workspace scoping Tier-2 (Contrib)
Local LLM Tool Caller local-tool Local tool-calling model adapter for offline Ollama/vLLM loops Tier-2 (Contrib)
Omniroute Gateway omniroute Multi-model fallback routing through local/remote gateways Tier-2 (Contrib)
Script Worker script Executes local shell/Python automation scripts with env isolation Tier-2 (Contrib)
Direct LLM APIs direct In-process calls to Gemini, OpenAI, Anthropic, DeepSeek, or Ollama Tier-2 (Contrib)

Model Context Protocol (MCP) Integration

LetItLoop runs natively as an MCP server providing 8 JSON-RPC tools to AI agent runners:

{
  "mcpServers": {
    "letitloop": {
      "command": "letitloop-mcp",
      "env": {
        "WORKER_MODEL": "gemini:gemini-3.7-flash",
        "QC_MODEL": "gemini:gemini-3.1-pro"
      }
    }
  }
}

Add to Claude Code

claude mcp add letitloop -- python -m orchestrator.mcp_server

Recipes & Cookbooks

The recipes/ cookbook provides end-to-end, schema-validated walkthroughs:

Recipe Focus
01 - Legacy Codebase Refactor Refactor under pytest + ruff acceptance gates with scope fencing and bounded retries
02 - FastAPI CRUD Generator Feature decomposition into a 4-contract DAG chained with depends_on
03 - Offline Local LLM Loop Zero-cloud-key runs via Ollama (local-tool) and the docker sandbox adapter
04 - Multi-Agent QC Audit Multi-lens quality plane: panels, arbitration, budgets, and quality_spec

Validate all embedded example contracts anytime with pytest tests/test_recipes.py -q.


Living Architecture Decision Records (ADRs)

Following the Michael Nygard ADR convention, all core design invariants and architectural decisions are codified:

ADR Focus Status
ADR-0001 Write-Ahead Logging (WAL) & Zero-State Recovery accepted
ADR-0002 Deterministic AST, Regex & Exit-Code Verification Gates accepted
ADR-0003 Zero-API-Key Headless Agent CLI Wrapper Failovers accepted
ADR-0004 Format-Aware Acceptance Check & Markdown Injection accepted

Security & Sandboxing Architecture

letitloop operates under a zero-trust execution model:

  • Redaction Firewall: Automatic masking of PATs, OAuth keys, AWS credentials, GCP tokens, and PEM private keys.
  • Environment Scrubbing: Sensitive parent environment variables are stripped prior to worker execution.
  • Scope Checking: Userland filesystem snapshot diffing (scope.py) enforcing directory bounds and declared output paths.
  • Process Isolation: Process tree containment with Windows Job Objects (JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE) and POSIX session leadership.

License

Distributed under the MIT License. See LICENSE for more details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

letitloop-0.2.0.tar.gz (469.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

letitloop-0.2.0-py3-none-any.whl (374.4 kB view details)

Uploaded Python 3

File details

Details for the file letitloop-0.2.0.tar.gz.

File metadata

  • Download URL: letitloop-0.2.0.tar.gz
  • Upload date:
  • Size: 469.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for letitloop-0.2.0.tar.gz
Algorithm Hash digest
SHA256 524e43b1f049a62e90611db11b13b93de9709705552febad5f0d4724b0f014c9
MD5 10cae2943e98183c6bf7262c32b93024
BLAKE2b-256 09d4431d180c7056ed8d6ef8e603b00d87ec12707385cd1155f21038b83fc60f

See more details on using hashes here.

Provenance

The following attestation bundles were made for letitloop-0.2.0.tar.gz:

Publisher: release-pypi.yml on sdageltc/letitloop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file letitloop-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: letitloop-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 374.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for letitloop-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c69a78904a0081332fd6d880c77af66aeae38161849c2a821a2e622d593b66df
MD5 f04d159779d28d6ebbbd5d77d94ffdf8
BLAKE2b-256 0bd5f067aeb2ea2611907b3f5b285908b7b335f788892e8ede1718d185bf99a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for letitloop-0.2.0-py3-none-any.whl:

Publisher: release-pypi.yml on sdageltc/letitloop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page