BASIC
Part of Dev. BASIC scripts run on the Rhai engine. A keyword exists only where a registration exists; a name in a prose list is not proof.
Where keywords are implemented
| Home | Scope |
|---|---|
botserver/src/basic/keywords/ |
Local keywords and the code-facing reference (keyword_reference.rs, card.rs, invoke_action.rs, post_to.rs, set_answer_mode.rs, vibe_agent.rs). |
botbasic_core/src/keywords/ |
Arrays, math, validation, date/time, strings, control flow. |
botbasic_data/src/keywords/ |
Database, tables, memory, knowledge base, CRM and products. |
botbasic_comms/src/keywords/ |
Messaging, email, SMS, social, chat, webhooks and calendar. |
botbasic_ai/src/keywords/ |
LLM, AI tools, MCP, sandbox, orchestration and web scraping. |
botbasic_system/src/keywords/ |
Bot management, files, scheduling, security and app server. |
botbasic_compiler/src/ |
Syntax transforms and rewrite aliases consumed before execution. |
The crate paths above are relative to botserver/crates/. See
BASIC Basics for the language introduction.
Verified forms
These calling conventions come from keyword_reference.rs and the source files
named in the generated keyword pages.
| Keyword | Form | Authority in code |
|---|---|---|
TALK |
TALK "text" |
Custom syntax ["TALK", "$expr$"] in botbasic_core/src/keywords/hearing/talk.rs |
LLM |
answer = LLM "prompt" |
Custom syntax ["LLM", "$expr$"] in botbasic_ai/src/keywords/llm_keyword.rs |
USE TOOL |
USE TOOL "tool_name" |
Custom syntax ["USE", "TOOL", "$expr$"] in botbasic_ai/src/keywords/use_tool.rs |
ADD SUGGESTION |
ADD SUGGESTION "reply the user can tap" |
Compiler rewrite to add_suggestion(…) in botbasic_compiler/src/syntax_transforms/convert_multiword_keywords.rs; implementation in botbasic_comms/src/keywords/add_suggestion/ |
CLEAR SUGGESTIONS |
CLEAR SUGGESTIONS |
Custom syntax ["CLEAR", "SUGGESTIONS"] in botbasic_comms/src/keywords/add_suggestion/registration.rs |
GET BOT MEMORY |
value = GET BOT MEMORY "key" |
botbasic_data/src/keywords/bot_memory.rs (registered in the generated data family) |
TALK "Hello from BASIC"
answer = LLM "Summarize this in one sentence"
Check before you emit a keyword
The generated BASIC reference is
built from register_custom_syntax / register_fn registrations, rewrite
aliases and compiler directives. It also publishes a drift report: names listed
by get_all_keywords() that have no registration behind them. POST HTTP and
PUT HTTP, for example, are advertised there with no registered form. Use the
generated page for a keyword's status and signature instead of assuming that a
name works; per-family pages include
agents,
data,
dialog and
messaging.
Next: API for the other calling surface.