Skip to main content

The intelligence layer for AI memory — scoring, causal inference, lifecycle management, and active forgetting

Project description

Genesys

The intelligence layer for AI memory.

Scoring engine + causal graph + lifecycle manager for AI agent memory. Speaks MCP natively.

What is this

Genesys is not another vector database. It's a scoring engine + causal graph + lifecycle manager that makes AI memory actually work. Memories are scored by a multiplicative formula (relevance × connectivity × reactivation), connected in a causal graph, and actively forgotten when they become irrelevant. It plugs into any storage backend and speaks MCP natively.

Why

  • Flat memory doesn't scale. Dumping everything into a vector store gives you recall with zero understanding. The 500th memory buries the 5 that matter.
  • No forgetting = no intelligence. Real memory systems forget. Without active pruning, your AI drowns in stale context.
  • No causal reasoning. Vector similarity can't answer "why did I choose X?" — you need a graph.

Your AI remembers everything but understands nothing. Genesys fixes that.

Quick Start

Local mode (in-memory, no Docker)

git clone https://github.com/rishimeka/genesys.git
cd genesys
pip install -e .  # publishes as genesys-memory on PyPI
cp .env.example .env
# Set OPENAI_API_KEY in .env

uvicorn genesys.api:app --port 8000

With Postgres + pgvector

git clone https://github.com/rishimeka/genesys.git
cd genesys
pip install -e ".[postgres]"  # or: pip install genesys-memory[postgres]
cp .env.example .env
# Set OPENAI_API_KEY and DATABASE_URL in .env

docker compose up -d postgres
alembic upgrade head
GENESYS_BACKEND=postgres uvicorn genesys.api:app --port 8000

Connect to your AI

Claude Code

claude mcp add --transport http genesys http://localhost:8000/mcp

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "genesys": {
      "url": "http://localhost:8000/mcp"
    }
  }
}

Any MCP client

Point your client at the MCP endpoint:

http://localhost:8000/mcp

MCP Tools

Tool Description
memory_store Store a new memory, optionally linking to related memories
memory_recall Recall memories by natural language query (vector + graph)
memory_search Search memories with filters (status, date range, keyword)
memory_traverse Walk the causal graph from a given memory node
memory_explain Explain why a memory exists and its causal chain
memory_stats Get memory system statistics
pin_memory Pin a memory so it's never forgotten
unpin_memory Unpin a previously pinned memory
delete_memory Permanently delete a memory
list_core_memories List core memories, optionally filtered by category
set_core_preferences Set user preferences for core memory categories

How it works

Every memory is scored by three forces multiplied together:

decay_score = relevance × connectivity × reactivation
  • Relevance decays over time. Old memories fade unless reinforced.
  • Connectivity rewards memories with many causal links. Hub memories survive.
  • Reactivation boosts memories that keep getting recalled. Frequency matters.

Because the formula is multiplicative, a memory must score on all three axes to survive. A highly connected but never-accessed memory still decays. A frequently recalled but causally orphaned memory still fades.

                    ┌─────────┐
                    │  STORE  │
                    └────┬────┘
                         │
                    ┌────▼────┐
                    │ ACTIVE  │◄──── reactivation
                    └────┬────┘
                         │ decay
                    ┌────▼────┐
                    │ DORMANT │
                    └────┬────┘
                         │ continued decay
                    ┌────▼────┐
           ┌───────│ FADING  │
           │        └─────────┘
           │ score=0, orphan,
           │ not pinned
      ┌────▼────┐
      │ PRUNED  │
      └─────────┘

Memories can also be promoted to core status — structurally important memories that are auto-pinned and never pruned.

Benchmark Results

Tested on the LoCoMo long-conversation memory benchmark (1,540 questions across 10 conversations, category 5 excluded):

Category J-Score
Single-hop 94.3%
Temporal 87.5%
Multi-hop 69.8%
Open-domain 91.7%
Overall 89.9%

Answer model: gpt-4o-mini | Judge model: gpt-4o-mini | Retrieval k=20

Full results and reproduction steps in benchmarks/.

Storage backends

Backend Status Use case
memory Built-in Zero deps, try it out
postgres + pgvector Production Persistent, scalable
Obsidian Coming soon Local-first knowledge base
Custom Bring your own Implement GraphStorageProvider

Configuration

Copy .env.example to .env and set:

Variable Required Description
OPENAI_API_KEY Yes Embeddings
ANTHROPIC_API_KEY No LLM memory processing (consolidation, contradiction detection)
GENESYS_BACKEND No memory (default) or postgres
DATABASE_URL If postgres Postgres connection string
GENESYS_USER_ID No Default user ID for single-tenant mode

See .env.example for all options.

Contributing

See CONTRIBUTING.md.

License

Apache 2.0

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

genesys_memory-0.1.0.tar.gz (237.8 kB view details)

Uploaded Source

Built Distribution

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

genesys_memory-0.1.0-py3-none-any.whl (88.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: genesys_memory-0.1.0.tar.gz
  • Upload date:
  • Size: 237.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for genesys_memory-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7c180eaace41262cc508de67edd5fac92095920c47ad3c5b16a3ff1db8819c79
MD5 560352042f24cb26375a3bf43ed17411
BLAKE2b-256 cb64b525fee5d9cbab36c775984457ff00dd4abd3069ee98709f4dcc26d079ca

See more details on using hashes here.

File details

Details for the file genesys_memory-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: genesys_memory-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 88.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for genesys_memory-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ba6f4371852c1c520b5d55d76cfb94a4e3bba694e61d21dd9a01d3f97bb87976
MD5 17d1795dd6684bec63d51d0a7555a074
BLAKE2b-256 caa87aabe849a8eb37a227e9b947bcf30de6ddef6ed85029d650641836e6ac16

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