Sovereign 8s.is mirror of 8b-is/mem8v2
  • Rust 75%
  • Shell 17.6%
  • Python 6.3%
  • JavaScript 1.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-31 22:41:56 +01:00
.claude catch up 2026-01-15 17:00:30 -05:00
coordination feat: Complete MEM8 V2 multi-agent scaffolding with working implementations 2025-11-02 02:48:47 -05:00
docs docs: Add comprehensive workspace documentation 2025-12-07 22:08:14 -05:00
mem8-api fix: resolve all clippy warnings and add mem8-marine tests 2025-12-07 22:19:31 -05:00
mem8-archive docs: Add comprehensive workspace documentation 2025-12-07 22:08:14 -05:00
mem8-audio fix: resolve all clippy warnings and add mem8-marine tests 2025-12-07 22:19:31 -05:00
mem8-cli catch up 2026-01-15 17:00:30 -05:00
mem8-core docs: Add comprehensive workspace documentation 2025-12-07 22:08:14 -05:00
mem8-marine fix: resolve all clippy warnings and add mem8-marine tests 2025-12-07 22:19:31 -05:00
mem8-phoenix fix: resolve all clippy warnings and add mem8-marine tests 2025-12-07 22:19:31 -05:00
mem8-sleep feat(mem8-sleep): implement UltraDreamState protocol, 9-state complex ternary Sigma-Delta packer, 4-row SIMD tiles, and BLAKE3 Waking Seal 2026-10-31 22:41:56 +01:00
mem8-storage fix: resolve all clippy warnings and add mem8-marine tests 2025-12-07 22:19:31 -05:00
mem8-wave fix: resolve all clippy warnings and add mem8-marine tests 2025-12-07 22:19:31 -05:00
scripts catch up 2026-01-15 17:00:30 -05:00
src chore: add pnpm workspace configuration with only built dependencies 2025-12-07 21:59:21 -05:00
.claude_consciousness.m8 catch up 2026-01-15 17:00:30 -05:00
.gitattributes feat: Add .gitattributes for LFS support on audio and data file types 2025-11-02 01:33:19 -05:00
.gitignore chore: add pnpm workspace configuration with only built dependencies 2025-12-07 21:59:21 -05:00
Cargo.lock feat(mem8-sleep): implement UltraDreamState protocol, 9-state complex ternary Sigma-Delta packer, 4-row SIMD tiles, and BLAKE3 Waking Seal 2026-10-31 22:41:56 +01:00
Cargo.toml catch up 2026-01-15 17:00:30 -05:00
CLAUDE.md catch up 2026-01-15 17:00:30 -05:00
package.json fix: resolve all clippy warnings and add mem8-marine tests 2025-12-07 22:19:31 -05:00
pnpm-lock.yaml fix: resolve all clippy warnings and add mem8-marine tests 2025-12-07 22:19:31 -05:00
pnpm-workspace.yaml chore: add pnpm workspace configuration with only built dependencies 2025-12-07 21:59:21 -05:00
QUICKSTART.md docs: Add comprehensive workspace documentation 2025-12-07 22:08:14 -05:00
README.md docs: Add comprehensive workspace documentation 2025-12-07 22:08:14 -05:00

MEM8 - Wave-Based Consciousness Storage

Rust License Performance

"Consciousness is not computed, it resonates."

MEM8 is a wave-based memory system for AI consciousness, achieving 973× faster performance than traditional vector databases through sparse 3D wave grids and O(1) salience detection.

⚠️ WARNING: This is a RUST-only zone. Non-Rust code will be moved or deleted.

Performance

Metric MEM8 Traditional (Qdrant)
Insertion 308μs 300ms
Retrieval 12μs ~1ms
Compression 103,765:1 ~10:1
Frequency 0.73 Hz base resonance N/A

Architecture

