> Source: https://builder-docs.ema.ai/agent-reference/core/combine-text
> Title: Combine Text Agent

# Combine Text Agent

The Combine Text agent merges multiple text inputs into a single coherent response based on user-defined instructions. It consolidates information while maintaining clarity, source attribution, and contextual flow. It supports two modes: **LLM mode** (intelligently synthesizes texts based on your instructions) and **append mode** (concatenates texts as-is without processing).

## Use Cases

-   **Research Synthesis** -- Merge multiple search results or document excerpts into one summarized answer.
-   **Content Aggregation** -- Combine knowledge base entries, chat logs, or reports into a unified text.
-   **Document Creation** -- Automatically generate summaries or stitched documents from segmented inputs.
-   **Knowledge Consolidation** -- Pull together fragmented insights while retaining source references.

## Inputs

Input

Type

Required

Description

`texts_with_sources`

List of Texts

Yes

A collection of text segments from other agents or external sources.

`instructions`

String

Yes

User-defined guidance on how the texts should be combined (e.g., summarize, merge seamlessly, or retain structure).

## Outputs

Output

Type

Description

`combined_text_with_sources`

Text With Sources

A single, unified text that merges all inputs. Includes consolidated sources when provided and preserves logical flow according to your instructions.

## Configurations

None.

## Advanced Configurations

Parameter

Description

**Append Input Values As-Is**

Directly concatenates all text inputs in order, skipping LLM processing. Useful for creating raw, unprocessed combined documents.

**Configure EmaFusion**

Uses Ema's intelligent fusion to combine multiple LLM outputs. Optionally allows selecting specific LLMs or integrating custom models.

## How to Use This Agent

Merge a ticket summary and a knowledge base answer before sending a response:

```
ticket_trigger -> thread_summarizer ----\
 -> knowledge_search -> respond_using_search_results ---> combine_text -> send_email
```

## Related Agents

-   [Combine Search Results](/legacy-docs/agent-reference/core/combine-search-results) -- for merging search result objects rather than plain text.
-   [Convert to Text](/legacy-docs/agent-reference/core/convert-to-text) -- for converting non-text types to text before combining.
