En

Agented

A stateful text editor 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 for LLMs
Full Skill content: https://321skill.com/skills/agented-x/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 state and version history when LLMs edit code. In practical development, when an AI Agent needs to make multi-step modifications to the same file or edit across sessions, context is easily lost—each file read feels like the first time, leading to redundant work or conflicts. Agented provides LLMs with an editing experience akin to a human IDE, ensuring every edit is recorded.

Usage is straightforward: you simply operate on files via the ae command-line tool. When first encountering a file, run ae open <path>; it returns the file ID, line count, state token, and other details. Subsequent edits use ae s <file> -r <range> -w <content> --expect <token> for replacements, or ae i for insertions and ae w for writes. All operations are persisted in SQLite, supporting an undo tree and branching, enabling historical state recovery even across sessions.

It is ideal for AI Agent development scenarios involving frequent code edits, especially for multi-step refactoring or cross-session collaboration, whether in teams or individually. It also fits well in CI/CD pipelines for automated file modifications with audit trails, or as a core editor for LLM coding assistants, ensuring every write is safe and reliable.

It is recommended to consistently use ae open when an AI Agent first accesses a file; do not skip this step. Note that it only supports text files, not binary files. For one-off, single edits, using the platform's built-in editor can save tokens. Additionally, multi-line content is best passed via pipe or the -f parameter to avoid complex quote escaping.

Key Features

Unlike traditional tools like sed or vim, Agented is designed specifically for LLMs, featuring SQLite-persisted state, an undo tree with branching, and optimistic concurrency control via the `--expect` mechanism to prevent overwrites during multi-Agent collaboration.

Limitations

Only supports text files; cannot handle binary files. Requires local installation of the `ae` binary (via brew) and a macOS or Linux environment. State is stored in `.agented/state.db`—deleting this directory erases all history.

FAQ

How do I install Agented?

Run `brew install agented`, or manually compile and install from the GitHub repository `https://github.com/frane/agented`.

How can I view a file's edit history?

Use `ae log <file>` to view version history. Revert to a previous state with `ae undo <file>`, which supports branch navigation.

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