agentty is an open-source coding agent for terminal environments, written in C++26 and provided as a single static binary, intended as an alternative to Claude Code. Its core design philosophy is to be fast, lightweight, and not tied to a specific model vendor.
Purpose
agentty is used for AI pair programming in the terminal, helping developers complete tasks such as writing, modifying, debugging, and refactoring code. It is suitable for developers who want to avoid Node/Python runtime dependencies, pursue fast startup, need to flexibly switch between multiple large models, or need to safely run coding agents in sandboxed or air-gapped environments.
Main capabilities
- Native performance: A single static binary of about 16.7 MB, cold start of about 3 milliseconds, with no Node, Python, npm, or node_modules dependencies.
- Model-agnostic: Supports Claude Pro/Max (OAuth login), OpenAI, Groq, OpenRouter, Cerebras, DeepSeek, xAI (Grok), Mistral, Gemini, Fireworks, and local Ollama models, and can switch between them in real time via ^P.
- Retrieval-augmented generation (RAG): Built-in fully local retrieval engine, using hybrid BM25 + dense embeddings, RRF fusion, reranking, MMR diversification, compression, parent document expansion, GraphRAG document graph expansion, etc., sending only relevant code snippets, reportedly reducing context by more than 80%. Provides two tools, search_docs and search_code.
- Sandboxed by default: All shell calls run in an OS-level sandbox (Linux uses seccomp + landlock + cgroup2, macOS uses seatbelt + rlimits), credential files are masked, and file tools reject paths outside the workspace.
- Air-gapped mode: Can run via SSH on hosts without internet access, with end-to-end TLS pinning.
- Scripting and CI: Supports single execution with agentty run "prompt", and provides options such as --json, --timeout, --events jsonl, --read-only --no-network, etc.
- Complete tool suite: read, write, edit, bash, grep, glob, git, web, search_docs, search_code, task, each tool is equipped with a dedicated interface component.
- Learning the codebase: Supports Agent Skills and remember/forget memory, combined with a local RAG engine, and can remember project conventions across sessions.
- Smart Mode: An orchestrator-worker design, where a flagship model plans and cheaper models execute subtasks, adjusting the level of effort according to complexity, and learning across sessions.
- Editor integration: Runs in the Zed editor via the Agent Client Protocol (ACP).
- Loop sending: ^B can automatically resend the same prompt repeatedly until ^B is pressed again.
- Code block execution: ^G lists the code blocks from the previous reply, which can be executed interactively in a real terminal, supports sudo password prompts, and the output can be appended to the input box.
- Skill system: Supports SKILL.md files, is compatible with Claude Code's .claude/skills/ format, can declare effects: [exec, net], and can be installed via agentty skill add.
Usage
On first launch, an authentication interface will open, where you can paste an API key (such as Anthropic sk-ant-... or another provider's key), or use a local Ollama model that requires no key, or log in with Claude Pro/Max OAuth. After that, simply enter a prompt and press Enter.
Installation methods include: downloading a precompiled binary from the releases page (the filename includes the version number), or using an installation script to automatically resolve the version; on Termux/Android, it can be installed to $PREFIX/bin via the installation script; it can also be compiled from source, requiring a C++26 toolchain (GCC 14+, a newer Clang, or MSVC), with CMake presets such as debug, release, ci, and sanitizer provided.
When integrating in Zed, you need to add the ACP configuration in Zed settings.
Use cases
- Quick coding assistance within the terminal, without installing a Node/Python environment.
- Need to flexibly switch between multiple model providers or use local models.
- Have security requirements, need sandbox isolation or air-gapped operation.
- Automate coding tasks in CI or scripts.
- Use an AI programming assistant within the Zed editor.
- Use in an Android/Termux environment (shell/build tools do not run sandboxed on unrooted Android).
Limitations
- Requires a C++26 toolchain to compile from source.
- On unrooted Android, shell/build tools do not run sandboxed (Bubblewrap requires user namespaces, which Android does not grant).
- Some advanced RAG features (such as query expansion, HyDE, and GraphRAG community summaries) are disabled by default, need to be enabled via environment variables, and may consume model calls.
- The semantic retrieval part requires a local Ollama server to provide embeddings, otherwise it falls back to keyword-only search.
- Specific fees, pricing, platform support details, performance data, etc. are not yet provided.