botserver/docs/src/chapter-02
Rodrigo Rodriguez (Pragmatismo) 7a5e369402 Add comprehensive documentation for GB templates and configuration
modules

Add detailed README documentation for 15+ bot templates including:
- Platform analytics, BI reporting, and web crawler templates
- CRM, contacts, and marketing automation templates
- Legal document processing and office productivity templates
- LLM tools, LLM server, and API client integration templates
- Reminder management and meta-template for creating new templates

Add new Rust configuration modules:
- BM25 config for Tantivy-based sparse
2025-12-03 16:05:50 -03:00
..
assets - SVG UI. 2025-12-01 02:22:35 -03:00
gbai.md - SVG UI. 2025-12-01 02:22:35 -03:00
gbdialog.md Fix typos in bot file extensions and keyword names 2025-11-26 22:54:22 -03:00
gbdrive.md - Split into botui. 2025-12-02 21:09:43 -03:00
gbkb.md - SVG UI. 2025-12-01 02:22:35 -03:00
gbot.md - SVG UI. 2025-12-01 02:22:35 -03:00
gbtheme.md - SVG UI. 2025-12-01 02:22:35 -03:00
README.md - More htmx. 2025-11-29 17:27:13 -03:00
summary.md - More general docs. 2025-11-23 13:46:55 -03:00
template-analytics.md Add comprehensive documentation for GB templates and configuration 2025-12-03 16:05:50 -03:00
template-api-client.md Add comprehensive documentation for GB templates and configuration 2025-12-03 16:05:50 -03:00
template-bi.md Add comprehensive documentation for GB templates and configuration 2025-12-03 16:05:50 -03:00
template-crawler.md Add comprehensive documentation for GB templates and configuration 2025-12-03 16:05:50 -03:00
template-crm-contacts.md Add toml dependency for Askama custom filters config 2025-11-30 23:48:08 -03:00
template-crm.md Add comprehensive documentation for GB templates and configuration 2025-12-03 16:05:50 -03:00
template-law.md Add comprehensive documentation for GB templates and configuration 2025-12-03 16:05:50 -03:00
template-llm-server.md Add comprehensive documentation for GB templates and configuration 2025-12-03 16:05:50 -03:00
template-llm-tools.md Add comprehensive documentation for GB templates and configuration 2025-12-03 16:05:50 -03:00
template-marketing.md Add comprehensive documentation for GB templates and configuration 2025-12-03 16:05:50 -03:00
template-office.md Add comprehensive documentation for GB templates and configuration 2025-12-03 16:05:50 -03:00
template-reminder.md Add comprehensive documentation for GB templates and configuration 2025-12-03 16:05:50 -03:00
template-samples.md Add template samples and compliance API documentation 2025-11-30 22:39:24 -03:00
template-template.md Add comprehensive documentation for GB templates and configuration 2025-12-03 16:05:50 -03:00
templates.md - New templates. 2025-12-03 07:15:54 -03:00

Chapter 02: About Packages

How bots are organized in General Bots.

What You'll Learn

  • Package structure (.gbai folders)
  • Dialog scripts in BASIC
  • Knowledge bases
  • Configuration basics
  • How packages load

Package Structure

A bot is just a folder ending in .gbai:

my-bot.gbai/
├── my-bot.gbdialog/    # BASIC scripts
├── my-bot.gbkb/        # Documents
├── my-bot.gbot/        # Configuration
├── my-bot.gbtheme/     # Optional styling
└── my-bot.gbdrive/     # Optional storage

Drop the folder in templates/, it loads automatically.

Key Concepts

Dialogs (.gbdialog)

  • BASIC scripts that control conversation
  • start.bas is optional (but needed to activate tools/KB with USE TOOL/USE KB)
  • Simple commands like TALK and HEAR

Knowledge Base (.gbkb)

  • Put PDFs and documents in folders
  • Automatically becomes searchable
  • Bot can answer questions from documents

Configuration (.gbot)

  • Single config.csv file
  • Simple name,value pairs
  • Missing values use defaults

Themes (.gbtheme)

  • Optional CSS styling
  • Most bots don't need this

Storage (.gbdrive)

  • Links to S3-compatible storage
  • For large files and uploads

How It Works

  1. Discovery: Finds .gbai folders
  2. Loading: Reads all components
  3. Indexing: Processes documents
  4. Activation: Bot is ready

No build process. No compilation. Just folders and files.

The web UI uses HTMX with server-side rendering - minimal JavaScript, no build process, just HTML templates powered by Rust.

Topics Covered


General Bots