# General Bots Documentation (BotBook)
**Version:** 6.2.0
**Purpose:** Comprehensive documentation for General Bots (mdBook format)

---
## Overview
BotBook is the official documentation repository for General Bots, built using [mdBook](https://rust-lang.github.io/mdBook/). It provides comprehensive guides, API references, tutorials, and architectural documentation for the entire General Bots platform - an enterprise-grade LLM orchestrator and AI automation platform.
For the latest live documentation, visit **[docs.pragmatismo.com.br](https://docs.pragmatismo.com.br)**.
---
## ποΈ Architecture
---
## π¦ General Bots Repositories
| Repository | Description | Status |
|------------|-------------|--------|
| [**botserver**](https://github.com/GeneralBots/botserver) | Core API server - LLM orchestration, automation, integrations | β
Production |
| [**botui**](https://github.com/GeneralBots/botui) | Pure web UI - HTMX-based interface (suite & minimal) | β
Production |
| [**botapp**](https://github.com/GeneralBots/botapp) | Tauri desktop wrapper - native file access, system tray | β
Production |
| [**botlib**](https://github.com/GeneralBots/botlib) | Shared Rust library - common types, HTTP client, utilities | β
Production |
| [**bottemplates**](https://github.com/GeneralBots/bottemplates) | Templates - bots, apps, prompts, UI components | β
Production |
| [**botbook**](https://github.com/GeneralBots/botbook) | Documentation - mdBook format, multi-language | β
Production |
---
## π Quick Start
### Prerequisites
- **Rust** (latest stable) - [Install from rustup.rs](https://rustup.rs/)
- **Git** - [Download from git-scm.com](https://git-scm.com/downloads)
- **mdBook** - `cargo install mdbook`
### Run the Server
```bash
# Clone and run
git clone https://github.com/GeneralBots/botserver
cd botserver
cargo run
```
On first run, botserver automatically:
- Installs required components (PostgreSQL, S3 storage, Cache, LLM)
- Sets up database with migrations
- Downloads AI models
- Starts HTTP server at `http://127.0.0.1:8080`
### Run the Desktop App
```bash
# Clone botui (pure web)
git clone https://github.com/GeneralBots/botui
cd botui
cargo run # Starts web server at :3000
# In another terminal, clone and run botapp (Tauri desktop)
git clone https://github.com/GeneralBots/botapp
cd botapp
cargo tauri dev
```
### Build Documentation
```bash
# Clone botbook
git clone https://github.com/GeneralBots/botbook
cd botbook
# Build documentation
mdbook build
# Serve locally with hot reload
mdbook serve --open
```
---
## β¨ Key Features
### π€ Multi-Vendor LLM API
Unified interface for OpenAI, Groq, Claude, Anthropic, and local models.
### π§ MCP + LLM Tools Generation
Instant tool creation from code and functions - no complex configurations.
### πΎ Semantic Caching
Intelligent response caching achieving **70% cost reduction** on LLM calls.
### π Web Automation Engine
Browser automation combined with AI intelligence for complex workflows.
### π Enterprise Data Connectors
Native integrations with CRM, ERP, databases, and external services.
### π Git-like Version Control
Full history with rollback capabilities for all configurations and data.
---
## π― 4 Essential Keywords
General Bots provides a minimal, focused system:
```basic
USE KB "knowledge-base" ' Load knowledge base into vector database
CLEAR KB "knowledge-base" ' Remove KB from session
USE TOOL "tool-name" ' Make tool available to LLM
CLEAR TOOLS ' Remove all tools from session
```
---
## π Documentation Structure
```
botbook/
βββ book.toml # mdBook configuration
βββ src/
β βββ SUMMARY.md # Table of contents
β βββ README.md # Introduction
β βββ 01-introduction/ # Quick Start
β βββ 02-templates/ # Package System
β βββ 03-knowledge-base/ # Knowledge Base
β βββ 04-gbui/ # UI Interface
β βββ 06-gbdialog/ # BASIC Dialogs
β βββ 08-config/ # Configuration
β βββ 10-rest/ # REST API
β βββ 12-auth/ # Authentication
β βββ assets/ # Images, diagrams
βββ i18n/ # Translations
βββ book/ # Generated output
```
---
## π Documentation Writing Guidelines
### β
Keyword Naming Rules - MANDATORY
**Keywords NEVER use underscores. Always use spaces.**
| Write This | NOT This |
|------------|----------|
| `SEND MAIL` | `SEND_MAIL` |
| `GENERATE PDF` | `GENERATE_PDF` |
| `MERGE PDF` | `MERGE_PDF` |
| `DELETE` | `DELETE_HTTP` |
| `SET HEADER` | `SET_HEADER` |
| `FOR EACH` | `FOR_EACH` |
#### Correct Syntax Examples
```basic
SEND MAIL to, subject, body, attachments
GENERATE PDF template, data, output
MERGE PDF files, output
DELETE "url"
ON ERROR RESUME NEXT
SET BOT MEMORY key, value
KB STATISTICS
```
#### β NEVER Use Underscores
```basic
SEND_MAIL ' WRONG!
GENERATE_PDF ' WRONG!
DELETE_HTTP ' WRONG!
```
---
### π¨ Official Icons - MANDATORY
**NEVER generate icons with LLM. Use official SVG icons from `botui/ui/suite/assets/icons/`**
#### Usage in Documentation
```markdown

```
#### Required Icons
```
ui/suite/assets/icons/
βββ gb-logo.svg # Main GB logo
βββ gb-bot.svg # Bot/assistant
βββ gb-analytics.svg # Analytics
βββ gb-calendar.svg # Calendar
βββ gb-chat.svg # Chat
βββ gb-drive.svg # File storage
βββ gb-mail.svg # Email
βββ gb-meet.svg # Video meetings
βββ gb-tasks.svg # Task management
βββ ...
```
All icons use `stroke="currentColor"` for CSS theming.
---
### π« NO ASCII Diagramrams - MANDATORY
**NEVER use ASCII art diagrams. ALL diagrams must be SVG.**
#### β Prohibited ASCII Patterns
```
βββββββββββ βββββββββ +-------+
β Box β β Box β | Box |
βββββββββββ βββββββββ +-------+
```
#### β
What to Use Instead
| Instead of... | Use... |
|---------------|--------|
| ASCII box diagrams | SVG diagrams in `assets/` |
| ASCII flow charts | SVG with arrows and boxes |
| ASCII directory trees | Markdown tables |
---
### π¨ SVG Diagram Guidelines
All SVGs must support light/dark modes:
```xml
```
---
### π¬ Conversation Examples
Use WhatsApp-style HTML format for bot interactions:
```html