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

@oni.bot/core

v1.0.2

Published

The graph execution engine for agent swarms — production-grade orchestration with zero dependencies

Readme


Install

npm install @oni.bot/core
  • Zero runtime dependencies. Self-contained TypeScript. No transitive supply-chain risk. Runs in Node.js 18+, serverless functions, and edge runtimes without adaptation.
  • 5 model adapters via raw HTTP. Anthropic, OpenAI, OpenRouter, Google, and Ollama — no vendor SDKs required.
  • 21 exports. Root package plus 20 named subpaths for precise tree shaking.

Quick Start

import { StateGraph, START, END, lastValue, anthropic } from "@oni.bot/core";

type State = {
  question: string;
  answer: string;
};

const model = anthropic("claude-sonnet-4-6");

const graph = new StateGraph<State>({
  channels: {
    question: lastValue<string>(() => ""),
    answer:   lastValue<string>(() => ""),
  },
});

graph.addNode("answer", async (state) => {
  const response = await model.chat({
    messages: [{ role: "user", content: state.question }],
  });
  return { answer: response.content as string };
});

graph.addEdge(START, "answer");
graph.addEdge("answer", END);

const app = graph.compile();

for await (const chunk of app.stream(
  { question: "What is a Pregel execution model?" },
  { streamMode: "values" },
)) {
  console.log(chunk.answer);
}

Sub-modules

21 entry points — import only what you use.

| Subpath | Description | |---|---| | @oni.bot/core | Core engine: StateGraph, START, END, channels, Command, Send | | @oni.bot/core/prebuilt | Prebuilt agents: createReactAgent, defineAgent | | @oni.bot/core/swarm | Swarm templates: SwarmGraph (hierarchical, fan-out, pipeline, peer-network, map-reduce, debate, mesh) | | @oni.bot/core/hitl | Human-in-the-loop: interrupt, getUserInput, getUserApproval | | @oni.bot/core/store | Cross-thread KV store: InMemoryStore, BaseStore, NamespacedStore | | @oni.bot/core/messages | Message channel primitives: messagesChannel, MessageAnnotation | | @oni.bot/core/checkpointers | Persistence backends: MemoryCheckpointer, SqliteCheckpointer | | @oni.bot/core/functional | Functional API: task, entrypoint, pipe, branch | | @oni.bot/core/inspect | Graph inspection: buildGraphDescriptor, toMermaid, cycle detection | | @oni.bot/core/streaming | Token streaming: emitToken, getStreamWriter, StreamWriter | | @oni.bot/core/models | LLM adapters: anthropic, openai, openrouter, google, ollama | | @oni.bot/core/tools | Tool definition: defineTool, ToolSchema, ToolResult | | @oni.bot/core/agents | Agent builder: defineAgent, AgentDefinition | | @oni.bot/core/coordination | Inter-agent messaging: RequestReplyBroker, PubSub | | @oni.bot/core/events | Event bus: EventBus, 10 lifecycle event types | | @oni.bot/core/guardrails | Budget and safety: BudgetTracker, ContentFilter, PermissionGuard | | @oni.bot/core/testing | Test utilities: mockModel, assertGraph, createTestHarness | | @oni.bot/core/harness | Agentic loop: ONIHarness, AgentLoop, HooksEngine, ContextCompactor | | @oni.bot/core/mcp | MCP client: JSON-RPC/stdio tool bridge | | @oni.bot/core/lsp | LSP client: language server protocol primitives | | @oni.bot/core/config | Config loader: JSONC parsing, environment variable resolution |


Ecosystem

Built on @oni.bot/core:


License

MIT — AP3X Dev