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-8/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 AI coding agents edit files. In real-world development, AI agents often need to modify code in multiple steps, but the traditional "read-then-write" pattern can easily lead to conflicts or lost changes if the file is modified by other processes. Agented uses a state token (state_token) and a transaction mechanism to ensure every write is based on the latest state. If a conflict occurs, it automatically rejects the operation and returns the new state, allowing the AI to safely retry.
Usage is straightforward. After installing the ae binary, you operate via command-line verbs in your terminal. When first accessing a file, use ae open <path> to obtain a state token. Subsequent operations like read, replace, and insert should include the --expect <token> parameter. All edits are persisted to a SQLite workspace, forming a traceable undo tree that supports branch navigation. For multi-line content, you can pipe it via standard input to avoid complex quote escaping.
It is particularly well-suited for AI coding agents that require multi-step, cross-file editing. This includes scenarios involving complex refactoring, transactional multi-file modifications (e.g., renaming variables, migrating API calls), or teams that want to preserve a complete edit history for future review. For one-off, single modifications or scenarios where history is unnecessary, you can use the platform's built-in editor directly.
It is recommended to consistently use this tool when starting complex refactoring tasks and to enable the concurrency.require_expect: writes configuration to enforce state checks. Note that it only supports plain text files, not binary files. It also requires the Go runtime for self-compilation, or you can install a pre-compiled binary via Homebrew.
Key Features
Unlike Git's version control, Agented focuses on file-level edit history with finer granularity (each insertion/replacement is a version) and supports transaction rollback and concurrent conflict detection. Unlike standard editors (e.g., vim), it is designed specifically for AI agents: all operations are performed via command-line verbs and return structured state tokens, facilitating programmatic interaction.
Limitations
Only supports text files, not binary files; relies on SQLite for state storage; requires installation of the `ae` binary (via Homebrew or Go compilation); requires version 1.4.0+; strict use of the `--expect` parameter is necessary when multiple AI agents edit concurrently.
FAQ
How do I install Agented?
On macOS, install via Homebrew: `brew tap frane/tap && brew install agented`. For other systems, compile from source: `git clone https://github.com/frane/agented && cd agented && make install`.
How do I start editing a new file?
Use `ae open <filename>` to open the file for the first time, which returns a state token. You can then use `ae s <filename> -r <range> -w <newtext> -x <token>` to perform a replacement.
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-8/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-8/raw/index.md