KKKKhazix/agent-autoloopPublic

让你的命令行 Agent 在后台自己接活、自己跟进到底;平时不烦你,遇到拿不准的事才发卡片找你拍板。

AI summary: Automated workflow engine for chaining AI agent executions.

Stars
6.8K
+282 today
Forks
1.3K
Watchers
11
Open issues
0
Open PRs
4
Contributors
~46
Commits
303
Branches
1

TypeScriptMITCreated Nov 3, 2026Last push 3d agoLatest release v1.10.6+665 stars this week+2.7K this month

Quick answers

What is agent-autoloop?
Automated workflow engine for chaining AI agent executions.
What does agent-autoloop do?
Agent Autoloop provides an execution environment for defining and running complex loops of autonomous AI agents. It orchestrates sequences where outputs from one agent feed directly into the next without manual intervention. The system handles state persistence and error recovery between steps. It offers a structured way to execute recurring multi-agent workflows reliably. The architecture separates agent definitions from the execution engine to simplify maintenance.
Who is agent-autoloop for?
Developers and AI researchers building multi-agent systems. It is designed for those who need to automate complex, recurring workflows involving language models.
How do I get started with agent-autoloop?
git clone https://github.com/KKKKhazix/agent-autoloop && npm install
How popular is agent-autoloop on GitHub?
KKKKhazix/agent-autoloop has 6,823 stars and 1,268 forks on GitHub, and gained 665 stars in the last 7 days.
What license does agent-autoloop use?
KKKKhazix/agent-autoloop is released under the MIT license.

Star history

since Nov 8, 2026
02K4K6KNov 2026Nov 2026Nov 2026Nov 2026
6.8K stars as of Nov 29, 2026. Measured daily since Nov 8, 2026; GitHub no longer exposes earlier star timestamps.

Update history

2 recorded
  • Nov 29, 2026New release v1.10.6 (previously v1.9.1).
  • Nov 17, 2026New release v1.9.1 (previously v1.6.4).

Contribution activity

