Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Dialogflow Migration Guide

Migrating chatbots and conversational agents from Dialogflow to General Bots.

General Bots

Overview

Dialogflow is Google’s conversational AI platform for building chatbots with intent-based NLU. General Bots provides a simpler, more powerful approach using LLM-based understanding and BASIC scripting—without cloud lock-in or complex intent management.

Why Migrate

AspectDialogflowGeneral Bots
HostingGoogle Cloud onlySelf-hosted
PricingPer-request feesNo per-request costs
NLU ApproachIntent + entity trainingLLM-based (zero training)
FulfillmentCloud Functions/webhooksNative BASIC scripts
Knowledge BaseLimited connectorFull RAG system
ChannelsVia integrationsNative multi-channel
CustomizationLimitedFull source access
MaintenanceIntent training requiredLLM handles variations

Cost Comparison

Dialogflow Pricing

EditionCost
ES (Standard)Free tier + $0.002/request
CX$0.007/request
Mega Agent$0.06/request

10,000 requests/month: $20-600/month

General Bots

ComponentCost
Software$0
Infrastructure$50-200/month
LLM APIUsage-based (typically lower)

Architecture Comparison

Dialogflow Architecture

User → Dialogflow Agent → Intent Matching → Fulfillment Webhook → Response
                ↓
         Entity Extraction
                ↓
         Context Management

General Bots Architecture

User → BASIC Script → LLM Processing → Response
             ↓
      Knowledge Base (RAG)
             ↓
      Direct Actions (DB, API, etc.)

Concept Mapping

Intents to BASIC

Dialogflow ConceptGeneral Bots Equivalent
IntentLLM understanding + conditions
Training PhrasesNot needed (LLM handles)
EntityHEAR AS <type>
ContextSET CONTEXT / SET BOT MEMORY
FulfillmentDirect BASIC code
Follow-up IntentConversation flow
EventON triggers
Knowledge ConnectorUSE KB

Entity Types

Dialogflow EntityGeneral Bots HEAR AS
@sys.dateHEAR AS DATE
@sys.timeHEAR AS HOUR
@sys.numberHEAR AS INTEGER / FLOAT
@sys.emailHEAR AS EMAIL
@sys.phone-numberHEAR AS MOBILE
@sys.currency-nameHEAR AS MONEY
@sys.personHEAR AS NAME
Custom entityMenu options or LLM extraction

Migration Examples

Simple FAQ Bot

Dialogflow:

  • Intent: “hours” with training phrases
  • Response: “We’re open 9 AM to 5 PM”

General Bots:

USE KB "company-info"

SET CONTEXT "You are a helpful assistant for Acme Corp. Answer questions about our business."

TALK "Hi! How can I help you today?"
HEAR question
answer = LLM question
TALK answer

The LLM understands “hours”, “when are you open”, “opening times”, etc. without explicit training.

Order Status Bot

Dialogflow:

Intent: order.status
Training phrases: "where is my order", "track order", "order status"
Entity: @order_number
Fulfillment: Webhook to order API

General Bots:

' order-status.bas
SET CONTEXT "You help customers check their order status."

TALK "I can help you track your order. What's your order number?"
HEAR order_number

' Direct API call - no webhook needed
SET HEADER "Authorization", "Bearer " + GET CONFIG "orders-api-key"
order = GET "https://api.company.com/orders/" + order_number

IF order.error THEN
    TALK "I couldn't find that order. Please check the number and try again."
ELSE
    TALK "Your order #" + order_number + " is " + order.status + "."
    
    IF order.status = "shipped" THEN
        TALK "Tracking number: " + order.tracking
        TALK "Expected delivery: " + FORMAT(order.delivery_date, "MMMM d")
    END IF
END IF

TALK "Is there anything else I can help with?"

Appointment Booking

Dialogflow:

Intent: book.appointment
Entities: @sys.date, @sys.time, @service_type
Slot filling for required parameters
Fulfillment: Calendar API webhook

General Bots:

' appointment-booking.bas
SET CONTEXT "You help customers book appointments."

TALK "I'd be happy to help you book an appointment."

TALK "What type of service do you need?"
HEAR service AS "Consultation", "Follow-up", "New Patient", "Urgent Care"

TALK "What date works for you?"
HEAR appointment_date AS DATE

TALK "And what time?"
HEAR appointment_time AS HOUR

' Check availability
available = GET "https://api.calendar.com/check?date=" + appointment_date + "&time=" + appointment_time

IF available.open THEN
    ' Book directly
    BOOK service + " Appointment" AT appointment_date + " " + appointment_time
    
    TALK "Perfect! Your " + service + " appointment is confirmed for " + FORMAT(appointment_date, "MMMM d") + " at " + appointment_time
    
    ' Send confirmation
    TALK "What email should I send the confirmation to?"
    HEAR email AS EMAIL
    
    SEND MAIL TO email SUBJECT "Appointment Confirmation" BODY "Your " + service + " is scheduled for " + appointment_date
ELSE
    TALK "That time isn't available. How about " + available.next_slot + "?"
    HEAR confirm AS BOOLEAN
    ' ... continue flow
END IF

Multi-Turn Conversation

Dialogflow:

  • Follow-up intents
  • Context management
  • Lifespan settings

General Bots:

' pizza-order.bas
SET CONTEXT "You help customers order pizza."

TALK "Welcome to Pizza Bot! What would you like to order?"

