Skip to main content

Industrial-Grade 4D Causal Memory for AI

Project description

Oxta Mem

Industrial-Grade 4D Causal Memory for AI

Status Language Protocol

The Geodesic Memory Engine is a high-performance, persistent memory graph designed to give AI models "Time-Travel" capabilities without retraining. Unlike Vector Databases that search by similarity, Geodesic Engine searches by causality and time.

🚀 Key Features

  • Time Travel: Retrieve the exact state of any variable at any point in history.
  • 4D Graph Structure: Nodes are linked causally (Merkle-DAG), not just stored as a list.
  • Zero-Copy Persistence: Uses mmap and rkyv for instant startup and RAM-speed access backed by disk.
  • Universal Compatibility: Speaks the Redis (RESP) protocol. Works with any Redis client.
  • Python Bindings: Plug-and-play integration with PyTorch, TensorFlow, and LangChain via pyo3.

⚡ Performance

Benchmarks running on standard hardware:

  • Write Throughput: > 300,000 writes/sec (Append-Only Log)
  • Read Latency (P99): ~3 microseconds
  • Startup Time: < 10ms (Zero-Copy)

"The engine navigates millions of causal steps effectively instantly due to Arena Allocation and CPU Prefetching."

🛠️ Quick Start (Docker)

The easiest way to run the engine is via Docker.

Prerequisites

  • Docker
  • Docker Compose (Optional)

Running with Docker CLI

  1. Build the image:

    docker build -t geodesic-engine .
    
  2. Run the container:

    docker run -d -p 6379:6379 -v $(pwd)/data:/data --name geodesic geodesic-engine
    
  3. Test connection (using redis-cli):

    redis-cli -p 6379 PING
    # Output: PONG
    
    redis-cli -p 6379 SET user:1 "Alice"
    # Output: OK
    
    redis-cli -p 6379 GET user:1
    # Output: "Alice"
    

Running with Docker Compose

  1. Start the service:

    docker-compose up -d
    
  2. Stop the service:

    docker-compose down
    

The database file will be persisted in the ./data directory on your host machine.


🏗️ Manual Build (Rust)

If you prefer running "bare metal" or want to develop the core:

Prerequisites

  • Rust (latest stable)
  • Cargo

Installation

  1. Clone the repository:

    git clone https://github.com/your-repo/geodesic-engine.git
    cd geodesic-engine
    
  2. Build and Run:

    cd geodesic_engine
    cargo run --release -- --port 6379 --db-path ./my_memory.db --size-mb 1024
    

Running Benchmarks

To reproduce the performance metrics:

cd geodesic_engine
cargo run --release --bin benchmark

🐍 Python Integration (AI/ML)

You can use the engine directly from Python.

Option 1: Via Redis Client (Recommended for Production)

import redis

# Connect to Geodesic Engine
r = redis.Redis(host='localhost', port=6379, decode_responses=True)

# Write Event
r.set("sensor_X", "High Pressure")

# Read Current State
print(r.get("sensor_X"))

Option 2: Native Bindings (High Performance / Embedded)

To build the Python extension:

cd geodesic_engine
maturin develop --release

Usage:

from geodesic_engine import PyGeodesicEngine

engine = PyGeodesicEngine("local_store.db", 100)
engine.write("var_a", b"some_data")
print(engine.read_latest("var_a"))

📚 Documentation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oxta_mem-0.1.1.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oxta_mem-0.1.1-cp311-cp311-win_amd64.whl (248.6 kB view details)

Uploaded CPython 3.11Windows x86-64

File details

Details for the file oxta_mem-0.1.1.tar.gz.

File metadata

  • Download URL: oxta_mem-0.1.1.tar.gz
  • Upload date:
  • Size: 20.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for oxta_mem-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f92f336f81ba17104d2bdafd0270a4402eeae6160b9c649fec1bc306e75a9a2d
MD5 fbfa4d90589b2a800782d84bd85efcb4
BLAKE2b-256 0c28e52539f266ead6d1db3a6e1b81e9c207e803138a1d1a4cdbb4d333df31ee

See more details on using hashes here.

File details

Details for the file oxta_mem-0.1.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: oxta_mem-0.1.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 248.6 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for oxta_mem-0.1.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 23618127bb8f2a7d05ec137c8a489e79afa7a53a0cf7cb42142488f0f2f5eb83
MD5 ca116940dcc65fde29a0fd545c3adae7
BLAKE2b-256 717c9982556ae71b0a091e9306b1f13a9ca5543bb89c9745387e62c90473f8ba

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page