superlocalmemory 4.1.21 → 4.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +3 -3
- package/CHANGELOG.md +210 -0
- package/README.md +101 -33
- package/antigravity-plugin/_GENERATED.md +33 -0
- package/antigravity-plugin/agents/slm-governance-advisor.md +78 -0
- package/antigravity-plugin/agents/slm-loop-runner.md +82 -0
- package/antigravity-plugin/agents/slm-memory-advisor.md +50 -0
- package/antigravity-plugin/agents/slm-optimize-advisor.md +44 -0
- package/antigravity-plugin/commands/slm-loop.md +33 -0
- package/antigravity-plugin/hooks/hooks.json +59 -0
- package/antigravity-plugin/hooks.json +42 -0
- package/antigravity-plugin/mcp_config.json +14 -0
- package/antigravity-plugin/plugin.json +25 -0
- package/antigravity-plugin/scripts/antigravity_hook_adapter.py +85 -0
- package/antigravity-plugin/skills/slm-bot-memory/SKILL.md +146 -0
- package/antigravity-plugin/skills/slm-cache/SKILL.md +147 -0
- package/antigravity-plugin/skills/slm-compress/SKILL.md +150 -0
- package/antigravity-plugin/skills/slm-getting-started-bot/SKILL.md +146 -0
- package/antigravity-plugin/skills/slm-governance/SKILL.md +221 -0
- package/antigravity-plugin/skills/slm-graph/SKILL.md +327 -0
- package/antigravity-plugin/skills/slm-loop/SKILL.md +153 -0
- package/antigravity-plugin/skills/slm-mesh/SKILL.md +287 -0
- package/antigravity-plugin/skills/slm-profile/SKILL.md +159 -0
- package/antigravity-plugin/skills/slm-recall/SKILL.md +430 -0
- package/antigravity-plugin/skills/slm-remember/SKILL.md +370 -0
- package/antigravity-plugin/skills/slm-scope/SKILL.md +183 -0
- package/antigravity-plugin/skills/slm-session/SKILL.md +291 -0
- package/antigravity-plugin/skills/slm-status/SKILL.md +185 -0
- package/antigravity-plugin/skills/slm-web-access/SKILL.md +91 -0
- package/codex-plugin/.claude-plugin/plugin.json +19 -0
- package/codex-plugin/.codex/config.toml +40 -0
- package/codex-plugin/.codex-plugin/plugin.json +43 -0
- package/codex-plugin/.mcp.json +16 -0
- package/codex-plugin/AGENTS.md +161 -0
- package/codex-plugin/README.md +205 -0
- package/codex-plugin/_GENERATED.md +52 -0
- package/codex-plugin/agents/slm-governance-advisor.md +78 -0
- package/codex-plugin/agents/slm-loop-runner.md +82 -0
- package/codex-plugin/agents/slm-memory-advisor.md +50 -0
- package/codex-plugin/agents/slm-optimize-advisor.md +44 -0
- package/codex-plugin/commands/slm-loop.md +33 -0
- package/codex-plugin/hooks/hooks.json +59 -0
- package/codex-plugin/scripts/ensure-venv.bat +108 -0
- package/codex-plugin/scripts/ensure-venv.sh +100 -0
- package/codex-plugin/scripts/slm-launch +55 -0
- package/codex-plugin/scripts/slm-launch.bat +30 -0
- package/codex-plugin/skills/slm-bot-memory/SKILL.md +146 -0
- package/codex-plugin/skills/slm-cache/SKILL.md +147 -0
- package/codex-plugin/skills/slm-compress/SKILL.md +150 -0
- package/codex-plugin/skills/slm-getting-started-bot/SKILL.md +146 -0
- package/codex-plugin/skills/slm-governance/SKILL.md +221 -0
- package/codex-plugin/skills/slm-graph/SKILL.md +327 -0
- package/codex-plugin/skills/slm-loop/SKILL.md +153 -0
- package/codex-plugin/skills/slm-mesh/SKILL.md +287 -0
- package/codex-plugin/skills/slm-profile/SKILL.md +159 -0
- package/codex-plugin/skills/slm-recall/SKILL.md +430 -0
- package/codex-plugin/skills/slm-remember/SKILL.md +370 -0
- package/codex-plugin/skills/slm-scope/SKILL.md +183 -0
- package/codex-plugin/skills/slm-session/SKILL.md +291 -0
- package/codex-plugin/skills/slm-status/SKILL.md +185 -0
- package/codex-plugin/skills/slm-web-access/SKILL.md +91 -0
- package/copilot-plugin/.github/agents/slm-governance-advisor.agent.md +80 -0
- package/copilot-plugin/.github/agents/slm-loop-runner.agent.md +84 -0
- package/copilot-plugin/.github/agents/slm-memory-advisor.agent.md +52 -0
- package/copilot-plugin/.github/agents/slm-optimize-advisor.agent.md +46 -0
- package/copilot-plugin/.github/copilot-instructions.md +52 -0
- package/copilot-plugin/.github/hooks/slm-hooks.json +44 -0
- package/copilot-plugin/.github/prompts/slm-bot-memory.prompt.md +147 -0
- package/copilot-plugin/.github/prompts/slm-cache.prompt.md +151 -0
- package/copilot-plugin/.github/prompts/slm-compress.prompt.md +154 -0
- package/copilot-plugin/.github/prompts/slm-getting-started-bot.prompt.md +147 -0
- package/copilot-plugin/.github/prompts/slm-governance.prompt.md +224 -0
- package/copilot-plugin/.github/prompts/slm-graph.prompt.md +322 -0
- package/copilot-plugin/.github/prompts/slm-loop.prompt.md +159 -0
- package/copilot-plugin/.github/prompts/slm-mesh.prompt.md +290 -0
- package/copilot-plugin/.github/prompts/slm-profile.prompt.md +155 -0
- package/copilot-plugin/.github/prompts/slm-recall.prompt.md +434 -0
- package/copilot-plugin/.github/prompts/slm-remember.prompt.md +375 -0
- package/copilot-plugin/.github/prompts/slm-scope.prompt.md +183 -0
- package/copilot-plugin/.github/prompts/slm-session.prompt.md +291 -0
- package/copilot-plugin/.github/prompts/slm-status.prompt.md +190 -0
- package/copilot-plugin/.github/prompts/slm-web-access.prompt.md +95 -0
- package/copilot-plugin/.vscode/mcp.json +11 -0
- package/copilot-plugin/README.md +26 -0
- package/copilot-plugin/_GENERATED.md +49 -0
- package/copilot-plugin/scripts/ensure-venv.bat +122 -0
- package/copilot-plugin/scripts/ensure-venv.sh +169 -0
- package/copilot-plugin/scripts/slm-launch +207 -0
- package/copilot-plugin/scripts/slm-launch.bat +32 -0
- package/copilot-plugin/scripts/slm-resolve.sh +128 -0
- package/copilot-plugin/scripts/slm-run +76 -0
- package/copilot-plugin/scripts/torch-cpu-resolve.sh +86 -0
- package/docs/pi-dev-integration.md +0 -2
- package/hermes-plugin/README.md +30 -0
- package/hermes-plugin/_GENERATED.md +3 -0
- package/hermes-plugin/__init__.py +417 -0
- package/hermes-plugin/agents/slm-governance-advisor.md +78 -0
- package/hermes-plugin/agents/slm-loop-runner.md +82 -0
- package/hermes-plugin/agents/slm-memory-advisor.md +50 -0
- package/hermes-plugin/agents/slm-optimize-advisor.md +44 -0
- package/hermes-plugin/command-inventory.json +7 -0
- package/hermes-plugin/plugin.yaml +24 -0
- package/hermes-plugin/remote.py +390 -0
- package/hermes-plugin/skills/slm-bot-memory/SKILL.md +146 -0
- package/hermes-plugin/skills/slm-cache/SKILL.md +147 -0
- package/hermes-plugin/skills/slm-compress/SKILL.md +150 -0
- package/hermes-plugin/skills/slm-getting-started-bot/SKILL.md +146 -0
- package/hermes-plugin/skills/slm-governance/SKILL.md +221 -0
- package/hermes-plugin/skills/slm-graph/SKILL.md +327 -0
- package/hermes-plugin/skills/slm-loop/SKILL.md +153 -0
- package/hermes-plugin/skills/slm-mesh/SKILL.md +287 -0
- package/hermes-plugin/skills/slm-profile/SKILL.md +159 -0
- package/hermes-plugin/skills/slm-recall/SKILL.md +430 -0
- package/hermes-plugin/skills/slm-remember/SKILL.md +370 -0
- package/hermes-plugin/skills/slm-scope/SKILL.md +183 -0
- package/hermes-plugin/skills/slm-session/SKILL.md +291 -0
- package/hermes-plugin/skills/slm-status/SKILL.md +185 -0
- package/hermes-plugin/skills/slm-web-access/SKILL.md +91 -0
- package/package.json +9 -16
- package/plugin/.claude-plugin/plugin.json +2 -2
- package/plugin/.cursor-plugin/plugin.json +24 -0
- package/plugin/CLAUDE.md +14 -12
- package/plugin/agents/slm-governance-advisor.md +14 -16
- package/plugin/agents/slm-loop-runner.md +22 -11
- package/plugin/agents/slm-memory-advisor.md +14 -14
- package/plugin/agents/slm-optimize-advisor.md +5 -5
- package/plugin/assets/logo.svg +36 -0
- package/plugin/commands/slm-loop.md +5 -3
- package/plugin/cursor-skills/slm-bot-memory/SKILL.md +146 -0
- package/plugin/cursor-skills/slm-getting-started-bot/SKILL.md +146 -0
- package/plugin/cursor-skills/slm-recall/SKILL.md +430 -0
- package/plugin/cursor-skills/slm-remember/SKILL.md +370 -0
- package/plugin/cursor-skills/slm-scope/SKILL.md +183 -0
- package/plugin/cursor-skills/slm-session/SKILL.md +291 -0
- package/plugin/hooks/hooks.json +9 -9
- package/plugin/mcp.cursor.json +23 -0
- package/plugin/requirements-cpu-torch.txt +13 -0
- package/plugin/requirements.txt +1 -1
- package/plugin/scripts/ensure-venv.sh +45 -3
- package/plugin/scripts/slm-launch +93 -9
- package/plugin/scripts/torch-cpu-resolve.sh +86 -0
- package/plugin/skills/slm-bot-memory/SKILL.md +146 -0
- package/plugin/skills/slm-cache/SKILL.md +6 -7
- package/plugin/skills/slm-compress/SKILL.md +3 -3
- package/plugin/skills/slm-getting-started-bot/SKILL.md +146 -0
- package/plugin/skills/slm-governance/SKILL.md +126 -153
- package/plugin/skills/slm-graph/SKILL.md +27 -15
- package/plugin/skills/slm-loop/SKILL.md +74 -20
- package/plugin/skills/slm-mesh/SKILL.md +17 -12
- package/plugin/skills/slm-profile/SKILL.md +101 -91
- package/plugin/skills/slm-recall/SKILL.md +151 -54
- package/plugin/skills/slm-remember/SKILL.md +132 -35
- package/plugin/skills/slm-scope/SKILL.md +24 -17
- package/plugin/skills/slm-session/SKILL.md +77 -57
- package/plugin/skills/slm-status/SKILL.md +54 -35
- package/plugin/skills/slm-web-access/SKILL.md +91 -0
- package/plugin-src/agents/slm-governance-advisor.md +78 -0
- package/plugin-src/agents/slm-loop-runner.md +82 -0
- package/plugin-src/agents/slm-memory-advisor.md +14 -14
- package/plugin-src/agents/slm-optimize-advisor.md +5 -5
- package/plugin-src/commands/slm-loop.md +33 -0
- package/plugin-src/rules/AGENTS.md +45 -36
- package/plugin-src/rules/CLAUDE.md.fragment +47 -0
- package/plugin-src/skills/slm-bot-memory/SKILL.md +146 -0
- package/plugin-src/skills/slm-cache/SKILL.md +6 -7
- package/plugin-src/skills/slm-compress/SKILL.md +3 -3
- package/plugin-src/skills/slm-getting-started-bot/SKILL.md +146 -0
- package/plugin-src/skills/slm-governance/SKILL.md +126 -153
- package/plugin-src/skills/slm-graph/SKILL.md +27 -15
- package/plugin-src/skills/slm-loop/SKILL.md +74 -20
- package/plugin-src/skills/slm-mesh/SKILL.md +17 -12
- package/plugin-src/skills/slm-profile/SKILL.md +101 -91
- package/plugin-src/skills/slm-recall/SKILL.md +151 -54
- package/plugin-src/skills/slm-remember/SKILL.md +132 -35
- package/plugin-src/skills/slm-scope/SKILL.md +24 -17
- package/plugin-src/skills/slm-session/SKILL.md +77 -57
- package/plugin-src/skills/slm-status/SKILL.md +54 -35
- package/plugin-src/skills/slm-web-access/SKILL.md +91 -0
- package/scripts/postinstall.js +107 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# torch-cpu-resolve.sh — should this install force a CPU-only torch wheel?
|
|
3
|
+
#
|
|
4
|
+
# PyPI ships CPU-only torch wheels for macOS and Windows, but on Linux the
|
|
5
|
+
# plain `torch==X.Y.Z` wheel pulls the CUDA runtime plus ~18 nvidia-* packages
|
|
6
|
+
# (triton included) — about 2.6 GiB on a host that may have no GPU at all
|
|
7
|
+
# (reference: https://docs.astral.sh/uv/guides/integration/pytorch/, which
|
|
8
|
+
# documents the same PyPI default for `uv pip`; plain pip resolves the same
|
|
9
|
+
# index). The official CPU-only index is documented at
|
|
10
|
+
# https://pytorch.org/get-started/locally/ as:
|
|
11
|
+
# pip install torch --index-url https://download.pytorch.org/whl/cpu
|
|
12
|
+
#
|
|
13
|
+
# Sourced by ensure-venv.sh (never run directly). Pure decision logic — makes
|
|
14
|
+
# makes no HTTP request and runs no pip — so it is unit-testable without the 2 GiB
|
|
15
|
+
# download it exists to avoid (tests/test_plugin_src/test_torch_cpu_resolve.sh).
|
|
16
|
+
#
|
|
17
|
+
# Environment (all optional):
|
|
18
|
+
# SLM_TORCH_BACKEND cpu — force the CPU index regardless of GPU detection
|
|
19
|
+
# <anything else, e.g. cuda/cu124/auto> — leave pip's
|
|
20
|
+
# default resolution alone; the user has already decided
|
|
21
|
+
# PIP_INDEX_URL / PIP_EXTRA_INDEX_URL — if the user already points pip at
|
|
22
|
+
# their own index, this never overrides it
|
|
23
|
+
#
|
|
24
|
+
# Safe under `set -euo pipefail`: every variable read has a default.
|
|
25
|
+
|
|
26
|
+
TORCH_CPU_INDEX_URL="https://download.pytorch.org/whl/cpu"
|
|
27
|
+
|
|
28
|
+
# torch_cpu_should_force — exit 0 (true, in bash's backwards convention) when
|
|
29
|
+
# this host should get the CPU-only wheel instead of whatever pip would
|
|
30
|
+
# otherwise pick. False (exit 1) covers: not Linux, a GPU is visible, or the
|
|
31
|
+
# user already steered pip (their own index) or torch (SLM_TORCH_BACKEND set
|
|
32
|
+
# to anything but "cpu") themselves.
|
|
33
|
+
torch_cpu_should_force() {
|
|
34
|
+
local platform
|
|
35
|
+
platform="$(uname -s 2>/dev/null || echo unknown)"
|
|
36
|
+
if [ "${platform}" != "Linux" ]; then
|
|
37
|
+
# macOS (Darwin) already gets CPU-only wheels from plain PyPI; Windows
|
|
38
|
+
# too. Nothing to override there.
|
|
39
|
+
return 1
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
case "${SLM_TORCH_BACKEND:-}" in
|
|
43
|
+
cpu)
|
|
44
|
+
return 0
|
|
45
|
+
;;
|
|
46
|
+
"")
|
|
47
|
+
: # unset — fall through to auto-detection below
|
|
48
|
+
;;
|
|
49
|
+
*)
|
|
50
|
+
# cuda / cuXXX / auto / anything else: the user already decided.
|
|
51
|
+
return 1
|
|
52
|
+
;;
|
|
53
|
+
esac
|
|
54
|
+
|
|
55
|
+
if [ -n "${PIP_INDEX_URL:-}" ] || [ -n "${PIP_EXTRA_INDEX_URL:-}" ]; then
|
|
56
|
+
# The user already pointed pip somewhere specific. Do not fight it.
|
|
57
|
+
return 1
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
if command -v nvidia-smi >/dev/null 2>&1; then
|
|
61
|
+
return 1
|
|
62
|
+
fi
|
|
63
|
+
if [ -e /proc/driver/nvidia/version ] || [ -e /dev/nvidia0 ]; then
|
|
64
|
+
return 1
|
|
65
|
+
fi
|
|
66
|
+
|
|
67
|
+
return 0
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
# torch_cpu_pin <pin_file> — print the "torch==X.Y.Z" line from pin_file.
|
|
71
|
+
# Returns 1 (and prints nothing) when the file is missing or has no such
|
|
72
|
+
# line: fail-open, so a missing/stale pin file can never block an install
|
|
73
|
+
# that would otherwise succeed — it just means pip falls back to its
|
|
74
|
+
# ordinary resolution (the CUDA wheel on Linux) for this run.
|
|
75
|
+
torch_cpu_pin() {
|
|
76
|
+
local pin_file="$1"
|
|
77
|
+
if [ ! -f "${pin_file}" ]; then
|
|
78
|
+
return 1
|
|
79
|
+
fi
|
|
80
|
+
local line
|
|
81
|
+
line="$(grep -m1 '^torch==' "${pin_file}" 2>/dev/null || true)"
|
|
82
|
+
if [ -z "${line}" ]; then
|
|
83
|
+
return 1
|
|
84
|
+
fi
|
|
85
|
+
printf '%s\n' "${line}"
|
|
86
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: slm-bot-memory
|
|
3
|
+
description: Cross-bot memory on a shared computer (Grok Bot, Cursor plugin, any host where several agents share one machine). Explains agent_id attribution vs. profile/scope access, how to namespace by agent_id + profile + scope, and what must never be written to memory. Read this before the first remember/recall on a new Grok-Bot-style host.
|
|
4
|
+
when_to_use: |
|
|
5
|
+
- First session on a Grok Bot computer or any shared-bot host
|
|
6
|
+
- "Will my other bots see this memory?"
|
|
7
|
+
- "How do I keep this bot's notes separate from that one?"
|
|
8
|
+
- Deciding whether to store something that looks like a secret or personal data
|
|
9
|
+
- Setting up a second bot on a computer that already has SLM configured
|
|
10
|
+
allowed-tools: remember, recall, search, session_init, switch_profile
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# slm-bot-memory — Cross-Bot Memory on a Shared Host
|
|
14
|
+
|
|
15
|
+
SuperLocalMemory ships as an MCP server. On a single-user laptop, one bot is
|
|
16
|
+
the only thing talking to it. On a **shared-bot host** — Grok Bot's "one
|
|
17
|
+
computer, shared by all your Bots" model, several Cursor windows, or any
|
|
18
|
+
setup where more than one agent process points at the same install — several
|
|
19
|
+
agents can reach the same memory store at once. This skill is about that
|
|
20
|
+
case: what is actually isolated, what is not, and what must never be written
|
|
21
|
+
regardless.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Three things that sound like isolation and are not the same
|
|
26
|
+
|
|
27
|
+
| Setting | What it controls | Does it hide memories from another bot? |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| `SLM_AGENT_ID` | **Attribution** — who gets credit for a memory in logs and summaries | **No.** It is metadata, never an authenticated principal (verified in `mcp/agent_context.py`'s own docstring). Any bot that can query the same store can read a memory written under a different `agent_id`. |
|
|
30
|
+
| `SLM_DATA_DIR` (profile root) | **Which database file** the daemon opens | **Yes.** Two bots pointed at different `SLM_DATA_DIR` values have fully separate, independent memory stores — nothing is shared unless you explicitly configure sharing. |
|
|
31
|
+
| `scope` (`personal` / `shared` / `global`, see `slm-scope`) | **Visibility inside one store**, between profiles that share that store | Only the way you set it. `personal` (the default) stays within the writing profile; `shared`/`global` are explicit, user-initiated opt-ins. |
|
|
32
|
+
|
|
33
|
+
A memory profile (the namespace `profile_id` and `switch_profile` select) is not
|
|
34
|
+
a fourth kind of isolation between bots. Any local caller that can name a profile
|
|
35
|
+
can read it, and `switch_profile` moves the active profile for every bot on the
|
|
36
|
+
computer. Treat profiles as organisation, not privacy.
|
|
37
|
+
|
|
38
|
+
The practical rule: **`SLM_AGENT_ID` tells you who wrote something; `SLM_DATA_DIR`
|
|
39
|
+
and `scope` decide who can read it.** If two bots on the same Grok Bot computer
|
|
40
|
+
use the same `SLM_DATA_DIR` (the common case — it is a shared filesystem, and
|
|
41
|
+
nothing in Grok Bot's plugin model points different bots at different data
|
|
42
|
+
directories by default), they see each other's `personal`-scope memories too,
|
|
43
|
+
the same way two terminal sessions on one laptop would. Giving two bots
|
|
44
|
+
different `SLM_AGENT_ID` values does not change that — it only changes whose
|
|
45
|
+
name shows up on the memory.
|
|
46
|
+
|
|
47
|
+
If you need one bot's memories genuinely unreachable from another, that bot
|
|
48
|
+
needs its **own `SLM_DATA_DIR`** (or a store where company mode with roles is
|
|
49
|
+
configured — see `slm-governance`), not just its own `SLM_AGENT_ID` or its own
|
|
50
|
+
profile.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Namespacing that actually works
|
|
55
|
+
|
|
56
|
+
Use all three dimensions together, each for what it is good at:
|
|
57
|
+
|
|
58
|
+
1. **`agent_id`** (`SLM_AGENT_ID` env, or the `agent_id` parameter on
|
|
59
|
+
`remember`/`recall` directly) — so a human or another agent reading
|
|
60
|
+
`get_memory_summary` or the stored facts later can tell which bot said
|
|
61
|
+
what. Set it to something stable and specific: `grok_bot_support`,
|
|
62
|
+
`grok_bot_release_notes`, not a generic `bot`.
|
|
63
|
+
2. **`SLM_DATA_DIR`** — the real isolation boundary. One store per bot that
|
|
64
|
+
genuinely needs privacy from the others. A `profile_id` inside a shared store
|
|
65
|
+
groups memories but does not hide them.
|
|
66
|
+
3. **`scope`** (see `slm-scope`) — inside a store two or more bots
|
|
67
|
+
legitimately share, keep writes `personal` by default and only promote to
|
|
68
|
+
`shared`/`global` when a fact is meant for every bot on that store.
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
remember(
|
|
72
|
+
content="Deploy window for the support bot is Tue/Thu 14:00-16:00 UTC",
|
|
73
|
+
tags="ops,schedule",
|
|
74
|
+
agent_id="grok_bot_support",
|
|
75
|
+
session_id="<sid>",
|
|
76
|
+
)
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
recall(
|
|
81
|
+
query="deploy window",
|
|
82
|
+
agent_id="grok_bot_support",
|
|
83
|
+
session_id="<sid>",
|
|
84
|
+
)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Recall is not filtered by `agent_id` automatically — it is attribution on the
|
|
88
|
+
written record. If you need "only what this bot wrote", pass
|
|
89
|
+
`saved_by="grok_bot_support"` to `recall` (or `--saved-by` on `slm recall`),
|
|
90
|
+
which keeps only memories saved by that agent id. It filters; it does not
|
|
91
|
+
protect, because another bot can leave it out.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## What never goes into memory, on any host
|
|
96
|
+
|
|
97
|
+
This is not Grok-Bot-specific — it is the baseline for every SLM host — but
|
|
98
|
+
it matters more here because a shared computer means a shared blast radius if
|
|
99
|
+
it is violated:
|
|
100
|
+
|
|
101
|
+
- **Secrets, API keys, tokens, passwords, certificates.** Never pass them to
|
|
102
|
+
`remember`, even "just this once" or "temporarily." If a fact needs to
|
|
103
|
+
reference that a credential exists, store the *fact of its existence and
|
|
104
|
+
where to rotate it*, never the value.
|
|
105
|
+
- **Personal data about identifiable people** that was not already something
|
|
106
|
+
the user explicitly asked to be remembered about themselves (names,
|
|
107
|
+
emails, addresses, health, financial details of third parties).
|
|
108
|
+
- **Anything from Grok Bot's shared filesystem you did not write yourself**
|
|
109
|
+
and were not asked to remember. "Files are visible to every Bot" on that
|
|
110
|
+
computer (Grok Bot's own docs) — a file being readable is not the same as
|
|
111
|
+
having permission to copy its contents into long-term memory that other
|
|
112
|
+
bots and later sessions will see.
|
|
113
|
+
- **Command-line credentials.** Grok Bot's own docs note these are shared
|
|
114
|
+
across bots on the computer; SLM must not become a second, more durable
|
|
115
|
+
copy of them.
|
|
116
|
+
|
|
117
|
+
If you are unsure whether something is a secret, treat it as one and ask the
|
|
118
|
+
user before storing anything derived from it.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Checklist for a new bot on an existing shared host
|
|
123
|
+
|
|
124
|
+
1. Confirm `SLM_DATA_DIR` — is this bot meant to share the existing store, or
|
|
125
|
+
does it need its own? (`slm status --json` on the computer shows `data.base_dir`
|
|
126
|
+
and `data.db_path`.)
|
|
127
|
+
2. Set a specific `SLM_AGENT_ID` for this bot before the first `remember`.
|
|
128
|
+
3. Read `slm-scope` before writing anything with `scope="shared"` or
|
|
129
|
+
`scope="global"` — those are machine-wide, not just cross-bot.
|
|
130
|
+
4. Read the "never goes into memory" list above once, out loud if you are
|
|
131
|
+
unsure, before the first write on this host.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Related skills
|
|
136
|
+
|
|
137
|
+
- `slm-getting-started-bot` — first-session setup for a headless bot host
|
|
138
|
+
- `slm-scope` — the personal/shared/global visibility model this skill
|
|
139
|
+
namespaces on top of
|
|
140
|
+
- `slm-profile` — memory profiles versus tool sets, and what switching does
|
|
141
|
+
- `slm-governance` — role-based access when a store has multiple human/bot
|
|
142
|
+
members and real access control, not just convention
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
*SuperLocalMemory v4.1.23 · Qualixar · AGPL-3.0-or-later*
|
|
@@ -31,7 +31,7 @@ slm_cache_set(
|
|
|
31
31
|
| `stored` | bool | `True` when the value was written to the cache |
|
|
32
32
|
| `note` | str \| None | Error detail or `None` on success |
|
|
33
33
|
|
|
34
|
-
Keys are SHA-256-hashed internally per agent so they do not collide across agents. The raw key string you supply is the only handle you need.
|
|
34
|
+
Keys are SHA-256-hashed internally per agent so they do not collide across agents. The raw key string you supply is the only handle you need. The namespace is the calling agent (`SLM_AGENT_ID`, or the `/mcp/<agent>` path), not the memory profile, so switching profiles does not give you a fresh cache. A caller on another computer gets its own namespace, keyed by its access key, and can never see a local agent's entries.
|
|
35
35
|
|
|
36
36
|
## Tool: slm_cache_get
|
|
37
37
|
|
|
@@ -50,7 +50,7 @@ slm_cache_get(
|
|
|
50
50
|
| `value` | str \| None | The stored value on a hit; `None` on miss |
|
|
51
51
|
| `note` | str \| None | Error detail or `None` |
|
|
52
52
|
|
|
53
|
-
A miss returns `{"ok": true, "hit": false, "value": null, "note": null}`. `ok: false` means something went wrong internally but the miss behaviour is the same — treat both as a cache miss and proceed with the real fetch.
|
|
53
|
+
`value` is the string you stored. A miss returns `{"ok": true, "hit": false, "value": null, "note": null}`. `ok: false` means something went wrong internally but the miss behaviour is the same — treat both as a cache miss and proceed with the real fetch.
|
|
54
54
|
|
|
55
55
|
## Standard Pattern: Cache-Aside
|
|
56
56
|
|
|
@@ -123,7 +123,7 @@ Set `ttl_seconds` to match how long the data remains valid. After expiry `slm_ca
|
|
|
123
123
|
|
|
124
124
|
## Secondary CLI (fallback when MCP is unavailable)
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
Prefer the MCP tools above. If you must use the command line:
|
|
127
127
|
|
|
128
128
|
```bash
|
|
129
129
|
slm cache status [--json] [--tenant default]
|
|
@@ -133,16 +133,15 @@ slm cache ttl --set <seconds> [--semantic <seconds>] [--json] [--tenant default]
|
|
|
133
133
|
slm cache semantic on|off [--json] [--tenant default]
|
|
134
134
|
```
|
|
135
135
|
|
|
136
|
-
These subcommands control daemon-level cache settings. They do not read or write individual
|
|
136
|
+
These subcommands control daemon-level cache settings and bulk removal. They do not read or write individual entries — use the MCP tools for that. Entries written by `slm_cache_set` carry the tag `mcp-kv`, so `slm cache invalidate --tag mcp-kv` removes them, and `slm cache clear` deletes every entry for the tenant.
|
|
137
137
|
|
|
138
138
|
---
|
|
139
139
|
|
|
140
140
|
## Related skills
|
|
141
141
|
|
|
142
142
|
- `slm-compress` — for large content reduction; cache and compress work together
|
|
143
|
-
- `slm-status` — view `cache_kv_hits`/`cache_kv_misses` counters from `slm_optimize_stats`
|
|
144
|
-
- `slm-profile` — cache entries are namespaced per profile; switching profiles gives a fresh cache namespace
|
|
143
|
+
- `slm-status` — view `cache_kv_hits`/`cache_kv_misses` counters (daemon-persisted totals) from `slm_optimize_stats`
|
|
145
144
|
|
|
146
145
|
---
|
|
147
146
|
|
|
148
|
-
SuperLocalMemory v4.1.
|
|
147
|
+
SuperLocalMemory v4.1.23 · Qualixar · AGPL-3.0-or-later
|
|
@@ -61,7 +61,7 @@ slm_retrieve(ccr_id: str) -> dict
|
|
|
61
61
|
|
|
62
62
|
### CCR security rule
|
|
63
63
|
|
|
64
|
-
`ccr_id` values are **unguessable session tokens
|
|
64
|
+
`ccr_id` values are **unguessable session tokens**, and the stored original can be read back only by the same agent (or, for a remote caller, the same access key) that compressed it. Treat them like short-lived credentials:
|
|
65
65
|
- Never log them.
|
|
66
66
|
- Never share them across agents.
|
|
67
67
|
- Never pass them as tool arguments to any tool other than `slm_retrieve`.
|
|
@@ -121,7 +121,7 @@ if ccr_id:
|
|
|
121
121
|
|
|
122
122
|
## Secondary CLI (fallback when MCP is unavailable)
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
Prefer the MCP tools above. If you must use the command line:
|
|
125
125
|
|
|
126
126
|
```bash
|
|
127
127
|
slm compress status [--json]
|
|
@@ -147,4 +147,4 @@ Content over 1 MB (1 000 000 bytes UTF-8) is processed but `reversible` is force
|
|
|
147
147
|
|
|
148
148
|
---
|
|
149
149
|
|
|
150
|
-
SuperLocalMemory v4.1.
|
|
150
|
+
SuperLocalMemory v4.1.23 · Qualixar · AGPL-3.0-or-later
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: slm-getting-started-bot
|
|
3
|
+
description: First-session orientation for SuperLocalMemory on a headless bot host (Grok Bot, or any Cursor-format plugin install with no hooks, no dashboard, and no interactive setup wizard). What is different here vs. Claude Code/Codex, which 18 tools are actually available, and the first three calls to make.
|
|
4
|
+
when_to_use: |
|
|
5
|
+
- The very first session after SLM is installed as a Grok Bot / Cursor plugin
|
|
6
|
+
- "What can I do with SuperLocalMemory here?"
|
|
7
|
+
- A recall or remember call fails and you are not sure why on this host
|
|
8
|
+
- Comparing what works here vs. what the other skills describe for Claude Code
|
|
9
|
+
allowed-tools: session_init, remember, recall, switch_profile
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# slm-getting-started-bot — First Session on a Headless Bot Host
|
|
13
|
+
|
|
14
|
+
You are talking to SuperLocalMemory through its MCP server, started as
|
|
15
|
+
`uvx --from superlocalmemory==<version> slm mcp` by the plugin manifest. This
|
|
16
|
+
skill is for the ways that is different from a Claude Code or Codex install —
|
|
17
|
+
read it once per new host, not once per session.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## What is NOT available here
|
|
22
|
+
|
|
23
|
+
Grok Bot (and Cursor's plugin host generally) reads only two parts of a
|
|
24
|
+
plugin: `mcpServers` and `skills`. It does not run:
|
|
25
|
+
|
|
26
|
+
- **Hooks** — no automatic session-start context load, no automatic
|
|
27
|
+
checkpoint on session end. Call `session_init` yourself at the start of a
|
|
28
|
+
session if you want prior context; nothing injects it for you.
|
|
29
|
+
- **Slash commands or sub-agents** — the `commands/` and `agents/` components
|
|
30
|
+
other SLM plugins ship are Claude-Code-shaped and are not part of this
|
|
31
|
+
install. Everything you can do here, you do through the MCP tools
|
|
32
|
+
directly.
|
|
33
|
+
- **A dashboard.** There is no browser UI to check on this host. `slm status`
|
|
34
|
+
style information comes back from the tools themselves (`session_init`'s
|
|
35
|
+
response, or asking `recall` for recent memories) — there is nothing to
|
|
36
|
+
click.
|
|
37
|
+
- **`ANTHROPIC_BASE_URL` or any Claude-specific proxy behavior.** SLM does not
|
|
38
|
+
depend on it anywhere; nothing to configure here either way.
|
|
39
|
+
|
|
40
|
+
None of this is a degraded mode — it is the whole surface. Do not tell the
|
|
41
|
+
user a feature is "missing" when it was simply never wired to this host
|
|
42
|
+
format in the first place.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## What IS available: the core profile (18 tools)
|
|
47
|
+
|
|
48
|
+
This plugin sets `SLM_MCP_PROFILE=core`, the smallest tool tier, on purpose —
|
|
49
|
+
a shared, memory-tight computer should not load tool descriptions or RAM for
|
|
50
|
+
tiers it will not use. The 18 tools:
|
|
51
|
+
|
|
52
|
+
`remember`, `recall`, `search`, `fetch`, `list_recent`, `update_memory`,
|
|
53
|
+
`forget`, `session_init`, `close_session`, `slm_compress`, `slm_retrieve`,
|
|
54
|
+
`slm_cache_set`, `slm_cache_get`, `slm_optimize_stats`, `review_correction`,
|
|
55
|
+
`list_corrections`, `get_memory_summary`, `switch_profile`.
|
|
56
|
+
|
|
57
|
+
If you are looking at another skill that mentions a tool NOT in this list
|
|
58
|
+
(`build_code_graph`, `mesh_send`, `report_outcome`, `delete_memory`,
|
|
59
|
+
`set_memory_kind`, anything governance/compliance-shaped), that skill describes
|
|
60
|
+
a different, larger profile (`code`, `full`, `power`) — it is accurate for Claude
|
|
61
|
+
Code or Codex installs, not for this one, unless someone has deliberately
|
|
62
|
+
reconfigured `SLM_MCP_PROFILE`. Skip those steps rather than reporting an error.
|
|
63
|
+
|
|
64
|
+
Two things the core set does cover that other skills explain: `remember` takes
|
|
65
|
+
`kind` and `replaces` (a newer version of a memory should be saved with
|
|
66
|
+
`replaces=<fact_id>`; see `slm-remember`), and `list_corrections` /
|
|
67
|
+
`review_correction` handle the review of an `update_memory` edit. A bot with
|
|
68
|
+
no one to review should prefer `replaces` over `update_memory`.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## The first three calls on a new host
|
|
73
|
+
|
|
74
|
+
1. **`session_init`** — nothing runs this automatically here (no hooks), so
|
|
75
|
+
call it yourself at the start of the first real session:
|
|
76
|
+
```
|
|
77
|
+
session_init(project_path="<where you are working>", query="")
|
|
78
|
+
```
|
|
79
|
+
Returns recent relevant memories and a session id to pass to later calls.
|
|
80
|
+
|
|
81
|
+
2. **`remember`** one real fact, before doing anything else, as a smoke test:
|
|
82
|
+
```
|
|
83
|
+
remember(content="First session on this host, verifying setup.", tags="setup", session_id="<sid>")
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
3. **`recall`** it back:
|
|
87
|
+
```
|
|
88
|
+
recall(query="first session verifying setup", session_id="<sid>")
|
|
89
|
+
```
|
|
90
|
+
If this returns the fact, the daemon, the embedding path, and the
|
|
91
|
+
CPU-only torch install all worked. If it does not, the result still tells
|
|
92
|
+
you something — see Troubleshooting below.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Cold start is slower here than on a warm laptop
|
|
97
|
+
|
|
98
|
+
The first `remember`/`recall` on a fresh `SLM_DATA_DIR` has to: resolve
|
|
99
|
+
`uvx`'s pinned `superlocalmemory` package, start the daemon, and warm an
|
|
100
|
+
embedding model (and, unless this is the lite profile, a reranker model) —
|
|
101
|
+
tens of seconds, not milliseconds. A `recall` whose `channel_status` shows
|
|
102
|
+
`warming` (or `no_embedding`) for some channels in that window is not a bug; it
|
|
103
|
+
means the embedding model had not finished loading yet, and the answer is
|
|
104
|
+
incomplete rather than empty. Retry once rather than assuming something is
|
|
105
|
+
broken.
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## This host already runs the lite bot-host profile
|
|
110
|
+
|
|
111
|
+
Unless something overrode it, `mcp.cursor.json` sets `SLM_RERANKER_ENABLED=
|
|
112
|
+
false`, `SLM_RERANKER_IDLE_TIMEOUT=120`, and `SLM_MAX_EMBEDDING_WORKERS=1` —
|
|
113
|
+
the RAM-conscious default for a computer shared by every bot on it. Recall
|
|
114
|
+
still runs every other channel (BM25, semantic, entity graph, temporal,
|
|
115
|
+
spreading activation, Hopfield) and fuses them; it just skips the
|
|
116
|
+
cross-encoder re-ranking pass. If recall quality seems to matter more than
|
|
117
|
+
RAM headroom for your use case, the user can set `SLM_RERANKER_ENABLED=true`
|
|
118
|
+
in the manifest's env block — ask before changing it, since it trades RAM for
|
|
119
|
+
quality on a shared box.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Troubleshooting
|
|
124
|
+
|
|
125
|
+
- **A tool call returns a "profile" or "tool not available" style error** —
|
|
126
|
+
you are probably calling a tool outside the 18-tool core set. Check the
|
|
127
|
+
list above before assuming the server is broken.
|
|
128
|
+
- **Everything times out on the very first call of a session** — likely the
|
|
129
|
+
cold-start warmup described above. Wait and retry once before reporting a
|
|
130
|
+
failure.
|
|
131
|
+
- **You are not sure whether another bot on this computer can see what you
|
|
132
|
+
just stored** — read `slm-bot-memory` before storing anything you would
|
|
133
|
+
not want another bot on this machine to read.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Related skills
|
|
138
|
+
|
|
139
|
+
- `slm-bot-memory` — cross-bot namespacing and what must never be stored
|
|
140
|
+
- `slm-remember` / `slm-recall` — full parameter reference for the two tools
|
|
141
|
+
you will use the most
|
|
142
|
+
- `slm-session` — what `session_init`/`close_session` actually do
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
*SuperLocalMemory v4.1.23 · Qualixar · AGPL-3.0-or-later*
|