commits per day, last 52 weeks
DecJanFebMarAprMayJunJulAugSepOctNovMonWedFri2025-12-07: 0 commits2025-12-08: 0 commits2025-12-09: 0 commits2025-12-10: 0 commits2025-12-11: 0 commits2025-12-12: 0 commits2025-12-13: 0 commits2025-12-14: 0 commits2025-12-15: 0 commits2025-12-16: 0 commits2025-12-17: 0 commits2025-12-18: 0 commits2025-12-19: 0 commits2025-12-20: 0 commits2025-12-21: 0 commits2025-12-22: 0 commits2025-12-23: 0 commits2025-12-24: 0 commits2025-12-25: 0 commits2025-12-26: 0 commits2025-12-27: 0 commits2025-12-28: 0 commits2025-12-29: 0 commits2025-12-30: 0 commits2025-12-31: 0 commits2026-01-01: 0 commits2026-01-02: 0 commits2026-01-03: 0 commits2026-01-04: 0 commits2026-01-05: 0 commits2026-01-06: 0 commits2026-01-07: 0 commits2026-01-08: 0 commits2026-01-09: 0 commits2026-01-10: 0 commits2026-01-11: 0 commits2026-01-12: 0 commits2026-01-13: 0 commits2026-01-14: 0 commits2026-01-15: 0 commits2026-01-16: 0 commits2026-01-17: 0 commits2026-01-18: 0 commits2026-01-19: 0 commits2026-01-20: 0 commits2026-01-21: 0 commits2026-01-22: 0 commits2026-01-23: 0 commits2026-01-24: 0 commits2026-01-25: 0 commits2026-01-26: 0 commits2026-01-27: 0 commits2026-01-28: 0 commits2026-01-29: 0 commits2026-01-30: 0 commits2026-01-31: 0 commits2026-02-01: 0 commits2026-02-02: 0 commits2026-02-03: 0 commits2026-02-04: 0 commits2026-02-05: 0 commits2026-02-06: 0 commits2026-02-07: 0 commits2026-02-08: 0 commits2026-02-09: 0 commits2026-02-10: 0 commits2026-02-11: 0 commits2026-02-12: 0 commits2026-02-13: 0 commits2026-02-14: 0 commits2026-02-15: 0 commits2026-02-16: 0 commits2026-02-17: 0 commits2026-02-18: 0 commits2026-02-19: 0 commits2026-02-20: 0 commits2026-02-21: 0 commits2026-02-22: 0 commits2026-02-23: 0 commits2026-02-24: 0 commits2026-02-25: 0 commits2026-02-26: 0 commits2026-02-27: 0 commits2026-02-28: 0 commits2026-03-01: 0 commits2026-03-02: 0 commits2026-03-03: 0 commits2026-03-04: 0 commits2026-03-05: 0 commits2026-03-06: 0 commits2026-03-07: 0 commits2026-03-08: 0 commits2026-03-09: 0 commits2026-03-10: 0 commits2026-03-11: 0 commits2026-03-12: 0 commits2026-03-13: 0 commits2026-03-14: 0 commits2026-03-15: 0 commits2026-03-16: 0 commits2026-03-17: 0 commits2026-03-18: 0 commits2026-03-19: 0 commits2026-03-20: 0 commits2026-03-21: 0 commits2026-03-22: 0 commits2026-03-23: 0 commits2026-03-24: 0 commits2026-03-25: 0 commits2026-03-26: 0 commits2026-03-27: 0 commits2026-03-28: 0 commits2026-03-29: 0 commits2026-03-30: 0 commits2026-03-31: 0 commits2026-04-01: 0 commits2026-04-02: 0 commits2026-04-03: 0 commits2026-04-04: 0 commits2026-04-05: 0 commits2026-04-06: 0 commits2026-04-07: 0 commits2026-04-08: 0 commits2026-04-09: 0 commits2026-04-10: 0 commits2026-04-11: 0 commits2026-04-12: 0 commits2026-04-13: 0 commits2026-04-14: 0 commits2026-04-15: 0 commits2026-04-16: 0 commits2026-04-17: 0 commits2026-04-18: 0 commits2026-04-19: 0 commits2026-04-20: 0 commits2026-04-21: 0 commits2026-04-22: 0 commits2026-04-23: 0 commits2026-04-24: 0 commits2026-04-25: 0 commits2026-04-26: 0 commits2026-04-27: 0 commits2026-04-28: 0 commits2026-04-29: 0 commits2026-04-30: 0 commits2026-05-01: 0 commits2026-05-02: 0 commits2026-05-03: 0 commits2026-05-04: 0 commits2026-05-05: 0 commits2026-05-06: 0 commits2026-05-07: 0 commits2026-05-08: 0 commits2026-05-09: 0 commits2026-05-10: 0 commits2026-05-11: 0 commits2026-05-12: 0 commits2026-05-13: 0 commits2026-05-14: 0 commits2026-05-15: 0 commits2026-05-16: 0 commits2026-05-17: 0 commits2026-05-18: 0 commits2026-05-19: 0 commits2026-05-20: 0 commits2026-05-21: 0 commits2026-05-22: 0 commits2026-05-23: 0 commits2026-05-24: 0 commits2026-05-25: 0 commits2026-05-26: 0 commits2026-05-27: 0 commits2026-05-28: 0 commits2026-05-29: 0 commits2026-05-30: 0 commits2026-05-31: 0 commits2026-06-01: 0 commits2026-06-02: 0 commits2026-06-03: 0 commits2026-06-04: 0 commits2026-06-05: 0 commits2026-06-06: 0 commits2026-06-07: 0 commits2026-06-08: 0 commits2026-06-09: 0 commits2026-06-10: 0 commits2026-06-11: 0 commits2026-06-12: 0 commits2026-06-13: 0 commits2026-06-14: 0 commits2026-06-15: 0 commits2026-06-16: 0 commits2026-06-17: 0 commits2026-06-18: 0 commits2026-06-19: 0 commits2026-06-20: 0 commits2026-06-21: 0 commits2026-06-22: 0 commits2026-06-23: 0 commits2026-06-24: 0 commits2026-06-25: 0 commits2026-06-26: 0 commits2026-06-27: 0 commits2026-06-28: 0 commits2026-06-29: 0 commits2026-06-30: 0 commits2026-07-01: 0 commits2026-07-02: 0 commits2026-07-03: 0 commits2026-07-04: 0 commits2026-07-05: 0 commits2026-07-06: 0 commits2026-07-07: 0 commits2026-07-08: 0 commits2026-07-09: 0 commits2026-07-10: 0 commits2026-07-11: 0 commits2026-07-12: 0 commits2026-07-13: 0 commits2026-07-14: 0 commits2026-07-15: 0 commits2026-07-16: 0 commits2026-07-17: 0 commits2026-07-18: 0 commits2026-07-19: 0 commits2026-07-20: 0 commits2026-07-21: 0 commits2026-07-22: 0 commits2026-07-23: 0 commits2026-07-24: 0 commits2026-07-25: 0 commits2026-07-26: 0 commits2026-07-27: 0 commits2026-07-28: 0 commits2026-07-29: 0 commits2026-07-30: 0 commits2026-07-31: 0 commits2026-08-01: 0 commits2026-08-02: 0 commits2026-08-03: 0 commits2026-08-04: 0 commits2026-08-05: 0 commits2026-08-06: 0 commits2026-08-07: 0 commits2026-08-08: 0 commits2026-08-09: 0 commits2026-08-10: 0 commits2026-08-11: 0 commits2026-08-12: 0 commits2026-08-13: 0 commits2026-08-14: 0 commits2026-08-15: 0 commits2026-08-16: 0 commits2026-08-17: 0 commits2026-08-18: 0 commits2026-08-19: 0 commits2026-08-20: 0 commits2026-08-21: 0 commits2026-08-22: 0 commits2026-08-23: 0 commits2026-08-24: 0 commits2026-08-25: 0 commits2026-08-26: 0 commits2026-08-27: 0 commits2026-08-28: 0 commits2026-08-29: 0 commits2026-08-30: 0 commits2026-08-31: 0 commits2026-09-01: 0 commits2026-09-02: 0 commits2026-09-03: 0 commits2026-09-04: 0 commits2026-09-05: 0 commits2026-09-06: 0 commits2026-09-07: 0 commits2026-09-08: 0 commits2026-09-09: 0 commits2026-09-10: 0 commits2026-09-11: 0 commits2026-09-12: 0 commits2026-09-13: 0 commits2026-09-14: 0 commits2026-09-15: 0 commits2026-09-16: 0 commits2026-09-17: 0 commits2026-09-18: 0 commits2026-09-19: 0 commits2026-09-20: 0 commits2026-09-21: 0 commits2026-09-22: 0 commits2026-09-23: 0 commits2026-09-24: 0 commits2026-09-25: 0 commits2026-09-26: 0 commits2026-09-27: 0 commits2026-09-28: 0 commits2026-09-29: 0 commits2026-09-30: 0 commits2026-10-01: 0 commits2026-10-02: 0 commits2026-10-03: 0 commits2026-10-04: 0 commits2026-10-05: 0 commits2026-10-06: 0 commits2026-10-07: 0 commits2026-10-08: 0 commits2026-10-09: 0 commits2026-10-10: 0 commits2026-10-11: 0 commits2026-10-12: 0 commits2026-10-13: 0 commits2026-10-14: 0 commits2026-10-15: 0 commits2026-10-16: 0 commits2026-10-17: 0 commits2026-10-18: 0 commits2026-10-19: 0 commits2026-10-20: 0 commits2026-10-21: 0 commits2026-10-22: 0 commits2026-10-23: 0 commits2026-10-24: 0 commits2026-10-25: 0 commits2026-10-26: 0 commits2026-10-27: 0 commits2026-10-28: 0 commits2026-10-29: 0 commits2026-10-30: 0 commits2026-10-31: 0 commits2026-11-01: 0 commits2026-11-02: 0 commits2026-11-03: 15 commits2026-11-04: 47 commits2026-11-05: 41 commits2026-11-06: 30 commits2026-11-07: 19 commits2026-11-08: 4 commits2026-11-09: 12 commits2026-11-10: 11 commits2026-11-11: 12 commits2026-11-12: 12 commits2026-11-13: 3 commits2026-11-14: 9 commits2026-11-15: 8 commits2026-11-16: 8 commits2026-11-17: 4 commits2026-11-18: 3 commits2026-11-19: 6 commits2026-11-20: 13 commits2026-11-21: 5 commits2026-11-22: 5 commits2026-11-23: 4 commits2026-11-24: 5 commits2026-11-25: 7 commits2026-11-26: 2 commits2026-11-27: 5 commits2026-11-28: 5 commits2026-11-29: 7 commits2026-11-30: 0 commits2026-12-01: 0 commits2026-12-02: 0 commits2026-12-03: 0 commits2026-12-04: 0 commits2026-12-05: 0 commits
302 commits in the last yearLessMore

