Skip to main content

Requirements

  • Node.js 18+
  • A Zero Runtime address and auth token from the dashboard
  • API keys for the providers you use

Install

Conventions

  • Agents are built with the createAgent({ ... }) factory and define async onEnter() and onExit() lifecycle hooks.
  • Core APIs (createAgent, Pipeline, serve, invoke, Room, Sip, functionTool) are imported from @zrt/js-sdk; provider plugins from @zrt/js-sdk/plugins/<name>.
  • Pipeline and every provider are factory calls (no new) that take a single options object, for example GoogleLLM({ maxOutputTokens: 8192 }).
  • Tools are a name-to-spec map on createAgent, each { description, parameters, execute }. JavaScript cannot read parameter types at runtime, so you describe them yourself. Standalone, reusable tools can also be built with functionTool({ name, description, parameters, execute }).

API reference

Node.js SDK API reference

Every export, type, and option in the Node.js SDK.
The Quickstart shows a complete agent. Runnable examples are at zrt-js-sdk-examples.