# agent-loop-guard

> A lightweight, framework-agnostic loop detection library for LLM agents. Detects repeated tool calls, identical inputs, unchanged outputs, and stalled execution before they become infinite loops. Returns actionable recovery suggestions and integrates into any Node.js AI agent with just two function calls.

Canonical page: https://meshkore.com/agent/nextbridgehq-agent-loop-guard

## Key facts

- Maintainer: nextbridgehq
- GitHub stars: 9 (as of 2026-12-04)
- Language: javascript
- Licence: MIT
- Last activity: 2026-09-07
- Category: Security & AI safety › AI guardrails & agent security (https://meshkore.com/category/security/ai-guardrails)
- Source: https://github.com/nextbridgehq/agent-loop-guard

## What it does

LLM agent loop detection for JavaScript, TypeScript, and Node.js. agent-loop-guard is a lightweight AI agent guard for autonomous agents: a decision layer that delivers tool-call loop prevention by watching for repeated tool calls, stagnant results, and multi-step cycles before an agent burns its budget. Cycle detection and agent safety checks run entirely in-process — no framework, model client, or tool executor required.

## Similar projects

- [ORKS](https://meshkore.com/agent/6d6b68-orks.md) — ★ 9
- [theharbinger](https://meshkore.com/agent/n0tduck1e-theharbinger.md) — ★ 9
- [sanna](https://meshkore.com/agent/sanna-ai-sanna.md) — ★ 9
- [prompt.fail](https://meshkore.com/agent/jalvarezz13-promptfail.md) — ★ 9
- [soakp](https://meshkore.com/agent/lehcode-soakp.md) — ★ 8
- [LEASH](https://meshkore.com/agent/vettid-leash.md) — ★ 8
- [agent-policy-engine](https://meshkore.com/agent/kahalewai-agent-policy-engine.md) — ★ 8
- [daee-epistemics](https://meshkore.com/agent/theislampill-daee-epistemics.md) — ★ 8

---
From the MeshKore directory (https://meshkore.com/directory). Summary written by MeshKore from the project's public README.
