Logotipo de Genesys

Genesys

Organización
Astrix-Labs

Open-source causal graph memory for AI agents. 85.55 on LoCoMo under a frozen, reproducible protocol. MCP server with ACT-R scoring, spreading activation, and active forgetting.

EditorAstrix-Labs
Repositoriopapez
IdiomaPython
Forks
3
Estrellas
27
Herramientas disponibles
0
Tipo de transportestdio
Categorías
LicenciaAGPL-3.0
Enlaces
  • Conecta herramientas a flujos de trabajo con IA

    Genesys ofrece funciones MCP que pueden usar los clientes y agentes de IA compatibles.

  • 0 herramientas disponibles

    Explora a continuación las acciones que se pueden invocar, con sus nombres y descripciones cuando el servidor los proporcione.

  • Configuración lista para copiar

    Usa los ejemplos de instalación para configurar este servidor en tu cliente MCP preferido.

  • Indicadores de interés en el código abierto

    27 estrellas y 3 forks en el repositorio enlazado.

PyPI PyPI Downloads CI License: AGPL v3

Papez

The intelligence layer for AI memory.

Papez doesn't just remember what happened; it remembers why. A scoring engine + causal graph + lifecycle manager for AI agent memory. Speaks MCP natively.

LoCoMo benchmark (certified)

SystemScoreProtocol
Papez85.55 ± 0.37Frozen: gpt-4o-mini answerer + judge, temp 0, n=1,540, cats 1–4, 10 runs (July 2026)
Zep75.14Comparable published setup
Mem066.9Comparable published setup (Mem0 paper)

Self-reported vendor figures above ~90 use different answerers/judges and are not comparable — the oracle retrieval ceiling under this frozen protocol is 94.9. Reproduce it yourself: Astrix-Labs/locomo-harness · full methodology · per-run results.

Hosted product: papez.ai — your personal memory for AI, carried across ChatGPT, Claude, and every MCP app · Pricing · Developer docs · Benchmark methodology (85.55 on LoCoMo, certified over 10 runs, receipts published)

What is this

Papez is a scoring engine, causal graph, and lifecycle manager for AI memory. Memories are scored by a multiplicative formula (relevance × connectivity × reactivation), connected in a causal graph, and actively forgotten when they become irrelevant.

This package (papez) is the core library: an in-memory causal graph engine with optional JSON persistence, plus a stdio MCP server. It has no database dependency and no REST API. A hosted product built on top of this library — with Postgres, additional storage backends, and a REST/HTTP MCP API — is available separately at api.papez.ai; it is not part of this package.

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. Papez fixes that.

Quick Start

Requires Python 3.11 or newer.

Install the package. The base install has zero database dependencies — state lives in memory and is optionally persisted to a JSON file.

bash
pip install papez

Optional extras:

bash
pip install 'papez[openai]'      # OpenAI embeddings
pip install 'papez[local]'       # Local embeddings (sentence-transformers, no API key)
pip install 'papez[anthropic]'   # LLM-based causal inference (consolidation, contradiction detection)

Run the stdio MCP server directly:

bash
python3 -m papez

From source

bash
git clone https://github.com/Astrix-Labs/papez.git
cd papez
pip install -e '.[dev]'
pytest tests/

Connect to your AI

Claude Code

bash
claude mcp add papez -- python -m papez

Claude Desktop

Add to your claude_desktop_config.json:

json
{
  "mcpServers": {
    "papez": {
      "command": "python",
      "args": ["-m", "papez"]
    }
  }
}

Reliability & retries

The stdio server is a single local process. Under load — or during a restart or redeploy of a hosted transport in front of it — a tool call can transiently fail or the connection can briefly go unresponsive. Memory writes and reads are not worth crashing an agent turn over, so clients should degrade gracefully rather than treat a memory call as fatal:

  • The server degrades gracefully too: a tool exception (or a missing required argument) is returned as a structured {"error": "...", "retryable": bool} payload instead of a protocol-level MCP failure, so a memory hiccup never crashes the transport. The retryable flag encodes the guidance below — true only for read tools.
  • Retry idempotent reads (memory_recall, memory_search, memory_traverse, memory_explain, memory_stats) with a short bounded backoff (e.g. 2–3 attempts). These have no side effects worth worrying about beyond reactivation bookkeeping.
  • Do not blindly retry memory_store / memory_amend on an ambiguous timeout — a silent success followed by a retry creates a duplicate node. Prefer to continue the turn and reconcile on the next memory_recall, or pass a stable source_session so duplicates are easy to spot.
  • Treat memory as best-effort context, not a hard dependency. If a call fails, proceed with whatever context you already have and try again next turn rather than aborting. The graph is durable; a missed write is recoverable, a crashed agent turn is not.

