Skip to main content

Bubbletea Documentation

Table of Contents

Introduction

1. Intro Concept - Frontend for your AI Agent

Bubbletea is the frontend platform for AI agents & chatbots. Share your AI creations with the world through beautiful, instant chat interfaces. Build your bot in any language, host it anywhere, and Bubbletea provides the user interface.

  • No frontend development needed
  • Share bots with simple URLs
  • Professional UI out of the box
  • Built-in user management & history

Quickstart

2. Quickstart - E2E Echobot

Get your first bot running in minutes. This complete example shows you how to build, deploy, and share a working chatbot in just 3 steps.

🎬 Video Demonstration

Watch this step-by-step video guide that walks you through the entire process: Bubbletea Quickstart Tutorial

Step 1: Create an Echo Bot

First, install the Bubbletea SDK and create a simple bot that echoes messages back to users. The @bt.chatbot decorator automatically handles all the HTTP endpoint setup for you.

# Install SDK with LLM support
pip install 'bubbletea-chat[llm]'

# echobot.py
import bubbletea_chat as bt

@bt.chatbot
def echo_bot(message: str):
    # Simple echo bot
    return bt.Text(f"Echo: {message}")

if __name__ == "__main__":
    # Creates /chat endpoint automatically
    bt.run_server(echo_bot, port=8000, host="0.0.0.0")

Step 2: Deploy with ngrok or Replit

Now make your bot accessible from the internet. Choose either ngrok for local development or Replit for instant cloud hosting. Both options are free and take less than a minute to set up.

Option A: Deploy with ngrok (Local Development)

# Install ngrok: https://ngrok.com/download
# Start your bot locally
python echobot.py

# In another terminal, expose it to internet
ngrok http 8000

# Your bot URL will be: https://abc123.ngrok-free.app

Option B: Deploy on Replit (Cloud Hosting)

Replit provides free, always-on hosting with zero configuration:

  • Go to replit.com and create a new Python repl
  • Copy your bot code into main.py
  • Click "Run" to start your bot
  • Get instant URL: https://your-bot.username.repl.co
  • Free hosting, SSL included, always online
  • Click "Deploy" button and ensure deployment type is set to "Public"

Step 3: Register Your Bot & Access Everywhere

Finally, register your bot through the Dashboard to make it accessible to users:

  • Go to https://bubbletea.chat
  • Create or select a subaccount for your bot
  • Use BT Agent or the dashboard UI to register your bot

Your bot is now accessible at:

Documentation

📚 Core Documentation

🔧 Key Features

Components

Bubbletea provides rich UI components for your bot:

  • 💬 Text - Simple text messages
  • 📝 Markdown - Rich formatted text
  • 🎨 Image - Display images with alt text
  • 🎬 Video - Embed videos with player controls
  • 🎴 Cards - Interactive cards with images and text
  • 💊 Pills - Quick action buttons
  • ⚠️ Error - Error messages with proper styling
  • ⏳ Block - Loading indicators

Learn more in the Components Documentation

Bot Configuration

Configure your bot's identity, appearance, and behavior:

import bubbletea_chat as bt

@bt.config()
def get_config():
    return bt.BotConfig(
        name="your-bot",
        url="https://your-bot.com/chat",
        is_streaming=False,
        display_name="Your Bot",
        subtitle="Brief description",
        icon_emoji="🤖",
        description="Full description with **markdown** support"
    )

See full configuration options in Bot Configuration

Multiple Bots Support

Run multiple bots in the same application:

# Support Bot at /support
@bt.chatbot("support")
def support_bot(message: str):
    return bt.Text("How can I help you?")

# Sales Bot at /sales
@bt.chatbot("sales")
def sales_bot(message: str):
    return bt.Text("Let me help you find the perfect plan!")

# Run all bots
bt.run_server(port=8000)

Learn more in Multiple Bots Documentation

Examples

Bot Examples Repository

Visit our bots folder for complete working examples:

  • Echo Bot - Simple starter bot
  • Morning Bot - Daily assistant with Firebase integration
  • Movie Bot - Movie recommendations
  • OpenAI Bot - GPT-powered conversational bot

Each bot includes:

  • Complete source code
  • Setup instructions
  • Environment configuration
  • Deployment guides

Quick Example: Image Generation Bot

@bt.chatbot
async def art_bot(message: str):
    llm = LLM(model="dall-e-3")
    image_url = await llm.agenerate_image(message)
    return [bt.Image(image_url), bt.Text("Your image is ready!")]

More examples in Examples & Showcase

Contributing

Bubbletea is open source and welcomes contributions! Whether you're fixing bugs, adding features, improving documentation, or creating example bots, your contributions help make Bubbletea better for everyone.

How to Contribute

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

Resources

License

MIT License - See LICENSE file for details

View on GitHub | Report Issue

Metadata

Release files for bubbletea-chat 0.6.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bubbletea-chat 0.6.4
File Size Uploaded
bubbletea_chat-0.6.4.tar.gz 32.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bubbletea-chat 0.6.4
File Interpreter ABI Platform
bubbletea_chat-0.6.4-py3-none-any.whl Python 3 none any Details

Total release size: 50.6 kB

Release files / bubbletea_chat-0.6.4.tar.gz

Download URL bubbletea_chat-0.6.4.tar.gz
Size 32.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4cb0547b15082850740a399f6ec6e7a35f3701f3d454e7a79a0ed283cd4549c1
BLAKE2b-256 checksum
How to use checksums
f5e37033c122dacb03cb251fec2ad945d10e85dffb0664c3dbae005fb98c1c5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release files / bubbletea_chat-0.6.4-py3-none-any.whl

Download URL bubbletea_chat-0.6.4-py3-none-any.whl
Size 18.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ccb3417e86c4a6eed8110d609e2dfa5aa8e95087a0109f9b810693ae55522891
BLAKE2b-256 checksum
How to use checksums
7b0779fc3a9eeac4c7fede9c52fc43df6a60a79e4ac60c21b06820efc2ffb293
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.6.4 This release

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.8

2 release files

0.5.7

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page