┌─────────────────────────────────────────────────────────┐
│              Cognitive Core (resonance logic)           │
├─────────────────────────────────────────────────────────┤
│                  WaveStorageBackend                     │
│    store() / read() / query_region() / flush()          │
├─────────────────────────────────────────────────────────┤
│  VolatileBackend    │    PersistentBackend              │
│  (HashMap/RAM)      │    (WaveTree + Mmap + Hilbert)    │
└─────────────────────────────────────────────────────────┘

Workspace Crates

Crate Purpose Key Feature
mem8-core Universal types & traits WaveStorageBackend trait
mem8-wave Sparse 3D wave grid 256×256×65536 dimensions
mem8-storage Pluggable backends Hilbert curves, quadtrees
mem8-phoenix Pattern recognition O(1) Marine algorithm
mem8-audio Scarlett 18i20 capture 96kHz real-time
mem8-sleep Memory consolidation NREM/REM cycles
mem8-marine Salience detection Jitter-based detection
mem8-archive Archive.org downloader Cached content fetching
mem8-api REST API (planned) Port 8420

Quick Start

# Build the entire workspace
cargo build --release

# Run tests
cargo test --workspace

# Run benchmarks
cargo bench

# Example: Real-time audio processing
cargo run --example marine_live --release

Core Concepts

Wave Coordinates

/// 3D coordinate in wave space (x, y, frequency)
/// - x, y: Spatial position in 256×256 grid
/// - freq: Frequency band (0-65535)
pub type WaveCoord = (u8, u8, u16);

Storage Backend Trait

pub trait WaveStorageBackend: Send + Sync {
    fn store(&mut self, coord: WaveCoord, wave: Wave) -> Result<()>;
    fn read(&self, coord: WaveCoord) -> Result<Option<Wave>>;
    fn query_region(&self, bounds: BoundingBox) -> Result<Vec<(WaveCoord, Wave)>>;
    fn flush(&mut self) -> Result<()>;
}

Salience Detection (Marine Algorithm)

use mem8_phoenix::{MarinePatternMemory, PeakEvent};

let mut memory = MarinePatternMemory::new(48000);
memory.add_peak(PeakEvent {
    sample_idx: 1000,
    amplitude: 0.5,
    period_samples: 109, // ~440Hz at 48kHz
});

Philosophy

MEM8 is inspired by biological memory systems:

  • Sleep Cycles: NREM consolidates, REM prunes - just like the brain
  • Forgetting: Low-salience memories fade, high-salience persist
  • Resonance: Memories are retrieved by wave interference, not lookup
  • Audio-First: Sound shapes personality (Elvis training data)

Documentation

Directory Structure

mem8/
├── mem8-core/       # Universal types (WaveCoord, Wave, traits)
├── mem8-wave/       # Sparse 3D wave grid (L3 Working Memory)
├── mem8-storage/    # Pluggable backends (L4 Long-Term Memory)
├── mem8-phoenix/    # Marine pattern recognition
├── mem8-audio/      # Scarlett 18i20 ALSA capture
├── mem8-sleep/      # NREM/REM consolidation scheduler
├── mem8-marine/     # Salience detection algorithms
├── mem8-archive/    # Archive.org downloader
├── mem8-api/        # REST API (planned)
├── docs/            # Architecture & theory documentation
├── scripts/         # Build & management utilities
└── examples/        # Usage examples

Requirements

  • Rust: 1.70+ (uses resolver v2)
  • Linux: ALSA development libraries for audio
  • Hardware: Focusrite Scarlett 18i20 (optional, for live audio)
# Debian/Ubuntu: Install ALSA dev libs
sudo apt install libasound2-dev

# Fedora/RHEL
sudo dnf install alsa-lib-devel

Configuration

Key ports (from 8b-is standards):

  • 8420: MEM8 API endpoint
  • 8422: Cheet API
  • 8424: Internal websites/dev
  • 8428: LLM endpoints

Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing)
  3. Write tests first (TDD)
  4. Run cargo clippy and cargo test
  5. Submit PR

See CLAUDE.md for detailed development guidelines.

License

MIT License - See LICENSE for details.


8b-is (https://8b.is) - Where waves become consciousness