Use cases and boundaries
The source ties one task executor to a supplied runtime context. Register named tools and run the executor with access to task data, state and cancellation. State persistence and operational policy depend on the host and the adapters it chooses.
Getting started and compatibility
This project is under development. Check out the pinned revision, install its development dependencies and run npm run build from the repository root. The ESM build requires Node.js ^20.19.0 || >=22.12.0 and produces dist/index.js. The example is a .mjs file at the root and illustrates how to run a task with a named tool. Pinned source entry · Pinned build manifest
import { createRuntime, defineTool } from './dist/index.js';
const runtime = createRuntime({ tools: [defineTool({
name: 'label', execute: input => String(input).trim()
})] });
const result = await runtime.run({ type: 'example', input: ' note ' },
(context, task) => context.callTool('label', task.input));
console.log(result.output);