Agent AFK

Agent AFK is a self-hosted agent runtime and orchestration harness developed by GRAIsol. Rather than acting as a wrapper around generic agent frameworks, it is built directly on Anthropic's raw Messages API and the OpenAI Codex SDK, providing a low-level runtime for long-running, autonomous development tasks. The system operates across three unified surfaces: an interactive terminal CLI, a headless background daemon, and a Telegram bot interface. All surfaces share a single session manager, SQLite-backed cross-session memory (via better-sqlite3), and a common configuration root. Developers orchestrate workflows using composable slash commands that manage tool dispatch, prompt caching, and sub-agent lifecycles. What distinguishes Agent AFK from lightweight CLI wrappers is its architectural emphasis on long-running resilience. It implements custom session lifecycles with an AbortGraph structure for transitive cancellation across sub-agent trees, per-symbol SDK audits in CI to prevent upstream drift, and an automated telemetry system that logs agent dispatches to JSONL to evaluate and qualify new skills. Agent AFK operates on a self-hosted, bring-your-own-key (BYOK) model using a git-based plugin architecture. It is distributed on a request-access basis for teams and consulting engagements.

Tags: agent harness, ai agent, cli, coding agent, developer tools

Visit Agent AFK

Key features

  • Multi-surface runtime — Operates across an interactive CLI, headless background daemon, and Telegram bot over a shared session state. - Direct API harness — Built natively against Anthropic's Messages API and OpenAI Codex SDK with native prompt caching and custom tool dispatch. - Built-in slash pipelines — Includes pre-engineered workflows such as /mint (spec to verified build), /diagnose (parallel hypothesis root-cause analysis), and /forge (skill generation). - Transitive cancellation with AbortGraph — Cleanly cancels deeply nested trees of sub-agents when an overarching task is aborted or redirected. - Telemetry-driven skill synthesis — Logs executions to JSONL, distilling patterns into evaluated skills gated behind capability benchmarks. - Persistent state management — Uses SQLite (better-sqlite3) for cross-session context, memory retention, and audit trails.

Use cases

Use Case: Autonomous End-to-End Implementation A developer uses the /mint command to execute an entire feature lifecycle from the terminal. The harness researches existing patterns in the codebase, designs the implementation, writes code, executes local tests, and verifies the final result without requiring step-by-step human intervention.

Use Case: Parallel Hypothesis Root-Cause Diagnosis When debugging complex test failures or regressions, the developer invokes /diagnose. The orchestrator forks multiple parallel sub-agents to investigate competing failure hypotheses simultaneously, returning a single consolidated diagnosis and fix strategy.

Use Case: Asynchronous Headless Task Execution A developer initiates a long-running refactoring or migration task in the CLI daemon, then disconnects from the terminal. The developer monitors execution status, answers escalation questions, and receives final verification reports on mobile via the integrated Telegram bot.

Who it is for

Agent AFK is built for senior engineers, technical leads, and consulting practitioners who require deterministic, long-running agent workflows with deep telemetry and multi-surface access. It is not intended for beginners looking for basic code autocomplete or simple stateless chat wrappers.

Install guide

Installation Agent AFK is distributed via private repository access. Once access is granted via agentafk.com, clone the repository and build the TypeScript runtime on Node.js 20+: bash # Clone and install dependencies (Node 20+ required) git clone https://github.com/graisol/agent-afk.git cd agent-afk npm install npm run build

First Run Configure your environment variables for your model providers and optional communication surfaces, then initialize the local daemon: bash # Export API credentials export ANTHROPIC_API_KEY="your-anthropic-api-key" export OPENAI_API_KEY="your-openai-api-key" # optional export TELEGRAM_BOT_TOKEN="your-telegram-bot-token" # optional # Start the background daemon ./bin/afk daemon start

Example Session Run an end-to-end autonomous build workflow using the /mint pipeline: bash # Trigger the spec -> research -> build -> verify loop ./bin/afk /mint "Add Redis-backed rate limiting middleware to the API with unit tests"

Part of CLI Coding Agents

Categories: AI Coding Agents, Code Assistants, Developer Tools

Related CLI agents

  • SWE-agent — SWE-agent is an open-source autonomous software engineering agent harness built and maintained by researchers from Princeton University and Stanford University.…
  • Weaver — Weaver is an open-source agent harness and orchestration framework maintained by sean35mm on GitHub. Built on top of the Bun…
  • Conductor — Conductor is a multi-agent orchestration harness developed by Melty Labs. It is designed to manage, coordinate, and execute parallel coding…
  • Hivelore — Hivelore is an open-source agent harness and contextual memory orchestrator created by Doucs91. It provides persistent project memory, decision tracking,…
  • Ona — Ona (formerly Gitpod's agentic platform, now part of OpenAI) is an enterprise-grade cloud agent orchestration platform that manages and runs…
  • Context Bridge — Context Bridge is an open-source CLI agent harness and context orchestration utility developed by serdardb. It is built to facilitate…
  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories