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.

┌─────────────────────────────────────────────────────────────┐
│                      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.0.tar.gz (16.5 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.0-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hope_memory-0.1.0.tar.gz
  • Upload date:
  • Size: 16.5 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.0.tar.gz
Algorithm Hash digest
SHA256 04d78763745b5e3cfb4dd35e8807f69d2c15f50b34c11b3727b1223748430e8f
MD5 551e918ff9d76e26024ac758e261c33a
BLAKE2b-256 d2acd6c9dcb0c37bfc84daf2f59a72a94f4e9d56791593530a56c71431c4b9eb

See more details on using hashes here.

Provenance

The following attestation bundles were made for hope_memory-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: hope_memory-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.4 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d3db59a1fb8a961b8a4bf78efa4079d4bdd152d7e060948481b199bc90f0882b
MD5 9e23256573d3a83556c1d99cde1a62ee
BLAKE2b-256 ec69bf4566be434826413d6b77549f372e797a0c6c708716852b553db7d76e9d

See more details on using hashes here.

Provenance

The following attestation bundles were made for hope_memory-0.1.0-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