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

openclaw-sga-mcts-atoms

v2.0.0

Published

Plan-time atom retrieval for OpenClaw. Distill Inspector-approved sessions into reusable atomic experience. Pure Node, native SQLite via better-sqlite3.

Readme

SGA-MCTS Atoms

Plan-time atom retrieval for OpenClaw multi-agent crews. When Inspector signs off on a session above the configured score threshold, the plugin extracts atomic units of experience 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.

Pure Node: no Python, native SQLite via better-sqlite3 (ships prebuilt arm64 binaries, no compile step on Pi 5). Bag-of-tokens Jaccard scoring keeps retrieval predictable, dependency-free, and zero-cost.

Install

Via OpenClaw plugins CLI:

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

No --dangerously-force-unsafe-install flag required as of v2.0.0. The plugin scans cleanly: no child_process, no shell-out.

Configure in OpenClaw

{
  "plugins": {
    "entries": {
      "sga-mcts-atoms": {
        "enabled": true,
        "config": {
          "dbPath": "/home/USER/.openclaw/sga_mcts/atoms.db",
          "minSessionScore": 0.7,
          "topK": 5
        }
      }
    }
  }
}

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

Surfaces

| Where | What | |---|---| | Hook agent_end | If event.inspector.score >= minSessionScore, read atoms from ~/.openclaw/sessions/<sessionId>.json and insert deduped rows into the atom DB | | Tool retrieve_atoms({query, k}) | Captain calls this during plan decomposition; returns top-k atoms by Jaccard token overlap with the query | | 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 CURRENT_TIMESTAMP
);
CREATE INDEX idx_atoms_session ON atoms(session);

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

Performance

  • Extraction on agent_end: ~5ms per session on a Pi 5 (in-process SQLite, transactional insert)
  • retrieve_atoms: ~10ms over 1000 atoms with Jaccard scoring; scales linearly, fine up to ~50k rows
  • Storage: ~200 bytes per atom; 10k atoms ≈ 2MB SQLite file
  • No network, no embeddings, no external services

Changelog

2.0.0

  • Removed Python extractor and retriever scripts. All logic now in Node via better-sqlite3.
  • No more child_process. Plugin scans cleanly without --dangerously-force-unsafe-install.
  • Manifest no longer declares python3 runtime.
  • Bag-of-tokens scoring upgraded from match-count to proper Jaccard similarity.

License

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