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

gpbacay-arcane

v4.1.0

Published

ARC 1 structured decisions (tool calling, extraction, classification, embeddings) for Node.js and the browser

Readme

gpbacay-arcane (Node.js)

ARC 1 tool calling, field extraction, classification, and embeddings from Node.js.

The model runs locally in a Python child process, so you also need the Python package:

pip install gpbacay-arcane
npm install gpbacay-arcane
const { load } = require("gpbacay-arcane");

const agent = await load(); // bundled arc1-tiny; load({ python, model }) to override

await agent.run("is it raining in Tokyo?", [
  { name: "get_weather", description: "Get the current weather for a city.",
    parameters: [{ name: "city", description: "City name" }] },
]);
// { function_calls: [{ name: "get_weather", arguments: { city: "Tokyo" } }], confidence, ... }

await agent.extract("My name is Maria Santos and I live in Cebu", { name: "Person name", city: "City" });
await agent.classify("the headphones sound amazing", ["positive", "negative", "neutral"]);
await agent.embed("hello");

agent.close();
  • load() resolves once the model is loaded. The first load takes a while because TensorFlow starts up. Later calls take milliseconds.
  • The Python interpreter is options.python, then $ARC1_PYTHON, then python on Windows or python3 elsewhere.
  • Tools are not executed here. Use function_calls in your own code.

Node.js without Python

gpbacay-arcane/web also runs in plain Node.js (ESM) with no Python install:

npm install gpbacay-arcane onnxruntime-web
import { load } from "gpbacay-arcane/web";

const agent = await load(); // reads the bundled arc1.onnx / arc1.json from disk
const r = await agent.classify("I was charged twice", ["billing", "shipping"]);
await agent.close();

In the browser (no server, no Python)

gpbacay-arcane/web runs the same model client-side with onnxruntime-web (WebAssembly). The model is 5.5 MB, and the browser fetches it once and caches it. Results match the Python package.

npm install gpbacay-arcane onnxruntime-web

Next.js (App Router), in a client component:

"use client";
import { useEffect, useRef, useState } from "react";
import { load } from "gpbacay-arcane/web";

export default function Arc1Demo() {
  const agent = useRef(null);
  const [out, setOut] = useState("loading ARC 1...");
  useEffect(() => {
    load().then((a) => { agent.current = a; setOut("ready"); });
    return () => agent.current?.close();
  }, []);
  const ask = async () => {
    const r = await agent.current.run("is it raining in Tokyo?", [
      { name: "get_weather", description: "Get the current weather for a city.",
        parameters: [{ name: "city", description: "City name" }] },
    ]);
    setOut(JSON.stringify(r.function_calls));
  };
  return <><button onClick={ask} disabled={out.startsWith("loading")}>Ask</button><pre>{out}</pre></>;
}
  • The API matches the Node API: run, extract, classify, embed and close, with the same result objects. The one exception is cycles: it is fixed at export time and can't be passed per call.
  • By default load() uses arc1.onnx / arc1.json from this package, and the bundler emits them as assets. To serve them yourself (for example from public/arc1/), use load({ model: "/arc1/arc1.onnx", config: "/arc1/arc1.json" }).
  • In browsers, onnxruntime's .wasm runtime is fetched from jsDelivr. To self-host it, pass load({ wasmPaths: "/ort/" }).
  • To re-export after training: python examples/export_arc1_onnx.py --model your.rcn --out node/web (needs pip install tf2onnx onnxruntime). The script also checks that the ONNX outputs match TensorFlow.