KKKKhazix/agent-autoloop
A self-hosted event hub for CLI agents that pause for approval and resume work
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Tracked from daily D1 telemetry snapshots. Hover any data point for exact daily star counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Agent Autoloop is an event-driven TypeScript hub that runs CLI agents in discrete turns. Its deterministic kernel/ matches normalized events against local rules, coalesces pending updates for the same work item, and projects state from an append-only fact log. host/ owns the Node HTTP server, filesystem, clock, SQLite connection, and plugin loading. The log and indexes are committed together before the hub acknowledges a write.
protocol/ defines schemas and validation; worker/ claims work, runs the agent, sends heartbeats, and submits the result. The subprocess contract is the final reply, optionally carrying an agent-autoloop JSON receipt for a decision, notification, scheduled recheck, or follow-on event. Sources, agents, notification channels, and delivery are separate plugin interfaces. The CLI entrypoint runs from bin/agent-autoloop.ts into cli/main.ts.
Key Capabilities & Differentiators
Built-in adapters cover Claude Code, Codex, ACP, DeepSeek Harness, ZCode, and generic commands. Multi-turn Q&A and cross-process resumption were tested with Claude Code, Codex, and ACP setups using the official Codex adapter and Agentica 1.6.1. ZCode was tested for a question-and-answer round trip back into the same session. Operators can validate and preview rule changes, pause rules and explicitly replay skipped events, and inspect individual runs and wakeup reasons from the CLI.
When a turn asks for a decision, the hub stores the pending state and the agent exits; no agent process runs or consumes tokens while waiting. On an Apple M5 Pro with 24 GB RAM and Node 24.21.0, the hub measured 88.78 ms cold start, 59.94 MB idle RSS, 170.49 MB RSS with 1,000 waiting long polls, 2,394 individually committed writes per second, and 1.82 ms p99 dispatch latency. These are hub measurements, not model response times.
Trade-offs & Limitations
Compared with cron and shell scripts, Autoloop adds durable waits, session resumption where supported, and a trace of why work ran. Compared with a CI pipeline, it is useful when an agent must decide what to do next or ask a person; CI remains the simpler choice for fixed build and test stages. There is no built-in dashboard, the generic command adapter does not preserve sessions, and Feishu has stronger verification coverage than the four generic webhook templates tested only against local mocks.
External text is passed as data files rather than interpolated into prompts, and incoming events cannot override the agent, working directory, or access settings. Those controls do not replace restricting what an agent is allowed to do. The eight-hop cutoff bounds event chains but also stops legitimate chains that exceed it. Retained history increases disk usage and slows summaries; the measured full rebuild after a format change took 48.2 seconds at 1.1 million facts. Crash tests covered forced process termination, not whole-machine power loss.
Hardware & Deployment Guide
The self-hosted CLI runs on Windows, macOS, and Linux. It requires Node.js 24 or later, Git, and an installed, authenticated CLI agent; the documented macOS/Linux install path also uses curl. Install and update target published releases. agent-autoloop try exercises the ask, exit, answer, and resume path with the local agent. Rules live in ~/.agent-autoloop/rules.json; an invalid or unreadable update leaves the previous rules active.
A single-machine deployment with desktop notifications needs no public inbound port. Link-based approvals require hub.publicUrl to be reachable from the answering device; webhook sources also need a route to the hub, so validate connectivity before depending on either. Self-hosting the hub does not make model calls offline. v1.11.3 fixed Windows desktop notices when the hub starts before the desktop is ready; v1.11.2 fixed review persistence for PR descriptions ending in an empty Codex review section; v1.11.1 corrected doctor checks for hub URLs with a trailing slash.
ask receipt persists a decision card and lets the agent process exit; supported adapters resume the session after an answer.why traces an individual run.check, preview routing with emit --dry-run without writing to the log, and explicitly replay events skipped during a pause.Developers and small teams already using CLI agents who want to turn issue follow-up, recurring reports, and operational triage into auditable workflows that can pause for human judgment.
A fixed cron job or CI pipeline already does the job, you need a managed visual workflow console, or you expect self-hosting the hub to make model inference offline.
Quick Start & Installation
curl -fsSL https://raw.githubusercontent.com/KKKKhazix/agent-autoloop/main/install.sh | sh
Comparison vs. Top Agents & Frameworks Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| agent-autoloop ★ | 7.1k | +404 | TypeScript | MIT | A self-hosted event hub for CLI agents that pause for approval and resume work |
| n8n | 213.1k | +787 | TypeScript | — | Visual Node.js platform for self-hosted workflows and multi-step AI agents |
| activepieces | 25.9k | +104 | TypeScript | — | Self-hosted TypeScript automation with visual workflows and reusable MCP tools |
| OpenHands | 94.8k | +374 | TypeScript | MIT | Self-hosted control plane for coding agents across local, remote, and cloud back |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/KKKKhazix/agent-autoloop.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about agent-autoloop
How does a CLI agent pause for approval and pick up where it left off?
agent-autoloop block in its final reply. An ask receipt creates a decision card; the agent process exits, and the reply schedules a new turn. Tested session-aware adapters can resume the prior conversation across processes. The generic command adapter uses an argument array rather than shell interpolation, but does not provide session continuity.Does the hub need a GPU, and how should I size the host?
Can I self-host Agent Autoloop for commercial work?
When is Autoloop a better fit than cron or a CI workflow?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy