Skip to content

Data Model 🟑 BETA

A generated app's data model is a set of tables in the bot's database, attached to a task manifest and queried from BASIC with TABLE and FIND.

Data Model Flow

Developer guide map

What Is a Table?

tables.bas is a special script parsed at compile time; it defines tables that sync_bot_tables() creates or updates in the bot's database. Ordinary scripts must not CALL it.

Creating Tables

Step Mechanism
Declare a table BEGIN TABLE … END TABLE in tables.bas
Persist the definition Compile-time table sync
Attach to a task POST /api/autotask/tables via source_edit

Adding Fields

Fields are part of the table declaration. Changing a field means changing the declaration and letting the sync path update the database; see the TABLE keyword.

Field Types

Field types follow the declarations supported by the table parser. No extra type list is asserted here; check the compiled keyword reference before using an unfamiliar type.

Searching Data

FIND queries a table from BASIC; see the FIND keyword. The REST surface exposes project and app data through generated routes.

Linking Tables

Relationships are declared in the table definition. The app generation path uses the same tables as any other bot script; no separate generated schema exists.

Shared Data

Apps in one bot share table scope. Cross-bot access uses the memory and delegation keywords described in Multi-Agent Orchestration.

Limits

  • tables.bas is parsed at compile time and is not a callable tool.
  • Schema changes go through the declaration and sync path, not through an ad-hoc endpoint.
  • Diesel table! macros live only in botschema.

Next Steps