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

# Text Reader

> Parameters and methods of TextReader, which reads text files into documents.

TextReader reads 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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.