> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gravixlayer.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Read File

> Read file content from an agent runtime

```python theme={null}
from gravixlayer import GravixLayer

client = GravixLayer()
runtime = client.runtime.create(template="python-3.14-base-small")

# Write a file first so we have something to read
runtime.file.write("/workspace/output.txt", "hello from gravix\n")

result = runtime.file.read("/workspace/output.txt")
print(result.content)
print(result.size)  # File size in bytes

runtime.kill()
```

## Parameters

| Parameter | Type   | Required | Description       |
| --------- | ------ | -------- | ----------------- |
| `path`    | string | Yes      | File path to read |

## Response

| Field     | Type    | Description        |
| --------- | ------- | ------------------ |
| `content` | string  | File text content  |
| `path`    | string  | Resolved file path |
| `size`    | integer | File size in bytes |
