> Source: https://builder-docs.ema.ai/agent-reference/specialized/email-writer
> Title: Email Writer Agent

# Email Writer Agent

The Email Writer agent generates high-quality, professional email responses grounded in search results. It ensures outbound or reply emails are traceable to source documentation -- company policies, knowledge bases, or trusted references -- rather than relying on the LLM's general knowledge. This agent is typically used as a final step after Search, Web Search, or Combine Search Results agents in email-centric workflows.

## Use Cases

-   Writing customer-facing or internal email responses grounded in retrieved documentation.
-   Generating professional email replies to inquiries using company knowledge bases.
-   Automating email drafting in support, sales, operations, or partner workflows.
-   Ensuring email communication is accurate, consistent, and traceable to source material.

## Inputs

Input

Type

Required

Description

`query`

TextWithSources

Yes

The email context or question that needs to be addressed.

`search_results`

SearchResults

Yes

Relevant search results used as source material, from Search, Web Search, or Combine Search Results agents.

`user_instructions`

Text

No

Guidance for tone, emphasis, or formatting preferences.

## Outputs

Output

Type

Description

`response_with_sources`

TextWithSources

A fully composed email with subject line (8 words max), greeting, concise body (3-6 sentences), closing, and signature block.

## Configurations

Parameter

Description

Default

`model_config`

Fusion model configuration used to generate the email response.

Required

`process_entire_document`

When enabled, processes entire documents instead of only matching segments from search results.

None

## How to Use This Agent

Customer support email automation:

```
chat_trigger -> knowledge_search -> email_writer -> send_email -> workflow_output
```

## Known Limitations

-   **Timezone handling**: Date and time references use the system default timezone and do not account for user-specific timezone preferences.

## Related Agents

-   [Respond using Search Results](/legacy-docs/agent-reference/core/respond-using-search-results) -- for general responses (not specifically email-formatted).
-   [Send Email](/legacy-docs/agent-reference/core/send-email) -- for delivering the composed email; use downstream of this agent.
