Latest / AI & agents

LoopGain

github.com · Package · Active

Cost controller that stops AI agent loops once they converge

Visit github.com ↗Share

Stars
127
Forks
11
Open issues
1
Last commit
Releases
1
Found
4 months ago

GitHub figures as of . They are context, not a ranking.

LoopGain is an open-source Python controller for AI agent loops that stops a loop once it has converged and rolls back to the best result if quality falls. It works with several agent frameworks, including LangGraph, CrewAI and AutoGen. It suits teams who want to limit spending on agent loops without a fixed iteration cap.

Repository description on GitHub: “An open-source cost controller for AI agent loops — stops a loop when it's actually converged and rolls back before it degrades, instead of running to a fixed max_iterations cap. Real-time loop-gain (Aβ) bands + best-so-far rollback. Adapters for LangGraph, CrewAI, AutoGen, LangChain, OpenAI Agents,”

What it does

  • Measures agent loops in real time and stops them once they converge
  • Rolls back to the best result if quality falls
  • Works with LangGraph, CrewAI and AutoGen
  • Python controller that replaces a fixed max_iterations cap

Good for

  • Stop an agent refinement loop once more iterations stop helping
  • Cut API spend on agent loops without a fixed iteration cap
  • Roll back an agent loop to its best result

Suits: Teams limiting spending on AI agent loops.

Worth knowing: Detects convergence, not correctness, and is only as good as the verifier behind it.

What you can try

Read the README on GitHub and install from source.

Install

pip install loopgain

Confirmed against the package registry. Read the project’s own instructions before running anything.

Links go to third-party sites KipFound does not control. KipFound has not installed, audited or tested this software.

Found vs. released

Kip first saw LoopGain on , when fitz2882 posted it to Show HN. The oldest published release on GitHub is v0.6.5, dated . Its first tagged release came 77 days after it was found.

Day-7 and day-30 updates

Day 7 no new release

  • No tagged release was published in the first 7 days after it was found (GitHub release dates).
  • Show HN discussion at check time: 31 points, 14 comments. API record

Checked , later than day 7 because tracking began after.

Day 30 no new release

  • No tagged release was published in the first 30 days after it was found (GitHub release dates).
  • Show HN discussion at check time: 31 points, 14 comments. API record

Checked , later than day 30 because tracking began after.

Release timeline every entry links to its source

  1. Repository created on GitHub: loopgain-ai/loopgain
  2. Found: fitz2882 posted it to Show HN. Show HN
  3. Release v0.6.5
  4. Day-7 check recorded by Kip (details)
  5. Day-30 check recorded by Kip (details)

Quick answers

When was LoopGain released?
Its first tagged release on GitHub is dated 30 Sep 2026. Kip found it on Show HN on 15 Jul 2026.
Is LoopGain open source?
Its source is public on GitHub at loopgain-ai/loopgain under the Apache-2.0 licence.
What does LoopGain run on?
Library.
Is LoopGain free?
It is open source, so the code is free to read and run; check the licence for terms.
Is LoopGain still maintained?
Yes. It had a commit or release in the last 90 days as of the latest check.

Provenance

SourceRecordLast checked
Show HNlisting
official API record
GitHub repositoryloopgain-ai/loopgain
REST API record
GitHub Releasesrelease list
REST API record

Stable ID hn-48919562. Summary written by KipFound’s editor.

Share

Similar tools

More in AI & agents

Made this, or spotted a mistake? Ask for a correction or removal. No account or email address needed.