Write File • AI Agent SDK

write_file: Write a file to the sandbox.

write_file

Async

Method

</div>

This is a method of the SandboxProtocol class in the protocols module.

Write a file to the sandbox.

Signature

python
async def write_file(path: str, content: Union[str, bytes]) -> bool

Parameters

ParamField str

Path within sandbox

ParamField Union[str, bytes]

File content

Returns

ResponseField bool

True if successful

Source

View on GitHub

praisonaiagents/sandbox/protocols.py at line 297