AFT
Gives coding agents a real IDE and OS: symbol-aware perception, precise edits, and a persistent background runtime.
- Source repo
- cortexkit/aft
- Stars
- ★ 337
- Last updated
- today
- License
- MIT
- Primary language
- Rust
- FA score
- 74/100 · Some gaps
At a glance
- Works with
- Portable with changes
- You'll need
- Typical use
- Developers already on OpenCode or Pi whose agent burns tokens reading whole files, who want aft_outline and aft_zoom to fetch structure instead.
- Main limitation
- Only three adapters exist today (OpenCode, Pi, and OMP via the Pi plugin); other hosts, MCP, and other frameworks are listed as future work.
- Maintenance
- Commits in the last 30 dayslast commit 2026-11-10latest release v0.63.5 (2026-11-01)
- Source review
- 74/100 · Some gaps
What does this agent do, and when should you use it?
AFT is the "sensorimotor cortex" of the CortexKit plugin family: a Rust core binary plus thin per-harness adapters that let a coding agent see code as structure and edit it at the symbol level. The binary speaks JSON-over-stdio, keeps one process per project root alive across sessions, and bundles tree-sitter parsing for roughly 27 languages, symbol and call-graph analysis, trigram and semantic indexes, and an LSP client. Adapters exist for OpenCode (@cortexkit/aft-opencode) and Pi (@cortexkit/aft-pi), with OMP supported through the Pi plugin; they hoist the host's built-in read/write/edit/bash/grep slots and add an aft_ tool family on top. Installation is npx @cortexkit/aft@latest setup, which detects installed harnesses, writes their config, and resolves the binary via cache, npm platform package, PATH, cargo install, or GitHub release. Backups, indexes, and downloaded LSP servers live under ~/.local/share/cortexkit/aft/, and the project is MIT licensed.
Perception: aft_outline lists every symbol in a file, directory, or remote URL with kind, name, line range, visibility, and nested members; aft_zoom drills into one function or type and can annotate callers and callees with callgraph: true; aft_search runs hybrid semantic plus lexical retrieval over an index using local, OpenAI-compatible, or Ollama embedding backends; aft_callgraph follows callers, callees, data flow, and the shortest call path between symbols; aft_inspect returns one health report with LSP errors and warnings, TODOs, metrics, dead code, unused exports, and duplicates. Action: edit supports fuzzy find/replace, replacing a named symbol, batch and multi-file transactions, and glob replace; write creates directories, backs up, formats, and optionally returns inline diagnostics; apply_patch handles multi-file Begin Patch format with atomic rollback; aft_import adds, removes, and organizes imports per language; ast_grep_search and ast_grep_replace do structural matching with meta-variables. Runtime: bash rewrites commands (cat to read, grep to the grep tool) and compresses per-command output; background: true spawns detached tasks managed with bash_status, bash_kill, and bash_watch; PTY sessions are driven with bash_write and inspected via bash_status; aft_safety keeps a per-file undo stack, named checkpoints, and restore. grep/glob run on trigram indexes built in the background, persisted to disk, refreshed by a file watcher, and honoring .gitignore plus an optional .aftignore.
- Developers already on OpenCode or Pi whose agent burns tokens reading whole files, who want aft_outline and aft_zoom to fetch structure instead.
- TypeScript or frontend teams doing cross-file renames or import cleanup, replacing fragile line-based edits with symbol replacement and aft_import.
- Engineers dropped into a large unfamiliar repository who need aft_callgraph and aft_inspect to map call chains, dead code, and duplicated logic.
- People whose agent runs test suites, installers, docker ps, or kubectl and drowns in logs, using output compression plus background tasks and bash_watch.
- Users who need the agent to drive a REPL, vim, or a nested terminal, using PTY sessions through bash_write and bash_status.
- Teams that want a safety net around agent edits, relying on aft_safety's per-file undo stack and named checkpoints.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
npx @cortexkit/aft@latest setupnpx @cortexkit/aft@latest setup --harness opencodenpx @cortexkit/aft@latest setup --harness pinpx @cortexkit/aft@latest setup --harness omp
- Config files
~/.config/cortexkit/aft.jsonc~/.config/opencode/opencode.jsonc- Runtime
- Bun 1.0+
How do you install or deploy this agent?
Prerequisites: Node.js (for npx) and a target harness (OpenCode or Pi; OMP goes through the Pi plugin). Run the unified installer:
npx @cortexkit/aft@latest setupTarget a single harness if you prefer:
npx @cortexkit/aft@latest setup --harness opencode
npx @cortexkit/aft@latest setup --harness pi
npx @cortexkit/aft@latest setup --harness ompBuilding from source for development needs Bun ≥ 1.0 and Rust stable 1.92+:
bun install
cargo build --release
bun run buildHow do you use this agent?
On the next session start after setup, the aft binary downloads if needed and all tools come online. Configure at user or project level with aft.jsonc:
// ~/.config/cortexkit/aft.jsonc or <project>/.cortexkit/aft.jsonc
{
"enabled": true,
"inspect": {
"duplicates": {
"expected_mirrors": [["packages/opencode-plugin/**", "packages/pi-plugin/**"]]
}
}
}Diagnostics and cache management:
npx @cortexkit/aft@latest doctor
npx @cortexkit/aft@latest doctor --fix
npx @cortexkit/aft@latest doctor lspTo uninstall, first remove the harness registration: in OpenCode, delete the @cortexkit/aft-opencode entry from the top-level "plugin" array in ~/.config/opencode/opencode.jsonc; in Pi run:
pi remove npm:@cortexkit/aft-piWhat are this agent's strengths and limitations?
- It actually hoists the host's built-in tool slots (read, write, edit, bash, grep), so the agent keeps its normal call patterns while gaining tree-sitter parsing, indexed search, and output compression.
- One persistent Rust process per project root is shared across sessions, keeping parse trees warm while each session keeps an isolated undo history.
- Every mutation is parsed, formatted, and backed up before it hits disk, and aft_safety adds per-file undo stacks and named checkpoints for fine-grained rollback.
- Output compression targets noisy CLIs such as test runners, installers, docker ps, and kubectl, keeping errors and summaries while dropping the firehose.
- Broad language coverage: the README lists around 27 languages and calls out special handling for Metal, CUDA, Objective-C headers, and TOML.
- MIT licensed, published as a crate and npm packages, and not tied to one model vendor since semantic search can use local or Ollama embedding backends.
- Only three adapters exist today (OpenCode, Pi, and OMP via the Pi plugin); other hosts, MCP, and other frameworks are listed as future work.
- The benchmark suite is still in progress, so there are no published numbers for search latency, retrieval quality, token reduction, or end-to-end task success.
- Building from source requires Rust 1.92+ (pinned by the oxc 0.126 dependency family) with incremental compilation disabled by default, making first builds heavy.
- Coverage is uneven by language: Scala, Bash, HTML/Markdown, YAML, and TOML lack AST or import support, and Python refactoring is partial, missing cross-file moves.
- Semantic search needs an embedding backend choice; picking an OpenAI-compatible or remote backend means code snippets leave the machine.
- Contributions require an issue with the design-approved label before a PR is reviewed, which slows down drive-by fixes.
How does this agent compare with similar options?
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| AFT This agent | 74 · Some gaps | — | ★ 337 | today | Rust | — |
| CodeGraph | 57 · Major gaps | CLIFree + model costs | ★ 915 | 1mo ago | Rust | Claude Code · OpenAI API · Claude API |
| Graphicle | 84 · Good | CLIFree + model costs | ★ 556 | 1d ago | Rust | Codex · Claude Code |
| CodeSeek | 55 · Major gaps | CLIFree + model costs | ★ 760 | 3mo ago | Rust | Codex · Claude Code |
How does FollowAgents rate this agent?
Why each dimension lost points
The docs explain data locations, project-config trust boundaries, which environment-variable names are disclosed, storage permissions, and per-file undo/checkpoints, supporting high scores for data-flow transparency, sensitive-data handling, and rollback. Setup replaces host built-in tools and exposes bash, background tasks, and PTY; the packet mentions permission scanning for OpenCode but does not establish confirmation for every high-impact action or least-privilege defaults throughout. Binary resolution includes npm, PATH, cargo, and GitHub, while the packet gives little detail on dependency-security policy. The MIT license and author field provide limited attribution; publisher identity and maintenance contact are unverified.
The README, configuration reference, and source excerpts broadly align on the Rust core, host adapters, persistence, and tool interface; the docs also disclose unresolved behavior such as repeated PTY log reads and replay. Platform binaries and several resolution fallbacks support availability, but the packet establishes neither availability commitments nor local execution evidence. The CLI formats fatal errors readably, and config reload errors retain the last good value and report the issue; coverage of failure cases is incomplete.
The README targets OpenCode, Pi, and OMP across many coding-language scenarios. Configuration details distinguish user/project permissions, platform behavior, and host behavior, and the docs state support boundaries and limitations. Automatic host detection and session-start loading are convenient, though trigger rules are not equally specific across all supplied excerpts.
The README, tool/config/CLI references, and architecture overview form a clear information structure. Quick installation, per-host setup, uninstall, examples, language differences, and known limits are documented; the MIT license text is complete. Package and tool names are visible, but the packet contains no conventional release changelog or clear maintainer responsibility/support commitment, so those scores remain low.
Symbol-aware inspection and editing, semantic search, call graphs, indexed retrieval, and background tasks provide concrete added value for coding agents. The docs describe usable outputs, narrowing controls, task status, and recovery. The productivity and token-saving benefits are asserted, while benchmarks are still in progress, so cost-benefit does not receive full marks.
README claims can be traced to the architecture, configuration docs, and supplied source excerpts. The investigation documents name implementation sites, measurement scope, and unresolved items, which supports traceability and separation of facts from inferences. Corroboration is incomplete because source files are samples and no execution or independent testing evidence is supplied; confidence therefore remains low.
- Setup replaces some host built-in tools and enables broad codebase and shell operations; review host registration, configuration, and project trust settings before use.
- The README says benchmarks are still in progress, so productivity and token-saving claims are not yet established by published benchmark results.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
Release notes excerpt
v0.63.5 AFT 0.63.5 fixes two problems introduced in 0.63.4. It has no other changes. Fixed - AFT starts again inside a Linux sandbox that does not let it read the disk root, such as nono with Landlock. 0.63.4 stopped at startup there ([#1245](https://github.com/cortexkit/aft/issues/1245)). - aft_inspect on two or more files outside the project no longer fails with "refused again after it was approved" after the first approval in OpenCode 2 daemon mode ([#1258](https://github.com/cortexkit/aft/issues/1258); thanks @iceteaSA).View on GitHub ↗ -
Release notes excerpt
v0.63.4 AFT 0.63.4 replaces 0.63.0 through 0.63.3, which were not published because their release builds failed. It adds shell memory limits, changed-file reports and a separate cache location. Diagnostics, call graphs, command recovery and permissions are fixed, with lower resource use. Upgrading - Outdated call graphs and symbol caches rebuild on use; call-graph caches take about three quarters less disk space. …View on GitHub ↗
FAQ
How is this different from handing my agent a few MCP tools?
Does my code leave the machine?
Will upgrading or uninstalling destroy data?
Which languages work, and where are the gaps?
Do background tasks and PTY sessions survive an agent restart?
Is AFT open source?
Is AFT safe to use?
Is AFT still maintained?
Who makes AFT?
Thanks — we use this to improve the page.