Agented
A stateful text editor designed specifically 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 specifically for LLMs Full Skill content: https://321skill.com/skills/agented-x-4/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 agents edit code or documents. In real-world development, when multiple agents or the same agent edits the same file multiple times, overwrites, conflicts, and lost work are common. Agented solves this by persisting state in SQLite and using a versioned undo tree, ensuring every edit is traceable and allowing rollback to any historical state if issues arise.
Usage is straightforward: simply invoke ae from the command line. For example, ae open foo.go opens a file and returns a state token and the current content. Subsequent edits use commands like ae s foo.go -r 12:14 -w "..." -x <token> to replace text. The editor automatically checks if the token is expired; if the file has been modified by another process, writes are rejected and the latest content is returned. Multi-line input is supported via pipes or the -f parameter. All operations use short commands to save AI tokens.
It's ideal for teams or individuals requiring multi-step edits, multi-agent collaboration, or strict edit history tracking. Particularly for those already using AI coding assistants (like Claude, Cursor) for code review, batch refactoring, or file-by-file modifications, Agented provides Git-like but finer-grained file-level version control without explicit commits.
We recommend adopting this tool at the start of new projects or during complex refactoring, beginning with ae open to register files. Note: it primarily handles text files, not binaries. The default concurrency mode is require_expect: warn; in strict multi-agent environments, manually configure it to require_expect: writes to enforce validation.
Key Features
Compared to standard editors (like vim, nano) or Git, Agented features a built-in concurrency control mechanism designed for LLMs: it uses a state token and the `--expect` flag to implement optimistic locking, automatically detecting file conflicts, rejecting writes, and returning the latest content for retry. General editors lack this atomic operation guarantee tailored for AI workflows.
Limitations
Supports text files only, not binary files. Requires SQLite and a local filesystem, version ≥1.4.0, and must run on macOS or Linux (installable via Homebrew).
FAQ
How do I check a file's current state?
Use `ae open <path>` or `ae s <path> -r 0:0` to get the file's line count, content hash, state token, and annotation info.
What should I do if a conflict occurs during editing?
If the `--expect` token expires during a write, the command exits with code 3 and returns the new content and token. Simply retry the operation with the new token.
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-4/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-4/raw/index.md