> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pilottai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Email agent

# Email Agent Example

Simple example showing how to set up an email handling agent with PilottAI framework.

## Setup

```bash theme={null}
pip install pilott
```

## Example Usage

```python theme={null}
from pilottai import Serve
from pilottai.core import AgentConfig, LLMConfig

# Initialize
pilott = Serve(name="EmailAgent")

# Create agent
email_agent = await pilott.add_agent(
    title="email_manager",
    goal="Handle email communications",
    tools=["email_sender", "email_analyzer"]
)

# Send email
job = {
    "type": "send_email",
    "template": "welcome",
    "recipient": "user@example.com"
}

result = await pilott.execute([job])
```

## Tools

* email\_sender: Send emails with attachments
* email\_analyzer: Analyze email content and intent
* template\_manager: Handle email templates

## Features

* Email sending and analysis
* Template management
* Sentiment analysis
* Priority handling

## Code

Ready to use code [email\_agent.py](../../pilott/agents/email_agent.py)
