Bundle Pluginstructural

SGA-MCTS Atomsv2.0.0

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

openclaw-sga-mcts-atoms·runtime sga-mcts-atoms·by @msbel5
openclaw bundles install clawhub:openclaw-sga-mcts-atoms
Latest release: v2.0.0Download zip

Capabilities

Bundle format
clawpack
Runtime ID
sga-mcts-atoms

Compatibility

Built With Open Claw Version
2026.5.4
Plugin Api Range
>=2026.0.0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The name, description, README, manifest, and code all align: the plugin listens for approved session completion, reads atom text from OpenClaw session files, stores it in a local SQLite database, and exposes retrieval/extraction tools. The better-sqlite3 dependency is directly related to the stated SQLite storage purpose.
Instruction Scope
The instructions stay within the stated OpenClaw atom-retrieval purpose: configure a local DB path, read atoms from ~/.openclaw/sessions/<sessionId>.json, write to ~/.openclaw/sga_mcts/atoms.db, and use retrieve_atoms/extract_atoms. There are no instructions to read unrelated credentials, inspect shell history, collect broad system state, or send data to external endpoints.
Install Mechanism
There is no separate install spec, shell installer, or arbitrary URL download. The bundle is not purely instruction-only because it includes executable plugin code and a declared npm dependency on better-sqlite3, but that dependency is expected for native SQLite use and is not disproportionate.
Credentials
The skill requests no environment variables, secrets, primary credentials, or required config paths. The provided code does not read process.env.
Persistence & Privilege
always is false and the plugin is not enabled by default. Its startup activation is consistent with registering hooks/tools, and it writes only its own configured local atom database. There is no evidence that it modifies other skills, agent-wide policies, or unrelated system configuration.
Assessment
This looks internally coherent. Before installing, be aware that it will persist reusable text atoms from approved sessions in a local SQLite database and may surface them in future planning, so sensitive information included in those atoms could be reused later. If supply-chain provenance matters to you, verify the referenced GitHub repository and the npm dependency better-sqlite3.

Verification

Tier
structural
Scope
artifact only
Summary
Validated package structure and extracted metadata.
Scan status
clean

Tags

latest
2.0.0

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

WhereWhat
Hook agent_endIf 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