car-runtime
v0.5.1
Published
Common Agent Runtime — a deterministic execution layer for AI agents
Maintainers
Readme
car-runtime
Node.js bindings for Common Agent Runtime — a deterministic execution layer for AI agents. Models propose; the runtime validates and executes.
Install
npm install car-runtimeThe package's install script downloads the matching native binary for your platform from car-releases. Supported platforms: macOS (14+) arm64/x64, Linux x64/arm64 glibc.
Quickstart
import { CarRuntime, executeProposal } from 'car-runtime';
const rt = new CarRuntime();
// Register tools + policies.
await rt.registerTool('shell');
await rt.registerPolicy('no_rm', 'deny_tool_param', 'shell', 'command', 'rm -rf');
// Verify before executing.
const proposal = JSON.stringify({
actions: [{
id: 'a1',
type: 'tool_call',
tool: 'shell',
parameters: { command: 'ls' },
dependencies: [],
}],
});
const check = JSON.parse(await rt.verifyProposal(proposal));
if (!check.valid) throw new Error(`invalid: ${JSON.stringify(check.issues)}`);
// Execute with a JS tool callback.
const result = await executeProposal(rt, proposal, async (callJson) => {
const { tool, params } = JSON.parse(callJson);
// Dispatch to your tool implementation.
return JSON.stringify({ stdout: 'ok' });
});Full API reference lives in index.d.ts. High-level docs and
examples: https://github.com/Parslee-ai/car-releases
Environment variables
CAR_RUNTIME_SKIP_DOWNLOAD=1— bypass the install-time download. Place the binary in the package directory yourself.CAR_RUNTIME_DOWNLOAD_BASE=<url>— override the download origin (e.g. internal mirror). Binary filename is appended.
License
Free for any use including commercial; free to redistribute unmodified.
Modification, reverse engineering, and derivative works are not permitted.
See LICENSE for the full text. Copyright © 2026 Parslee AI.
