Convert to Text Agent
The Convert to Text agent converts any number of named inputs of various types into a single text string. It automatically detects input types and converts them to text format, then combines them in connection order. This is a deterministic operation that does not use LLMs.
Use Cases
- Converting diverse agent outputs (documents, extraction results, search results) into a single text format for downstream processing.
- Generating query strings from agent outputs for use in search or other text-based operations.
- Preparing multiple inputs for LLM consumption by converting them to a unified text format.
- Combining structured and unstructured data into a single text output.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
named_inputs | Any (multiple) | Yes | Flexible inputs from other agents. Supports Documents, Search Results, Extraction Columns, Rule Sets, Text with Sources, plain text, primitives, structured data (JSON), and lists of any supported type. |
Outputs
| Output | Type | Description |
|---|---|---|
text_with_sources | Text With Sources | Combined text from all inputs (separated by delimiters), with consolidated source references and confidence set to 1.0. |
Configurations
This agent has no additional configuration. The conversion is determined entirely by the input type.
Conversion Behavior by Type
| Input Type | Conversion |
|---|---|
| Documents | Converts using document formatting to extract text content. |
| Search Results | Extracts text and sources from search results. |
| Extraction Columns | Converts to JSON string representation. |
| Rule Sets | Converts to JSON string and extracts associated sources. |
| Text with Sources | Extracts text directly. |
| Primitives | Numbers, booleans, and strings converted to string representation. |
| Structured Data | JSON objects and lists converted to JSON string format. |
| Lists | Recursively processes each element according to its type. |
How to Use This Agent
Convert an email to text before passing to a categorizer that expects text input:
email_trigger -> convert_to_text -> text_categorizer -> [branch] -> ...
Related Agents
- Combine Text -- for merging multiple text values.