Read File • AI Agent SDK

read_file: Read a file from the sandbox.

read_file

Async

Method

</div>

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

Read a file from the sandbox.

Signature

python
async def read_file(path: str) -> Optional[Union[str, bytes]]

Parameters

ParamField str

Path within sandbox

Returns

ResponseField Optional[Union[str, bytes]]

File content or None if not found

Source

View on GitHub

praisonaiagents/sandbox/protocols.py at line 313