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

@smooai/smooth-operator-core

v0.20.4

Published

Native TypeScript implementation of the smooth-operator agent engine — an in-process, OpenAI-compatible agentic tool-calling loop with knowledge grounding. The TypeScript sibling of the Rust reference engine, the C# core, and the Python core.

Readme


The TypeScript sibling of the Rust reference engine. Agents, tools, knowledge/RAG, memory, checkpointing, human-in-the-loop, cost budgets, and workflows — as one embeddable npm package. It's the engine, not a notebook demo.

@smooai/smooth-operator-core is the native TypeScript implementation of the Smoo AI agent engine — the in-process observe→think→act loop that powers lom.smoo.ai. It's a sibling of the Rust reference engine and one of the polyglot set (Rust, TypeScript, Python, Go, C#/.NET) whose behavior is held at parity by a shared eval suite.

It's a library, not a client to a remote server: it is the agent, running in your Node process. Every surface is covered by fast, offline tests built on a deterministic MockLlmProvider, so the loop is verified — not vibe-coded.

Install

npm install @smooai/smooth-operator-core

Quickstart

A complete agent — no credentials needed — using the deterministic mock provider the engine's own tests run on:

import { SmoothAgent, MockLlmProvider } from '@smooai/smooth-operator-core';

const provider = new MockLlmProvider().pushText('the answer is 42');
const agent = new SmoothAgent(provider, { instructions: 'You are a helpful assistant' });

const response = await agent.run('what is the answer?');
console.log(response.text);

SmoothAgent's constructor takes a ChatClientLike (the MockLlmProvider implements it — swap in any OpenAI-compatible client) and an AgentOptions object. run returns an AgentRunResponse whose text is the final answer.

Features

The full parity surface — every engine in the polyglot set ships it:

  • Agentic tool-calling loop — observe→think→act, looping until the model answers.
  • Typed tools — register Tools the model can call, with parallel dispatch.
  • Knowledge / RAG + vectorsInMemoryKnowledge / VectorKnowledge ground the turn in retrieved documents.
  • MemoryInMemoryMemory recalls long-term entries into context each turn.
  • Compaction — a sliding-window token budget keeps the prompt under a ceiling.
  • Cost / budgetCostTracker + CostBudget with per-model pricing and early stop.
  • CheckpointingInMemoryCheckpointStore (and the CheckpointStore seam) persist/resume a conversation.
  • RerankLexicalReranker reranks retrieved hits before injection.
  • Sub-agents / delegationdelegateTool spawns child agents for sub-tasks.
  • Cast + clearanceCast, Clearance, makeRole for per-role tool-access policy.
  • Human-in-the-loop gateHumanGate requires approval before designated tool calls run.
  • Conversation threadSmoothAgentThread carries a conversation across multiple run calls.
  • LlmProvider seam + MockLlmProvider — inject any OpenAI-compatible client; the record/replay mock drives the offline tests.
  • Deferred tools + tool_searchToolSearch hides rarely-used tool schemas behind a meta-tool the model calls to promote the ones it needs.
  • Typed workflow graphWorkflow with typed nodes/edges, alongside the agent loop.
  • Parallel tool calls — dispatch ≥2 tool calls concurrently (transcript order preserved).
  • Retry / backoff — retry transient model-call failures with exponential backoff.
  • Streaming — stream incremental text, tool calls, and tool results as the turn runs.

Streaming

runStream is an async generator over a StreamEvent tagged union (discriminated on type): text deltas as the model produces them, each tool_call before dispatch, each tool_result after it finishes, and a terminal done event carrying the same response run would have returned.

for await (const event of agent.runStream('what is the answer?')) {
    if (event.type === 'text') process.stdout.write(event.text);
    if (event.type === 'done') console.log(`\n${event.response.text}`);
}

runStream requires a streaming-capable client (chat.completions.createStream); the MockLlmProvider supplies one, replaying the same script as the non-streaming path.

Part of Smoo AI

smooth-operator-core is built and open-sourced by Smoo AI — the AI-powered business platform with AI built into every product: CRM, customer support, campaigns, field service, observability, and developer tools.

Links

License

MIT — see LICENSE.