How to Create an Email Knowledge Agent
Introduction
An Email Knowledge Agent is an AI-powered assistant that automatically responds to incoming emails using your knowledge base. It reads incoming messages, searches your Collection for relevant information, and drafts intelligent replies—all without human intervention (or with optional approval workflows).
As covered in the master introduction, a Knowledge Agent requires two core components:
A KA Engine – Defines how the agent behaves (tone, structure, intent detection, fallback behavior).
A KA Collection – Defines what the agent knows (articles, PDFs, web pages).
This guide walks you through configuring an Email Knowledge Agent, including the critical Protocol Configuration step that connects the agent to your email inbox.
Before starting, ensure you have:
✅ A KA Engine created in AI Labs → Engines. See Engine Guide
✅ A KA Collection created in Collections. See Collection Guide
✅ Access to the email account you want to connect (administrative access may be required for API setup)
Step-by-Step: Creating an Email Knowledge Agent
Step 1: Access the New Agent Screen
From the main navigation sidebar, click
Agents.Click the blue
+ Create Agentbutton at the top left.In the Agent Type Library, locate the
Knowledge Agentcard and click it.
Step 2: Goal – Select Knowledge Agent
The Goal tab is now complete. You will automatically move to the Define tab.
Step 3: Define – Basic Setup
3.1. Agent Name
In the
Agent namefield, enter a descriptive name (e.g., "Customer Support Email Bot" or "Event Inquiry Responder").
3.2. Knowledge Agent Type (Channel Selection)
You will see channel options: Website, Email, WhatsApp, Telegram.
Select
Email. This configures the agent for email reply functionality.
3.3. Select Language
Choose the primary language of the emails you will be processing (e.g., English).
Email KA right now only support "English". contact support for more info
3.4. Navigate to Design
Click
Nextto proceed to the Design tab.
Step 4: Design – Configuring the Email Agent
This is where you attach your Engine and Collection, and configure the email connection.
4.1. Targeted Urls (Knowledge Base Selection)
Before configuring behavior, you must tell the agent what it should know.
Targeted Urlsdropdown: Select the KA Collection you created earlier (e.g., "KA for BE website," "Product Documentation").This collection contains all the content the AI will use to answer incoming email questions.
You can select up to 3 collections
Important: Your Collection is the Source of Truth
The Collection provides the factual knowledge your agent relies on. Without a selected collection, your agent has no information to answer emails.
Ensure you have created a KA Collection before proceeding. If no collections appear in the dropdown, go back and complete the Collection Creation Guide first.
See the KA Collection Creation Guide
4.2. Settings and Configuration
Select engine: Click the dropdown and choose the KA Engine you created earlier. This attaches the "brain" to your agent.
🧠 Important: Selecting Your Engine
The Engine defines your agent's personality—tone of voice, answer structure, intent detection, and fallback behavior. Choose the engine that matches the communication style you want for email replies.
See the KA Engine Creation Guide
Step 5: Protocol Configuration – Connecting Your Email Inbox
This is the most critical step for Email Agents. You must configure how the agent connects to your email server to read and reply to messages.
5.1. Protocol Type
Click the
Protocol Typedropdown.You will have two options:
Microsoft Graph API (Recommended for Microsoft 365 / Office 365 / Outlook accounts)
IMAP Configuration (For all other email providers)
Choose the option that matches your email provider.
5.2. Option A: Microsoft Graph API Configuration
Best for: Microsoft 365, Office 365, Outlook.com, Hotmail, or any email hosted on Microsoft Exchange Online.
Microsoft Graph API is Microsoft's modern, secure API for accessing email, calendar, and contacts. It is more reliable and secure than traditional IMAP.
What You Need to Find:
Field | Description | Where to Find It |
|---|---|---|
Client ID | A unique identifier for your application in Microsoft Entra ID | Azure Portal → App Registrations → Your App → Application (client) ID |
Client Secret | A password that allows your agent to authenticate with Microsoft | Azure Portal → App Registrations → Your App → Certificates & Secrets → New client secret → Copy the Value immediately |
Tenant ID | Your organization's unique identifier in Microsoft 365 | Azure Portal → App Registrations → Your App → Overview → Directory (tenant) ID |
Authority | The authentication endpoint URL |
|
The email address this agent will monitor | The full email address (e.g., support@yourcompany.com) |
Step-by-Step: Creating Microsoft Graph API Credentials
Follow these steps in the Microsoft Azure Portal or Microsoft Entra Admin Center:
Register an Application:
Go to App registrations > New registration.
Enter a name (e.g., "Bridged Email Agent").
Leave redirect URI blank (or enter a placeholder like
https://login.microsoftonline.com).Click Register .
Copy Your IDs:
On the Overview page, copy the Application (client) ID and Directory (tenant) ID. You will need both .
Create a Client Secret:
Go to Certificates & secrets > New client secret.
Add a description and choose an expiration period (18 months is recommended to balance security and maintenance) .
Click Add.
IMPORTANT: Immediately copy the Secret Value. It will be hidden forever once you leave the page .
Set API Permissions:
Go to API permissions > Add a permission.
Select Microsoft Graph > Application permissions .
Add the following permissions (minimum required for reading and sending mail):
Mail.ReadMail.SendUser.Read(to access sender information)
Click Add permissions .
Grant Admin Consent:
In the API permissions screen, click Grant admin consent for [Your Organization] .
Click Yes to confirm .
Enter Credentials in Bridged:
Client ID: Paste the Application (client) ID.
Client Secret: Paste the secret value you copied.
Authority: The system may auto-generate this based on your Tenant ID. If not, use:
https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0/token.Email: Enter the mailbox address this agent will monitor.
5.3. Option B: IMAP Configuration
Best for: Gmail, Yahoo, iCloud, ProtonMail, custom domain email (non-Microsoft), or any provider that offers IMAP access.
IMAP (Internet Message Access Protocol) is a standard email protocol that allows the agent to read emails from your server.
What You Need to Find:
Field | Description | Where to Find It |
|---|---|---|
Host | The IMAP server address | Your email provider's help documentation or IT department |
Port | The port number for IMAP connection | Common port: 993 (with SSL) |
Username | Your email login credential | Usually your full email address |
Password | Your email password or app-specific password | Your email account settings (use App Password if 2FA is enabled) |
Secure Connection | Enable SSL/TLS for encrypted communication | Almost always YES (enabled) |
Common IMAP Server Settings by Provider:
Provider | IMAP Host | Port | Security |
|---|---|---|---|
Gmail |
| 993 | SSL/TLS |
Yahoo Mail |
| 993 | SSL/TLS |
| 993 | SSL/TLS | |
iCloud Mail |
| 993 | SSL/TLS |
Office 365 (Legacy) |
| 993 | SSL/TLS |
Custom Domain | Varies (e.g., | 993 | SSL/TLS |
Important Note on Passwords:
If your email account uses Two-Factor Authentication (2FA) , you cannot use your regular password.
You must create an App Password from your account security settings.
For Gmail, enable "Less secure app access" or create an App Password at https://myaccount.google.com/apppasswords.
Step-by-Step: Finding Your IMAP Settings
Check your email provider's help documentation:
Search for "[Provider Name] IMAP settings" (e.g., "Gmail IMAP settings").
Most providers have a support page listing their server addresses and ports .
Enable IMAP access:
Log in to your email account via web browser.
Go to Settings > See all settings > Forwarding and POP/IMAP.
Ensure IMAP access is Enabled .
Generate an App Password (if using 2FA):
Go to your account security settings.
Find App passwords or Application-specific passwords.
Generate a new password for "Bridged Email Agent."
Copy the generated password (it will look like
xxxx xxxx xxxx xxxx).
Enter Credentials in Bridged:
Host: Enter the IMAP server address (e.g.,
imap.gmail.com).Port: Enter
993(standard secure port) .Username: Enter your full email address.
Password: Enter your regular password or the App Password you generated.
Secure Connection: Toggle ON (enable SSL/TLS) .
Step 6: Email Template Configuration
After configuring the protocol, you must design the email template that the agent will use when replying.
6.1. Email Template Editor
Email Template Content: Create your email template using a mix of custom text and special variables.
Example Template:
text
Dear {{SENDER_NAME}},
Thank you for your email. We appreciate you taking the time to reach out to us.
{{AI_REPLY}}
If you have any further questions or need additional assistance, please feel free to contact us.
Best regards,
Support Team
[Organization Name]6.2. Template Variables Reference
Variable | Description |
|---|---|
| The name of the person who sent the original email |
| The AI-generated response content (based on your Engine and Collection) |
6.3. Footer Text
Enter any standard footer text (e.g., disclaimers, unsubscribe links, company address).
Step 7: Reply Approval Configuration
You can control how strictly replies are managed before they are sent.
7.1. Auto Approval
Auto Approval: Toggle ON to automatically approve and send AI-generated replies without any manual review.Toggle OFF to require manual approval for every reply. replies will be send to the Approval Recipients and they can manually send the KA responses
7.2. Approval Recipients
If Auto Approval is OFF, specify who should receive AI-generated replies for approval.
Add New Recipient: Enter email addresses of team members who will review and approve replies before sending.Added recipients will appear in the
Approval Recipientslist (e.g.,sample@bridged.media).
Step 8: Publish – Going Live
8.2. Final Submission Options
Submit: Makes the agent live immediately or at the scheduled Go Live Date.
Click on submit button to complete the process.
How It Works: The Email Reply Flow
An email arrives in the configured inbox.
The Knowledge Agent reads the email content.
It searches the Collection for relevant information.
It applies the Engine guidelines to formulate a response.
It populates the Email Template with the sender's name and AI-generated reply.
If Auto Approval is ON: The reply is sent immediately.
If Auto Approval is OFF: The reply is sent to Approval Recipients for review. Once approved, They need to send the email manually.
Troubleshooting & Common Issues
This can occur due to an invalid Client ID, Secret, or Tenant ID. Verify your credentials in the Azure Portal and ensure the secret hasn't expired.
This error is usually due to missing API permissions. Check API Permissions and make sure Mail.Read and Mail.Send are added, and admin consent is granted.
The connection could be refused if the host or port is incorrect. Verify your IMAP settings with your provider. Common ports are 993 for SSL.
This may result from using the incorrect username or password, or having 2FA enabled. If using 2FA, create and use an App Password instead of your regular password.
These errors can occur due to certificate mismatches, usually caused by self-signed certificates. You may enable the 'Insecure SSL' option if available, but do so with caution.
This could be due to incorrect protocol configuration or permissions. Try testing with a simple email first and check the approval queue if Auto Approval is off.