Skip to main content
Glama
agent-loop-mcp
by meharajM

Agentic Loop Memory Server ♾️

Agent Skills skills.sh

面向长期运行的智能体工作流的行业标准持久化记忆与状态管理器。

让任何 AI 模型——尤其是上下文窗口有限的小型模型——都能具备高端模型那样的持久性。本项目以两部分生态系统的形式运作:用于状态管理的 MCP Server 和用于编排的 Agent Skill。

🛠 完整设置(必需)

为获得最佳体验,您必须同时安装编排技能和 MCP 服务器。

1. 安装技能

将 agentic-loop 技能安装到您的 AI 智能体(Codex、Claude Code、Cursor、Gemini CLI、GitHub Copilot 以及其他 Agent Skills 宿主):

npx skills add meharajM/agent-loop-mcp@agentic-loop -g -y

在激活前预览该技能:

gh skill preview meharajM/agent-loop-mcp agentic-loop

2. 配置 MCP 服务器

将以下内容添加到您的 mcp_config.json:

{
  "mcpServers": {
    "agent-loop": {
      "command": "npx",
      "args": ["-y", "@mhrj/mcp-agent-loop"]
    }
  }
}

Related MCP server: Ori Mnemos

🌟 为什么这种方法独一无二

与被动式记忆工具不同,这是一个主动状态管理器。它会监控字数以触发压缩周期,并在每次失败时强制执行"自愈策略",防止 AI 智能体陷入无意义的循环。

📂 项目结构

  • src/:MCP 服务器的 TypeScript 源码。

  • skills/agentic-loop/SKILL.md:面向 AI 的指令手册。

  • build/:JavaScript 构建产物。

📄 许可证

ISC

Available Tools

6 tools
compact_memoryA

Empties the Active Context and appends the AI-provided summary to the Compacted History.

Inputs: session_id (required), context_summary (required).

get_tool_suggestionsB

Ask this tool if you are stuck and don't know what other tools to use.

Inputs: no named parameters.

init_loopA

Creates a new .md loop state file for the given session to start a continuous, autonomous task.

Inputs: objective (required), session_id (required).

log_stepA

Appends to the Active Context. Rejects if failed=true but no self_heal_strategy is provided. Warns if context is too large.

Inputs: action (required), failed (required), result (required), session_id (required), +1 more.

report_blockerA

Updates state to STATUS_BLOCKED and asks for human intervention when absolutely stuck.

Inputs: reason (required), session_id (required).

resume_loopC

Removes the block and adds human input context back into the loop.

Inputs: session_id (required), user_input (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool has a distinct purpose: init starts a loop, log appends steps, compact clears memory, resume unblocks, report triggers human intervention, and get_tool_suggestions offers guidance. No overlapping functionality.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (init_loop, log_step, compact_memory, resume_loop, report_blocker, get_tool_suggestions), using snake_case throughout.

    Tool Count5/5

    With 6 tools covering the essential loop lifecycle operations, the count is well-scoped for a specialized agent-loop management server.

    Completeness5/5

    The toolset provides comprehensive coverage for managing an autonomous loop: initialization, logging, memory compaction, resumption, blocker reporting, and suggestion retrieval. No obvious gaps in the workflow.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      B
      maintenance
      Provides persistent memory for LLM applications, enabling AI assistants to remember user preferences, facts, and conversation history across sessions.
      2
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides durable memory for AI agents with structured storage, semantic search, OAuth authentication, and lifecycle controls.
      10
      Apache 2.0