# Building a Conversational AI Agent

## **How to Build a Multi-Channel Conversational AI Agent in raia**

### 🧭 Overview

The raia platform allows you to create Conversational AI Agents that work across **Live Chat**, **SMS**, **Email**, and **Voice**. You can deploy them as internal tools or public-facing assistants — with no code required.

Agents are built in **Launch Pad**, trained in **Copilot**, and launched/monitored in **Mission Control**.

***

### 🏗️ Phase 1 – Build in Launch Pad

#### 1. Create the Agent

In **Launch Pad**, click **Create Agent**:

* Choose a **Role** (e.g., Support, Sales, Analyst)
* Set:
  * **Public Name**
  * **Internal Name**
  * **Description**
  * **Tags**

#### 2. Define Agent Instructions

Instructions define your agent’s tone, logic, and scope.

**Example:**

> You are a helpful AI assistant for ACME Corp.\
> You answer questions from users across chat, SMS, email, and voice.\
> Greet users warmly, keep answers short, escalate if unsure.

***

#### 3. Upload Knowledge & Packs

Train your agent using:

* Internal documents (PDFs, Docs, Sheets)
* Knowledge base exports
* Website content
* Training Packs (reusable content bundles)

Use **raia Connect** to:

* Clean and format raw content
* Convert into structured Markdown or JSON
* Push directly to the agent’s vector store

***

#### 4. Enable Multi-Channel Skills

In the **Skills** tab, activate:

**✅ Live Chat Skill**

* Customize chat widget
* Set welcome message and branding
* Embed on your site via HTML snippet

**✅ SMS Skill**

* Assign number (via Twilio)
* Set opt-in/out message flow
* Use for support, outreach, or reminders

**✅ Email Skill**

* Use `@raiabot.com` or your domain
* Set reply signature and fallback messages
* Auto-respond to inbound messages

**✅ Voice Skill**

* Assign number
* Add greeting, IVR options, and transcription
* Use for inbound or outbound calling

***

#### 5. Add Integrations via Skills

**🔌 Webhook Skill**

Push transcripts, metadata, or scores to:

* CRM (e.g., Salesforce, HubSpot)
* Ticketing system (e.g., Zendesk, Jira)
* Internal databases

**📬 Notification Skill**

Send alerts via SMS or email to:

* Notify internal teams when a conversation starts or ends
* Route qualified conversations to human agents

**🧠 Scoring Skill**

Score each conversation:

* Based on quality, accuracy, or qualification
* Identify high-priority interactions for follow-up

***

### 🧪 Phase 2 – Train in Copilot

#### ✅ Internal Testing

* Team members ask questions using Copilot
* AI responds with answers from its knowledge
* Feedback loop:
  * Thumbs up/down
  * Edit answers
  * Mark as “Include in Training”

#### 👤 Human Takeover

In live interactions, support staff can:

* **Take over conversations** directly in Copilot
* View history and continue the thread
* Hand back to the AI when ready

***

### 🚀 Phase 3 – Deploy in Mission Control

#### 1. Activate Skills

In Mission Control, set each channel’s status to **Active**:

* Live Chat → embed and monitor
* SMS → send and receive
* Email → respond to inbound
* Voice → answer and transcribe

#### 2. Launch Outbound Campaigns (optional)

* Upload contact list
* Write message templates (SMS or Email)
* Send via Mission Control
* AI handles replies, qualifies leads, and scores conversations

#### 3. Monitor & Optimize

* View scores, tags, and summaries in Mission Control
* Use filters to review top or low-performing threads
* Refine training content weekly

***

### 🧠 Use Case Example: Omni-Channel Support Agent

| Feature       | Implementation                        |
| ------------- | ------------------------------------- |
| Live Chat     | Embedded on help site                 |
| SMS           | Twilio number for 24/7 user questions |
| Email         | Connect <support@yourdomain.com>      |
| Voice         | Phone support with escalation routing |
| Notifications | Alert support team when agent stuck   |
| Webhooks      | Push transcripts into Zendesk         |
| Scoring       | Highlight unclear responses           |
| Copilot       | Real-time human handoff & training    |

***

### ✅ Setup Checklist

| Task                                           | Status |
| ---------------------------------------------- | ------ |
| Agent role, name, and instructions defined     | ✅      |
| Knowledge uploaded and Packs added             | ✅      |
| Live Chat, SMS, Email, and Voice skills active | ✅      |
| Webhook + Notification + Scoring configured    | ✅      |
| Copilot tested by internal team                | ✅      |
| Conversation accuracy ≥95%                     | ✅      |
| Live deployment complete                       | ✅      |

***

### 🔁 Ongoing Improvement Tips

* Review Copilot feedback weekly
* Update training Packs regularly via raia **Connect**
* Monitor scores to detect weak answers
* Adjust escalation logic as needed
* Rotate human reviewers for objective feedback

***


---

# Agent Instructions: 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:

```
GET https://docs.raiaai.com/dev-program/agents/building-a-conversational-ai-agent.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