MCP Tools

ToolDescription
memory_storeStore a new memory. Use related for writer-specified typed edges ({id, type}); related_to is legacy and always creates caused_by. Optional category. May return possible_conflicts (heuristic hints).
memory_amendRecord a correction: creates a new memory that supersedes an existing one. The old memory is kept (decayed in recall), not deleted.
memory_recallRecall memories by natural language query (vector + keyword + graph spreading activation). Supports verbosity: "concise" for lightweight payloads.
memory_searchFiltered vector search by status, category, date (since), last-active date (active_since), or entity. Pass an empty query to enumerate by recency instead (no embedder needed) — with since/active_since this answers "what's new since I last looked" without knowing what to query for.
memory_traverseWalk the causal graph from a node. Returns reachable nodes and the edges of the induced subgraph (source/target/type/weight/created_by) — a superset of the BFS tree, so paths can be reconstructed. Honors edge_types.
memory_explainExplain a memory's score. Includes a score_model block (formula + live per-force breakdown + staleness note) and removal_impact.
memory_statsGet memory system statistics
pin_memoryPin a memory so it's never forgotten
unpin_memoryUnpin a previously pinned memory
delete_memoryPermanently delete a memory
list_core_memoriesList core memories, optionally filtered by category
set_core_preferencesSet user preferences for core memory categories
promote_to_orgPromote a private memory to org visibility

Writer-specified edges & corrections

memory_store's related argument lets the writer set edge semantics instead of guessing. Each entry is {"id": "<node-id>", "type": "<edge-type>"}, directed new_node --type--> target (so supersedes means the new node supersedes the target). Invalid types are rejected before the node is created — explicit writes never half-succeed. related_to still exists but always creates caused_by; prefer related.

To correct a fact, use memory_amend(node_id, content, reason=...): it stores the new version, links it SUPERSEDES → old, and keeps the old memory for audit. Recall automatically deprioritizes superseded hits and tags them with superseded_by.

When you memory_store something that lexically disagrees with an auto-link candidate (a changed number, a negation), the result may include possible_conflicts — heuristic hints, not verified contradictions, and never materialized as edges. Use them to decide whether to memory_amend.

Concise recall

memory_recall(query, verbosity="concise") skips the causal-chain enrichment and returns only id / summary / status / score / activation / is_core (plus superseded_by when set) per hit — much cheaper on tokens for high-frequency lookups. verbosity="full" (the default) is unchanged. Reactivation writes still occur in both modes (they are governed by read_only, not verbosity).

See docs/scoring.md for what activation / decay_score actually mean — in short, it is a retention weight that rises when a memory is recalled, not a countdown to deletion.

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.

decay_score (aliased activation on every hit) is a retention weight, not a deletion countdown — recalling a memory raises it, and a low score just means "resting," not "doomed." Deletion requires a low score and orphaned and unpinned and non-core and non-org and idle (not stored, recalled or reactivated for 30 days, GENESYS_FORGETTING_MIN_IDLE_DAYS), all at once. The stdio server runs the rescore-transition-prune pass every 10 minutes (GENESYS_MAINTENANCE_INTERVAL_S; 0 disables it). See docs/scoring.md for the full model and worked numbers.

STORE → ACTIVE → DORMANT → FADING → PRUNED
           ↑                    │
           └── reactivation ────┘
                                  (only if score=0, orphan, not pinned)

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

Benchmark Results

See the certified LoCoMo results at the top of this README: 85.55 ± 0.37 over 10 runs under a frozen protocol (gpt-4o-mini answerer and judge, temperature 0, n=1,540, categories 1–4). Category 5 — adversarial questions with disputed ground truth — is excluded, matching the comparable published setups.

Every run is reproducible: the harness is at Astrix-Labs/locomo-harness, with full methodology and per-run results published. Reproduction scripts for the in-repo scenarios are in benchmarks/.

Storage backend

This package ships one storage backend: an in-memory causal graph (storage/memory.py) with optional JSON persistence via GENESYS_PERSIST_PATH. No database is required.

Additional backends — Postgres/pgvector, FalkorDB, MongoDB, and an Obsidian vault adapter — along with a REST API, OAuth, and multi-user auth, are part of the hosted product at api.papez.ai and are not included in this repo.

Want a different storage backend for the open-source library? Implement the provider protocols in storage/base.py and bring your own.

