Introduction
A local AI agent runner — terminal, daemon, and Telegram, sharing one session.
Built on the Anthropic SDK, Agent AFK runs outside Claude Code as its own process — a full agentic runtime you own completely. Hand it long or multi-step work and check in asynchronously: it delegates the work and leaves the judgment to you.
npm install -g agent-afkWho it's for
- Developers who want to hand long or multi-step tasks to an AI agent and check in asynchronously, rather than babysitting a terminal.
- Engineers running headless, CI-adjacent workflows that need model reasoning, bash access, and subagent orchestration without a human in the loop.
- Anyone who wants Telegram supervision — a phone ping the moment work lands in a terminal (finished) state — without standing up a server.
Four surfaces, one session manager
Every surface shares the same context, memory, and tools — so work started in one can be picked up in another.
One-Shot Chat
afk chat — a single pipe-friendly turn that scripts well.
Interactive REPL
afk i — slash commands, plan mode, and streaming output.
Daemon
afk daemon — a long-running, cron-friendly headless agent.
Telegram Bot
afk telegram start — the same tools and memory, on your phone.
Key capabilities
Subagent orchestration
Run many subagents at once — independent tasks run in parallel, dependent ones wait their turn.
Slash skills
A registry of built-in slash commands plus auto-discovered SKILL.md plugins, with typo-tolerant command suggestions.
Verification workflows
Skills like /review and /diagnose fan parallel checks across a change before surfacing a recommendation.
Local traces
Every run appends an inspectable trace — tool calls, gate decisions, cost — readable with afk trace show.
Telegram supervision
Get a phone ping when a scheduled task lands, then reply to drive the session from anywhere.
Unattended guardrails
Cost ceilings, turn limits, and worktree isolation keep long unattended runs in bounds.
Safety & verification controls
Agent AFK ships blast-radius controls — the guardrails that keep unattended runs safe — out of the box:
- Cost guardrails —
AFK_MAX_BUDGET_USD(or--max-budget-usdonafk chat) aborts a turn that would breach the cost ceiling. - Turn limits —
--max-turnscaps total turns (afk chatdefaults to 10,afk ito 100), preventing runaway sessions. - Bypass permissions — by default tool calls run without per-tool approval prompts, which is intentional for unattended work.
- Worktree isolation —
--worktreecreates a git worktree for the session; on clean exit it is removed automatically.
Local-first, no phone-home
Agent AFK keeps all state under ~/.afk/ — sessions, memory, plugins, logs, daemon state. There is no analytics or remote telemetry: it never sends your prompts, code, or usage anywhere except directly to the model provider you configure. What telemetry exists is local JSONL you can read or delete.
Ready to go deeper? Start with the Quickstart, then see How It Works.