AFT: A Sensorimotor Cortex for Coding Agents with IDE and OS Capabilities
This repository profile is provided by osrepos.com, an open source repository discovery platform.
Summary
AFT provides coding agents with advanced IDE and OS capabilities, acting as a sensorimotor cortex for perception and action within a codebase. It enhances agent productivity and reduces token usage by offering structured code perception, precise symbol-aware edits, and background task management. Part of the CortexKit family, AFT integrates with platforms like OpenCode and Pi to elevate agent interaction with code.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
AFT, part of the CortexKit family, provides coding agents with a sophisticated IDE and OS environment. It acts as a "sensorimotor cortex," bridging an agent's reasoning with the codebase by enabling structured perception and precise action. This innovative approach helps agents interact with code more effectively, moving beyond basic read and bash commands to symbol-aware operations and intelligent code navigation.
Why Use AFT and Its Benefits
AFT significantly enhances agent productivity and reduces token usage by offering a rich set of tools categorized into three core functions:
- Sensory Cortex: Perceive. This allows agents to "see" the codebase with structure and meaning. Instead of raw text, agents can use tools like
aft_outlineto view file symbols,aft_zoomto inspect specific functions, andaft_searchfor semantic code retrieval.aft_callgraphhelps trace dependencies, whileaft_inspectprovides codebase health reports. Fastgrepandglobare also included, powered by trigram indexing. - Motor Cortex: Act. AFT empowers agents to "act" on the codebase with precision, manipulating code at the symbol level rather than line numbers. Tools like
editsupport fuzzy matching and batch edits,writehandles file creation with formatting, andapply_patchenables atomic multi-file changes. Advanced features includeaft_refactorfor workspace-wide symbol moves andaft_importfor language-aware import management.ast_grep_searchandast_grep_replaceoffer structural code manipulation. - Brainstem: Keep it Alive. This autonomic layer manages long-running tasks, noisy output, and recovery, freeing the agent's attention.
bashexecution includes command rewriting and output compression. Agents can spawnbackground tasks, manage PTY sessions, and benefit fromaft_safetywith a per-file undo stack and named checkpoints, ensuring codebase recoverability.
By providing these capabilities, AFT transforms how AI agents interact with code, making them more efficient, accurate, and robust.
Installation
Getting started with AFT is straightforward. Use the following command to set up AFT:
npx @cortexkit/aft@latest setup
This command auto-detects installed harnesses (like OpenCode or Pi) and configures them. For OpenCode, it replaces built-in read, write, edit, and apply_patch with AFT-backed versions and adds the aft_ tool family. For Pi, it replaces read, write, edit, and grep, also adding the aft_ family.
Examples
AFT offers a comprehensive suite of tools for various coding agent tasks. Here are a few examples of its capabilities:
- Structured Code Perception:
aft_outline: Get a structured view of all symbols in a file or directory.aft_search: Find code by meaning using hybrid semantic and lexical retrieval.aft_inspect: Generate a codebase health report with LSP errors, warnings, and metrics.
- Precise Code Manipulation:
edit: Perform symbol-aware find/replace operations or batch edits across multiple files.aft_refactor: Execute workspace-wide symbol moves, function extractions, or inlining.aft_import: Add, remove, or organize imports in a language-aware manner.
- Robust Environment Management:
bash: Execute shell commands with output compression and background task support.aft_safety: Utilize a per-file undo stack and named checkpoints for recovery.
For a complete list and detailed usage, refer to the official documentation.
Links
- GitHub Repository: https://github.com/cortexkit/aft
- Crates.io: https://crates.io/crates/agent-file-tools
- npm (@cortexkit/aft): https://www.npmjs.com/package/@cortexkit/aft
- Discord: https://discord.gg/DSa65w8wuf
Related repositories
Similar repositories that may be relevant next.

Agent Governance Toolkit: Policy Enforcement for Autonomous AI Agents
August 27, 2026
The Microsoft Agent Governance Toolkit (AGT) provides robust policy enforcement, zero-trust identity, and execution sandboxing for autonomous AI agents. It addresses critical security and compliance challenges, ensuring agents operate within defined boundaries and providing tamper-evident audit trails. AGT covers all 10 items of the OWASP Agentic Top 10, making it essential for shipping AI agents to production securely.
awesome-ai-agents: A Curated List of AI Agent Resources
August 18, 2026
awesome-ai-agents is a comprehensive, curated list of resources for building and understanding AI agents. It covers frameworks, tools, platforms, research papers, and more, making it an essential guide for anyone exploring the rapidly evolving field of autonomous AI systems.

nanobot: An Ultra-Lightweight, Self-Hosted Personal AI Agent Framework
August 9, 2026
nanobot is an ultra-lightweight, open-source, self-hosted personal AI agent framework built in Python. It offers a WebUI, tools, memory, multi-agent workflows, and automation capabilities, making it a versatile solution for personal AI tasks. Users can deploy it across various platforms, including chat apps, for seamless integration.

mcp-agent: Build Effective AI Agents with Model Context Protocol in Python
December 7, 2025
mcp-agent is a powerful Python framework designed to help developers build effective AI agents using the Model Context Protocol (MCP) and simple, composable workflow patterns. It fully implements MCP, providing robust support for agent lifecycle management and integrating patterns from Anthropic's 'Building Effective Agents'. This framework simplifies the creation of durable, production-ready agent applications.
Source repository
Open the original repository on GitHub.