Configuration

Copy .env.example to .env and set:

VariableRequiredDescription
OPENAI_API_KEYUnless GENESYS_EMBEDDER=localEmbeddings
ANTHROPIC_API_KEYNoEnables LLM-based causal inference (consolidation, contradiction detection). Off by default — without it, causal edges only come from edges the caller explicitly declares in memory_store plus cosine-similarity linking.
GENESYS_EMBEDDERNoopenai (default) or local (sentence-transformers, no API key)
GENESYS_PERSIST_PATHNoJSON file path to persist state across restarts (in-memory otherwise)
GENESYS_USER_IDNoDefault user ID for single-tenant mode

Auto-link tuning

Auto-linking connects a newly stored memory to semantically similar existing memories. If it is too permissive you get a "hairball" — everything ends up ~2 hops from everything, which destroys traversal scoping. Three knobs bound it:

VariableDefaultDescription
GENESYS_AUTOLINK_MIN_SIMILARITYembedder-recommendedCosine floor to create an auto-link. Explicit value wins over the embedder default.
GENESYS_AUTOLINK_MAX_EDGES3Max auto-links a single memory_store may create. Caps fan-out.
GENESYS_AUTOLINK_MAX_NODE_DEGREE10Max auto_link edges any single node may accumulate as a target. Fan-out alone still lets a hub gain one edge per store forever; this caps the hub itself.

The floor is embedder-aware: an auto-link is permanent graph structure, so its floor sits above the transient recall floor. When GENESYS_AUTOLINK_MIN_SIMILARITY is unset, the effective floor is the embedder's recommendation — 0.6 for OpenAI (text-embedding-3-small, whose genuine matches cluster ~0.5+) and 0.45 for local sentence-transformers (whose genuine matches cluster ~0.2–0.4 but whose noise pairs have been observed at ~0.44, so only near-duplicate content auto-links locally). Any unknown embedder falls back to 0.45. Auto-linking also de-dupes: if a pair is already connected by any edge (e.g. a user_explicit caused_by), no parallel auto_link related_to is created.

The possible_conflicts hint on memory_store scans with its own, lower floor (GENESYS_CONFLICT_MIN_SIMILARITY, defaulting to the recall floor) over a wider window (GENESYS_CONFLICT_SCAN_K, default 8) — so tightening the auto-link floor never shrinks conflict detection.

Recall / relevance floors

The same embedder-aware pattern governs recall filtering:

VariableDefaultDescription
GENESYS_RECALL_MIN_SIMILARITYembedder-recommended (OpenAI 0.5 / other 0.2)Cosine floor below which pure vector hits are dropped from memory_recall. Keyword hits bypass it.
GENESYS_CORE_INJECT_MIN_SIMILARITYembedder-recommended (OpenAI 0.45 / other 0.2)Floor for injecting auto-promoted core memories into recall results. Pinned memories are always injected.

Scoring knobs

The three-force scoring formula and its lifecycle thresholds are all env-configurable (see engine/config.py and docs/scoring.md): GENESYS_ACTR_DECAY, GENESYS_RELEVANCE_VECTOR_WEIGHT, GENESYS_RELEVANCE_KEYWORD_WEIGHT, GENESYS_MIN_CONNECTIVITY, GENESYS_FORGETTING_THRESHOLD, the GENESYS_DORMANCY_* transition thresholds, and the GENESYS_CORE_* promotion weights.

See .env.example for all options.

Built by

Papez is built by Rishi Meka at Astrix Labs. It came out of frustration with re-explaining project context to Claude every session. The goal is the intelligence layer between your LLM and your memory — fully open source.

Contributing

See CONTRIBUTING.md.

License

AGPL-3.0-or-later

Note: Papez releases prior to v0.3.6 were documented as Apache 2.0 in error. The LICENSE file has always contained the AGPLv3 text. From v0.3.6 onward, all documentation correctly references AGPL-3.0-or-later with a Contributor License Agreement.

Instalación

TypingMind
{
  "mcpServers": {
    "papez": {
      "command": "python3",
      "args": [
        "-m",
        "genesys_memory"
      ]
    }
  }
}

Usa el MCP de Genesys con varios modelos de IA

TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que, una vez conectado Genesys, puedes usarlo con distintos modelos de IA en TypingMind sin tener que configurarlo por separado para cada modelo. Esta integración MCP se ejecuta localmente en tu dispositivo a través del conector MCP de TypingMind.

Guía de configuración para usar el conector local