Signals and awards

derived from tracked data
  • Breakout launch

    6,823 stars in 29 days

  • Rising fast

    +665 stars this week

  • Well documented

    High community health score

  • Permissive license

    MIT

  • Continuous integration

    Automated checks passing

What agent-autoloop does

Agent Autoloop provides an execution environment for defining and running complex loops of autonomous AI agents. It orchestrates sequences where outputs from one agent feed directly into the next without manual intervention. The system handles state persistence and error recovery between steps. It offers a structured way to execute recurring multi-agent workflows reliably. The architecture separates agent definitions from the execution engine to simplify maintenance.

Developers and AI researchers building multi-agent systems. It is designed for those who need to automate complex, recurring workflows involving language models.

  • Sequential execution: chains multiple agent tasks into a continuous automated workflow.
  • State management: persists data between agent transitions to ensure context is maintained.
  • Error recovery: implements retry mechanisms and fallbacks for failed agent actions.
  • Configurable loops: allows users to define custom recurring workflow schedules.
  • Pluggable agents: supports integrating different agent implementations via a common interface.

Where teams use it

Data Processing Pipelines

Automate data extraction, transformation, and analysis using specialized AI agents.

Continuous Monitoring

Deploy agents to continuously monitor systems and trigger automated responses.

Content Generation

Chain research, drafting, and editing agents to produce content autonomously.

Testing Automation

Run suites of testing agents against applications in a recurring loop.

Getting started: git clone https://github.com/KKKKhazix/agent-autoloop && npm install

README

main branch

Agent Autoloop

让你的命令行 Agent 在后台自己接活、自己跟进到底;平时不烦你,遇到拿不准的事才发卡片找你拍板。

中文 | English

上手 · 场景模板 · 插件 · 内核 · 文档

架构图

它解决什么问题?

平时我们用 Claude Code、Codex 这类命令行 Agent,大多是“人守着终端用”:你输一句话,盯着它跑,等它问你下一步;一旦关掉窗口或者人走开,事情就断了。

Agent Autoloop 是一个极轻量的自动化中台。它把任务调度做成一个零外部依赖的内核,把事件来源、Agent、通知通道,甚至代码上线流水线全部拆成可随时插拔的插件。

  • 一台电脑、一条命令就能跑。 装在你的 Windows、Mac 或 Linux 上,不用买云服务器,也不用开放公网端口。
  • 一行配置接新 Agent。 不需要 SDK,也不需要改 Agent 源码,能接收提示词并打印最后一条回复的命令行工具都能接。
  • 没有后台界面。 需要你拍板时把卡片推到飞书、钉钉、企微、Slack、Discord 或桌面通知;想看全局进展,敲一行命令。

上手

支持 Windows、macOS 和 Linux。需要 Node 24 或更新、Git,以及一个已经登录的命令行 Agent;macOS/Linux 还需要 curl,不需要 GitHub 账号。也可以把安装说明交给你的 Agent。

Windows PowerShell:

