botserver/docs/src/chapter-02/gbdrive.md
Rodrigo Rodriguez (Pragmatismo) 892d20440e Add comprehensive documentation for GeneralBots, including keyword references, templates, and user guides
- Created detailed markdown files for keywords such as HEAR, TALK, and SET_USER.
- Added examples and usage notes for each keyword to enhance user understanding.
- Developed templates for common tasks like enrollment and authentication.
- Structured documentation into chapters covering various aspects of the GeneralBots platform, including gbapp, gbkb, and gbtheme.
- Introduced a glossary for key terms and concepts related to GeneralBots.
- Implemented a user-friendly table of contents for easy navigation.
2025-10-25 14:50:14 -03:00

1.9 KiB

.gbdrive File Storage

The .gbdrive system manages file storage and retrieval using MinIO (S3-compatible object storage).

What is .gbdrive?

.gbdrive provides:

  • Centralized file storage for all packages
  • Versioning and backup capabilities
  • Access control and organization
  • Integration with knowledge bases and tools

Storage Structure

Files are organized in a bucket-per-bot structure:

org-prefixbot-name.gbai/
├── .gbdialog/
│   └── [script files]
├── .gbkb/
│   └── [collection folders]
├── .gbot/
│   └── config.csv
├── .gbtheme/
│   └── [theme files]
└── user-uploads/
    └── [user files]

File Operations

Uploading Files

REM Files can be uploaded via API or interface
REM They are stored in the bot's MinIO bucket

Retrieving Files

REM Get file content as text
GET ".gbdialog/start.bas"

REM Download files via URL
GET "user-uploads/document.pdf"

File Management

  • Automatic synchronization on bot start
  • Change detection for hot reloading
  • Version history maintenance
  • Backup and restore capabilities

Integration Points

Knowledge Bases

  • Documents are stored in .gbkb collections
  • Automatic processing and embedding
  • Version tracking for updates

Themes

  • Static assets served from .gbtheme
  • CSS, JS, and HTML files
  • Caching for performance

Tools

  • Tool scripts stored in .gbdialog
  • AST and compiled versions
  • Dependency management

Access Control

Files have different access levels:

  • Public: Accessible without authentication
  • Authenticated: Requires user login
  • Bot-only: Internal bot files
  • Admin: Configuration and sensitive files

Storage Backends

Supported storage options:

  • MinIO (default): Self-hosted S3-compatible
  • AWS S3: Cloud object storage
  • Local filesystem: Development and testing
  • Hybrid: Multiple backends with fallback