Agent AFK
Claude Code decides how the agent behaves. Agent AFK lets you edit the rules.
Agent AFK is an open-source coding-agent harness you can actually change. Run long coding tasks while you're away, use any model, and edit the rules that decide what the agent can touch, when it stops, and how it proves the work.
Agent AFK isn't "smarter than Claude Code." It's yours in a way Claude Code can't be.
<p align="center" <img src="assets/demo-placeholder.png" alt="Agent AFK interactive mode" width="820" </p
⭐ Like the idea of an agent loop you fully own? Star the repo — it's the fastest way to help other people find it.
Claude Code vs. Agent AFK
| | Claude Code | Agent AFK | |---|---|---| | Harness | Closed binary | Apache-2.0, editable | | The loop | You configure around it | You edit the loop | | Behavior | Mostly fixed | Prompts, gates, routing, skills are code | | Result | A great default agent | An agent system you own |
The model isn't the product — the loop is. Agent AFK hands you the loop as code: prompts, gates, routing, skills, traces, providers, terminal states. Edit any of them.
Install
npm install -g agent-afkRequires Node ≥ 22.
Smoke test:
afk --version # confirm the install (works before login)
afk doctor # environment self-check
afk chat "hello"Already using Claude Code or Codex? Run afk migrate — it imports your existing plugins, skills, and MCP servers. It doesn't copy files; it live-reads the source tool's dirs, so anything you install there keeps showing up in AFK with no re-run.
What you can do with it
- Chat from your terminal — afk chat "..." for one-shot, afk for a REPL with full tool access (Bash, file ops, web fetch, grep/glob, subagents).
- Hand long work off to a daemon — afk daemon runs headless. Pair it with sendtelegram and you get pings on your phone when work lands in a terminal state.
- Read the trace — every run writes an append-only record of what the agent did. afk trace show prints it back as a human-readable receipt — tool calls, gate decisions, subagent lifecycles, cost — so you can audit a run without reaching for jq.
- Message Claude from Telegram — afk telegram setup walks you through bot token + allowlist. After that you have a private chat surface backed by the same session manager as the REPL.
- Built-in orchestrators — /mint, /diagnose, /spec, /research, /ship, /review dispatch subagent waves. /mint takes a feature idea and runs spec → research → plan → parallelize → build → verify → ship. /diagnose forks parallel root-cause hypotheses for failing tests and bugs.
Agent AFK Pro: Autonomous skill-generation (/forge) and the calibrated skill-qualification rubric (/qualify) are reserved for Agent AFK Pro and are not part of the open-source build.