Connect Your Mastra Agent

Connect your Mastra agent to CometChat

Build and deploy your Mastra agent chat with a fully customizable CometChat interface. Customize the chat experience, monitor performance and deploy effortlessly.
Hero image

Three ways to integrate your Mastra agent

Add your Mastra agent to the CometChat frontend

Choose from three paths to connect your Mastra agent to the CometChat copilot

Widget Builder

Drag, drop and build your agent chat

The no-code way to embed your Mastra agent directly into your frontend.

  • Customize the look and feel of your Mastra agent chat by choosing your theme, layout, typography, and display text,.

  • Toggle chat features and arrange components in the style of your choice.

  • Export the embed code and drop it straight into your app.

UI Kits

Customize, preview and ship with the UI Kits

Pre-built components to get you started quickly.

  • Access CometChat's UI Kit components and choose the features you need for your Mastra agent chat.

  • Toggle style components, functions, and more in the layout of your choice.

  • The best option if you want advanced customization without starting from scratch.

    .

SDKs

Build, design, and control your Mastra agent

Prefer full control over how your Mastra agent looks and behaves? CometChat SDK gives you all the building blocks to wire it up exactly how you want.

  • Build a custom Mastra agent chat with complete flexibility using CometChat SDKs.

  • Bring in your own UI and design for complete end to end customization.

  • Perfect for enterprise-scale needs.

    .

Core Platform Capabilities

The essentials: What every Mastra agent gets

Everything your Mastra agent needs to be safe, responsive, and measurable.

Built-in guardrails + moderation

Two-Way Safety, Built In

Most platforms stop at content filters. We moderate both ways - and give your Mastra agent the logic, visibility, and flexibility to do it your way.

Two-way moderation

Works with CometChat AI, OpenAI, or your own moderation API

Fallback logic, refusal routing, escalation paths

Visual policy builder with thresholds, triggers, and roles

Audit trails, CSAM detection, and full RBAC compliance

Plug into any stage of the message lifecycle

Multichannel notifications engine

Your Mastra agent is only helpful if people come back to talk to it.

Most agents get ghosted. Yours won’t.

Native push, email, and SMS support

Retry logic, delivery throttling, and batching

Trigger-based delivery rules - unread X mins, fallback triggered, user went silent

Threaded email replies (yes, replies go back to chat!)

Integrates with SendGrid, Twilio, or your custom providers

User-level frequency + preference settings

Insights dashboard

Ship the Mastra agent. Then make it better. Without needing Mixpanel, Segment, or BI setups.

From day one, you get built-in visibility into what your Mastra agent is doing - and how people are responding.

Resolution rates, fallback frequency, retry counts, latency

Tool usage breakdowns, prompt paths, knowledge base hits

Conversation-level analytics: drop-off points, re-engagement, success outcomes

Sentiment markers and feedback loops

Exportable, filterable, and privacy-respectful

AI-ready chat layer, out-of-the-box

A complete, production-grade chat interface built for real AI-driven conversations.

Streaming agent replies with thinking states

See responses unfold in real time, with visible thinking, searching, and acting states.

Retry & stop controls

Let users retry a response, stop generation, or recover gracefully from failures.

Feedback controls

Collect thumbs-up, thumbs-down, or written feedback to continuously improve agent quality.

Rich response rendering

Show structured outputs like cards, charts, summaries, and visual insights.

Interactive UI actions

Trigger UI elements like buttons, forms, modals, and workflows directly from agent responses.

Inline citations & expandable reasoning

Provide transparent answers with sources, citations, and optional step-by-step reasoning.

Markdown rendering

Render clean, readable responses with headings, lists, code blocks, and links.

Voice messages

Enable voice-based conversations with support for sending and receiving audio.

Multimedia support

Handle text, images, videos, files, and rich content in a single conversation.

FAQ

Got questions? We’ve got answers.

Ellipse
CometChat Logo

Start shipping your Mastra agent today

The fastest way to put your existing Mastra agent in front of users