An application calls a Lispex rule in one of three ways. It runs the rule on
JSON input with lispex rule run, calls an evaluator with set limits through
lispex embed, or uses the application API that Topaz supplies.
The pages in this part follow those paths, then cover the MCP server, images,
and bytecode.
To try a rule first, open the Playground or run a file as shown in First Program. Install Native or npm from Downloads. File execution uses the Lispex Interpreter by default.
Choose how your application calls a rule
| Path | What the application supplies and gets back | Guide |
|---|---|---|
| JSON input | The application supplies the source, a JSON input, and resource limits to lispex rule run. The command writes the result and a readable summary into a new directory | Run a Decision Rule with JSON Input |
| Evaluator with set limits | The application prepares the rule and a binary input for lispex embed, evaluates the rule, and inspects the outcome file | Run a Rule Within Set Limits |
| Topaz application | Topaz supplies the application API and defines its package and deployment requirements | Call Lispex Rules in the Topaz documentation |
In every path, the calling application decides what external action to take from the result.
What your application handles
Your application supplies the input and decides what to do with the answer. Lispex rules have no hidden network calls, clocks, random values, or package imports. The reference implementation uses exact arithmetic where possible and defined evaluation and diagnostic rules.
To compare runs, keep the source bytes, input bytes, executor, and resource profile the same. A resource profile specifies the work and memory available to a run. Compare the same result, output, and diagnostic channels, as described in Repeatable Results and Execution Limits.
Ordinary execution runs trusted source directly in the calling process.
lispex compare-engines, which compares execution methods, works the same way.
The authoring evaluator in lispex mcp serve runs the source of each request
in a separate local worker process. To set work and memory limits for a
decision rule, use Native lispex embed. It runs inside the calling process
and produces a record linking the rule, input, limits, and outcome when
execution completes. Follow Run a Rule Within Set Limits
for the required files and commands.
Choose a product
| Task | Start here | Where to read the result |
|---|---|---|
| Try source in the browser | Playground | Output and diagnostics beside the editor |
| Run a source file in the terminal | Native or npm from Downloads | Standard output, diagnostics, and exit status |
| Run rules from a Node.js program | The lispex command installed by the lispex npm package | The command's standard output, diagnostics, and exit status |
These products use the same Lispex Interpreter for ordinary source evaluation. Products and Supported Platforms lists their additional features. For SICP lessons, use the separate SICP Study Guide.
Set a resource profile
A resource profile specifies execution limits. Choose the evaluator according to the language features your rule needs.
| Command family | Language profile |
|---|---|
lispex embed | Decision language profile |
lispex embed full | Complete current language profile, including 205 built-in procedure entries |
These are separate evaluators with their own binary interfaces and result formats. Both use WASM components with no imports and create a fresh instance for each request. They account for preparation and evaluation separately and produce a portable core record binding one execution. See Reference for Evaluators with Execution Limits for the interfaces and limits.
Connect tools, images, and bytecode
| Task | Guide |
|---|---|
| Connect the local MCP server to an application that supports MCP | Connect the MCP Server |
| Send rule source inside an image and restore it on the other side | Create and Restore Lispex Images |
| Save and execute compiled instructions | Compile a Rule to Bytecode |
Compare implementations
To investigate differences in results, output, or diagnostics, read Lispex Interpreter and Lispex VM. That path explains the required products and comparison reports.