This is a persistent state manager for long-running agent workflows that you install in two parts: an MCP server for storage and a skill file that teaches the agent when to compact memory. It monitors word counts to trigger compression cycles and includes a self-healing strategy to break infinite loops when agents get stuck. You'd reach for this when working with smaller models that have limited context windows but need to maintain state across extended tasks. The server exposes standard memory operations through stdio transport, while the skill instructions live in SKILL.md and orchestrate when to save, retrieve, and compress context. Think of it as giving any model the persistent memory behavior of larger ones without requiring massive context.
The industry-standard persistent memory and state manager for long-running agentic workflows.
Enable any AI model—especially smaller ones with limited context windows—to function with the persistence of high-end models. This project works as a two-part ecosystem: an MCP Server for state management and an Agent Skill for orchestration.
For the best experience, you must install both the orchestration skill and the MCP server.
Install instructions into your AI agent (Claude Code, Cursor, etc.):
npx skills add meharajM/agent-loop-mcp --yes
Add the following to your `mcp_config.json`:
{
"mcpServers": {
"agent-loop": {
"command": "npx",
"args": ["-y", "@mhrj/mcp-agent-loop"]
}
}
}
Unlike passive memory tools, this is an Active State Manager. It monitors word counts to trigger compaction cycles and enforces a "Self-Healing Strategy" on every failure, preventing AI agents from getting stuck in mindless loops.
src/: TypeScript source for the MCP server.skills/agentic-loop/SKILL.md: The instruction manual for the AI.build/: JavaScript artifacts.ISC
io.github.ericm1018/skillfm-llm-cost-optimizer-openai-anthropic-usage
io.github.mikerawsonnz/llm-orchestration-agent
io.github.mikerawsonnz/authenticated-llm-agent
labforgedev/copilot-memory-mcp
csoai-org/agent-prompt-injection-firewall-mcp
io.github.mikerawsonnz/authenticated-multi-llm-agent