Agented
A stateful text editor designed for LLMs
Install & Use
Copy this prompt and send it to your AI assistant (Claude / Cursor / TRAE / Codex / WorkBuddy etc.) to auto-install:
Help me install this AI Skill: Agented. It is used for: A stateful text editor designed for LLMs Full Skill content: https://321skill.com/skills/agented-x-5/raw/index.md Read that page and install it.
The prompt includes a link to the full Skill content. You can also view the full content.
This Skill addresses the lack of history and concurrency control when LLMs edit files. In real-world development, AI agents often need to modify the same file multiple times, but standard editors cannot track each version of these edits, easily leading to conflicts or lost work. Agented ensures every edit is traceable and reversible through its stateful editor and undo tree, supporting branch navigation.
Usage is straightforward: after installing the ae binary, run ae open <file> in the terminal to open a file and obtain a state_token. You can then perform operations like replacement and insertion using short-form commands such as ae s <file> -r <range> -w <text> -x <token>. All modifications are persisted to a SQLite database, with support for transactions and concurrency detection. If the file is modified by another process, writes will fail and return the new content and token, allowing for safe retries.
It is particularly well-suited for AI agent development scenarios involving multi-step edits, especially for teams or individuals needing to batch-refactor code or manage changes across multiple files. For developers already using the platform's built-in editor, Agented provides more robust history and concurrency safety guarantees, making it ideal for performing secure refactoring operations in complex codebases.
In multi-agent collaboration scenarios, it is recommended to uniformly set require_expect: writes to enforce pre-write checks and avoid concurrency conflicts. Note that it primarily targets text files and does not support binary files, requiring local installation of the ae binary. For single, simple edits, using the platform's built-in editor might be more lightweight.
Key Features
Unlike standard text editors (e.g., nano/vim), Agented is designed for LLMs, achieving concurrency safety via `state_token` and versioning all edits in an undo tree. Compared to the platform's built-in editor, it supports multi-step, cross-session editing and historical backtracking, preventing work loss.
Limitations
Requires local installation of the `ae` binary (via brew), currently only supports text files (no binary file editing), and relies on SQLite for state storage.
FAQ
How do I install Agented?
Run `brew tap frane/tap && brew install agented` to install it. The command-line tool after installation is `ae`.
How is concurrency safety ensured?
Each read returns a `state_token`; writes must pass this token via `--expect`. If the file has been modified, the write is rejected (exit code 3) and a new token is returned, allowing for a retry. By default, only a warning is issued, but you can set `require_expect: writes` to enforce the check.
Installation guide for AI assistants
If your AI coding assistant (Claude Code, Cursor, TRAE etc.) can see this page, send it this message to auto-install:
Visit https://321skill.com/skills/agented-x-5/raw/index.md to read the original Skill definition (Markdown format) for Agented, and install it according to the instructions.
Raw Markdown URL for AI: /skills/agented-x-5/raw/index.md