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

@msbel/openclaw-sga-mcts-atoms

v1.0.6

Published

Plan-time atom retrieval for OpenClaw. Distill Inspector-approved sessions into reusable atomic experience.

Readme

SGA-MCTS Atoms

Distill past Inspector-approved sessions into reusable atomic experience.

When Inspector signs off on a session with a high enough score, the plugin extracts atomic units of experience (compact action/observation/outcome strings) and stores them in a local SQLite database. Captain queries the store via retrieve_atoms during plan decomposition for new tasks, biasing decomposition toward strategies that previously worked.

The atom store is intentionally local and dependency-free: no embeddings, no network, plain SQLite + bag-of-tokens scoring. Trades retrieval quality for predictability and zero cost — works fine on a Raspberry Pi.

Install

Via OpenClaw plugins CLI (recommended):

openclaw plugins install clawhub:openclaw-sga-mcts-atoms

Or via npm:

npm install -g @msbel/openclaw-sga-mcts-atoms

Add to OpenClaw config

Append to ~/.openclaw/openclaw.json:

{
  "plugins": {
    "entries": {
      "sga-mcts-atoms": {
        "enabled": true,
        "config": {
          "extractorPython": "python3",
          "extractorScript": "~/.openclaw/sga_mcts/atom_extractor.py",
          "retrieverScript": "~/.openclaw/sga_mcts/atom_retriever.py",
          "dbPath": "~/.openclaw/sga_mcts/atoms.db",
          "minSessionScore": 0.7,
          "topK": 5
        }
      }
    }
  }
}

Restart the gateway: systemctl --user restart openclaw-gateway.

Hooks + Tools

| Surface | What | |---|---| | Hook agent_end | Auto-extract atoms when Inspector score ≥ minSessionScore | | Tool retrieve_atoms(query, k) | Captain calls during plan decomposition | | Tool extract_atoms(session_id) | Manual extraction for back-fill |

Atom store schema

CREATE TABLE atoms (
    id        INTEGER PRIMARY KEY,
    session   TEXT NOT NULL,
    text      TEXT NOT NULL UNIQUE,
    score     REAL NOT NULL DEFAULT 0,
    created   TEXT NOT NULL DEFAULT (datetime('now'))
);

text carries a UNIQUE constraint, so duplicate atoms across sessions collapse naturally.

Performance

  • Extraction: ~50ms per session on a Pi 5 (intent: cheap, run after every approved session)
  • Retrieval: ~20ms for 1000 atoms with bag-of-tokens scoring
  • Storage: ~200 bytes per atom; 10K atoms ≈ 2MB SQLite file
  • No network I/O. No embeddings. No external services.

License

MIT. Source: https://github.com/msbel5/openclaw-sga-mcts-atoms