Usa esta opción si el servidor MCP necesita acceder a archivos locales, aplicaciones o recursos privados de tu ordenador.

1

Abre los ajustes de MCP

En TypingMind, ve a Ajustes, luego a Ajustes avanzados y a Model Context Protocol, y elige Configurar conector.

  1. Abre TypingMind en tu navegador.
  2. Haz clic en el icono de Ajustes.
  3. Ve a Ajustes avanzados.
  4. Abre la sección Model Context Protocol.
  5. Haz clic en Configurar conector y elige Este dispositivo.
Pantalla de configuración del conector MCP de TypingMind con «Este dispositivo» seleccionado
2

Ejecuta el comando del conector

Elige Este dispositivo, copia el comando de TypingMind y ejecútalo en Terminal. Mantén el proceso en ejecución mientras uses MCP.

  1. Copia el comando de configuración que muestra TypingMind.
  2. Abre Terminal en macOS o Windows Terminal en Windows.
  3. Pega y ejecuta el comando.
  4. Acepta la instalación del paquete si Terminal te pide confirmación para continuar.
  5. Mantén el proceso en ejecución en la ventana de Terminal mientras uses las herramientas MCP.
3

Añade Genesys como servidor

Cuando el estado del conector sea «Listo», haz clic en «Edita servidores» y pega la configuración del servidor MCP.

  1. Espera hasta que el estado del conector indique «Listo».
  2. Haz clic en Edita servidores.
  3. Pega la configuración del servidor MCP de Genesys.
  4. Guarda la lista de servidores.
  5. Actualiza para comprobar que el conector sigue listo.
Ajustes de MCP de TypingMind con un servidor activo y el botón «Edita servidores»
{
  "mcpServers": {
    "papez": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Úsala con distintos modelos

Guarda la lista de servidores, abre Plugins, activa las herramientas MCP de Genesys y selecciona cualquier modelo de IA compatible en TypingMind para usar las herramientas en el chat o asignárselas a un agente de IA.

  1. Abre la página Plugins en TypingMind.
  2. Activa las herramientas MCP de Genesys.
  3. Inicia un chat y elige el modelo de IA que quieras usar.
  4. Usa las herramientas MCP en el chat o asígnalas a un agente de IA.
  5. Cambia a otro modelo de IA cuando lo necesites sin volver a conectar MCP.
Chat de TypingMind que usa herramientas MCP activadas con un modelo de IA seleccionado
¿Puedes usar Genesys para ayudarme con esta tarea?
Genesys
Claro. Lo he leído.
Esto he encontrado usando Genesys.

Preguntas frecuentes

¿Para qué sirve el servidor MCP Genesys?

Genesys es un servidor MCP que permite a los clientes de IA compatibles conectarse a herramientas y contexto externos. En TypingMind, basta con añadir este servidor MCP una vez para que sus herramientas estén disponibles en tu espacio de trabajo de IA.

¿Puedo usar el servidor MCP Genesys con varios modelos de IA en TypingMind?

Sí. TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que puedes usar Genesys con distintos modelos de IA, como Claude, ChatGPT, Gemini u otros que hayas configurado en TypingMind, sin configurar el servidor MCP por separado para cada modelo.

¿Por qué usar el conector MCP de Genesys con TypingMind?

TypingMind es una de las mejores interfaces de chat con LLM porque reúne varios modelos de IA, prompts, plugins, agentes de IA, claves de API y herramientas MCP en un solo espacio de trabajo. Con Genesys conectado, puedes usar sus herramientas MCP con tus modelos preferidos y mantener organizado tu flujo de trabajo de chat en TypingMind.

¿Cómo conecto el servidor MCP Genesys a TypingMind?

Genesys funciona a través del conector MCP local de TypingMind. Es la mejor opción cuando el servidor MCP necesita acceder a archivos locales, aplicaciones de escritorio, herramientas de línea de comandos o recursos privados de tu ordenador.

¿Qué herramientas ofrece el servidor MCP Genesys en TypingMind?

Genesys ofrece funciones MCP que puedes activar desde la página Plugins de TypingMind y usar en el chat o asignar a agentes de IA.

¿Tengo que compartir mis claves de API con TypingMind para usar el servidor MCP Genesys?

No. TypingMind prioriza el funcionamiento local y te permite mantener el control de tus proveedores de modelos, claves de API, prompts y configuración MCP. Si Genesys requiere autenticación, añade las cabeceras, los ajustes de OAuth o la configuración local necesarios para ese servidor MCP al crear la conexión.

Servidores MCP relacionados

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