Agent AFK
griffinwork40/agent-afk
Delegue o trabalho, mantenha o controle — agente IA com rastreamento local
Ver no GitHubPlano de controle local-first para agentes IA de longa duração, permitindo delegação de tarefas paralelas com rastreamento completo, sessões resumíveis, verificação antes do envio e notificações. Oferece múltiplas interfaces (CLI, REPL, daemon, Telegram) com memória persistente e orquestração integrada.
Instalação
npx convez-ai griffinwork40/agent-afk1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Automação de fluxos de trabalho de longa duração com verificação e auditoria
- Orquestração de agentes paralelos com rastreamento completo de execução
- Assistência produtiva em terminal com memória cross-session e comandos especializados
Veredito

Agent AFK é uma solução madura e bem-estruturada para quem precisa de automação confiável com auditoria. A arquitetura local-first, sessões resumíveis e rastreamento transparente o tornam ideal para fluxos críticos, apesar de exigir conforto com CLI e configuração em desenvolvimento.
README
A tradução para o português deste README ainda está na fila.
Agent AFK
Delegate the work. Keep the judgment.
Agent AFK is a local-first control plane for long-running AI agent work. Hand off multi-session, headless tasks to parallel agents — then stay in control with traces you can read (
afk trace show), resumable sessions, verification passes before anything ships, and a phone ping the moment work lands in a terminal state. Bring your own model.
Install
npm install -g agent-afk
Requires Node ≥ 22.
Smoke test:
afk --version # confirm the install (works before login)
afk doctor # environment self-check
afk login # save an Anthropic API key or OAuth token
afk chat "hello"
What you can do with it
- Chat from your terminal —
afk chat "..."for one-shot,afk ifor a REPL with full tool access (Bash, file ops, web fetch, grep/glob, subagents). - Hand long work off to a daemon —
afk daemonruns headless. Pair it withsend_telegramand 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 showprints it back as a human-readable receipt — tool calls, gate decisions, subagent lifecycles, cost — so you can audit a run without reaching forjq. - Message Claude from Telegram —
afk telegram setupwalks 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,/reviewdispatch subagent waves./minttakes a feature idea and runs spec → research → plan → parallelize → build → verify → ship./diagnoseforks 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.
- Cross-session memory — Claude remembers preferences, decisions, and procedures across runs. Backed by SQLite at
~/.afk/agent-framework/memory/plus aHOT.mdthat injects into every future session's system prompt. - Background tasks — Ctrl+B in the REPL detaches the current turn into a tracked task;
/taskslists them,/attach <id>re-attaches.
Four surfaces, one session manager
| Command | Surface |
|---|---|
afk chat "..." | One-shot turn — pipe-friendly, scripts well |
afk i (alias of afk interactive) | REPL with slash commands, streaming, plan mode, image paste |
afk daemon | Long-running headless agent, cron-friendly |
afk telegram start | Telegram bot — same tools, same memory, on your phone |
Configuration
agent-afk keeps all of its state under ~/.afk/ — sessions, plugins, memory, logs, settings. Nothing is shared with ~/.claude/. You can delete ~/.claude entirely and afk still runs.
Local-first, no phone-home. There is no analytics or remote telemetry — Agent AFK never sends your prompts, code, or usage anywhere except directly to the model provider you configure. What telemetry exists is local JSONL under ~/.afk/ that you can read or delete.
Minimum viable config is one env var:
ANTHROPIC_API_KEY=sk-ant-...
Optional, in order of usefulness:
# Pick a model — opus | sonnet | haiku | fable (Anthropic) or codex (OpenAI)
AFK_MODEL=sonnet
# Enable the Telegram bot + send_telegram tool
TELEGRAM_BOT_TOKEN=1234567890:ABC...
AFK_TELEGRAM_ALLOWED_CHAT_IDS=12345678
# Per-task safety rails
AFK_MAX_BUDGET_USD=5.00
Project-scoped system prompt. Drop an AFK.md at your project root and afk appends it to its built-in framework prompt whenever you run from that directory — your instructions layer on top of the base, they don't replace it. No frontmatter needed.
Check what resolved. afk config dumps the live configuration. afk doctor validates keys, paths, and provider connectivity.
Models
Default is sonnet. Override per-call with --model:
afk chat "explain this stack trace" --model opus
afk i --model haiku
afk chat "refactor this" --model codex
| Model | Best for |
|---|---|
fable | Most capable — Claude Fable 5 (Mythos-class), hardest reasoning + long-horizon agentic work (1M context) |
opus | Complex reasoning, multi-step planning, long contexts |
sonnet | Day-to-day default — balanced speed and capability |
haiku | Fast, cheap, one-shots |
Useful commands
afk status # connection, model, bypass-mode state
afk doctor # environment self-check
afk config # dump resolved config
afk plugin list # installed plugins under ~/.afk/plugins/
afk completion zsh # shell completion (also: bash, fish)
afk --help # full command tree
Aliases: afk c → chat, afk i → interactive, afk s → status.
A note on permissions
afk runs with bypass permissions by default: no per-tool prompts. Claude can run bash, read and write files, fetch URLs, and call MCP servers without asking each time. This is intentional — afk is built for unattended work, where a permission prompt with no human in front of it is just a wedged session.
Use afk on a machine and account you trust. Override per-session with --permission-mode if you want stricter behavior.
Troubleshooting
invalid x-api-key / ANTHROPIC_API_KEY not found — run afk doctor. Confirm the key is set in your shell or in ~/.afk/config/afk.env.
Cannot send message: session is closed — the session timed out or was closed. Start a new one (afk i or a fresh afk chat).
Maximum turns exceeded — safety rail tripped. Bump it with --max-turns 50 or higher.
Hit the budget cap — raise AFK_MAX_BUDGET_USD or unset it for the session.
Telegram bot won't start — afk telegram status then afk telegram logs. Most common cause: missing AFK_TELEGRAM_ALLOWED_CHAT_IDS after token setup.
Changelog
Recent releases at CHANGELOG.md, also viewable in-REPL via /changelog.
License
Agent AFK is open core, licensed under Apache-2.0 (SPDX: Apache-2.0).
Use it, modify it, fork it, embed it in commercial or closed-source products — the
standard Apache conditions apply (keep the license and NOTICE, note
significant changes, and don't use the "Agent AFK" name or marks to imply
endorsement). No copyleft, no CLA.
Pro & Team add-ons (premium skill packs, team features, priority support) are
separate commercial products under their own terms — see LICENSING.md.
The core harness is, and will stay, free and open.
Contributions are accepted under the DCO
(git commit -s). "Agent AFK" is a trademark of Griffin Long. © Griffin Long.