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

# Inbound Receptionist

> Build an AI receptionist to route calls and answer FAQs

This recipe demonstrates how to build a capable inbound receptionist that can answer common questions and, if necessary, take a message or escalate.

## Goal

Create an agent named "Front Desk" that:

1. Greets the caller.
2. Answers questions about hours and location.
3. Uses RAG to answer specific policy questions.
4. Detects voicemail if the user calls after hours (simulated).

## 1. Prepare Knowledge Base

First, create a text file named `company_info.txt`:

```text theme={null}
Acme Corp is located at 123 Innovation Drive, San Francisco, CA.
Business hours are Monday to Friday, 9:00 AM to 5:00 PM PST.
Our support email is support@acme.com.
Return Policy: Items can be returned within 30 days of purchase with a receipt.
```

Upload this via the API:

```bash theme={null}
curl -X POST "https://api.getbutter.ai/api/knowledge-base" \
  -F "file=@company_info.txt" \
  -F "name=Company Info" \
  ...
```

Save the `documentation_id`.

## 2. Configure the Agent

We need a system prompt that encourages concise, helpful answers.

**System Prompt:**

```text theme={null}
You are the AI receptionist for Acme Corp.
Your goal is to answer caller questions efficiently using your knowledge base.
- Be polite and professional.
- Keep answers under 2 sentences when possible.
- If you don't know the answer, say "I'm not sure about that, but I can have a human call you back."
- If the user wants to speak to a human, ask for their name and reason for calling.
```

**API Request:**

```json theme={null}
{
  "config": {
    "agent_name": "Front Desk",
    "system_prompt": "You are the AI receptionist...",
    "speak_first": true,
    "kb_document_ids": ["<DOCUMENTATION_ID>"],
    "voicemail_detection": true,
    "voicemail_message": "Hi, you've reached Acme Corp after hours. Please leave a message."
  }
}
```

## 3. Testing

1. Assign a phone number to this agent.
2. Call the number.
3. Ask: "What are your hours?" -> Expect: "We are open Monday to Friday, 9 to 5 PST."
4. Ask: "Can I return a shirt I bought last week?" -> Expect: "Yes, items can be returned within 30 days with a receipt."
