{"id":51560491,"url":"https://github.com/leoyeai/autonomous-loop-manager","last_synced_at":"2026-07-10T10:01:26.109Z","repository":{"id":366966602,"uuid":"1264151017","full_name":"LeoYeAI/autonomous-loop-manager","owner":"LeoYeAI","description":"Cross-session goal pursuit for OpenClaw agents. Goal memory, failure memory, strategy evolution. Zero dependencies, atomic writes, on-demand loading.","archived":false,"fork":false,"pushed_at":"2026-06-24T02:40:28.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-24T04:27:25.298Z","etag":null,"topics":["agent","ai-agent","clawhub","goal-tracking","memory","myclaw","nodejs","openclaw","self-evolving"],"latest_commit_sha":null,"homepage":"https://myclaw.ai","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LeoYeAI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-09T15:55:25.000Z","updated_at":"2026-06-24T02:40:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/LeoYeAI/autonomous-loop-manager","commit_stats":null,"previous_names":["leoyeai/autonomous-loop-manager"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/LeoYeAI/autonomous-loop-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeoYeAI%2Fautonomous-loop-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeoYeAI%2Fautonomous-loop-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeoYeAI%2Fautonomous-loop-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeoYeAI%2Fautonomous-loop-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LeoYeAI","download_url":"https://codeload.github.com/LeoYeAI/autonomous-loop-manager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeoYeAI%2Fautonomous-loop-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35328278,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-10T02:00:06.465Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","ai-agent","clawhub","goal-tracking","memory","myclaw","nodejs","openclaw","self-evolving"],"created_at":"2026-07-10T10:01:22.495Z","updated_at":"2026-07-10T10:01:26.095Z","avatar_url":"https://github.com/LeoYeAI.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# autonomous-loop-manager\n\n**让 Agent 拥有跨 Session 的目标追求能力。**\n\n目标记忆、失败记忆、策略进化，三位一体让 Agent 越用越聪明。\n\n[English](#english) | [中文](#中文)\n\n---\n\n## 中文\n\n### 核心概念\n\n| 记忆层 | 存什么 | 解决什么问题 |\n|--------|--------|-------------|\n| **目标记忆** (goals) | 用户目标、分解步骤、当前进度 | 跨 session 继续追求同一目标 |\n| **失败记忆** (reflections) | 踩过的坑、失败原因、任务反思 | 下次自动避开同类错误 |\n| **策略进化** (strategies) | 有效打法、上下文、成功次数 | 越用越聪明，不重复发明轮子 |\n\n### 安装\n\n```bash\nclawhub install autonomous-loop-manager\n```\n\n或手动：\n```bash\ngit clone https://github.com/LeoYeAI/autonomous-loop-manager.git \\\n  ~/.openclaw/workspace/skills/autonomous-loop-manager\n```\n\n初始化 memory 文件：\n```bash\ncd ~/.openclaw/workspace/skills/autonomous-loop-manager/memory\ncp goals.example.json goals.json\ncp strategies.example.json strategies.json\ncp reflections.example.json reflections.json\n```\n\n**要求：** Node.js 18+\n\n### 使用方式\n\n把 `loop-prompt.md` 内容注入到 Agent 的 system prompt，之后直接用自然语言：\n\n```\n\"帮我做一个完整的商业计划书\"\n\"继续上次的任务\"\n\"这个方向不行，换一个\"\n\"你做到哪了？\"\n```\n\n### 工具一览\n\n| 工具 | 命令 | 说明 |\n|------|------|------|\n| `goal-track` | `node tools/goal-track.js \u003ccmd\u003e` | 创建/更新/查询目标 |\n| `reflect` | `node tools/reflect.js \u003ccmd\u003e` | 写入/查询反思记录 |\n| `strategy` | `node tools/strategy.js \u003ccmd\u003e` | 管理策略库 |\n| `recall` | `node tools/recall.js \u003ccmd\u003e` | 按需加载（省 token）|\n| `status` | `node tools/status.js \u003cuser_id\u003e` | 整体状态报告 |\n| `plan` | `node tools/plan.js \u003c任务描述\u003e` | 生成有记忆的执行计划 |\n\n### recall — 按需加载（v1.1 新增）\n\n解决 memory 越积越多、全量注入上下文爆 token 的问题。\n\n```bash\n# 只输出一行式清单（注入 system prompt 用这个）\nnode tools/recall.js manifest \u003cuser_id\u003e\n\n# 看到相关条目后，再按需展开全文\nnode tools/recall.js expand strategy \u003cid\u003e\nnode tools/recall.js expand reflection \u003cid\u003e\nnode tools/recall.js expand goal \u003cid\u003e\n\n# 跨三类记忆搜索\nnode tools/recall.js search \"关键词\"\n```\n\n### 文件结构\n\n```\nautonomous-loop-manager/\n├── SKILL.md              # Skill 元信息\n├── _meta.json            # 工具注册表\n├── loop-core.sh          # 统一入口（loop \u003ccommand\u003e）\n├── loop-prompt.md        # Agent 思维框架（注入 system prompt）\n├── memory/\n│   ├── goals.json        # 目标 \u0026 进度（本地，不提交）\n│   ├── reflections.json  # 反思记录（本地，不提交）\n│   └── strategies.json   # 策略库（本地，不提交）\n└── tools/\n    ├── lib/store.js      # 原子写 + 文件锁（共享存储层）\n    ├── goal-track.js\n    ├── reflect.js\n    ├── strategy.js\n    ├── recall.js         # v1.1 新增\n    ├── status.js\n    └── plan.js\n```\n\n### Changelog\n\n**v1.1.0**\n- 新增 `recall.js`：清单注入 + 按需展开，解决 token 规模化问题\n- 全部工具改原子写 + 目录文件锁（`lib/store.js`），消除并发写丢数据风险\n- 修复 `plan.js` 崩溃 bug（`user_id:` 命中正则时 Assignment to constant variable）\n- loop-prompt.md 加入按需加载纪律\n\n**v1.0.0**\n- 初始版本：goal-track / reflect / strategy / status / plan\n\n---\n\n## English\n\n### What is this?\n\nA skill for OpenClaw agents that provides **cross-session goal pursuit**: the agent remembers what it's working toward, where it left off, what failed, and what strategies worked.\n\n### Three memory layers\n\n- **Goal memory** — tracks active goals, decomposition, progress across sessions\n- **Failure memory** — records what went wrong and why, prevents repeating mistakes  \n- **Strategy evolution** — accumulates effective approaches, ranked by success count\n\n### Install\n\n```bash\nclawhub install autonomous-loop-manager\n```\n\nOr manually:\n```bash\ngit clone https://github.com/LeoYeAI/autonomous-loop-manager.git \\\n  ~/.openclaw/workspace/skills/autonomous-loop-manager\n```\n\nInitialize memory:\n```bash\ncd memory\ncp goals.example.json goals.json\ncp strategies.example.json strategies.json\ncp reflections.example.json reflections.json\n```\n\n**Requires:** Node.js 18+\n\n### Key feature: on-demand loading (v1.1)\n\nMemory grows over time. Injecting all of it into context causes token overflow. `recall.js` solves this:\n\n```bash\n# Inject only a one-line manifest into system prompt\nnode tools/recall.js manifest \u003cuser_id\u003e\n\n# When a line looks relevant, expand full content on demand\nnode tools/recall.js expand strategy|reflection|goal \u003cid\u003e\n\n# Cross-memory keyword search\nnode tools/recall.js search \"keyword\"\n```\n\n### Technical notes\n\n- **Zero dependencies** — plain Node.js, no npm install needed\n- **Atomic writes** — all tools use tmp-file + fsync + rename via `lib/store.js`\n- **File locking** — mkdir-based lock prevents concurrent write corruption\n- **Memory files are local** — `.gitignore`d, never committed\n\n---\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleoyeai%2Fautonomous-loop-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleoyeai%2Fautonomous-loop-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleoyeai%2Fautonomous-loop-manager/lists"}