botserver/docs/src
2025-11-21 23:23:53 -03:00
..
appendix-i Revise documentation in Chapter 01 to improve clarity and structure, including updates to the installation instructions and session management overview. 2025-10-25 15:59:06 -03:00
chapter-01 - New stuff, 6.1. 2025-11-21 23:23:53 -03:00
chapter-02 - New stuff, 6.1. 2025-11-21 23:23:53 -03:00
chapter-03 - New stuff, 6.1. 2025-11-21 23:23:53 -03:00
chapter-04 Revise documentation in Chapter 01 to improve clarity and structure, including updates to the installation instructions and session management overview. 2025-10-25 15:59:06 -03:00
chapter-05 - New stuff, 6.1. 2025-11-21 23:23:53 -03:00
chapter-06 WPP. 2025-11-21 12:13:48 -03:00
chapter-07 Revise documentation in Chapter 01 to improve clarity and structure, including updates to the installation instructions and session management overview. 2025-10-25 15:59:06 -03:00
chapter-08 - New stuff, 6.1. 2025-11-21 23:23:53 -03:00
chapter-09 - New stuff, 6.1. 2025-11-21 23:23:53 -03:00
chapter-10 Add comprehensive documentation for GeneralBots, including keyword references, templates, and user guides 2025-10-25 14:50:14 -03:00
chapter-11 docs: expand session management and add authentication section 2025-11-03 20:42:38 -03:00
chapter-12 docs: expand session management and add authentication section 2025-11-03 20:42:38 -03:00
glossary.md docs: expand session management and add authentication section 2025-11-03 20:42:38 -03:00
introduction.md - New stuff, 6.1. 2025-11-21 23:23:53 -03:00
README.md - New stuff, 6.1. 2025-11-21 23:23:53 -03:00
SUMMARY.md - New stuff, 6.1. 2025-11-21 23:23:53 -03:00
TODO.txt feat: add HTTP server and refactor initialization 2025-11-15 09:48:46 -03:00

BotServer Documentation

Welcome to the BotServer documentation. This guide explains how to install, configure, extend, and deploy conversational AI bots using BotServer's template-based package system and BASIC scripting language.


About This Documentation

This documentation has been recently updated to accurately reflect the actual implementation of BotServer version 6.0.8. The following sections are now accurate:

Accurate Documentation:

  • Chapter 02: Package system (template-based .gbai structure)
  • Chapter 06: Rust architecture (single-crate structure, module overview)
  • Chapter 09: Core features
  • Introduction: Architecture and capabilities

⚠️ Partial Documentation:

  • Chapter 05: BASIC keywords (examples exist, full reference needs expansion)
  • Chapter 08: Tool integration (concepts documented, implementation details needed)
  • Chapter 11: Authentication (implemented but needs detail)

📝 Needs Documentation:

  • UI module (src/ui/)
  • UI tree module (src/ui_tree/)
  • Riot compiler module (src/riot_compiler/)
  • Prompt manager (src/prompt_manager/)
  • API endpoints and web server routes
  • MinIO/S3 drive integration details
  • Video conferencing (LiveKit) integration

What is BotServer?

BotServer is an open-source conversational AI platform written in Rust. It enables users to create intelligent chatbots using:

  • BASIC Scripting: Simple .bas scripts for conversation flows
  • Template Packages: Organize bots as .gbai directories with dialogs, knowledge bases, and configuration
  • Vector Search: Semantic document retrieval with Qdrant
  • LLM Integration: OpenAI, local models, and custom providers
  • Auto-Bootstrap: Automated installation of PostgreSQL, Redis, MinIO, and more
  • Multi-Bot Hosting: Run multiple isolated bots on a single server

Quick Start

  1. Installation: Follow Chapter 01: Run and Talk
  2. Explore Templates: Check templates/announcements.gbai/ for examples
  3. Create a Bot: Copy a template and modify it
  4. Learn BASIC: Read Chapter 05: BASIC Reference
  5. Configure: Edit config.csv in your .gbot/ directory
  6. Deploy: Restart BotServer to activate changes

Table of Contents

Part I - Getting Started

Part II - Package System

Part III - Knowledge Base

Part IV - Themes and UI

Part V - BASIC Dialogs

Part VI - Extending BotServer

Part VII - Bot Configuration

Part VIII - Tools and Integration

Part IX - Feature Reference

Part X - Community

Part XI - Authentication and Security

Appendices


Architecture Overview

BotServer is a monolithic Rust application (single crate) with the following structure:

Core Modules

  • auth - Argon2 password hashing, session tokens
  • bot - Bot lifecycle and management
  • session - Persistent conversation state
  • basic - BASIC interpreter (powered by Rhai)
  • llm / llm_models - LLM provider integration
  • context - Conversation memory management

Infrastructure

  • bootstrap - Auto-installation of components
  • package_manager - Manages PostgreSQL, Redis, MinIO, etc.
  • web_server - Axum HTTP API and WebSocket
  • drive - MinIO/S3 storage and vector DB
  • config - Environment configuration

Features

  • automation - Cron scheduling and events
  • email - IMAP/SMTP integration (optional)
  • meet - LiveKit video conferencing
  • channels - Multi-channel support
  • file - Document processing (PDF, etc.)
  • drive_monitor - File system watching

Technology Stack

  • Language: Rust 2021 edition
  • Web: Axum + Tower + Tokio
  • Database: Diesel ORM + PostgreSQL
  • Cache: Redis/Valkey
  • Storage: AWS SDK S3 (MinIO)
  • Vector DB: Qdrant (optional)
  • Scripting: Rhai engine
  • Security: Argon2, AES-GCM
  • Desktop: Tauri (optional)

Project Information


Documentation Status

This documentation is a living document that evolves with the codebase. Contributions are welcome! If you find inaccuracies or gaps:

  1. Check the source code in src/ for ground truth
  2. Submit documentation improvements via pull requests
  3. Report issues on GitHub

See TODO.txt for known documentation gaps and future enhancements.


Next Steps

Start with Introduction for a comprehensive overview, or jump directly to Chapter 01: Run and Talk to install and run BotServer.