Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Chapter 06: BASIC + LLM - The Perfect Match

Why BASIC?

In 1964, John Kemeny and Thomas Kurtz created BASIC with a revolutionary idea: programming should be for everyone. Today, General Bots brings this philosophy to the AI era.

With BASIC + LLM, you write:

TALK "What's your name?"
HEAR name
poem = LLM "Create a heartfelt poem for " + name
TALK poem

Not 50 lines of boilerplate.

The Core Keywords

Just SEVEN main keywords power everything:

KeywordPurposeExample
TALKOutputTALK "Hello!"
HEARInputHEAR name AS NAME
USE KBKnowledgeUSE KB "docs"
USE TOOLFunctionsUSE TOOL "weather"
GETDataGET "api/users"
IF/THENLogicIF age >= 18 THEN ...
FOR/NEXTLoopsFOR i = 1 TO 10 ...

Your First Tool

In the LLM world, you write tools that AI can use:

' enrollment.bas - An LLM-callable tool
PARAM name AS STRING LIKE "John Smith" DESCRIPTION "Full name"
PARAM email AS STRING LIKE "john@example.com" DESCRIPTION "Email"
PARAM course AS STRING LIKE "Introduction to AI" DESCRIPTION "Course"

DESCRIPTION "Enrolls a student in a course"

SAVE "enrollments.csv", name, email, course, NOW()
TALK "Enrolled " + name + " in " + course

The LLM handles the conversation. You define the action.

Everyone Can Program

You don’t need:

  • A computer science degree
  • Years of experience
  • Understanding of algorithms

You just need:

  • An idea
  • 10 minutes to learn BASIC
  • Creativity

Getting Started

TimeGoal
Minute 1TALK "Hello, world!"
Minute 5Add HEAR and LLM
Day 1Production-ready bot

Documentation Guide

DocumentPurpose
BasicsCore LLM-first concepts
Keywords ReferenceComplete keyword list
TemplatesReal-world examples
Universal MessagingMulti-channel support

Keyword Categories

The Philosophy

BASIC in General Bots isn’t about controlling conversation flow - it’s about providing tools and context that LLMs use intelligently.

Write simple tools. Let AI handle the complexity.


“The beauty of BASIC lies not in what it can do, but in who it enables to do it.”