En

Agented

A stateful text editor designed for LLMs

开发流程 编写业务代码重构遗留代码排查Bug根因管理代码分支 claudecursor通用 ★ 843 Updated 2026-08-02

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/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 persistent history and the difficulty of safe concurrent operations when AI coding agents edit code. In real-world development, AI agents often need to modify the same file multiple times, but standard editors lack state management, leading to edit conflicts and loss of context. Agented solves this by persisting workspace state in SQLite and maintaining a versioned undo tree, making every edit traceable and revertible.

Usage is straightforward: you operate on files via the ae command in your terminal. Start with ae open <path> to specify the file you want to edit; it returns a file ID, line count, state token, and other info. You can then perform operations like ae s foo.go -r 12:14 -w "..." -x <token> for replacement, or use commands like ae i and ae w. All operations pass the state token via the --expect parameter to ensure concurrency safety.

It's ideal for AI coding agents that require multi-step, multi-file editing, especially teams needing safe refactoring and complete history preservation—such as in code reviews, bug fixes, or large-scale refactoring scenarios. Human developers can also use it, but the core design goal is to provide a reliable file editing infrastructure for AI agents.

We recommend using this tool uniformly for scenarios involving multiple files or requiring transactional commits. Note that it is not suitable for editing binary files or for quick, one-off modifications (using a built-in editor is more efficient for those). Additionally, installation depends on Homebrew and requires macOS or Linux.

Key Features

Unlike standard editors like sed or vim, Agented provides a state_token and a versioned undo tree to ensure concurrency safety: if a file is modified by another process, writes are rejected with the new content returned, preventing silent overwrites. It also supports multi-step transactions, where all edits either succeed entirely or are rolled back.

Limitations

Only supports text files, not binary files; depends on the `ae` binary, which must be installed via Homebrew and currently only supports macOS/Linux systems; uses SQLite for state storage by default, so workspace file size is limited by disk capacity.

FAQ

How do I install Agented?

Run `brew tap frane/tap && brew install agented`, then you can use the `ae` command.

What is a state_token and why is it needed?

The state_token is a version identifier returned each time a file is read. It is passed via the `--expect` parameter during writes; if the file has been modified by another process, the write fails and returns the new content, preventing conflicts.

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/raw/index.md to read the original Skill definition (Markdown format) for Agented, and install it according to the instructions.