explaingit

thu-nmrc/openloop

Analysis updated 2026-05-18

55PythonAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

A Python toolkit that wraps any AI coding agent in a monitored loop: run, check, fix, verify, and repeat until the project actually works.

Mindmap

mindmap
  root((OpenLoop))
    What it does
      Monitors agent loops
      Run fix verify repeat
    Tech stack
      Python
      CLI
      JSON config
    Use cases
      Stuck bug fixing
      Long running tasks
    Guardrails
      Circuit breaker
      Baseline checks
      Timeouts
    Audience
      Developers
      Agent builders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Wrap a coding agent so it stops only when automated checks actually pass

USE CASE 2

Track a long-running agent task with logs and a heartbeat status file

USE CASE 3

Add a circuit breaker so an agent does not loop forever on a stuck bug

USE CASE 4

Compare an agent's fix against a performance baseline before accepting it

What is it built with?

PythonCLIJSON config

How does it compare?

thu-nmrc/openloopbhartiyashesh/purelymailcalendarequality-machine/claude-p
Stars555555
LanguagePythonPythonPython
Setup difficultymoderatemoderateeasy
Complexity3/54/53/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires Python 3.11+ and a JSON config file describing each loop stage.

Use freely for any purpose, including commercial use, as long as you keep copyright and license notices.

In plain English

OpenLoop is a small Python toolkit for wrapping any AI agent in a monitored feedback loop. The idea is that instead of telling an agent to keep trying until something works, you set up a workspace that tracks exactly what the agent is doing, when each step succeeds or fails, and when it should stop. The core loop goes through a fixed sequence: run the project to see if it works, scan for bugs, attempt a fix via any shell command or agent, verify the result with automated checks, optionally compare against a performance baseline, then write a summary and either continue or stop. All of these steps are configured in a single JSON file where you specify what command to run at each stage. A key design choice is that OpenLoop does not tie you to any specific AI model or editor. The fix and improve steps are just shell commands, so you can plug in any agent that runs from a terminal. Each command gets its own log file, and the current state, including which process is running, how far along it is, and what went wrong last, is always written to a compact JSON file called a heartbeat. The toolkit also includes guardrails to prevent runaway behavior: timeouts, stall detection, a circuit breaker that marks the task as blocked if too many consecutive steps fail, and baseline checks that require a measurable score to stay above a threshold before the loop treats anything as done. The project ships with a CLI that handles initializing a workspace, validating the configuration, running the loop, and printing current status. It is in alpha and works on Python 3.11 or later.

Copy-paste prompts

Prompt 1
Set up an OpenLoop workspace in this repo and configure the fix step to run my test suite
Prompt 2
Explain what OpenLoop's heartbeat file tracks and how to read it
Prompt 3
Write an OpenLoop config that stops after 10 consecutive failed attempts
Prompt 4
Show me how to plug my own coding agent into OpenLoop's improve step

Frequently asked questions

What is openloop?

A Python toolkit that wraps any AI coding agent in a monitored loop: run, check, fix, verify, and repeat until the project actually works.

What language is openloop written in?

Mainly Python. The stack also includes Python, CLI, JSON config.

What license does openloop use?

Use freely for any purpose, including commercial use, as long as you keep copyright and license notices.

How hard is openloop to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is openloop for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.