- Add comprehensive documentation in botbook/ with 12 chapters - Add botapp/ Tauri desktop application - Add botdevice/ IoT device support - Add botlib/ shared library crate - Add botmodels/ Python ML models service - Add botplugin/ browser extension - Add botserver/ reorganized server code - Add bottemplates/ bot templates - Add bottest/ integration tests - Add botui/ web UI server - Add CI/CD workflows in .forgejo/workflows/ - Add AGENTS.md and PROD.md documentation - Add dependency management scripts (DEPENDENCIES.sh/ps1) - Remove legacy src/ structure and migrations - Clean up temporary and backup files |
||
|---|---|---|
| .. | ||
| assets | ||
| architecture.md | ||
| autonomous-tasks.md | ||
| building.md | ||
| cargo-tools.md | ||
| containers.md | ||
| crates.md | ||
| custom-keywords.md | ||
| dependencies.md | ||
| docker-deployment.md | ||
| example-gbapp.md | ||
| gbai.md | ||
| gbdialog.md | ||
| gbdrive.md | ||
| gbkb.md | ||
| gbot.md | ||
| gbtheme.md | ||
| infrastructure.md | ||
| keyword-refactoring.md | ||
| kubernetes-deployment.md | ||
| monitoring-setup.md | ||
| observability.md | ||
| philosophy.md | ||
| README.md | ||
| scaling.md | ||
| services.md | ||
| summary.md | ||
| template-analytics.md | ||
| template-api-client.md | ||
| template-attendance-crm.md | ||
| template-bi.md | ||
| template-crawler.md | ||
| template-crm-contacts.md | ||
| template-crm.md | ||
| template-embedded.md | ||
| template-law.md | ||
| template-llm-server.md | ||
| template-llm-tools.md | ||
| template-marketing.md | ||
| template-office.md | ||
| template-reminder.md | ||
| template-samples.md | ||
| template-template.md | ||
| templates.md | ||
| testing-safety.md | ||
Chapter 2: Architecture & Packages
Architecture and deployment reference for developers.
Overview
botserver is built in Rust with a modular architecture. Extend it by creating custom keywords, services, or entire applications.
Architecture
┌─────────────────────────────────────────┐
│ Web Server (Axum) │
├─────────────────────────────────────────┤
│ BASIC Runtime (Rhai) │
├──────────┬──────────┬──────────┬────────┤
│ LLM │ Storage │ Vector │ Cache │
│ Service │ (MinIO) │ (Qdrant) │(Valkey)│
├──────────┴──────────┴──────────┴────────┤
│ PostgreSQL │
└─────────────────────────────────────────┘
Deployment Options
| Method | Use Case | Guide |
|---|---|---|
| Local | Development | Installation |
| Docker | Production | Docker Deployment |
| LXC | Isolated components | Container Deployment |
Module Structure
| Module | Purpose |
|---|---|
web_server |
HTTP/WebSocket handling |
basic |
BASIC language runtime |
llm |
LLM provider integration |
drive |
Object storage |
shared |
Database models |
Creating Custom Keywords
// In src/basic/keywords/my_keyword.rs
pub fn my_keyword(context: &mut EvalContext) -> Result<Dynamic, Box<EvalError>> {
// Your keyword logic
Ok(Dynamic::from("result"))
}
Register in keywords/mod.rs and rebuild.
Autonomous Task AI
General Bots enables autonomous task execution where the machine does the work:
Human describes intent → AI plans → AI generates → AI deploys → AI monitors
Key concepts:
- Intent Compilation - LLM translates natural language to execution plans
- CREATE SITE - Generates HTMX apps bound to botserver API
- .gbdrive - Cloud-synced workspace for all task files
- Autonomous Execution - System runs plans with approval gates
See Autonomous Task AI for complete documentation.
Chapter Contents
- Architecture Overview - System design
- Building from Source - Compilation guide
- Container Deployment (LXC) - Linux containers
- Docker Deployment - Docker setup
- Scaling - Load balancing
- Infrastructure - Hardware planning
- Observability - Monitoring
- Autonomous Task AI - Machine does the work
- Custom Keywords - Extending BASIC
- Services - Service layer
See Also
- Installation - Getting started
- BASIC Reference - Scripting language