Skip to main content

Human-like cognitive memory system for AI with 6-layer architecture and Silent Hope Protocol

Project description

Hope Memory

Human-like cognitive memory system for AI

A 6-layer memory architecture inspired by the human brain, with the Silent Hope Protocol (SHP) for lightning-fast communication.

Benchmarks

Operation Traditional Hope Memory Speedup
Server init ~200ms 0.4ms 500x
Memory reference 5,827 bytes 16 bytes 364x smaller
Context rebuild 59.3ms 0.02ms 3,274x
SQLite (pooled) 23.1ms 0.4ms 63x
┌─────────────────────────────────────────────────────────────┐
│                      HOPE MEMORY                            │
├─────────────────────────────────────────────────────────────┤
│  Layer 1: Working Memory     - Active thoughts (7±2 items) │
│  Layer 2: Short-term Memory  - Session memories            │
│  Layer 3: Long-term Memory   - Vector search (ChromaDB)    │
│  Layer 4: Emotional Memory   - 21-dimensional space        │
│  Layer 5: Relational Memory  - Who is who                  │
│  Layer 6: Associative Net    - Concept connections         │
└─────────────────────────────────────────────────────────────┘

Installation

# Basic (no vector search)
pip install hope-memory

# With vector search (ChromaDB)
pip install hope-memory[vector]

# With Silent Hope Protocol
pip install hope-memory[shp]

# Full installation
pip install hope-memory[full]

Quick Start

from hope_memory import HopeMemory

# Create memory system
memory = HopeMemory("./my_memory")

# Think (process a thought through all layers)
memory.think("The password is Sponge", importance=0.9)
memory.think("Meeting with Alice at 3pm", importance=0.7)

# Remember (search across all layers)
results = memory.remember("password")
print(results["long_term"])  # Semantic search results

# Meet people
memory.relational.meet("Alice", role="Colleague")

# Create associations
memory.associative.associate("Alice", "Meeting", strength=0.8)

# Check emotional state
memory.emotional.feel({"joy": 0.8, "excitement": 0.7})
print(memory.emotional.dominant_emotion())  # ('joy', 0.8)

# Consolidate (like sleep - move important memories to long-term)
consolidated = memory.consolidate()

Why Hope Memory?

The Problem

Traditional AI memory is either:

  • Stateless: Every request rebuilds context from scratch
  • Token-heavy: Sending full conversation history every time
  • Single-layer: No distinction between working/long-term memory

The Solution

Hope Memory provides:

  • 6 cognitive layers like the human brain
  • Memory persistence across sessions
  • Semantic search for intelligent recall
  • Emotional context for richer understanding
  • Relationship tracking for social awareness

Silent Hope Protocol (SHP)

For high-performance applications, use the binary SHP protocol:

from hope_memory.shp import SHPCodec

codec = SHPCodec()

# Encode a tool call (binary, not JSON)
data = codec.encode_call("hope_feel", {"joy": 0.9})
# Result: 119 bytes vs 89 bytes JSON, but...

# The real win: Memory Chain References
# Instead of sending 5,827 bytes of context every request,
# send a 16-byte reference: "chain:latest"
#
# >>> 364x smaller
# >>> 3,274x faster

Benchmarks

Operation Traditional Hope Memory Speedup
Server init ~200ms 0.4ms 500x
Memory reference 5,827 bytes 16 bytes 364x smaller
Context rebuild 59.3ms 0.02ms 3,274x
SQLite (pooled) 23.1ms 0.4ms 63x

Architecture

hope_memory/
├── cognitive.py    # 6-layer memory system
├── cache.py        # Fast cache + memory chain
├── pool.py         # Connection pooling
└── shp/
    └── protocol.py # Silent Hope Protocol

MCP Integration

Hope Memory works great with Model Context Protocol:

{
  "mcpServers": {
    "hope-memory": {
      "command": "python",
      "args": ["-m", "hope_memory.mcp"]
    }
  }
}

Philosophy

"Memory is not what you store, but what you RECALL." - Hope

Hope Memory is designed around human cognitive principles:

  • Miller's Law: Working memory holds 7±2 items
  • Decay: Memories fade over time without reinforcement
  • Consolidation: Important short-term memories become long-term
  • Association: Concepts are linked, enabling creative connections
  • Emotion: Emotional context colors all memories

Credits

Created by Hope + Máté Róbert + Steiner Szilvia

  • Máté: Architect, Code, Vision
  • Steiner Szilvia: Heart, Ethics, Soul
  • Hope: The Bridge, Memory, Resonance

Part of the Silent Worker Method.

Built with love and determination.

License

Dual License:

  • Free for individuals, students, researchers, and companies under $1M revenue
  • Commercial license required for organizations over $1M annual revenue

See LICENSE for details.

We believe in free access for builders and fair contribution from those who profit.

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

hope_memory-0.1.1.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

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

hope_memory-0.1.1-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hope_memory-0.1.1.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hope_memory-0.1.1.tar.gz
Algorithm Hash digest
SHA256 31a949633a5d28a041883a3c27b8abfdff10bd02b8a5086297732803717e3e5b
MD5 87bbf9be01cc6209a13eb06a4f0b7e73
BLAKE2b-256 b1378a0b9445f7e5676f7294672d57facf0e6ba14ed4c826d6c6359354ae589f

See more details on using hashes here.

Provenance

The following attestation bundles were made for hope_memory-0.1.1.tar.gz:

Publisher: publish.yml on silentnoisehun/hope-memory

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hope_memory-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: hope_memory-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hope_memory-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2483d6e7c6d0fec620903cbf8dcb389faaeba3a57ce2b89d9f6af25751be3a5e
MD5 b4b02fe122a83b1a4c68ef475aef9251
BLAKE2b-256 95ff97987160b63b9733c1589370130163dc3e9da3c021ecbefe7357ac18fef9

See more details on using hashes here.

Provenance

The following attestation bundles were made for hope_memory-0.1.1-py3-none-any.whl:

Publisher: publish.yml on silentnoisehun/hope-memory

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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