// CONTENTS Part 00 · Welcome

// PART 00

The two-minute mental model

Chapter 04 / 60 4 min read English Part 00 of 15

You can understand how General Bots fits together in about two minutes. Everything else in this book elaborates one of the five ideas below.

1. A bot is documents plus tools plus a model

Documents (.gbkb)  +  Tools (.bas)  +  LLM  =  your assistant

You do not write dialog flow charts. You add documents the assistant should know, define small tools for actions, and let the language model hold the conversation: it answers from the documents, collects parameters for the tools, and calls them when it has what it needs.

2. A session is the conversation’s memory

Every conversation lives in a session — a container holding the message history, the variables set along the way, the active knowledge bases and the user’s identity. Sessions survive reloads and restarts: history is stored in PostgreSQL and cached for fast access. A returning user continues where the conversation paused, and one user’s context never leaks into another’s.

3. Channels are transports, not rewrites

The web chat, WhatsApp, Telegram, Microsoft Teams and Instagram all deliver messages into the same pipeline. A channel adapter normalises the inbound payload, stores attachments in Drive, and delivers the answer back. The same script, the same knowledge and the same tools run everywhere; what varies per channel is the transport and a per-channel prompt file.

4. The apps are one workspace, not silos

The 68 suite applications share one storage layer and one command catalog. Files created in a conversation open in Sheets, Docs or Slides with a deep link; contacts in CRM are the same records the Mail app looks up; the assistant can open any enabled app on your behalf or perform an app action directly from chat.

5. Preview mode separates stable from new

The registry classifies every app as always visible or preview-only. Stable apps — Chat, Explorer, Docs, Sheets, Paper, Calendar, Tasks, CRM, Billing, Products, Mail, Settings and the utility apps — are in every launcher. The rest appear when you switch on Preview in the sidebar. This book marks each chapter’s app with its status so you know what to rely on.

The 30-second version

./botserver

Open http://localhost:3000, sign in, and start chatting. First run installs the database, storage and cache into botserver-stack/, deploys starter bots from templates, and reports when it is ready.

What happens in your first conversation

  1. You open Chat and type a greeting; the bot answers from its start script and shows suggestion chips.
  2. You ask about a topic covered by a document in .gbkb/; the assistant retrieves the relevant content and answers with it in context.
  3. You ask for something that requires action — “enroll me in the course” — and the assistant identifies the matching tool, asks for the missing parameters, runs the script, and reports the result.

That loop — question, retrieval or tool, answer — is the whole product. The next part shows you around the interface you just opened.

Where to go next

Need Chapter
Find apps, search and settings Part 1 — Find your way around
Understand Chat in depth Part 2 — Talk and think
Create your first file Part 3 — Write and edit
Connect WhatsApp or Teams Part 10 — Channels

Run your first bot in five minutes

  1. Run botserver — ./botserver. No configuration file is needed to start.
  2. Wait for bootstrap (2–5 minutes) — the binary detects the OS, downloads PostgreSQL, Drive (S3-compatible object storage) and cache into botserver-stack/, generates credentials, creates the schema and deploys the default bots.
  3. Open the suite — http://localhost:3000 and start a conversation.

If those services already run somewhere, point the bot at them instead of the bundled ones; the bootstrap skips what is already configured.

Your first tool

Tools are plain BASIC files in the bot’s .gbdialog/ folder:

' enrollment.bas
PARAM name, course
DESCRIPTION "Enroll a student in a course"
SAVE "enrollments.csv", name, course, NOW()
TALK "Welcome to " + course + ", " + name + "!"

The model discovers the tool from DESCRIPTION, collects name and course in conversation, and calls the script when it has both.

Add knowledge

Drop documents in .gbkb/ subfolders. They are indexed automatically, answers cite them, and the index refreshes when files change.

Optional components

./botserver install email       # mail server
./botserver install directory   # identity provider
./botserver install llm         # local LLM runtime (offline mode)
./botserver install meeting     # video conferencing

When something is wrong

  • ./botserver status tables, status drive and status cache report each bundled component.
  • To start clean, stop the server and remove botserver-stack/ (and .env); the next run rebuilds it.

Found a mistake? Open an issue · All books

// SEARCH ESC
Pagefind · 236 pages · 4 books Enter to open ↑ ↓ to move