File editor
Lets your agent read and modify files on disk: useful for coding agents, config management, or any workflow where the agent inspects output and makes targeted edits.
Example:
import { Agent } from '@strands-agents/sdk'import { fileEditor } from '@strands-agents/sdk/vended-tools/file-editor'
const agent = new Agent({ tools: [fileEditor],})
// Create, view, and edit filesawait agent.invoke('Create a file /tmp/config.json with {"debug": false}')await agent.invoke('Replace "debug": false with "debug": true in /tmp/config.json')await agent.invoke('View lines 1-10 of /tmp/config.json')from strands import Agentfrom strands.vended_tools import file_editor
agent = Agent(tools=[file_editor])agent("Create a file at /tmp/hello.txt with the contents 'Hello, world!'")