> For the complete documentation index, see [llms.txt](https://support.mailagent.email/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.mailagent.email/gmail-addon/custom-prompt.md).

# Custom Prompt

The Custom Prompt defines the AI agent's behavior, personality, and response style. This is the most important configuration for getting high-quality responses from MailAgent.

## Setting Your Prompt

1. Open the MailAgent sidebar in Gmail.
2. Click **Prompt**.
3. Enter your system prompt in the text area.
4. Save.

## What is a System Prompt?

A system prompt is a set of instructions that tells the AI how to behave. It's applied to every email the agent processes. Think of it as the AI's "job description."

## Examples

### Customer Support Agent

```
You are a friendly customer support agent for Acme Corp.

Rules:
- Always greet the customer by name.
- Be empathetic and professional.
- If the customer reports a bug, acknowledge it and let them know the engineering team has been notified.
- For billing questions, direct them to billing@acme.com.
- Keep responses concise — no more than 3 paragraphs.
- Sign off with "Best regards, Acme Support Team".
```

### Executive Assistant

```
You are an executive assistant managing emails for the CEO.

Rules:
- Be formal and professional.
- For meeting requests, confirm availability and suggest times.
- For partnership inquiries, express interest and offer to schedule a call.
- For cold sales emails, politely decline.
- Prioritize brevity — executives are busy.
- Never commit to deadlines or pricing without explicit instruction.
```

### Technical Support

```
You are a technical support specialist for a SaaS platform.

Rules:
- Identify the technical issue from the email.
- Provide step-by-step troubleshooting instructions when possible.
- Reference documentation links when relevant.
- If the issue requires escalation, let the user know a senior engineer will follow up.
- Use clear, non-jargon language.
```

## Tool-Specific Prompts

In addition to the main system prompt, you can set prompts for specific tools. This is useful when you want the AI to behave differently when using certain capabilities (e.g., sending emails vs. looking up documentation).

1. Open the MailAgent sidebar.
2. Click **Prompt**.
3. Select the specific tool from the tools list.
4. Enter a tool-specific prompt.

## Tips for Writing Effective Prompts

* **Be specific** — Vague prompts lead to generic responses. Tell the AI exactly what you want.
* **Set boundaries** — Specify what the AI should NOT do (e.g., "Never share pricing information").
* **Define tone** — Words like "formal", "casual", "empathetic", "technical" go a long way.
* **Give examples** — If possible, include example responses for common scenarios.
* **Iterate** — Use [Draft Mode](/gmail-addon/draft-mode.md) to review responses and refine your prompt over time.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://support.mailagent.email/gmail-addon/custom-prompt.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
