Agent Guard
Autonomous AI Agent Supervisor · Crash-Proof DAG Ledger & Keep-Awake
What’s New
Latest Release
• Native OS keep-awake lease daemon preventing MacBook sleep during long-running agent workflows.
• Atomic DAG task ledger with automatic crash-recovery and checkpoint verification.
• Zero-loss token compressor and 1% multi-account auto-rotator for uninterrupted execution.
curl -fsSL https://raw.githubusercontent.com/anksarvesh-lgtm/agent-guard/main/install.sh | bash
Please install and activate the Agent Guard MCP supervisor (https://github.com/anksarvesh-lgtm/agent-guard.git). Run `curl -fsSL https://raw.githubusercontent.com/anksarvesh-lgtm/agent-guard/main/install.sh | bash` in the terminal, verify with `node ~/.agent-guard/dist/cli.js doctor`, and adopt the @agent-guard rules to supervise all my development tasks with atomic ledger checkpoints and keep-awake protection.
Built for engineers running autonomous coding agents.
Every step requires tangible proof in the note. Agents cannot skip steps or lower test coverage unnoticed.
When you start an overnight build or refactor, Agent Guard locks OS sleep until all DAG steps finish, then gracefully releases.
When primary quota drops to ≤1%, Agent Guard automatically switches API keys or accounts with zero downtime.
Over 269 active skills loaded on demand to prevent prompt pollution while providing enterprise expertise.
Agents get lost in complex refactors without strict DAG constraints. Agent Guard enforces atomic step execution, records verified test output proof in .agent/ledger.json, and requires a git commit after every milestone.
Works with every AI agent and IDE you use.
Google Antigravity
Native stop-hook integration, IDE feedback loop breaker, and MCP stdio supervisor.
Claude Code CLI
One-prompt configuration with automatic skill discovery, cost counting, and lease protection.
Cursor & Windsurf
Seamless Model Context Protocol registration with auto-approved checkpoint tools.
README Highlights
Crash-proof DAG ledger architecture, verified unit test suites, and zero-telemetry design.
State Machine & Rollback
Strict ledger journaling in .agent/ledger.json with automated rollback snapshots (.prev.json). Guarantees zero lost context across unexpected shell disconnects.
Keep-Awake Assertion Leases
Direct integration with macOS power assertion APIs (IOPMAssertionCreateWithName). Prevents display or system sleep during long compilation runs or autonomous tasks.
1% Account Auto-Rotation
Continuous quota watchdog tracking token utilization across Claude, Gemini, and OpenAI accounts. Dynamically rotates active keys when remaining quota dips below 1%.
Changelog & Milestones
Continuous updates powering non-stop, reliable autonomous coding workflows.
-
Production Ready View Release
- Atomic Step Recovery: Instant rollback snapshot verification using
.agent/ledger.prev.jsonpreventing corrupt DAG states on unexpected termination. - Lease Heartbeat Watchdog: Upgraded native
caffeinateassertion lease with auto-refresh daemon and safety timeout. - Dynamic Account Rotation: Proactive credential auto-switch triggered when remaining token quota reaches <= 1%.
- Context Compressor: Intelligent context budget preservation for Gemini 1.5 Pro (2M) and Claude 3.5 Sonnet.
- Automated Doctor Suite:
cli.js doctornow performs end-to-end MCP latency and permission audits.
- Atomic Step Recovery: Instant rollback snapshot verification using
-
- Semantic Code Map: AST-based workspace indexing reducing unnecessary whole-file reads by 84%.
- Multi-IDE Compatibility: Seamless out-of-the-box support for Antigravity, Claude Code, Cursor, and Windsurf.
- Zero-Telemetry Protocol: All ledger states, logs, and cost counters remain 100% on the local filesystem.
Questions
Every single step checkpoint is atomically written to .agent/ledger.json and committed to git. When you reopen your agent and run task_status, Agent Guard resumes execution exactly from the last verified checkpoint.
Zero telemetry. Agent Guard operates 100% locally on your machine. No analytics, no phone-home servers, no telemetry pings. All state ledgers stay strictly within your local workspace.
Agent Guard invokes native macOS power assertion APIs (IOPMAssertionCreateWithName) to prevent system sleep while task steps remain in progress. As soon as all DAG steps are completed or canceled, the power assertion is instantly released.
Simply run ~/.agent-guard/dist/cli.js uninstall or remove the agent-guard entry from your IDE's mcp_config.json.
Information
Agrigence LLC
12.8 MB (Node.js & TypeScript)
Developer Tools
macOS 12+, Linux, Windows (Node 18+)
English
4+
Free (Apache 2.0 Open Source)
© 2026 Agrigence LLC