nexum-js
v0.2.0
Published
TypeScript SDK for Nexum EDurable Execution Engine for LLM Agents
Downloads
55
Maintainers
Readme
@nexum/sdk
TypeScript SDK for Nexum EDurable Execution Engine for LLM Agents.
Install
npm install nexum-js
# or
pnpm add nexum-jsQuick Start
import { workflow, worker } from "nexum-js";
import { z } from "zod";
const SearchResult = z.object({ content: z.string() });
const myWorkflow = workflow("ResearchAgent")
.effect("search", SearchResult, async (ctx, io) => {
return await io.call(mySearchTool, ctx.input.query);
})
.compute("summarize", z.string(), (ctx) => {
return ctx.get("search").content.slice(0, 500);
})
.build();
// Start the worker (connects to Nexum server)
const w = worker({ serverAddress: "localhost:50051" });
w.register(myWorkflow);
await w.start();Requires a running Nexum server. Start locally with:
npx @nexum/cli devLicense
MIT
