- 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.
1.6 KiB
1.6 KiB
.gbai Architecture
The .gbai extension defines the overall architecture and structure of a GeneralBots application. It serves as the container for all other package types.
What is .gbai?
.gbai (General Bot Application Interface) is the root package that contains:
- Bot identity and metadata
- Organizational structure
- References to other package types
- Application-level configuration
.gbai Structure
A typical .gbai package contains:
my-bot.gbai/
├── manifest.json # Application metadata
├── .gbdialog/ # Dialog scripts
├── .gbkb/ # Knowledge bases
├── .gbot/ # Bot configuration
├── .gbtheme/ # UI themes
└── dependencies.json # External dependencies
Manifest File
The manifest.json defines application properties:
{
"name": "Customer Support Bot",
"version": "1.0.0",
"description": "AI-powered customer support assistant",
"author": "Your Name",
"bot_id": "uuid-here",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
Application Lifecycle
- Initialization: Bot loads .gbai structure and dependencies
- Configuration: Applies .gbot settings and parameters
- Activation: Loads .gbdialog scripts and .gbkb collections
- Execution: Begins processing user interactions
- Termination: Cleanup and state preservation
Multi-Bot Environments
A single GeneralBots server can host multiple .gbai applications:
- Each runs in isolation with separate configurations
- Can share common knowledge bases if configured
- Maintain separate user sessions and contexts