Skip to main content
lua-cli is one npm package: the lua command and the TypeScript SDK your agent code imports. Every symbol on this page is exported from the package root, 'lua-cli'; three subpaths cover voice models, voice tests, and the workflow builder. Runtime objects such as Data and User are typed by the package and injected by the platform when your code runs, so the import exists for type-checking and for lua test. Verified against lua-cli 3.33.0.

Quick example

One tool, one skill, one agent, and one runtime object in a single file.
src/index.ts

Package subpaths

There is no lua-cli/skill subpath and no defineTool, defineSkill, defineWebhook, or defineJob export. Tools, skills, webhooks, jobs, processors, and MCP servers are classes; the define* helpers exist only for triggers, devices, device triggers, voices, and workflows.

Exports

Primitive classes and define helpers

Runtime objects

Workflow builder

Values: LuaWorkflow, LuaWorkflowBuildError, createWorkflow, createStep, defineWorkflow, step, stepOf, init, state, lit, eq, ne, gt, gte, lt, lte, inSet, notIn, exists, notExists, truthy, falsy, and, or, not, fromInit, fromStep, value, template, fromRequest, rows, fromKnowledge. Each is documented on Workflow builder.

Instance classes

JobInstance, UserDataInstance, DataEntryInstance, ProductInstance, BasketInstance, OrderInstance are the classes runtime methods return. Their members are listed on Types.

Type-only exports

Import these with import type; nothing is emitted at runtime. Some shapes the typings use are declared without a named export: LuaSkillConfig, LuaToolCtx, LuaWebhookEvent, TriggerStartWorkflow, SkillContextText, BatchingConfig, GovernanceConfig, and BrowserSwitchConfig. Write them inline or derive them from the exported types.

Availability

The platform injects the runtime objects into every execution context that runs your code; what differs is whether an end user is in scope. Workflows and Integrations.passthrough throw a typed error when the runtime they run in has no connection to those services. The rules per context are on About execution contexts.

Runtime lag

Local runs only. These members type-check and pass in lua test but the deployed runtime doesn’t accept them yet; each linked page carries the workaround.
  • Data.create(collection, data, { searchText, index }) and the matching Data.update options object. The deployed runtime takes searchText as a plain string in that position and fails the object form with searchText must be a string. See Data.
  • Data.collections() is not available in the deployed runtime.
  • Voice.createSession() is not available in the deployed runtime; Voice.call() is. See Voice runtime.
  • JobInstance.execution is the reverse case: set in the deployed runtime, undefined in lua test, and absent from the type. See Jobs.

See also