iex ((irm https://raw.githubusercontent.com/KKKKhazix/agent-autoloop/main/install.ps1).TrimStart([char]0xFEFF))

macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/KKKKhazix/agent-autoloop/main/install.sh | sh

安装和 agent-autoloop update 都装最新的 Release,那是通过了全部检查的版本。

装好后用你本机的 Agent 真实走一遍“提问 → 退出等回复 → 拍板 → 接着干完”:

agent-autoloop try

下面是在终端里的真实输出:

事件发出去了,Agent 开始干活……

Agent 结束了这一轮,问了你一个问题。它现在不占进程、不花 Token。

【等你决定】#1 试跑:选一个颜色
这是一次试跑,选哪个都行。
  1. 蓝色
  2. 绿色
回答:agent-autoloop answer 1 <序号>
答完运行 agent-autoloop status,能看到它接着把活干完。

交互终端里直接输入数字回车;非交互终端运行 agent-autoloop answer 1 2 选择“绿色”。再跑 agent-autoloop status,就能看到它接上刚才的会话并显示“你选了绿色,试跑通过”,还有今天和最近 7 天的轮数、Token 和费用(统计口径)。

一件事怎么转起来

编号和上面的架构图一一对应:

  1. 新事件进来。 早上 9 点的定时任务、GitHub 上新提的 Issue、业务系统报的错,都变成一条标准事件送进内核。
  2. 按规则派活。 内核照你写的规则,决定交给哪个 Agent、去哪个目录干。同一件事排队时又来的消息,会合并成一轮处理。
  3. 干完一轮就退出。 Agent 把结果写在最后一条回复里,进程直接退出。
  4. 拿不准才问你。 碰到删数据、停服、花钱、对外发消息这类事,内核通过飞书或桌面通知发一张卡片给你。等你回复期间,它不占后台进程,也不消耗 Token。
  5. 点一下,接着干。 你选完,它接上原来的对话,把剩下的活干完。

能自己搞定的事走图上方的自动闭环:直接办完,或者约个时间(比如半小时后)再醒来复查,全程不打扰你。

日常怎么配?

写一份规则(rules.json)

不需要写胶水代码。打开 ~/.agent-autoloop/rules.json,在 rules 里写清楚什么事、交给谁、在哪个目录干。to 填 agents 里已有的名字。比如每天早上 9 点写早报:

{
  "name": "早报",
  "when": { "cron": "0 9 * * *" },
  "to": "codex",
  "cwd": "~/notes",
  "prompt": "整理昨天的笔记和提交,写今天的早报。"
}

外部事件写法一样,只是要先接好来源。比如有人提新 Issue 时交给 Codex,先按说明在 sources 里登记 github:

{
  "name": "处理 issue",
  "when": { "source": "github", "types": ["issues.opened"] },
  "to": "codex",
  "cwd": "~/code/app",
  "skill": "handle-issue",
  "parallel": 3
}

agent-autoloop pause <规则>、resume <规则> 暂停和恢复一条规则,暂停期间到点不跑、来事件不接也不排队,恢复后不自动补跑;恢复时会列出暂停期间跳过的事件,照着给出的 agent-autoloop replay <规则> --since <时间> 一次补跑,每条只补一次。agent-autoloop run <规则> 立即跑一轮。这些记在中台的日志里,不改 rules.json。agent-autoloop runs [规则] 列出做完的轮次,--before <第几轮> 往前翻,拿到编号再用 agent-autoloop why <第几轮> 看来龙去脉。agent-autoloop wakeups [规则] 把最近 100 轮按规则和叫醒原因(约好的复查、你的回答、别的事件)分组,列出每组的轮数、已上报的用量和几个轮次编号,方便看出哪条规则在反复复查。

保存后几秒内自动生效,可以运行 agent-autoloop check 检查,agent-autoloop check <文件> 检查一份草稿,不碰正在跑的中台;agent-autoloop rules explain [文件] 看生效的规则和下次定时(也可以指定一份草稿),agent-autoloop emit <类型> --dry-run 预演一条事件会派给谁(不连接中台、不写日志)。就算改错了,或者文件被删、读不到,系统也会继续按旧规则跑,并发卡片提醒你。

Agent 怎么跟中台配合?

中台对 Agent 只有一个约定:在最后一条回复里交代结果。事情办完了,正常输出一句结论就行。需要向你请示时,在回复末尾附一段 agent-autoloop 代码块:

订单已经核对完毕,库存充足。

```agent-autoloop
{
  "ask": [{
    "title": "怎么发货?",
    "text": "两种方式今天都能发出。",
    "options": ["快递", "自提"],
    "key": "shipping"
  }]
}
```

除了提问(ask),还能发通知(notice)、关闭已解决的卡片(resolve)、预约复查(later)和触发新事件(events)。通告不需要回答,但结案时可以顺手写一句处理说明,这句话会留在卡片上;只是告诉一声的通告标成 fyi,不带按钮。万一 JSON 写错了,中台只让它在原会话里重写最后这段回复,不会把已经干完的业务重做一遍;重写也失败时,保留原结论并通知你回执没有生效(通用命令没有会话,直接走这一步)。接着旧会话跑也一样:会话接不上才开新的;接上了、干到一半断了,就算没跑成,过几分钟回到原会话重试,不开新会话重做。同一事项的新事件默认开新会话;规则写 "resume": true 就接着上一轮的会话。Claude Code 的订阅用量到了上限,中台按它报的恢复时间停止给它派活,排着的和新来的事件都留着,到点自动接着派,并通知你一次几点恢复。

拿来即用的场景模板

每套模板都提供示例规则和启用说明。

想做什么 已经封装好的流程
每日早报 默认每天 8 点整理本地笔记和 Git 提交,写入 briefs/YYYY-MM-DD.md
跟进 GitHub Issue 每 5 分钟查新 Issue,在本地改代码并通知你查看;不提交、不推送、不回复 Issue
线上告警排查 接收报错、对照代码查原因,需要重启时发卡片询问,回答后继续
用户反馈处理 重读反馈当前状态、修复、交付核实、准备回复;需要决定时飞书问你,回答后继续
网站巡检 每 5 分钟检查状态和关键内容,首次异常交给 Agent,持续异常不重复通知,恢复后更新原卡片
飞书周报与业务摘要 周日 18 点按你的权限读汇报和指定表格,生成本地摘要;飞书只发简短摘要,完整稿留在本机
收件箱分诊 默认每天 8 点读过去 24 小时的未读邮件,写成清单和回复草稿;不发送、不改邮箱状态
PR 自动交付 打上 deliver 标签后,审查、等 CI、合并、等发布并核对线上版本

启用: 打开对应说明。模板带任务 Skill 时,把它放进所用 Agent 的 skills 目录。把示例规则合入 ~/.agent-autoloop/rules.json,替换电脑名和路径,再运行 agent-autoloop check。

反馈处理、网站巡检、飞书摘要和收件箱分诊默认使用北京时间,只发给本人的飞书私聊。样例数据都是虚构的;脚本和回执只用本地 HTTP 与假飞书 CLI 验证过,没有在真实账号上跑过完整业务。

更多模板:Claude 委托 Codex 处理网页、每周代码清理。

插件体系:四个方向都能自由替换

内置插件随程序安装,填好配置即可启用;第三方插件用 agent-autoloop add <git 地址> 安装。

方向 内置 配置
事件:怎么发现新活 GitHub Webhook、GitLab Webhook、HTTP 接口、定时规则、Issue 轮询脚本 说明
Agent:谁来干活 Claude Code、Codex、ACP、DeepSeek Harness、ZCode、通用命令 说明
通道:去哪找你拍板 桌面通知(默认开启)、飞书、钉钉 / 企微 / Slack / Discord 说明
交付:把 CI/CD 也做成插件 delivery 说明

实测情况: Claude Code、Codex 和 ACP(官方 Codex ACP 适配器)跑通了多轮问答和跨进程会话续接;ZCode 跑通了提问、回答后接回原会话;Agentica 1.6.1 用 use: "acp" 跑通了多轮问答和跨进程会话续接;飞书跑通了发送、按钮回调和卡片更新;四种 Webhook 模板只在本地模拟服务上验证过,GitLab Webhook 按官方文档的格式测试,没连过真实 GitLab。这些文字通道靠回答链接拍板,要把 hub.publicUrl 配成手机或电脑能打开的地址。

内置 Agent 走第三方网关。 Claude Code、Codex 要接第三方模型服务,或者启动前要先设好环境变量,写一个设好变量再启动它的小脚本,在 Agent 里写 "program": "脚本路径",会话续接和用量统计照旧,见说明。

其他命令行 Agent 一行接入。 设置 use: "command" 并传入命令数组,{prompt} 作为独立参数传递,不会被当成 shell 代码执行。下面的命令整理自各家官方文档,我们还没有逐个跑过:

Agent 接入命令
DeepSeek Harness 旧版(内置插件要 0.2.2 或更新) dsh --profile headless {prompt}
pi pi --print {prompt}
OpenClaw openclaw agent exec {prompt}
Hermes hermes chat -Q -q {prompt}
Cursor agent -p --trust {prompt}
WorkBuddy / CodeBuddy codebuddy -p {prompt}

OpenClaw 的 agent exec 每次默认最多跑 600 秒,到点就算失败;要跑更久的,在命令里加 --timeout <秒>(0 不限时)。

会说 ACP 的 Agent 用 use: "acp" 接,还能接着原来的会话做:Agentica 1.6.1 写 "command": ["agentica", "acp"],Gemini CLI 写 "command": ["gemini", "--acp"],OpenCode 写 "command": ["opencode", "acp"],Antigravity 写 "command": ["agy", "acp"]。Agentica 已跑通多轮问答和跨进程会话续接(同一个 sessionId 走 session/load);它的 ACP 会话默认放在 ~/.agentica/acp/sessions,可用 AGENTICA_ACP_SESSION_DIR 换目录。只要单轮、不需要会话续接,也可以 use: "command" + ["agentica", "--query", "{prompt}", "--print"],实测跑通一轮,但没有用量统计和会话续接。Gemini CLI 0.67.0 和 OpenCode 1.1.2 已经跑通 ACP 握手,多轮问答和会话续接还没跑过。Antigravity(agy 1.5.5)在 Windows 上跑通了多轮问答和会话续接。

交付流水线。 配好交付规则后,给 GitHub PR 打上 deliver 标签后,它会自己跟进到上线:审代码 → 等 CI → 合并 PR → 等部署 → 核对线上版本。审查可以按写代码的 Agent 指定,也可以让多个项目共用一份策略。审查和交付配置只从 main 读取,绝不在接单电脑上检出或运行 PR 里的代码;排队、并发和重试直接复用内核。

写自己的插件。 从 Agent、通道、事件 三个可运行的最小模板开始,见插件开发说明。要让 Agent 操作网页,先看浏览器接入。命令行和 MCP 也能查看和回答卡片。

内核的四个机制

内核没有运行时依赖。它不读系统时钟、不用随机数、不向外发请求,插件主动连进来,账号凭据留在各自的插件里;同样的输入永远得出同样的结果。它把四个计算机领域的成熟做法用到了命令行 Agent 上:

  • 挂起零消耗:等你拍板时进程直接退出,等待状态存在数据库里,Agent 不用一直挂着。你三天没回,这三天就没有 Agent 进程在跑、不花 Token,只有很轻的中台在后台等着;你一回答,它接着原来的对话继续干。
  • 事件溯源:所有状态都从一条只追加的日志算出来,日志和索引在同一个事务里写进磁盘,写完才应答。进程被强杀,已经确认的事不丢(整机断电没有单独测过);任何一轮为什么跑、结果是什么,一条命令就能查清;数据格式变了就从日志重建,不用写迁移脚本。
  • 指令数据分离:思路和 SQL 参数化一样。Issue 的标题和正文等外部文字只作为资料放进文件,不拼进提示词,提示词里只有校验过字符的类型、编号和链接;用哪个 Agent、在哪个目录、什么权限,只由你本机的规则决定,事件里带 cwd、agent、access 字段会被直接拒收。
  • 跳数熔断:思路和网络包的 TTL 一样。Agent 交回的事件会再派给 Agent,层数一路累加,经过人工提问和定时复查也不清零,Agent 自己改不了;超过 8 层就只记录、不再派活,并发一张卡片告诉你。

自己跑一遍

Windows 用 npm run test:windows 和 node scripts/install-smoke-windows.ts,运行共用行为测试与原生进程、安装检查;Unix shell 测试仍在 Linux/macOS 上跑。

在程序目录 ~/.agent-autoloop/app 下运行:

验证什么 命令
任何一轮的来龙去脉 agent-autoloop why 1
20 万步模拟断网、丢包、崩溃和重复提交,一个种子就能复现 node sim/random.ts 24301 200000
强杀进程 1000 次,已确认的记录一条不丢 node sim/crash.ts 1000 12648430
下面的性能数字 npm run benchmark
第 1 轮 · 演示
11-03 20:47:25  规则版本 #1
11-03 20:47:25  触发事件:来源 local · 类型 demo.start · 对象 example
11-03 20:47:25  local 领取(演示程序)
11-03 20:47:25  结束:演示完成

实测性能

Apple M5 Pro、24 GB、Node 24.21.0。写入逐条提交,事务落盘后才应答。

指标 实测
冷启动 88.78 ms
空闲内存 59.94 MB RSS
1000 个同时等待的长轮询 170.49 MB RSS
持久化写入 2394 条/秒
派活 p99 1.82 ms
排队 5000 时被挡下的心跳 p99 1.66 ms
110 万条事实时的启动 112.3 ms
运行时依赖 0

历史变大后,状态汇总会变慢,日志和索引也继续占磁盘;格式变化后的首次启动要从日志全量重建,110 万条用时 48.2 秒。完整数据和测法。

用量与合规说明

中台直接调用你本机已经安装并登录好的命令行工具,不会读取或转存你的账号凭据。模型调用消耗算在你自己的账号名下,额度和使用范围遵循各家模型厂商的服务条款。

在高频自动化场景下,各家厂商通常更建议使用 API Key(个人订阅额度主要是为日常人工交互设计的,详见 Anthropic 与 OpenAI 的官方说明)。如果你用它对外提供服务,请使用 API Key。本项目为独立开源项目,与上述厂商无隶属或背书关系。

更多文档

仓库目录
位置 放什么
kernel/ 内核:决策、事实日志、状态投影、到期任务、规则匹配、接口行为与卡片表单
host/ 运行外壳:Node HTTP、文件与 SQLite 连接、时钟、配置、状态汇总、后台服务和插件加载
protocol/ 通信格式、JSON Schema、输入校验、HTTP 客户端和一致性检查
worker/ 接单程序:领活、运行 Agent、心跳与停止、读取和提交回执
cli/、bin/ 用户命令及启动入口,包括状态、回答、why、MCP、更新与卸载
plugins/ 内置 Agent、事件、通道和交付插件
examples/recipes/ 完整场景:规则、任务 Skill 和启用说明
examples/plugins/、examples/skills/、examples/*.sh 最小插件模板、独立任务手册和 Shell 示例
skills/agent-autoloop/ 中台的正式配置与操作手册,安装时也提供给 Agent 使用
docs/ 通信协议、插件开发说明与中英文架构图
tests/、sim/ 日常行为测试,以及模拟、穷举、强杀和变异检查
scripts/、.github/workflows/ 性能与真机验证、安装冒烟脚本,以及 Windows / Linux / macOS CI
根目录文档与 install.sh 中英文 README、安装说明、安全边界、开发约定、许可证与安装脚本

读代码可以从 bin/agent-autoloop.ts → cli/main.ts 开始,再按功能进入 host/、worker/ 或 plugins/;内核设计先看协议。同名文件分属不同层:host/http.ts 转换 Node 请求,kernel/http.ts 定义接口行为;protocol/rules.ts 校验输入,kernel/rules.ts 定义规则类型和匹配。

MIT License

View on GitHub

Recent activity

commits and pull requests

Releases and announcements

36 total
  1. Agent Autoloop 1.10.6v1.10.6Nov 29, 2026

    ## 改了什么 - 内置的 Codex 审查默认改用 gpt-6.2-astra。`review.xhigh` 里的路径不再把审查深度抬到 xhigh:这些路径照样一定会审,深度按审查器自己的配置(#432)。 - 让 Agent 通过 MCP 也能翻看运行记录:新增 `runs` 工具,可以只看某条规则的,也能一页页往前翻,和命令行 `agent-autoloop runs` 一样(#425)。 - `agent-autoloop doctor` 在还没装好的机器上以前提示“还没装好”却报告成功,现在会报告失败;已经打印出来的内容也不会再被截断(#425)。 - 状态页查每个通道最近一次送达更快了,通道和卡片多的时候尤其明显(#424)。 感谢 liujianhong007-max、Lumina 和 xdAsaah(补了 Windows 启动方式、提权检测和链接校验的测试)。 ## What's changed - The built-in Codex review now defaults to gpt-6.2-astra. Paths in `review.xhigh` no longer raise the review depth to xhigh: they are still always reviewed, at the depth the reviewer is configured with (#432). - Agents can list runs over MCP: the new `runs` tool takes an optional rule and pages back through older runs, as `agent-autoloop runs` does (#425). - `agent-autoloop doctor` on a machine that was never set up printed that it wasn't installed yet but exited successfully; it now exits with a failure, and nothing already printed is cut off (#425). - Looking up each channel's latest delivery for the status view is faster, especially with many channels and cards (#424). Thanks to liujianhong007-max, Lumina and xdAsaah (new tests for how Windows programs are started, el

  2. Agent Autoloop 1.10.5v1.10.5Nov 28, 2026

    ## 改了什么 - Windows 上,中台在后台运行时,每弹一张桌面卡片、每发一条飞书卡片,桌面上都会冒出一个黑色命令行窗口;接单程序连不上中台时、中台调用 git 时也一样。现在这些都不再弹窗(#419)。 - 所在时区某天没有午夜零点(比如贝鲁特、圣地亚哥、哈瓦那进入夏令时那天)时,当天的用量和轮数统计以前从“现在”算起,`status` 和用量一直显示今天什么都没发生;现在这一天从 01:00 算起(#420)。 - 安装说明里的 Windows 一行安装命令,在系统自带的 Windows PowerShell 5.1 里第一行就报错退出;命令已改好,照 README 复制即可(#421)。 感谢 xdAsaah。 ## What's changed - On Windows, with the hub running in the background, every desktop card and every Feishu card put a console window on the desktop, as did the worker's unreachable-hub command and the hub's git calls. None of them open a window any more (#419). - In a time zone where a day has no midnight (Beirut, Santiago or Havana on the day summer time starts), that day's spending and counts were read from the current moment, so `status` and spend showed nothing for today. The day now starts at 01:00 (#420). - The Windows one-line install command in the docs stopped on its first line in the built-in Windows PowerShell 5.1. The documented command is fixed; copy it from the README (#421). Thanks to xdAsaah.

  3. Agent Autoloop 1.10.4v1.10.4Nov 27, 2026

    ## 改了什么 - 新增 `agent-autoloop wakeups [规则]`:把最近 100 轮按规则和叫醒原因(约好的复查、你的回答、别的事件)分组,列出每组的轮数、已上报的用量和几个轮次编号,方便看出哪条规则在反复复查、用量花在了哪里(#414)。 - 远程接单电脑执行 `agent-autoloop join` 时,少写 `https://`、用了非 HTTP 协议、或地址里带账号、查询参数的,以前会提示接入成功却写下坏配置,之后接单一直失败,用正确地址重试也被拒绝;现在这类地址在写配置、装服务之前就会被拒绝,报错里也不回显原地址(#415)。 感谢 qingtian-4、16bh。 ## What's changed - New `agent-autoloop wakeups [rule]`: groups the last 100 rounds by rule and by what woke them (a recheck the agent booked, your answer, other events), with each group's round count, reported usage and a few round numbers, so a rule that keeps rechecking stands out (#414). - `agent-autoloop join` on a remote worker used to accept a hub address missing `https://`, using a non-HTTP scheme, or carrying credentials or a query string, report success, and leave a broken config that kept failing and blocked a retry with the right address. Such addresses are now refused before any config is written or service installed, and the error doesn't echo the address (#415). Thanks to qingtian-4 and 16bh.

  4. Agent Autoloop 1.10.3v1.10.3Nov 26, 2026

    ## 改了什么 - 中台标成“不知道结果”的一轮,以前本人用 `cancel` 也停不掉,卡片一直开着;现在本人可以直接结束它,`why` 里写明是本人停掉了一轮没有回音的活,对应的卡片也会关掉(#410)。 - Agent 回执里的事件,如果编号已经被另一条不同的事件占了,以前会被悄悄丢掉;现在会列在 `rejected` 里,说明这一条没有记下。同一条事件原样重发仍然不算错(#407)。 - 命令行的 `--dry-run`、`--json`、`--no-service`、`--yes` 写在位置参数前面时,不再把后面的参数吞掉;支持 `--port=3362` 这种写法;`--yes=false` 这类给开关赋值的写法会直接报错,不再被当成已确认(#404)。 - 交付插件等一个很慢的完整检查时,等满半小时不再算一次失败,而是过一分钟再看;只有还在跑的检查才这样等,已经结束却过不了的照旧算失败。查看 GitHub 的间隔从 5 秒放宽到 30 秒,免得几个交付一起用光请求额度(#411、#413)。 - 历史很长时,状态汇总快了三倍多:20 万轮时从约 1.08 秒降到约 0.3 秒(#406)。 感谢 argszero、qihao-6、yuearc、lumina678、a495863090-hub。 ## What's changed - A round the hub marked as unknown could not be ended, even by the owner with `cancel`, and its card stayed open; the owner can now end it, `why` says the owner stopped a round that had gone quiet, and its card is closed (#410). - A receipt event whose id already holds a different event was silently dropped; it is now listed in `rejected` as not recorded. Re-sending the identical event is still a no-op, not an error (#407). - On the command line, `--dry-run`, `--json`, `--no-service` and `--yes` placed before positional arguments no longer swallow them; `--port=3362`-style flags work; assigning a value to a

  5. Agent Autoloop 1.10.2v1.10.2Nov 25, 2026

    ## 改了什么 - 本人停掉的一轮,如果接单程序没法确认进程已经结束,以前 `why` 只显示“已停止”,接单程序说的原因被丢掉;现在会显示接单程序给的原因,让你知道进程可能还在跑(#402)。 - 一轮超时后接单程序停不掉也看不到它的进程时,以前记下的原因写着“已停止”;现在照实写“没能确认停止,进程可能还在跑”。结果和重试都不变(#395)。 - 在 Agent 的一轮里运行 `up` 重启正在派这一轮的中台,会让中台跟着这一轮一起结束、而且没有任何提示;现在会拒绝并说明怎么重启(登录服务、启动文件夹,或自己的终端)。在临时目录里另起的中台不受影响(#401)。 - 通道收到的卡片带上了 `lane`,通道可以把卡片发回事项来的地方,比如原来的群或话题(#393)。 - `init` 遇到不合法的端口时,以前会留下装了一半的状态;现在先检查端口再动手(#399)。 - Windows 上接单程序改用进程句柄检查自己启动的任务,检查更快(#396)。 感谢 argszero、qihao-6、novawind-go、yaoyouzhong、16bh。 ## What's changed - When a round the owner stopped came back failed because the worker could not confirm its process group had ended, `why` showed only 已停止 and dropped the worker's reason; it now shows that reason, so you know the process may still be running (#402). - After a timeout, when the worker could neither see nor signal a round's processes, the stored reason still said the round had been stopped; it now says the stop could not be confirmed and the process may still be running. The outcome and the retry are unchanged (#395). - Running `up` from inside an Agent round to restart the hub that dispatched it took the hub down with the round, silently; it is now refused with how to restart instead (lo

Code frequency

additions and deletions
+41.8K-41.8KWeek of 2026-11-01: +41,845 linesWeek of 2026-11-01: -9,600 linesWeek of 2026-11-08: +5,049 linesWeek of 2026-11-08: -790 linesWeek of 2026-11-15: +2,345 linesWeek of 2026-11-15: -537 linesWeek of 2026-11-22: +1,798 linesWeek of 2026-11-22: -217 linesWeek of 2026-11-29: +125 linesWeek of 2026-11-29: -123 linesNov 1, 2026Nov 29, 2026
+51.2K lines added, -11.3K removed over the last year.

Commits per week

last 52 weeks
1520Week of 2025-12-07: 0 commitsWeek of 2025-12-14: 0 commitsWeek of 2025-12-21: 0 commitsWeek of 2025-12-28: 0 commitsWeek of 2026-01-04: 0 commitsWeek of 2026-01-11: 0 commitsWeek of 2026-01-18: 0 commitsWeek of 2026-01-25: 0 commitsWeek of 2026-02-01: 0 commitsWeek of 2026-02-08: 0 commitsWeek of 2026-02-15: 0 commitsWeek of 2026-02-22: 0 commitsWeek of 2026-03-01: 0 commitsWeek of 2026-03-08: 0 commitsWeek of 2026-03-15: 0 commitsWeek of 2026-03-22: 0 commitsWeek of 2026-03-29: 0 commitsWeek of 2026-04-05: 0 commitsWeek of 2026-04-12: 0 commitsWeek of 2026-04-19: 0 commitsWeek of 2026-04-26: 0 commitsWeek of 2026-05-03: 0 commitsWeek of 2026-05-10: 0 commitsWeek of 2026-05-17: 0 commitsWeek of 2026-05-24: 0 commitsWeek of 2026-05-31: 0 commitsWeek of 2026-06-07: 0 commitsWeek of 2026-06-14: 0 commitsWeek of 2026-06-21: 0 commitsWeek of 2026-06-28: 0 commitsWeek of 2026-07-05: 0 commitsWeek of 2026-07-12: 0 commitsWeek of 2026-07-19: 0 commitsWeek of 2026-07-26: 0 commitsWeek of 2026-08-02: 0 commitsWeek of 2026-08-09: 0 commitsWeek of 2026-08-16: 0 commitsWeek of 2026-08-23: 0 commitsWeek of 2026-08-30: 0 commitsWeek of 2026-09-06: 0 commitsWeek of 2026-09-13: 0 commitsWeek of 2026-09-20: 0 commitsWeek of 2026-09-27: 0 commitsWeek of 2026-10-04: 0 commitsWeek of 2026-10-11: 0 commitsWeek of 2026-10-18: 0 commitsWeek of 2026-10-25: 0 commitsWeek of 2026-11-01: 152 commitsWeek of 2026-11-08: 63 commitsWeek of 2026-11-15: 47 commitsWeek of 2026-11-22: 33 commitsWeek of 2026-11-29: 7 commitsDec 7, 2025Nov 29, 2026
302 commits in the last 52 weeks.

When work happens

weekday and hour
SunMonTueWedThuFriSat036912151821Sun 0:00 — 0 commitsSun 1:00 — 1 commitsSun 2:00 — 0 commitsSun 3:00 — 0 commitsSun 4:00 — 0 commitsSun 5:00 — 1 commitsSun 6:00 — 0 commitsSun 7:00 — 0 commitsSun 8:00 — 0 commitsSun 9:00 — 12 commitsSun 10:00 — 1 commitsSun 11:00 — 0 commitsSun 12:00 — 0 commitsSun 13:00 — 0 commitsSun 14:00 — 2 commitsSun 15:00 — 3 commitsSun 16:00 — 0 commitsSun 17:00 — 0 commitsSun 18:00 — 0 commitsSun 19:00 — 0 commitsSun 20:00 — 0 commitsSun 21:00 — 1 commitsSun 22:00 — 3 commitsSun 23:00 — 0 commitsMon 0:00 — 0 commitsMon 1:00 — 2 commitsMon 2:00 — 0 commitsMon 3:00 — 3 commitsMon 4:00 — 0 commitsMon 5:00 — 0 commitsMon 6:00 — 0 commitsMon 7:00 — 0 commitsMon 8:00 — 0 commitsMon 9:00 — 9 commitsMon 10:00 — 0 commitsMon 11:00 — 0 commitsMon 12:00 — 0 commitsMon 13:00 — 0 commitsMon 14:00 — 0 commitsMon 15:00 — 7 commitsMon 16:00 — 0 commitsMon 17:00 — 0 commitsMon 18:00 — 0 commitsMon 19:00 — 0 commitsMon 20:00 — 1 commitsMon 21:00 — 1 commitsMon 22:00 — 1 commitsMon 23:00 — 0 commitsTue 0:00 — 0 commitsTue 1:00 — 1 commitsTue 2:00 — 0 commitsTue 3:00 — 1 commitsTue 4:00 — 1 commitsTue 5:00 — 0 commitsTue 6:00 — 0 commitsTue 7:00 — 1 commitsTue 8:00 — 0 commitsTue 9:00 — 8 commitsTue 10:00 — 1 commitsTue 11:00 — 0 commitsTue 12:00 — 0 commitsTue 13:00 — 0 commitsTue 14:00 — 0 commitsTue 15:00 — 1 commitsTue 16:00 — 1 commitsTue 17:00 — 2 commitsTue 18:00 — 1 commitsTue 19:00 — 0 commitsTue 20:00 — 0 commitsTue 21:00 — 12 commitsTue 22:00 — 2 commitsTue 23:00 — 3 commitsWed 0:00 — 3 commitsWed 1:00 — 4 commitsWed 2:00 — 1 commitsWed 3:00 — 4 commitsWed 4:00 — 4 commitsWed 5:00 — 5 commitsWed 6:00 — 1 commitsWed 7:00 — 0 commitsWed 8:00 — 0 commitsWed 9:00 — 8 commitsWed 10:00 — 1 commitsWed 11:00 — 0 commitsWed 12:00 — 0 commitsWed 13:00 — 1 commitsWed 14:00 — 5 commitsWed 15:00 — 1 commitsWed 16:00 — 3 commitsWed 17:00 — 7 commitsWed 18:00 — 4 commitsWed 19:00 — 5 commitsWed 20:00 — 5 commitsWed 21:00 — 4 commitsWed 22:00 — 4 commitsWed 23:00 — 0 commitsThu 0:00 — 0 commitsThu 1:00 — 5 commitsThu 2:00 — 3 commitsThu 3:00 — 3 commitsThu 4:00 — 0 commitsThu 5:00 — 1 commitsThu 6:00 — 1 commitsThu 7:00 — 6 commitsThu 8:00 — 6 commitsThu 9:00 — 6 commitsThu 10:00 — 0 commitsThu 11:00 — 0 commitsThu 12:00 — 1 commitsThu 13:00 — 7 commitsThu 14:00 — 1 commitsThu 15:00 — 3 commitsThu 16:00 — 2 commitsThu 17:00 — 5 commitsThu 18:00 — 1 commitsThu 19:00 — 5 commitsThu 20:00 — 2 commitsThu 21:00 — 1 commitsThu 22:00 — 1 commitsThu 23:00 — 1 commitsFri 0:00 — 6 commitsFri 1:00 — 3 commitsFri 2:00 — 1 commitsFri 3:00 — 0 commitsFri 4:00 — 0 commitsFri 5:00 — 0 commitsFri 6:00 — 0 commitsFri 7:00 — 0 commitsFri 8:00 — 0 commitsFri 9:00 — 24 commitsFri 10:00 — 1 commitsFri 11:00 — 1 commitsFri 12:00 — 0 commitsFri 13:00 — 1 commitsFri 14:00 — 0 commitsFri 15:00 — 7 commitsFri 16:00 — 1 commitsFri 17:00 — 0 commitsFri 18:00 — 0 commitsFri 19:00 — 1 commitsFri 20:00 — 1 commitsFri 21:00 — 3 commitsFri 22:00 — 0 commitsFri 23:00 — 1 commitsSat 0:00 — 2 commitsSat 1:00 — 6 commitsSat 2:00 — 0 commitsSat 3:00 — 1 commitsSat 4:00 — 0 commitsSat 5:00 — 0 commitsSat 6:00 — 0 commitsSat 7:00 — 0 commitsSat 8:00 — 0 commitsSat 9:00 — 17 commitsSat 10:00 — 1 commitsSat 11:00 — 0 commitsSat 12:00 — 0 commitsSat 13:00 — 0 commitsSat 14:00 — 1 commitsSat 15:00 — 6 commitsSat 16:00 — 1 commitsSat 17:00 — 0 commitsSat 18:00 — 0 commitsSat 19:00 — 0 commitsSat 20:00 — 0 commitsSat 21:00 — 3 commitsSat 22:00 — 0 commitsSat 23:00 — 0 commits
Commit volume by weekday and hour (UTC). Larger dots mean more commits.

Who is committing

last 52 weeks
Maintainer commits174 (59%)
Community commits123 (41%)

297 commits in total over the last year.

DateListRankStars gained
Nov 9, 2026daily#1n/a
Nov 8, 2026daily#1n/a
  • morluto/rea

    Reverse engineer anything with agents, from app behavior down to native binaries.

    486.9K stars · TypeScript

  • freeCodeCamp/freeCodeCamp

    freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.

    459.9K stars · TypeScript

  • openclaw/openclaw

    The AI that really does things. Any OS. Any Platform. The lobster way. 🦞

    395.6K stars · TypeScript

  • awesome-selfhosted/awesome-selfhosted

    A list of Free Software network services and web applications which can be hosted on your own servers

    342.5K stars

  • affaan-m/ECC

    The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

    315K stars · JavaScript

  • NousResearch/hermes-agent

    The agent that grows with you

    267.7K stars · Python