Write
Lays down the full content of a text file in one shot — creating it or overwriting whatever is there.
The confirmation returned to the model is of the form Wrote <N> lines to <path>., where N is the number of \n-separated entries in the content (so content ending with a newline reports one more entry than text lines, and empty content reports zero).
Example:
from strands import Agentfrom strands.vended_tools import write
agent = Agent(tools=[write])agent("Create a file at /tmp/hello.txt with the contents 'Hello, Strands!'.")import { Agent } from '@strands-agents/sdk'import { write } from '@strands-agents/sdk/vended-tools/write'
const agent = new Agent({ tools: [write] })await agent.invoke("Create /tmp/hello.txt containing 'Hello, Strands!'")