Agent Workspace
File Edit
Edit a file in the agent’s workspace by replacing an exact text occurrence
POST
Workspace: File Edit
Edit a file in the per-agent workspace by replacing an exact text occurrence.
old_text must match the existing file content exactly, including whitespace and indentation.
Path Parameters
Request Body
Exact text to find and replace. Must match existing file content, including whitespace.
Response
Example Request
Notes
- The match is exact and case-sensitive. Every occurrence of
old_textis replaced, andreplacements_madesays how many. To change only one occurrence, include enough surrounding text inold_textto make it unique. - To apply several edits atomically, use Multi Edit instead.
See Also
Body
application/json

