What is agentafk
Agent AFK is an open-source runtime for coding agents designed to operate without constant supervision. It allows developers to start a task and walk away, with the agent building features, verifying its own work, and notifying the user when done. It runs locally, supports any model provider (including local models), and is licensed under Apache-2.0.
How to use agentafk
Install the CLI globally via npm: npm install -g agent-afk (requires Node ≥20). After installation, the afk command is available on your PATH. You can start tasks interactively in the terminal, run them in the background via a daemon, or supervise remotely through a Telegram bridge. The agent follows a written operating contract with explicit terminal states: Done, Blocked, Asking, or Interrupted.
Features of agentafk
- Subagent orchestration: Spawns subagents by default; one interrupt kills the entire subagent tree.
- Prompt & skill routing: Slash commands like
/diagnose run parallel pipelines with isolated worktrees and verification.
- Local trace history: Every session, subagent, and tool call is stored under
~/.afk/ for inspection and recovery.
- Tool visibility: Inline display of every tool call, including arguments, output, and timing.
- Verification workflows: An adversarial agent re-derives claims before they reach your diff, ensuring "finished" means "correct".
- Remote supervision: Receive notifications and control runs from your phone via Telegram.
- Reversibility-aware: Fast on safe work (reversible edits, isolated worktrees), careful on risky work (commits, pushes, external calls are gated or verified).
- Memory: Preferences, conventions, and decisions are stored in
~/.afk/ and loaded in future sessions.
- Three attach surfaces: CLI REPL, background daemon, and Telegram bridge all converge on a single isolated root directory.
- Composable skills: Includes
/mint, /diagnose, /shadow-verify, /review, /ship, and more, each orchestrating parallel subagents.
Use Cases of agentafk
- Autonomous feature development: Start a feature task and walk away; the agent builds, verifies, and reports back.
- Bug diagnosis: Use
/diagnose to test parallel hypotheses in isolated git worktrees.
- Code review: Run
/review to get parallel security, correctness, API-compat, tests, and performance reviews on a diff or PR.
- Release management: Use
/ship to run pre-flight checks, tests, commit, push, and create a PR.
- Unattended background tasks: Run the daemon to handle tasks without supervision, with remote monitoring via Telegram.
Pricing
Agent AFK is free and open source (Apache-2.0). All features are included at no cost. Paid plans are for ongoing support from the maintainer:
- Open Source: $0, free forever, includes full CLI, REPL, daemon, Telegram bridge, built-in skills, subagents, hooks, MCP, plugins, local traces, and BYO model.
- Supported: $5,000/month, includes full repo + daemon + Telegram setup, custom skills, direct async access to the maintainer, and monthly working sessions.
- Dedicated: $10,000/month, includes everything in Supported plus priority response, weekly syncs, CI integration, custom orchestration, and team onboarding.
FAQ
What are the system requirements?
Requires Node ≥20 and runs on macOS or Linux.
Does it work with any model provider?
Yes, it works with any model provider, including local models. Your keys and tokens stay with your provider.
Is an account required?
No account is required to use the free version.
How does the agent verify its work?
It uses adversarial verification via /shadow-verify, where a second agent re-derives claims before they reach your diff.
What happens if the agent is unsure?
It stops and asks instead of guessing, entering an "Asking" terminal state.
Can I interrupt a running task?
Yes, one interrupt kills the entire subagent tree, and you can also interrupt remotely via Telegram.