# After-hours AI agent setup

> Take clear messages when the team is away and reserve handover for the situations you define.

- URL: https://hail.so/agent-templates/after-hours

## What does the after hours template do?

Take clear messages when the team is away and reserve handover for the situations you define. Start with the premade **After hours** template in the Hail console.
The same agent can answer calls, texts, and email when you turn on those channels.

The template starts with a greeting and instructions you can edit as you go.

## Make the agent familiar with your business
- **Hours.** Approved opening hours and the business timezone.
- **Urgency.** What counts as urgent for your team.
- **Fallback.** An on-call contact and a message-taking path when nobody answers.

## Set up the after hours agent
Open **Agents**, then **New agent** (or **Create agent** when the list is empty). Select **After hours**.
Use the [console walkthrough with screenshots](https://hail.so/create-ai-agent) for each step.

1. Give the agent a name your team will recognize.
2. Review the starter greeting and add your business facts to **Instructions**.
3. Choose any **Hand over** contacts and write when to call each person.
4. Review **Tools**, call limits, language, and recording. Keep the message that tells callers they are speaking with AI.
5. Turn on **Calls**, **Texts**, and **Email** for the channels you want.
6. Add a number for your chosen channels. Its labels show what your agent will answer.
7. Select **Create agent**. For email, choose this agent under **Agent replies** in **Email domains**.
8. Try a call, text, or email. The [visual guide](https://hail.so/create-ai-agent#4-connect-phone-calls-and-sms-to-the-same-agent) shows the email reply settings.

Calls and texts use your prepaid balance. [See usage prices](https://hail.so/pricing).
For US text messaging, follow the [SMS registration steps](https://hail.so/sms#10dlc-registration) for your number.

## Instructions for your after hours agent

Use this example as a starting point. Replace the capitalized text with your business details.

```prompt
Take after-hours messages for BUSINESS NAME.
Ask for the caller’s name, callback number, and reason. Ask one question at a time.
Ask whether the message is urgent and read the details back.
Share APPROVED OPENING HOURS only. Do not promise a reply time.
Call the person you chose for handover only when the note covers the situation.
If nobody answers, take a message.
For immediate danger, tell the caller to contact local emergency services.
```

Use a dedicated after-hours number or your phone provider’s forwarding schedule to choose when calls reach this agent.
The template handles the conversation. Your provider controls the schedule.
Try a call during open and closed hours. Give your handover contact a separate number so calls reach your team.

## Test the after hours workflow

| Test | Expected result |
| --- | --- |
| A caller asks when the team returns | Use the approved hours and timezone. |
| A routine inquiry arrives at night | Take a message without waking the on-call person. |
| An urgent issue matches the contact note | Try the configured handover contact. |
| The on-call person does not answer | Return to message capture without promising a callback time. |

Open **Activity** to read each practice conversation. Adjust the instructions, try again, and share the number when you like the results.

## Add context and human handover

Give callers a way to reach someone on your team. Add that person under **Hand over** and describe when to call them.
Hail can send the caller’s number and reason by text and email while your teammate’s phone rings. Alert delivery times vary.
The [handover guide](https://hail.so/blog/warm-transfer) covers alert setup and unanswered calls.

You can also help callers pick up where they left off.
The [conversation history steps](https://hail.so/create-ai-agent#6-add-email-and-assistant-led-setup-with-mcp) explain how to add call and text history through MCP or API.
This is an optional addition to the console template.

## Optional MCP, email, and API workflows

When you want to manage your agent through chat, [connect Hail MCP](https://hail.so/mcp) to your AI assistant.
Ask it to find your existing agent and help you update the instructions.
You can also ask it to connect your Hail-mail address to this agent for email replies.
The [email setup steps](https://hail.so/create-ai-agent#4-connect-phone-calls-and-sms-to-the-same-agent) explain who gets a reply.

For work inside your own software, your developer can use the [API](https://hail.so/docs/api).
[Webhooks](https://hail.so/docs/webhooks) send updates when something happens, such as a completed call.
Use these updates to add a follow-up task to your customer records or send a booking request to your calendar.

Read the [After-hours answering service guide](https://hail.so/blog/after-hours-answering-service) for the wider workflow and product choices.
