Skip to content

Examples

Use these examples when you want a runnable starting point instead of reading package-by-package reference material first.

Run everything

bash
npm install
npm run build
npm run examples

Example index

ExampleWhat it showsWhen to start here
execbox-basic.tsResolve a provider and execute guest code with QuickJS.You want the smallest end-to-end example.
execbox-process.tsRun the same provider flow inside a child-process executor.You want a stronger lifecycle boundary than in-process execution.
execbox-worker.tsRun the same provider flow inside a worker-thread executor.You want QuickJS off the main thread.
execbox-remote.tsRun the same provider flow through a transport-backed executor.You already own the runtime boundary and want execbox to plug into it.
execbox-mcp-provider.tsWrap MCP tools into a provider and execute against them.You want guest code to call upstream MCP tools as code.
execbox-mcp-server.tsExpose mcp_search_tools, mcp_execute_code, and mcp_code.You want downstream MCP clients to execute code against a wrapped tool namespace.
execbox-isolated-vm-basic.tsRun the same provider flow on the isolated-vm backend.You explicitly want the isolated-vm runtime.

Last updated:

Released under the MIT License.