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

@oraclaw/bandit

v1.0.0

Published

Ship winning features 3x faster. A/B testing and feature optimization powered by contextual bandits.

Downloads

55

Readme

@oraclaw/bandit

Ship winning features 3x faster. Stop guessing which variant wins — let the algorithm find it while maximizing conversions.

Drop-in replacement for Statsig, Eppo, and LaunchDarkly's experimentation layer. No data warehouse needed. Works from the first request.

Quick Start

npm install @oraclaw/bandit
import { OraBandit } from "@oraclaw/bandit";

const bandit = new OraBandit({ apiKey: "ok_live_..." });

// Which checkout flow converts best?
const result = await bandit.optimize([
  { id: "single-page", name: "Single Page Checkout", pulls: 1200, totalReward: 420 },
  { id: "multi-step", name: "Multi-Step Wizard", pulls: 800, totalReward: 312 },
  { id: "express", name: "Express Checkout", pulls: 400, totalReward: 180 },
]);

console.log(result.selected.name); // "Express Checkout"
console.log(result.score);         // 0.487 (UCB1 score)

Context-Aware Optimization

Not all users are the same. LinUCB learns which variant works best for each context:

const result = await bandit.optimizeContextual(
  [
    { id: "long-form", name: "Detailed Product Page" },
    { id: "quick-buy", name: "One-Click Purchase" },
    { id: "comparison", name: "Side-by-Side Compare" },
  ],
  // Context: [timeOfDay, isMobile, priceRange, returningUser]
  [0.75, 1.0, 0.3, 1.0],  // Evening, mobile, low price, returning
  // Historical observations (learns over time)
  previousObservations,
);

// Mobile returning users in evening → "One-Click Purchase" wins
// Desktop new users at noon → "Side-by-Side Compare" wins
// The algorithm discovers this automatically

For AI Agents

Add to your Claude Code / AI agent config:

{
  "mcpServers": {
    "oraclaw-bandit": {
      "command": "npx",
      "args": ["tsx", "path/to/oraclaw-mcp/index.ts"],
      "description": "A/B testing optimization — pick the best variant automatically"
    }
  }
}

MCP Tools available:

  • optimize_bandit — Best variant selection (UCB1, Thompson Sampling, ε-Greedy)
  • optimize_contextual — Context-aware selection (learns user segments automatically)

Agent use cases:

  • "Which email subject line should I send to this segment?"
  • "Should I show the upsell modal to this user?"
  • "Which prompt template performs best for this task type?"

Pricing

| Plan | Price | Calls/mo | |------|-------|----------| | Free | $0 | 3,000 | | Starter | $49/mo | 50,000 | | Growth | $199/mo | 500,000 | | Scale | Custom | Unlimited |

Why OraClaw Bandit vs. Statsig/Eppo?

| | OraClaw Bandit | Statsig | Eppo | |--|---------------|---------|------| | Works from request #1 | Yes (Thompson Sampling) | No (needs sample size) | No | | Context-aware | Yes (LinUCB) | Limited | Limited | | No data warehouse needed | Yes | Requires warehouse | Requires warehouse | | AI agent native (MCP) | Yes | No | No | | Price (50K decisions/mo) | $49/mo | $299/mo | Custom | | Zero LLM cost | Yes (pure math) | Yes | Yes |


@oraclaw/bandit is a thin API client. All optimization runs server-side. No algorithm source code is included in this package.