Skip to content

Modules ​

Modules add capabilities without changing the core. A module can contribute:

  • tools the agent can call;
  • a prompt section describing when and how to use them;
  • data sources with endpoint, auth, CORS, license and attribution;
  • an optional surface rendered in Explore;
  • optional settings shown in the module catalogue.

The module packages are installed from the @tablette npm scope. The core stays a single static build: there is no runtime import() and no remote code.

Enable and disable ​

Open Settings > Modules or Explore > Modules and toggle a module. Changes apply immediately; the agent uses the new set on its next turn.

A module also declares the modes it supports. Data modules currently target Sketch only, so their tools do not appear in Explore, Learn or Build even when the module is enabled.

The effective set is stored under studio.modules.overrides in localStorage. Per-module settings live under studio.module.<id>.

What a module adds ​

ContributionWhere it appears
Prompt sectionComposed into the system prompt for supported modes
ToolsAvailable to the agent in the same modes
Data sourcesModule catalogue: endpoint, license, CORS, methods
AttributionModule catalogue and generated apps
SurfaceOpen button in Explore > Modules
SettingsFields in the module card

The catalogue ​

ModuleAddsSurface
CanutesFrench parliamentary open data: scrutins, votes, deputies, dossiers, lawsCanutes browser
Open DataA catalogue of public sources by topic and countryOpen Data browser
ReportsSelf-contained, printable HTML research reportsReports library
WikidataCC0 facts, coordinates, types and identifiers—
WikimediaWikipedia summaries and Commons media—
BIMRThe legacy BIMR engine for Explore, Learn and Build—

All six are enabled by default. The bimr module is core-owned; the other five are installed npm packages.

Data-module rules ​

Modules that read public data follow a few rules:

  • Read-only. No module writes to a public source.
  • Fetch at generation time. The agent fetches data while composing an app; the app inlines it and does not call the source at runtime.
  • Metadata is not data. The Open Data module returns catalogue records, not datasets or files.
  • Attribution is part of the result. Every source declares its license and credit line; generated apps carry them.
  • Bounded queries. Tools cap limits and projections. The agent must not download whole tables or full records for a list.

Adding a module ​

A module is its own npm package implementing @tablette/module-sdk. The core discovers installed @tablette/module-* packages with scripts/gen-registry.mjs; opting in or out is a package.json edit.

A module must not require edits to src/agent/tools.ts or src/agent/prompts.ts, and must not import core source. Workspace, viewer, trace, mode and settings access are injected through ModuleContext.

See Module SDK for the contract and package layout.

Where the code lives ​

  • Module packages: tablette-modules repository, published as @tablette/module-*.
  • Core-owned BIMR engine: src/modules/bimr/.
  • Registry composition: src/modules/registry.ts.
  • Generated manifest: src/modules/registry.generated.ts.
  • Module UI: src/components/ModulesPanel.tsx and ModuleSurfaceHost.tsx.
  • Documentation links: src/modules/links.ts points at this site.

Next steps ​

Released under the MIT license.