' Size
TALK "What size pizza?"
HEAR size AS "Small", "Medium", "Large", "Extra Large"

' Type
TALK "What type would you like?"
HEAR pizza_type AS "Pepperoni", "Margherita", "Supreme", "Hawaiian", "Custom"

IF pizza_type = "Custom" THEN
    TALK "What toppings would you like? (comma separated)"
    HEAR toppings
END IF

' Confirm
TALK "So that's a " + size + " " + pizza_type + " pizza. Is that correct?"
HEAR confirmed AS BOOLEAN

IF confirmed THEN
    ' Store order
    order_id = INSERT "orders", #{
        size: size,
        type: pizza_type,
        toppings: toppings,
        status: "pending",
        created_at: NOW()
    }
    
    TALK "Great! Your order #" + order_id + " has been placed."
    TALK "Would you like to add anything else?"
    HEAR add_more AS BOOLEAN
    
    IF add_more THEN
        ' Continue ordering
    ELSE
        TALK "What's your delivery address?"
        HEAR address
        ' ... complete order
    END IF
ELSE
    TALK "No problem, let's start over."
END IF

Migrating Fulfillment Code

Dialogflow Webhook

// Dialogflow fulfillment
exports.webhook = (req, res) => {
  const intent = req.body.queryResult.intent.displayName;
  const params = req.body.queryResult.parameters;
  
  if (intent === 'order.status') {
    const orderId = params.order_number;
    // Call API
    fetch(`https://api.example.com/orders/${orderId}`)
      .then(response => response.json())
      .then(order => {
        res.json({
          fulfillmentText: `Your order is ${order.status}`
        });
      });
  }
};

General Bots Equivalent

' The logic is inline - no separate webhook needed
order = GET "https://api.example.com/orders/" + order_id
TALK "Your order is " + order.status

Knowledge Base Migration

Dialogflow Knowledge Connector

Limited to FAQ format, requires Google Cloud.

General Bots Knowledge Base

Full document support with RAG:

my-bot.gbkb/
├── products/
│   ├── catalog.pdf
│   └── specifications.xlsx
├── support/
│   ├── faq.md
│   └── troubleshooting.md
└── policies/
    ├── returns.pdf
    └── warranty.md
USE KB "products"
USE KB "support"
USE KB "policies"

answer = LLM customer_question

Context Migration

Dialogflow Contexts

// Setting context in fulfillment
outputContexts: [{
  name: `projects/.../contexts/order-context`,
  lifespanCount: 5,
  parameters: { orderId: '12345' }
}]

General Bots Memory

' Store context
SET BOT MEMORY "current_order_id", order_id
SET BOT MEMORY "customer_name", customer_name

' Retrieve context
order_id = GET BOT MEMORY "current_order_id"

Multi-Channel Deployment

Dialogflow Integrations

Requires separate configuration for each channel:

  • Web: Dialogflow Messenger
  • Telephony: CCAI
  • Other: Custom integrations

General Bots

Same code works everywhere:

' Works on Web, WhatsApp, Teams, Slack, Telegram, SMS
TALK "How can I help?"
HEAR question
USE KB "support"
answer = LLM question
TALK answer

Advanced Features

Small Talk

Dialogflow: Enable small talk prebuilt agent

General Bots: LLM handles naturally

SET CONTEXT "You are a friendly assistant. Engage in casual conversation when appropriate while staying helpful."

' LLM naturally handles:
' - "Hello"
' - "How are you?"
' - "Thanks"
' - "Goodbye"

Sentiment Analysis

Dialogflow: Enable sentiment in settings

General Bots:

HEAR customer_message

sentiment = LLM "Analyze the sentiment of this message and respond with: positive, neutral, or negative. Message: " + customer_message

IF sentiment = "negative" THEN
    SET CONTEXT "The customer seems frustrated. Be extra helpful and empathetic."
    ' Or escalate
    CREATE TASK "Review negative sentiment conversation" 
END IF

answer = LLM customer_message
TALK answer

Rich Responses

Dialogflow: Card, suggestion chips, etc.

General Bots:

' Suggestions
ADD SUGGESTION "Check Order"
ADD SUGGESTION "Track Shipment"
ADD SUGGESTION "Contact Support"
TALK "What would you like to do?"

' Images
TALK IMAGE "/products/featured.jpg"

' Files
TALK FILE "/documents/brochure.pdf"

Migration Checklist

Pre-Migration

  • Export Dialogflow agent (JSON)
  • Document all intents and training phrases
  • List entities and their values
  • Map fulfillment webhooks
  • Identify knowledge connectors
  • Note channel integrations

Migration

  • Set up General Bots environment
  • Create knowledge base from FAQs/docs
  • Build BASIC scripts for main flows
  • Implement entity validation with HEAR AS
  • Convert fulfillment logic to BASIC
  • Configure channels

Post-Migration

  • Test all conversation flows
  • Compare response quality
  • Verify API integrations
  • Train team on new system
  • Redirect channel integrations
  • Decommission Dialogflow agent

What You Gain

No Intent Training: LLM understands variations without explicit training phrases.

Simpler Architecture: Logic lives in BASIC scripts, not spread across intents and webhooks.

Self-Hosted: No Google Cloud dependency or per-request fees.

Native Integrations: Direct API calls and database access without webhook complexity.

Full RAG: Rich knowledge base support beyond simple FAQ.

Multi-Channel Native: Deploy everywhere with one codebase.

See Also