2.8 KiB
2.8 KiB
Keyword Reference
This section lists every BASIC keyword implemented in the GeneralBots engine. Each keyword page includes:
- Syntax – Exact command format
- Parameters – Expected arguments
- Description – What the keyword does
- Example – A short snippet showing usage
The source code for each keyword lives in src/basic/keywords/. Only the keywords listed here exist in the system.
Core Dialog Keywords
Variable & Memory
- SET - Set variable value
- GET - Get variable value
- SET BOT MEMORY - Persist data
- GET BOT MEMORY - Retrieve persisted data
AI & Context
- LLM - Query language model
- SET CONTEXT - Add context for LLM
- SET USER - Set user context
Knowledge Base
- USE KB - Load knowledge base
- CLEAR KB - Unload knowledge base
- ADD WEBSITE - Index website to KB
- FIND - Search in KB
Tools & Automation
- USE TOOL - Load tool definition
- CLEAR TOOLS - Remove all tools
- CREATE TASK - Create task
- CREATE SITE - Generate website
- CREATE DRAFT - Create email draft
UI & Interaction
- ADD SUGGESTION - Add clickable button
- CLEAR SUGGESTIONS - Remove buttons
- CHANGE THEME - Switch UI theme
Data Processing
- FORMAT - Format strings
- FIRST - Get first element
- LAST - Get last element
- SAVE FROM UNSTRUCTURED - Extract structured data
Flow Control
- FOR EACH ... NEXT - Loop through items
- EXIT FOR - Exit loop early
- ON - Event handler
- SET SCHEDULE - Schedule execution
Communication
- SEND MAIL - Send email
- ADD MEMBER - Add group member
Special Functions
Notes
- Keywords are case-insensitive (TALK = talk = Talk)
- String parameters can use double quotes or single quotes
- Comments start with REM or '
- Line continuation uses underscore (_)