@hunterzhu/pulse-runtime
v0.7.0
Published
[简体中文](https://github.com/zhuhengtan/Pulse/blob/main/packages/runtime/README.zh-CN.md)
Readme
@hunterzhu/pulse-runtime
The core agent runtime for Pulse: programs, lanes, agents, and outcomes.
Requirements
- Node.js 22+
- ESM only
Install
npm install @hunterzhu/pulse-runtimeQuick start
Save as example.mjs and run node example.mjs.
import { PulseRuntime, defineLaneProgram } from '@hunterzhu/pulse-runtime';
const program = defineLaneProgram({ id: 'hello', version: '1' }, (b) => {
b.addStep('start', () => ({
next: { complete: { value: { message: 'Hello, Pulse' } } },
}));
});
const runtime = new PulseRuntime();
const { agentId } = runtime.createAgent('Say hello', program);
const outcome = await runtime.start(agentId).outcome();
console.log(outcome.status); // "succeeded"This example runs offline with no model or credentials. Connecting real models and tools is described in the docs.
Documentation
License
This package is licensed under PolyForm Noncommercial 1.0.0. Commercial use requires separate permission. This is a source-available noncommercial license, not an OSI-approved open-source license.
