> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-service-account.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Text Reader

TextReader is a reader class that allows you to read data from text files.

## Parameters

<Snippet file="text-reader-reference.mdx" />

## Methods

### `read()`

Reads a text file and returns a list of documents.

| Parameter | Type                   | Default  | Description                                 |
| --------- | ---------------------- | -------- | ------------------------------------------- |
| `file`    | `Union[Path, IO[Any]]` | Required | Path to the text file or a file-like object |
| `name`    | `Optional[str]`        | `None`   | Name override for the resulting documents   |

### `async_read()`

Async variant of `read()`. Accepts the same parameters.
