slm-cache
KV cache for repeated reads — call slm_cache_get(key) first; on a miss do the expensive operation then slm_cache_set(key, value, ttl_seconds) to store it; on a…
Cross-session peer coordination via the SLM mesh network. Lets multiple AI agent sessions on the same machine discover each other, send messages, share lightweight state, and lock files to avoid conflicts. Requires full, power, or mesh MCP profile. All 8 tools are MCP-only —
$ npx -y skills add qualixar/superlocalmemory --skill slm-mesh --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/slm-meshContext preview
The summary Claude sees to decide when to auto-load this skill.
Cross-session peer coordination via the SLM mesh network. Lets multiple AI agent sessions on the same machine discover each other, send messages, share lightweight state, and lock files to avoid conflicts. Requires full, power, or mesh MCP profile. All 8 tools are MCP-only —
name: slm-mesh description: Cross-session peer coordination via the SLM mesh network. Lets multiple AI agent sessions on the same machine discover each other, send messages, share lightweight state, and lock files to avoid conflicts. Requires full, power, or mesh MCP profile. All 8 tools are MCP-only — there is no CLI fallback. when_to_use: | - Multiple agent sessions running simultaneously on the same machine - "Announce what I'm working on to other sessions" - "Check if another agent has locked a file before I edit it" - "Send a message to the other Claude session" - "Is anyone else working on this project?" - Parallel agent workflows needing coordination - Cross-session state sharing without persisting to the memory store allowed-tools: mesh_summary, mesh_peers, mesh_send, mesh_inbox, mesh_state, mesh_lock, mesh_events, mesh_status, Bash
The mesh network lets multiple AI agent sessions on the same machine discover each other and coordinate in real time — without writing to the persistent memory store. Mesh messages are transient (48-hour TTL); they complement memory (which is durable) rather than replacing it.
Mesh is local-only: it uses the SLM daemon as a local broker. No data leaves the machine.
---
Mesh tools are available in the `full`, `power`, and `mesh` MCP profiles. Confirm the active profile with `slm status` before calling mesh tools. If the tools are not available, switch to `full` profile with `switch_profile("full")` (requires `code` or higher active profile). See `slm-profile`.
---
mesh_summary(summary: str = "") -> dict
Call at session start to register on the mesh and announce your purpose. Other sessions can see your summary via `mesh_peers`. The session stays alive via automatic heartbeat.
mesh_summary(summary="Refactoring auth module in api/src/auth/")
Response: `{peer_id, summary, project_path, registered, heartbeat_active, broker_response}`
Call this once at the start of any session that will participate in the mesh. The peer registration happens automatically at MCP startup, but calling `mesh_summary` sets the human-readable description that other agents see.
---
mesh_peers() -> dict
Returns all active peer sessions on this machine.
mesh_peers()
Response: `{peers: [{peer_id, summary, project_path, last_seen}], count, my_peer_id}`
Use this to discover other sessions before sending a message or checking for conflicts.
---
mesh_send( to: str, # peer_id | "broadcast" | "project:/path/to/dir" message: str, # max 4 KB — use file paths for large data ) -> dict
Send a targeted, broadcast, or project-wide message.
# Direct message to a specific peer peers = await mesh_peers() target_id = peers["peers"][0]["peer_id"] mesh_send(to=target_id, message="I'm starting work on auth/handler.py — please hold off") # Broadcast to all sessions mesh_send(to="broadcast", message="Deploying to staging in 5 minutes") # Message all sessions working in the same project mesh_send(to="project:~/myproject", message="Tests are green on main")
**4 KB message cap.** For large payloads (diffs, file contents), write to a file and send the path instead. The circuit breaker opens automatically if the daemon is repeatedly unreachable — `mesh_send` returns `ok: false` in that case.
---
mesh_inbox() -> dict
Returns unread messages (direct, broadcast, and project-targeted). Messages are automatically marked as read after retrieval.
inbox = await mesh_inbox()
for msg in inbox["messages"]:
print(msg["from"], msg["content"])Response: `{messages: [{id, from, content, sent_at, read}], count, unread}`
Messages auto-expire after 48 hours.
---
mesh_state( key: str = "", value: str = "", action: str = "get", # "get" | "set" ) -> dict
Shared state is visible to all authenticated peers. Use it for non-secret coordination metadata: feature flags, task assignments, progress markers.
# Set state mesh_state(key="deploy_in_progress", value="true", action="set") mesh_state(key="current_reviewer", value=my_peer_id, action="set") # Read one key mesh_state(key="deploy_in_progress", action="get") # Read all state mesh_state(action="get")
**Security constraint:** Credentials, tokens, passwords, and API keys are rejected by the broker. Never store secrets in shared state.
---
mesh_lock( file_path: str, # must be an absolute path action: str = "query", # "query" | "acquire" | "release" ) -> dict
Check, acquire, or release a file lock before editing a shared file.
# Step 1: check if the file is already locked
lock = await mesh_lock(file_path="/abs/path/to/auth/handler.py", action="query")
if lock.get("locked"):
print(f"File is locked by {lock['locked_by']} — wait")
else:
# Step 2: acquire the lock
mesh_lock(file_path="/abs/path/to/auth/handler.py", action="acquire")
# ... edit the file ...
# Step 3: release the lock when done
mesh_lock(file_path="/abs/path/to/auth/handler.py", action="release")`file_path` must be an absolute path (starts with `/` on Unix, drive letter on Windows). Relative paths are rejected.
---
mesh_events() -> dict
Returns the activity log for the mesh network: peer joins, leaves, messages sent, and state changes. Use to understand what other sessions have been doing.
---
mesh_status() -> dict
Returns broker uptime, peer count, and connection health. Use at session start
Open-source governed, local-first memory control plane for AI agents and teams. arXiv:2608.08253
Repo: qualixar/superlocalmemory
KV cache for repeated reads — call slm_cache_get(key) first; on a miss do the expensive operation then slm_cache_set(key, value, ttl_seconds) to store it; on a…
Compress large text, tool output, or transcripts to reduce context-window usage while keeping the full 1M window intact — call slm_compress(content, mode,…
Enterprise compliance and governed workspace behavior for SuperLocalMemory. Covers role-based access (admin/member/viewer), retention policies, audit trail,…
Index and query a codebase as a structural graph — build the code graph, trace blast radius of a change, find callers/callees/inheritors, semantic code search…
Run gate-verified bounded loops with SuperLocalMemory as the durable ledger. Use when a task has a checkable acceptance condition (tests, schema, lint,…
Workspace isolation and runtime profile switching for SuperLocalMemory. Each profile is a fully independent memory namespace — separate facts, code graphs, and…