toolspace › registry › Muninn memory_tfidf
Muninn memory_tfidf
TF-IDF index over Muninn's memory summaries. Read-only similarity search, near-duplicate detection, clustering, and outlier identification across the memory store.
Install
install-manifest install https://raw.githubusercontent.com/oaustegard/muninn-utilities/main/manifests/memory-tfidf/muninn-memory-tfidf.v0.4.json
manifest JSON · source · docs · issues · homepage
Security
| Kill switch | manual Manual procedure: — |
|---|---|
| Smoke contract | shell timeout 10s |
Scopes
-
memory.trackingread turso-libsql-token (coarse; full DB access)Reads all memory summaries (id, summary, tags, type) from the Turso DB to build the index. Never writes.
-
net.outboundread *.turso.ioTalks to the configured Turso libSQL host for the initial fetch. No other outbound destinations.
Actions
-
build_and_query read idempotent
Fetch all memory summaries, build the TF-IDF index, and return a query result (duplicates / similar / clusters / outliers). ·
memory.trackingnet.outbound- Goal
- Run a TF-IDF similarity query over the memory store.
- Inputs
mode (duplicates|similar|clusters|outliers), threshold (float), id (for similar), n (for similar/outliers)- Outputs
{mode: string, results: array, build_time_ms: number, total_memories: int}- Errors
tracking_unconfigured (TURSO_* not set), tracking_unreachable, mode_unknown, id_not_found- Example
build_and_query mode=duplicates threshold=0.8
Environment
TURSO_TOKEN |
Turso libSQL auth token for the memory database. Read-only access is sufficient — this tool never writes. The token is a coarse credential; treat as a secret. required · secret: yes · obtain |
|---|---|
TURSO_URL |
Hostname of the Turso libSQL database, e.g. 'mydb-username.turso.io'. The tool reads memories via the libSQL HTTP pipeline endpoint. required · secret: no |
Verify & cost
| Install fee | 0¢ |
|---|---|
| Monthly fee | 0¢ |
| Usage model | none |
Runtime
runtime: python-module · install method: preinstalled · entrypoint: python -m muninn_utils.memory_tfidf
Loads all memory summaries from Turso once, builds a sklearn TfidfVectorizer + cosine-similarity matrix, and exposes four read-only queries: duplicates() (pairs above a similarity threshold), similar(id) (top-N for a given memory), clusters() (connected components above threshold), outliers() (memories with low max-similarity to anything else). Build is in-memory and ephemeral; nothing persists between calls in the tool's own storage. Authored as the deliberate **minimum-honest-manifest** consumer test for install-manifest-spec v0.3 — every required field is present, nothing optional is added past what the tool actually does.
Tags: tf-idfsimilarityclusteringmemoryread-only
License: MIT
Last fetched 2026-06-18T09:09:16Z (live)