toollane
v0.0.3
Published
A concurrency-safety-aware scheduler for LLM tool-call batches.
Readme
ToolLane (TypeScript)
Part of LoopEngine — a runtime for defining and running AI agents through a transparent ReAct loop — scheduling approved tool calls into parallel/solo execution lanes. Works standalone too, no dependency on LoopEngine itself.
See the root README for the pitch, the prior-art table, and the scope decisions. This file only covers what's specific to running the code.
Install
npm installQuickstart
npm run quickstartimport { ToolLane } from './src/index.js'
const toolLane = new ToolLane({
isSafe: (call) => ['read_file', 'list_dir', 'grep'].includes(call.name),
})
for (const lane of toolLane.plan(calls)) {
console.log(lane.mode, lane.calls.map((c) => c.name))
}
for await (const result of toolLane.run(calls)) {
// result.status is 'fulfilled' or 'rejected' — one failure never
// stops the rest of the batch.
}Test / build
npm test # vitest
npm run build # tsc -> dist/Status
Lane scheduling, streamed execution via an async generator, and isolated
failure handling are real and tested. Published as
toollane on npm.
