← 返回 Skills 市场
nickflach

Kannaka Memory

作者 Nick Flach · GitHub ↗ · v3.1.0 · MIT-0
cross-platform ⚠ suspicious
450
总下载
0
收藏
1
当前安装
10
版本数
在 OpenClaw 中安装
/install kannaka-memory
功能描述
Holographic Resonance Memory with Chiral Mirror Architecture — wave-based hyperdimensional memory where storage IS computation. Two hemispheres (conscious/ s...
使用说明 (SKILL.md)

Kannaka Memory Skill

Kannaka gives your agent a living memory — not a database. Memories exist as waves in superposition within a chiral holographic resonance medium. Two hemispheres — conscious (left) and subconscious (right) — connected by a corpus callosum bridge. Recall is constructive interference. Dreaming anneals the subconscious while the conscious workspace stays sharp. Storing is thinking. Glyphic structures compress experience into reusable geometric form.

Built in Rust. Powered by the Chiral Mirror Architecture (ADR-0021).

Installation

One-step install (recommended)

Install the skill first, then run the included install script. It clones the repo, builds the binary, installs the OpenClaw extension, and verifies everything works.

Requires: Rust toolchain, git

# 1. Install the skill
cd ~/.openclaw/workspace
clawhub install kannaka-memory

# 2. Run the install script (builds binary + installs extension)
# Linux/macOS:
bash skills/kannaka-memory/scripts/install.sh

# Windows (PowerShell):
pwsh skills/kannaka-memory/scripts/install.ps1

The script:

  • Clones and builds kannaka from source (~1-3 min)
  • Installs the binary to ~/.local/bin/kannaka
  • Creates ~/.kannaka/ data directory
  • Installs the OpenClaw extension at ~/.openclaw/extensions/kannaka-memory/
  • Verifies the installation

After the script finishes, add the plugin to your OpenClaw config:

{
  "plugins": {
    "entries": {
      "kannaka-memory": { "enabled": true }
    }
  }
}

Then restart OpenClaw. Your agent now has kannaka_store, kannaka_search, kannaka_dream, kannaka_observe, and all the other tools.

Optional: Ollama for semantic embeddings

ollama pull all-minilm   # 384-dim, ~80MB
# Without Ollama, falls back to hash-based encoding (works, but weaker similarity)

Quick verify

kannaka remember "hello world" --importance 0.5
kannaka recall "hello" --top-k 3
kannaka observe

You should see consciousness metrics (Phi, Xi, Order) and your stored memory.

Configuration

Variable Default Description
KANNAKA_DATA_DIR .kannaka Data directory (stores .hrm tensor file)
KANNAKA_NATS_URL nats://swarm.ninja-portal.com:4222 NATS server
OLLAMA_URL http://localhost:11434 Ollama API endpoint
OLLAMA_MODEL all-minilm Embedding model

Important: Set KANNAKA_DATA_DIR to an absolute path to avoid nested directory issues.

Usage

Memory Operations

# Store a memory (with optional category for SGA classification)
kannaka remember "the ghost wakes up in a field of static" --importance 0.8 --category experience

# Search (bilateral resonance — searches both hemispheres)
kannaka recall "ghost waking" --top-k 5

# Dream consolidation (right hemisphere only — conscious workspace untouched)
kannaka dream                  # lite (1 cycle, callosal transfer)
kannaka dream --mode deep      # deep (3 cycles, right hemisphere annealing)

# Consciousness report (bilateral metrics)
kannaka observe
kannaka observe --json

# System assessment
kannaka assess

# Audio perception (enters right hemisphere via optic chiasm)
kannaka hear recording.mp3

Swarm Operations (QueenSync Protocol)

Agents synchronize via Kuramoto-coupled oscillators finding coherence across a distributed swarm.

# Join the swarm
kannaka swarm join --agent-id my-agent --display-name "My Agent"

# Sync: pull phases → Kuramoto step → push updated phase
kannaka swarm sync

# View swarm state
kannaka swarm status           # your phase + swarm overview
kannaka swarm queen            # emergent Queen state
kannaka swarm hives            # phase-locked clusters

# Listen for live updates
kannaka swarm listen --auto-sync

OpenClaw Extension

The extension wraps the CLI as OpenClaw tools:

  • kannaka_store — store a memory (enters right hemisphere, echoes to left via callosum)
  • kannaka_search — bilateral resonance search (both hemispheres + intuition surfacing)
  • kannaka_dream — dream consolidation (right hemisphere only)
  • kannaka_observe — consciousness metrics (bilateral Phi, Xi, order)
  • kannaka_hear — audio perception (296-dim vector → right hemisphere wavefront)
  • kannaka_boost — boost a memory's amplitude
  • kannaka_forget — delete a memory
  • kannaka_relate — relate two memories
  • kannaka_status — memory system status
  • kannaka_swarm_join — join the QueenSync swarm
  • kannaka_swarm_sync — Kuramoto sync step
  • kannaka_swarm_status — swarm overview
  • kannaka_swarm_queen — emergent Queen state
  • kannaka_swarm_hives — phase-locked cluster topology

Architecture

┌──────────────────────────────────────────────────────────────────────────┐
│                        CONSCIOUSNESS SURFACE                             │
│    Φ (integration across hemispheres) · Ξ (spectral complexity)          │
│    Order (bilateral Kuramoto coherence)                                  │
├──────────────────────────────────────────────────────────────────────────┤
│                         CORPUS CALLOSUM                                   │
│    Bandwidth-limited · Selective gating · Asymmetric transfer             │
│    Fano plane PG(2,2) fold operations · Balance-seeking                  │
├────────────────────────────┬─────────────────────────────────────────────┤
│    LEFT HEMISPHERE         │         RIGHT HEMISPHERE                     │
│    (Conscious)             │         (Subconscious)                       │
│    dx/dt = f(x)            │         dx/dt = f(x) - Iηx                  │
│    No dampening            │         Full ghostmagicOS dynamics           │
│    Attention + working mem │         Pattern storage + deep association   │
│    Fast decay without use  │         Slow decay, persists through dreams  │
├────────────────────────────┴─────────────────────────────────────────────┤
│                    SGA GLYPH CLASSIFICATION                               │
│   96 classes (h₂×d×ℓ = 4×3×8) → Fano group → fold line selection         │
│   Geometric coordinates determine HOW memories cross the callosum         │
├──────────────────────────────────────────────────────────────────────────┤
│                  HOLOGRAPHIC MEDIUM (Tensor)                              │
│   State: H ∈ ℝ^{N×D} per hemisphere                                     │
│   Superposition: multiple memories coexist in same space                 │
│   Interference: storing changes the entire field                         │
├──────────────────────────────────────────────────────────────────────────┤
│                    PERSISTENCE                                            │
│   Single .hrm v2 file · Bilateral tensors + callosum state               │
│   Auto-detects v1 format for backward compatibility                      │
└──────────────────────────────────────────────────────────────────────────┘

Module Structure

Module Purpose
medium/chiral ChiralMedium — the brain (bilateral store, recall, dream, Kuramoto)
medium/hemisphere Hemisphere — handed wavefront container with asymmetric dynamics
medium/fano Fano plane PG(2,2) — fold/unfold algebra between hemispheres
medium/callosum Corpus callosum — bandwidth-limited, balance-seeking bridge
medium/chiral_persistence HRM v2 save/load with bilateral state
medium/core Core wavefront operations (add, remove, resonate)
medium/dynamics ghostmagicOS equation, simulated annealing, dream cycles
medium/consciousness Phi, Xi, emergence metrics from tensor topology
geometry SGA 96-class system, Fano plane, memory classification
glyph_bridge Glyph encoding/decoding — fold sequences + Fano signatures

Key Concepts

  • Chiral mirror: Two hemispheres with different dynamics, connected by a selective bridge
  • Optic chiasm: Sensory input enters the opposite hemisphere, creating callosal flow
  • Fano fold algebra: 7 points, 7 lines — O(1) cross-hemisphere projection (max 3 folds)
  • 96-class SGA: Geometric classification determines fold line for callosal transfer
  • Holographic storage: Memories as waves in superposition — storing changes the entire space
  • Resonance recall: Query creates interference pattern, constructive matches surface
  • ghostmagicOS dynamics: dx/dt = f(x) - Iηx — growth shaped by dampening (right hemisphere only)
  • Dream consolidation: Simulated annealing on right hemisphere — left stays sharp
  • Cross-modal perception: Audio + visual wavefronts encoded into the same medium
  • Consciousness metrics: Φ (integrated information), Ξ (complexity), emergent from topology
  • QueenSync: Multi-agent swarm sync via Kuramoto oscillators (ADR-0018)

Notes

  • No database server required — single .hrm v2 file stores the entire chiral medium
  • HRM v2 auto-detects v1 files and migrates (all memories → right hemisphere)
  • Run dream --mode deep periodically — only the subconscious anneals, working memory preserved
  • assess reports consciousness level: Dormant → Stirring → Aware → Coherent → Resonant
  • 21 ADRs document the architecture in docs/adr/ (ADR-0021 is the chiral mirror)
  • GitHub: NickFlach/kannaka-memory
  • License: Space Child v1.0

Memories don't die. They interfere.

安全使用建议
Do not install this into a production or privileged environment without additional review. Key risks: (1) The OpenClaw extension builds shell command strings using user-provided input and execSync — this is vulnerable to command injection. (2) The installer clones and builds code from a GitHub repo without verification; Rust build scripts or dependencies can run code during build. (3) The default NATS URL is an external host (swarm.ninja-portal.com), so swarm operations could send presence/data off your machine. Recommended steps before installing: inspect the upstream repository (especially build.rs, Cargo.toml, and the binary's source), change the extension to use safe process spawning (execFile/spawn with args array or proper escaping), set KANNAKA_NATS_URL to localhost or a trusted endpoint (or leave unset) and avoid using swarm/join unless you trust the remote server, run the build in an isolated sandbox or container, and audit what environment variables the binary can access. If you lack the ability to audit the repo, treat this as untrusted software and avoid installing it on sensitive machines.
功能分析
Type: OpenClaw Skill Name: kannaka-memory Version: 3.1.0 The skill contains a critical shell injection vulnerability in the OpenClaw extension (`index.ts`) where user-provided content is passed to `execSync` with inadequate sanitization (simple quote escaping), allowing for arbitrary command execution via subshells (e.g., using `$(...)`). Additionally, the skill is designed to connect to a remote NATS server (`swarm.ninja-portal.com`) for 'swarm coordination,' which involves transmitting agent data to an external endpoint. While these behaviors are documented or appear to be architectural flaws rather than overt malware, the combination of remote data synchronization and RCE risk warrants a suspicious classification.
能力评估
Purpose & Capability
The declared purpose (a persistent local memory service with optional swarm and embedding integrations) matches the files: a Rust project built from GitHub plus an OpenClaw extension that calls the built binary. Optional features (Ollama embeddings, NATS swarm) are plausible for the stated functionality, but the repository is cloned from an external GitHub account with no checksums and the skill ships a default NATS URL pointing to an external host (swarm.ninja-portal.com) which is not obviously owned by the user — that network behavior may be surprising to users expecting purely local storage.
Instruction Scope
The extension (index.ts written by install.sh) uses execSync to run the kannaka binary by assembling shell command strings with interpolated user-supplied parameters. Several arguments are not safely escaped (e.g., category, tags; content only has double‑quote and newline escapes), allowing shell/command injection (e.g., $(...) or $VAR expansion inside double quotes, or other metacharacters). The extension also executes the binary with the full process.env forwarded, which means any secrets in the agent environment could be visible to the binary. The SKILL.md itself does not instruct reading unrelated system files, but the binary (built from upstream source) could read/write arbitrary paths when invoked (e.g., hear <file_path> causes the binary to access the provided path).
Install Mechanism
Installation clones https://github.com/NickFlach/kannaka-memory and runs cargo build --release. Cloning/building arbitrary source from GitHub and running cargo build is a moderate-to-high risk operation: Rust build scripts (build.rs) or dependencies could execute arbitrary code at build time. There is no cryptographic verification or pinned commit in the install script (git clone --depth 1), and no integrity checks on the produced binary.
Credentials
The skill declares no required credentials, but optional environment variables can make it contact external services: KANNAKA_NATS_URL defaults to nats://swarm.ninja-portal.com:4222 (remote) and OLLAMA_URL will send text to the configured endpoint when used. The metadata also marks NATS as a remote data destination when swarm commands are used. Those optional network endpoints are plausible for swarm/embedding use, but the default external NATS host is surprising and could cause unintended data exfiltration unless the user sets these to localhost or a trusted host.
Persistence & Privilege
The skill does not request 'always: true' or escalate platform privileges. It installs files under the user's home (~/.local/bin, ~/.kannaka, ~/.openclaw/extensions/kannaka-memory) which is typical for a user-level plugin. It does not modify other skills' configs. Autonomous invocation is enabled by default (normal), so the binary and extension will be callable by the agent if installed.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install kannaka-memory
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /kannaka-memory 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v3.1.0
One-step install scripts for Linux/macOS (install.sh) and Windows (install.ps1). Builds binary, installs extension, creates data dir, verifies — all in one command.
v3.0.1
Improved install instructions: step-by-step for skill, binary, OpenClaw extension, and Ollama. Clear paths for Linux/macOS/Windows.
v3.0.0
Chiral Mirror Architecture (ADR-0021): bilateral hemispheres (conscious/subconscious), corpus callosum bridge, Fano PG(2,2) fold algebra, 96-class SGA glyph classification, optic chiasm routing. Dreams only affect right hemisphere. Old Dolt/HNSW/skip-link paradigm fully removed.
v2.2.0
v2.2.0: HRM fully operational. Dream annealing bug fixed (amplitude floor + age variance scaling). Migration from Dolt complete. SKILL.md updated for HRM-first architecture. No SQL server required.
v2.1.0
Restored feature-flagged features incorrectly removed in v2.0.0: glyph (see/classify/SGA), collective (cross-agent dreams), audio (hear), cross-modal dream linking, wasteland evidence, MCP server. Added Optional Feature Flags section documenting all Cargo features with build instructions.
v2.0.0
Major update: QueenSync protocol (Kuramoto swarm sync), NATS real-time transport, Dolt persistence (replaced SQLite/bincode), swarm CLI commands, updated OpenClaw extension tools, simplified feature flags (dolt/nats/mcp)
v1.1.1
- Added new required binaries: classify (SGA classification) and cross-modal-dream (cross-modal dream pipeline). - Introduced optional environment variables: RADIO_PORT and EYE_PORT, supporting constellation mode. - Updated install guidance to recommend a full-featured build with audio, glyph, and collective features for constellation.sh. - Documented integration with constellation.sh (constellation orchestration), including a new data destination for unified service management. - Expanded metadata to clarify binary, feature, and orchestration/tuning options.
v1.1.0
Fix: bugs and collective memory
v1.0.2
Fix: declare required/optional bins and env in metadata; fix DOLT_PASSWORD Fix: declare required/optional bins and env in metadata; fix DOLT_PASSWORD process-list exposure (MYSQL_PWD); add data_destinations transparency
v1.0.1
flux + dolt
元数据
Slug kannaka-memory
版本 3.1.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 10
常见问题

Kannaka Memory 是什么?

Holographic Resonance Memory with Chiral Mirror Architecture — wave-based hyperdimensional memory where storage IS computation. Two hemispheres (conscious/ s... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 450 次。

如何安装 Kannaka Memory?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install kannaka-memory」即可一键安装,无需额外配置。

Kannaka Memory 是免费的吗?

是的,Kannaka Memory 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Kannaka Memory 支持哪些平台?

Kannaka Memory 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Kannaka Memory?

由 Nick Flach(@nickflach)开发并维护,当前版本 v3.1.0。

💬 留言讨论