{"repo":"loopgain-ai/loopgain","free":true,"listed":false,"github":"https://github.com/loopgain-ai/loopgain","clone":"git clone https://github.com/loopgain-ai/loopgain.git","description":"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, and Claude Agent SDK; raw API for custom stacks.","language":"Python","stars":123,"topics":["agent-orchestration","agentic","agentic-ai","ai-agents","anthropic","autogen","claude","control-theory","crewai","divergence-detection"],"license":"Apache-2.0","category":"ai-agents","readme_excerpt":"LoopGain An open-source cost controller for AI agent loops. AI agent loops waste time and money when they don't know when to stop. LoopGain measures the loop in real time and stops it the moment it has actually converged — and rolls back before it degrades — instead of running to a fixed max iterations cap. Benchmark — 2,000 paired trials across 10 workload cells (run it yourself): - 92.8% less API spend than max iter=20 — $27.05 → $1.94 in total benchmark spend - 15× faster — median wall-clock per trial 30.9s → 2.1s - Quality preserved, not traded for speed — judge win-rate 0.50–0.63 on natural-distribution workloads (W1–W4, CI excluding null on most cells), 0.92–0.95 on engineered-failure workloads (W5); 0.678 weighted preference across 1,800 judge comparisons - Zero of six kill criteria fired (all six pre-registered with thresholds before the run) Honest limits, up front: LoopGain detects convergence, not correctness — it knows when more iterations won't help, not whether the answer is right, and it's only as good as the verifier behind your error signal. The full list of what it can't do → Home: loopgain.ai Works for any iterative AI workflow with a measurable error signal — verify-revise loops, refinement passes, tool-use retry chains, RAG with self-correction, code-gen with linter feedback, multi-step reasoning loops. Pre-built adapters for LangGraph, CrewAI, AutoGen, LangChain, OpenAI Agents SDK, and Claude Agent SDK ; drop-in via the raw API for any custom stack. Pure","default_branch":null,"files":null,"tree":[],"storefront":"/r/loopgain-ai","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/loopgain-ai/loopgain/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}