Agent AFK
Use afk to work with an AI agent in your terminal, automate tasks, and supervise work from other surfaces.
Agent AFK (afk) is an open source AI agent runtime that runs as its own process. You can ask it to inspect a project, edit files, run commands, and delegate work, then review the results in an interactive session or an unattended workflow.
Who it's for
- Developers who want help understanding a codebase, making changes, and checking the result.
- Engineers automating recurring work who need scripted runs, scheduled tasks, or a persistent daemon.
- People supervising longer tasks who want to check progress through Telegram or a web interface instead of staying at a terminal.
You choose the model provider and configure the tools, permissions, and instructions available to the agent. Start with an interactive session before setting up unattended work.
Start here
Get started
Install afk, authenticate, and ask your first useful question.
Concepts
Understand the agent loop, sessions, context, and safety controls.
Surfaces
Start in the terminal, then explore chat, daemon, Telegram, and web workflows.
Guides
Learn task workflows, from background work to scheduling and delegation.
Reference
Look up commands, slash commands, tools, and configuration keys.
Troubleshooting
Diagnose setup, authentication, and runtime problems.
What can I do with it?
- Work through a task interactively, with follow-up questions and streaming tool results.
- Run a single prompt from a script without opening the REPL.
- Run independent investigations in parallel, or coordinate dependent work.
- Keep a long process running while you work.
- Schedule recurring tasks and run them through a persistent service.
- Supervise sessions from Telegram or use the web interface.
- Isolate code changes in a git worktree and verify the result.
- Add skills, connect MCP servers and plugins, or use local models.
- Inspect a run's trace and review usage and cost.
- Embed the runtime in your own application.
Know what you are granting
The agent can execute commands and change files with your account's access. A new CLI installation starts in bypassPermissions mode, which disables path containment and path-approval prompts. Use --permission-mode default to enable path approvals, and read Safety before allowing unattended work.
Configuration, saved sessions, and local runtime artifacts normally live under ~/.afk/. Model requests go to the provider you configure, and enabled tools or integrations can send data to other services. Review tool access and extensions when connecting additional capabilities.