npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@unravelai/unravel-agent-runtime

v0.2.0

Published

Node and TypeScript bridge to the Unravel Rust agent runtime

Readme

@unravelai/unravel-agent-runtime for Node.js

Run the Rust agent loop from Node.js with TypeScript types and JavaScript tool callbacks. Each run launches a local Rust bridge process. The package includes executables for Linux x64/arm64, macOS x64/arm64, and Windows x64; Node.js 20 or later is required.

Install and run

Install the npm package, then configure a provider and any tools you need. You can supply apiKey directly or set the provider's API key environment variable, such as OPENAI_API_KEY.

npm install @unravelai/unravel-agent-runtime
import { createSession, run } from '@unravelai/unravel-agent-runtime';

const result = await run({
  provider: { kind: 'openai', model: 'gpt-4o-mini' },
  systemPrompt: 'Help the user.',
  prompt: 'Greet Ada.',
  session: createSession('conversation-1'),
  tools: [{
    name: 'greet',
    description: 'Greet someone by name',
    parameters: {
      type: 'object',
      properties: { name: { type: 'string' } },
      required: ['name'],
    },
    execute: (arguments_) => `Hello, ${(arguments_ as { name: string }).name}!`,
  }],
});

console.log(result.output);
// Pass result.session to the next run in this conversation.

run returns the assistant's final text and the full session history. Pass the returned session into a later run to continue the conversation. Tool callbacks may be synchronous or asynchronous and return text or an object with content and optional metadata. Tools execute sequentially by default. Set preferStreaming: true to receive model deltas through onEvent; the runtime only dispatches complete tool calls.

Version 0.2.0 keeps the Node callback contract text/metadata-only. Ephemeral tool observations are available through the Rust API; returning an image from a JavaScript tool does not implicitly forward it to the model.

For a local OpenAI-compatible endpoint, use kind: 'custom' with a baseUrl that includes /v1. The ollama, nvidia, and openrouter kinds use the built-in Rust provider settings.

When a run fails, AgentRunError.session contains the available conversation history. Resolve any tool_unknown entries before resuming: an interrupted tool may already have produced a side effect. An AbortSignal requests the Rust loop to stop; the promise rejects with its current session when it stops.

License

This package and the included Rust bridge are licensed under AGPL-3.0-only. See LICENSE, NOTICE, and PROVIDERS-NOTICE in the package for attribution.