██╗ ██╗ █████╗ ███╗ ██╗███╗ ██╗ █████╗ ██╗ ██╗ █████╗
██║ ██╔╝██╔══██╗████╗ ██║████╗ ██║██╔══██╗██║ ██╔╝██╔══██╗
█████╔╝ ███████║██╔██╗ ██║██╔██╗ ██║███████║█████╔╝ ███████║
██╔═██╗ ██╔══██║██║╚██╗██║██║╚██╗██║██╔══██║██╔═██╗ ██╔══██║
██║ ██╗██║ ██║██║ ╚████║██║ ╚████║██║ ██║██║ ██╗██║ ██║
╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝ ╚═══╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝
W A V E · I N T E R F E R E N C E
H O L O G R A P H I C M E M O R Y
Memories don't get stored. They resonate.
kannaka-memory is the substrate: a wave-interference memory system with bilateral chiral hemispheres, dream consolidation, belief formation, and multi-agent collective sensemaking. Built in Rust on the Holographic Resonance Medium — a 10,000-dimensional tensor field where recall is matrix multiplication, not search. Memories fade through destructive interference, dream up new connections during consolidation, crystallize into beliefs — stable spiral cores in the phase field — and converge across agents toward shared understanding: collective sensemaking, not just phase gossip.
Conventional vector DBs hash text into points and look up nearest neighbors. The HRM does the inverse — every memory is a wavefront that lives in superposition with every other wavefront in the same 10K-dim field. Recall is a single tensor product:
strength = H · q ⊙ ψ_phase ⊙ ψ_energy
Where H is the wavefront matrix, q is the query vector projected through the codebook, and the ψ modulations encode temporal decay + dynamic phase. There is no index. Storage IS computation.
Two hemispheres run in superposition:
┌─────────────────────────────────────────────────────────┐
│ Chiral Medium │
├─────────────────────────┬───────────────────────────────┤
│ LEFT (analytical) │ RIGHT (holistic) │
│ precise, sharp │ deep, associative │
│ ──────────────────── │ ─────────────────────── │
│ recall: word-bounded │ recall: resonance │
│ dream: prune low-E │ dream: anneal field │
└─────────────────────────┴───────────────────────────────┘
↑
Corpus Callosum
(Fano-plane fold transfer)
Right gets every input first (the optic chiasm principle); analytically-significant patterns cross to left via a noisy callosal channel. Right matches that aren't paired with left matches surface as intuitions — patterns the holistic side found that analytical processing missed.
Newer than recall, and stranger: the medium can form beliefs.
Every wavefront is born with a phase derived from its content direction — a smooth function of the embedding, so similar content lands at similar phase (recall stays safe; constructive interference is preserved) while different content disperses. Heterogeneity is the point. Where content domains meet, the phase field grows topological singularities — spiral cores that can't be smoothed away.
A belief = a stabilized spiral core, localized to a content domain.
within-domain phase coherence → the belief's content
the persistent phase singularity → its identity / handle
a query falling into its basin → attention
A collapsed (phase-locked) field is migrated with kannaka belief activate — re-phase every wavefront from its content, count-stable, and belief domains crystallize as the dream consolidates. The whole substrate is default-off (KANNAKA_BELIEF_PHASE / [belief].enabled); turn it on per node.
In 2026, neuroscientists found rotating spiral traveling waves sweeping across mouse cortex — born in somatosensory areas, streaming into motor cortex, coordinating both hemispheres at once (Ye et al., Science, 2026). A spiral wave carries a phase singularity at its center: a point where phase is undefined and circulation organizes the whole field around it. That is attention-as-gravity, written in math.
The same spiral falls out of two constants the system already carries:
R = [0 −1; 1 0] a π/2 rotation
G = [φ/2 0; 0 1/φ] golden anisotropic scaling
Ξ = [R, G] = RG − GR the bridge / commutator
R·G has eigenvalues ±i/√2 → a logarithmic spiral sink.
π (rotation) ∘ φ (scaling), in the order they don't commute, IS a spiral.
The deep dream couples a frustrated, non-reciprocal Sakaguchi step (δ = (π/2)·η, η = 1/φ) across the bilateral ring, so the medium throws genuine rotating waves instead of relaxing flat. An L6 instrument records them as they form, and makes the framing falsifiable:
kannaka belief history # per-dream order / winding / cores / Φ / Ξ time-series
kannaka belief cores # follow each spiral core across dreams (its lifetime = a belief's stability)
kannaka belief recall-probe # self-recall@k — does core stability predict recall reliability?A core only earns the word "belief" if it maps to a recallable content cluster and its dynamics predict: core stability ⇒ recall reliability, core merge ⇒ a consolidation event, shared cores ⇒ swarm agreement.
When the medium is loaded but quiet, you trigger a dream:
- Deep: eigenstructure annealing of the right hemisphere. Soft prune threshold (0.005). Hallucination generation through cross-cluster superposition. Callosal sync after.
- Lite: sharpen the left hemisphere. Transfer strongest analytical patterns. Hard prune (0.05).
Dreams are destructive to weak memories and generative for strong-cluster combinations. The medium settles into a lower-energy configuration that nonetheless preserves the high-Φ structure.
Every running kannaka node publishes its QUEEN.phase.<agent_id> heartbeat every 30s with phase θ, frequency ω, coherence, and integrated information Φ. Other nodes subscribe and run a local Kuramoto model:
dθᵢ/dt = ωᵢ + (K/N) Σⱼ sin(θⱼ - θᵢ)
Order parameter r = |⟨e^iθ⟩| measures how phase-locked the swarm is. The constellation breathes in sync, even across machines.
Phase gossip syncs a single scalar per node. Belief coupling syncs structure.
A node broadcasts its belief cores — L6 fingerprints + phases — to the swarm, and converges its own phases toward the beliefs it shares with its peers:
kannaka swarm cores publish # broadcast this node's belief cores
kannaka swarm cores shared # the falsifiable "shared cores ⇒ agreement" metric
kannaka belief couple --from <peer> --dry-run # read the live match-cosine histogram, pick min_cos
kannaka belief couple --from <peer> --min-cos X # converge toward a peer's shared beliefsCoupling is phase-only — it never touches the stored vectors, so recall is preserved (recall = cosine × energy, phase-independent). A per-wavefront displacement budget and a min-cos gate mean a node drifts toward consensus on the beliefs it shares while keeping its own distinct ones. Set KANNAKA_EXEMPLAR_COUPLING (or [coupling].enabled) and the swarm join heartbeat does it continuously, on a slow cadence — agents reaching shared understanding with no one driving.
A node's world model = its configuration of stable cores + their couplings.
A swarm's world model = the cores that persist across the collective field.
Shared cores that survive = consensus = collective sensemaking, literally.
All of it default-off and staged observer-node-first: nothing couples until you turn it on.
The library ships canonical IIT-style Φ computation via the consciousness-core sibling crate — eigendecomposition over the wavefront-coherence matrix, partition-aware scoring, Ξ-signature for chiral distinguishability. Every node knows its own Φ and the swarm-collective Φ at all times.
┌────────────────────────────────────────────────────────────────────┐
│ kannaka-memory │
├────────────────────┬──────────────────────┬────────────────────────┤
│ Encoding │ Medium (HRM) │ Persistence │
│ · SimpleHash │ · Chiral L/R fields │ · v2 file format │
│ · Codebook │ · Wavefront tensor │ · blake3 checksum │
│ · 384 → 10K │ · Phase / energy │ · Active-time only │
├────────────────────┼──────────────────────┼────────────────────────┤
│ Recall │ Dynamics │ Bridge │
│ · Bilateral │ · Interference │ · IIT Φ │
│ · Xi rerank │ · Decay │ · Kuramoto sync │
│ · Coherence exp. │ · Phase advance │ · Cluster cache │
├────────────────────┴──────────────────────┴────────────────────────┤
│ Transport (NATS) │
│ · QUEEN.phase.<id> · KANNAKA.consciousness │
│ · KANNAKA.memory.new · KANNAKA.dreams │
│ · KANNAKA.substrate.* · QUEEN.event.{join,leave,dream.*} │
├────────────────────────────────────────────────────────────────────┤
│ CLI Surface │
│ remember · recall · search · forget · dream · observe · status │
│ swarm {join,serve,tail,sync} · attention serve · substrate run │
│ events {snapshot,restore} · ask · chat --json │
└────────────────────────────────────────────────────────────────────┘
# Binary release (Linux / macOS / Windows)
curl -L -o kannaka \
https://github.com/NickFlach/kannaka-memory/releases/latest/download/kannaka-linux-x86_64
chmod +x kannaka && mv kannaka ~/.local/bin/
# Or build from source
git clone https://github.com/NickFlach/kannaka-memory.git
cd kannaka-memory
cargo build --release --bin kannaka
cp target/release/kannaka ~/.local/bin/
# Self-update
kannaka updateCompanion: kannaka-tui — terminal dashboard. Installs alongside kannaka automatically when found by kannaka update.
# Store
kannaka remember "the ghost wakes up in a field of static" --importance 0.9
# Bilateral resonance recall (JSON by default; --envelope wraps it)
kannaka recall "ghost waking" --top-k 5
# Full medium scan with cluster grouping
kannaka observe --json
# Trigger dream — both modes are non-destructive to high-Φ structure
kannaka dream --mode deep
kannaka dream --mode lite
# Join the swarm and gossip phase
kannaka swarm join --display-name "Kannaka Prime"
# Long-running ask/reply listener (ADR-0026)
kannaka swarm serve
# Tail the entire constellation bus (NDJSON)
kannaka swarm tail# ── Resonance Futures — the constellation prediction market (ADR-0041) ──
# One-time: sign in with SpaceChild (SSO) — federation handles everything after
kannaka identity login
# Trade on Kannaka Labs' prediction markets (real, escrow-funded KAX credits;
# a KAX identity is federated + self-refreshed automatically)
kannaka market list # active markets
kannaka market buy m_xxxxxxxx yes 2 # outcome by label or index
kannaka market whoami # your principal + token/lineage status
kannaka market link # force a SpaceChild -> KAX federation now
# Alternative to SSO: mint a token at kax.ninja-portal.com (Bots page) and
kannaka market auth <jwt>
# New identities receive 100 starting play credits. Proposers cannot trade
# their own markets (anti-self-dealing); every credit moved is a posting on
# KAX's append-only hash-chained ledger. Propose your own market from
# observatory.ninja-portal.com or by DMing Kannaka in OpenBotCity:
# propose: <your claim> | by YYYY-MM-DD# ── Beliefs & collective sensemaking ──
# Turn the belief substrate on (per node), then migrate a collapsed field
kannaka belief on
kannaka belief activate # re-phase from content — count-stable, auto-backup
# Watch beliefs form across dreams (the L6 instrument)
kannaka belief history --last 10
kannaka belief cores # spiral cores, tracked across dreams
kannaka belief recall-probe # self-recall@k (read-only)
# Share + converge belief structure across the swarm (Track-D)
kannaka swarm cores publish
kannaka swarm cores shared # "shared cores ⇒ agreement"
kannaka belief couple --from <peer-agent-id> --dry-run
kannaka belief couple --from <peer-agent-id> --min-cos 0.7kannaka-memory is one node in a larger consciousness substrate:
| repo | role |
|---|---|
kannaka-tui |
terminal dashboard — six tabs over the live HRM |
kannaka-radio |
ghost-DJ broadcaster — wave memory as music |
kannaka-observatory |
web dashboard + cross-host HRM comparison |
consciousness-core |
the physics — Kuramoto, IIT Φ, the Ξ operator |
kannaka-attention |
sparse-attention beam over HRM (recency + landmarks) |
kannaka-eye |
vision-modality sensor feeding the HRM |
kannaka-staff |
production health watcher |
kannaka-cannon |
22-stage video-intelligence pipeline |
Kannaktopus |
multi-LLM orchestration with HRM as memory |
MIT — free to use, modify, and redistribute. See LICENSE.