Skip to main content

Email KA

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:

  1. A KA Engine – Defines how the agent behaves (tone, structure, intent detection, fallback behavior).

  2. 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:

Step-by-step
  1. ✅ A KA Engine created in AI Labs → Engines. See Engine Guide

  2. ✅ A KA Collection created in Collections. See Collection Guide

  3. ✅ 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

  1. From the main navigation sidebar, click Agents .

  2. Click the blue + Create Agent button at the top left.

  3. In the Agent Type Library, locate the Knowledge Agent card 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 name field, 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 Next to 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 Urls dropdown: 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 Type dropdown.

  • 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

https://login.microsoftonline.com/{YOUR_TENANT_ID}/oauth2/v2.0/token

Email

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:

  1. 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 .

  2. Copy Your IDs:

    • On the Overview page, copy the Application (client) ID and Directory (tenant) ID. You will need both .

  3. 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 .

  4. 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.Read

      • Mail.Send

      • User.Read (to access sender information)

    • Click Add permissions .

  5. Grant Admin Consent:

    • In the API permissions screen, click Grant admin consent for [Your Organization] .

    • Click Yes to confirm .

  6. 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

imap.gmail.com

993

SSL/TLS

Yahoo Mail

imap.mail.yahoo.com

993

SSL/TLS

Outlook.com

imap-mail.outlook.com

993

SSL/TLS

iCloud Mail

imap.mail.me.com

993

SSL/TLS

Office 365 (Legacy)

outlook.office365.com

993

SSL/TLS

Custom Domain

Varies (e.g., mail.yourdomain.com)

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

  1. 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 .

  2. 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 .

  3. 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).

  4. 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

{{SENDER_NAME}}

The name of the person who sent the original email

{{AI_REPLY}}

The AI-generated response content (based on your Engine and Collection)

  • 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 Recipients list (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

  1. An email arrives in the configured inbox.

  2. The Knowledge Agent reads the email content.

  3. It searches the Collection for relevant information.

  4. It applies the Engine guidelines to formulate a response.

  5. It populates the Email Template with the sender's name and AI-generated reply.

  6. If Auto Approval is ON: The reply is sent immediately.

  7. 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.