botbook/src/07-gbapp
2025-12-17 17:44:07 -03:00
..
assets Update: General project updates 2025-12-06 11:09:12 -03:00
architecture.md Lowercase botserver/botbook references, add bottemplates repo, update autonomous tasks docs 2025-12-12 23:18:36 -03:00
autonomous-tasks.md docs: update 2025-12-17 17:44:07 -03:00
building.md Lowercase botserver/botbook references, add bottemplates repo, update autonomous tasks docs 2025-12-12 23:18:36 -03:00
cargo-tools.md Lowercase botserver/botbook references, add bottemplates repo, update autonomous tasks docs 2025-12-12 23:18:36 -03:00
containers.md Lowercase botserver/botbook references, add bottemplates repo, update autonomous tasks docs 2025-12-12 23:18:36 -03:00
crates.md Lowercase botserver/botbook references, add bottemplates repo, update autonomous tasks docs 2025-12-12 23:18:36 -03:00
custom-keywords.md Lowercase botserver/botbook references, add bottemplates repo, update autonomous tasks docs 2025-12-12 23:18:36 -03:00
dependencies.md Lowercase botserver/botbook references, add bottemplates repo, update autonomous tasks docs 2025-12-12 23:18:36 -03:00
docker-deployment.md Lowercase botserver/botbook references, add bottemplates repo, update autonomous tasks docs 2025-12-12 23:18:36 -03:00
example-gbapp.md Lowercase botserver/botbook references, add bottemplates repo, update autonomous tasks docs 2025-12-12 23:18:36 -03:00
infrastructure.md Lowercase botserver/botbook references, add bottemplates repo, update autonomous tasks docs 2025-12-12 23:18:36 -03:00
keyword-refactoring.md Update: General project updates 2025-12-06 11:09:12 -03:00
observability.md Lowercase botserver/botbook references, add bottemplates repo, update autonomous tasks docs 2025-12-12 23:18:36 -03:00
philosophy.md Update: General project updates 2025-12-06 11:09:12 -03:00
README.md Lowercase botserver/botbook references, add bottemplates repo, update autonomous tasks docs 2025-12-12 23:18:36 -03:00
scaling.md Update: General project updates 2025-12-06 11:09:12 -03:00
services.md Lowercase botserver/botbook references, add bottemplates repo, update autonomous tasks docs 2025-12-12 23:18:36 -03:00

Chapter 07: Extending General Bots

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

See Also