Agent Zero AI framework
text_editor_remote tool
Read, write, and patch files on a connected A0 CLI host.
Shown when a connected A0 CLI advertises remote file access. Reads, writes, and
patches files on the machine where that CLI is running. Use this tool, not
server-side file tools, when the user asks for files on the connected local
machine, A0 CLI host, or explicitly says not to use Docker/server files. For
complex remote edits, optionally load skill host-file-editing.
Availability and permissions are checked when the tool runs. If no CLI is connected, remote file access is disabled, or a write/patch needs Read&Write, report that to the user instead of falling back to server-side file tools.
Arguments
action:read,write, orpatchpath: file path on the CLI host filesystemread: optionalline_from,line_towrite: requirescontentpatch: requires one ofold_text+new_text,patch_text, oredits
Notes
- Prefer
readbefore line-number edits. - If the user says patch, change without rewriting, or don't rewrite, use
action: "patch"instead ofwrite. - For simple "change X to Y" requests, prefer exact replace with
old_textandnew_text;old_textmust match one exact current span. - Prefer
patch_textfor context-anchored changes andeditsonly for fresh, surgical line ranges. - If freshness checks reject a line patch, reread the file and retry with updated ranges.
- Reads are text previews capped at 2,000 lines and 256 KiB. When the result says
it was truncated, continue from its
next_lineonly if another bounded text slice is sufficient. - Write and patch content is capped at 256 KiB. For a complete large file or any binary file, use the authenticated CLI/Core HTTP upload or download path; do not retry it through this WebSocket tool. If no HTTP-facing action is available in the current task, ask the user to attach/upload the file through A0 CLI.
- Relative paths are relative to the CLI host filesystem. Do not rewrite them to
/a0/usr/workdir; that path belongs to the Agent Zero server/Docker side.
Usage
{
"thoughts": [
"The user asked for a file on the connected local machine, so I should read it through the A0 CLI host."
],
"headline": "Reading file on connected local machine",
"tool_name": "text_editor_remote",
"tool_args": {
"action": "read",
"path": "README.md",
"line_from": 1,
"line_to": 80
}
}