SuperAPI AI Directory

hipocampo

Bilingual (English/Spanish) dual-memory system on PostgreSQL, pgvector and NVIDIA NIM with progressive retrieval, deduplication, checkpoints and auto-repair.

Open website

About this tool

Hipocampo is a dual-memory persistence architecture for autonomous AI agents, designed to preserve technical knowledge and user profile data across sessions, enabling agents to learn, adapt, and scale efficiently. It is built on PostgreSQL 17 and pgvector, and includes the hybrid retrieval engine BIRE v3.7 (combining semantic embeddings, lexical expansion, GIN trigram search, and dynamic score fusion), as well as an experimental sparse selective cache (SSC) pipeline.

Purpose and Positioning Hipocampo addresses the lack of long-term memory in AI agents by using independent storage layers to preserve technical records (memoria_vectorial) and user profiles (memory_items), and implements cross-system semantic search based on 1024-dimensional embeddings. It is suitable for agent scenarios that require contextual continuity, error learning, and knowledge reuse.

Main Capabilities

  • Dual-memory architecture: Separates technical records and user profiles, both using 1024-dimensional embeddings.
  • BIRE v3.7 hybrid search: The default retrieval engine, combining local embeddings (Ollama qwen3-embedding:0.6b), query expansion, GIN trigram, and composite scoring, used by all MCP tools.
  • SSC (experimental): A four-stage progressive pipeline: tag routing → pgvector Top-K → GIN Trigram → ILIKE fallback.
  • Logarithmic checkpoints: Compresses historical memory based on time decay, merging 24-hour details into 90-day checkpoints.
  • Automatic tagging engine: A regex-based rule engine that automatically classifies and tags records at persistence time.
  • Hybrid prompt compression (v4.0): Two-stage compression, with extractive (sentence-level) processing for general text and LLM summarization (via the configured embedding endpoint) for technical/code content, reducing tokens by 20-50%.
  • Memory graph (v4.0): A directed graph of semantic relationships between memories, supporting links, BFS tree navigation, and shortest path finding.
  • Memory hierarchy and trigger prevention (v4.1): Three-level memory (episodic → semantic → automatic), supporting contextual triggers (such as trigger:php), with automatic rules permanently retained.
  • Code immune system (v4.2): Prevents agents from breaking working code through a three-step loop of pre-edit snapshots, post-edit validation, and creation of permanent rules when breakage occurs.
  • Code RAG (v4.0): Indexes project source code (PHP, JS, TS, Python, SQL) as semantic embeddings; search returns real code snippets.
  • Exponential time decay (v4.0): final_score = relevance × exp(-λ × days), λ=0.05 configurable, 20% floor.
  • MMR diversity anti-clustering (v4.3): Maximal Marginal Relevance reranking prevents dense embedding clusters from monopolizing results.
  • Active forgetting and archiving (v5.0): Episodic memories exceeding the age threshold are archived to cold storage, protecting automatica, semantica, and critico levels.
  • Memory fatigue boost (v5.0): Boosts ranking based on access frequency, simulating the brain reinforcing neural pathways.
  • Memory budget and tiering (v5.0): Manages three tiers—HOT (full embeddings), WARM (no embeddings), COLD (archived)—with a hot tier cap of 5000 entries.
  • Contradiction detection (v5.0): On save, uses negation probe embeddings to detect factual contradictions, logs a warning and creates a contradicts link, without blocking the save.
  • File watcher (v5.0): Monitors directory changes and automatically reindexes, managed by a systemd timer.
  • Link weight decay (v4.3): Memory graph links decay exponentially (half-life 90 days), pruned below 0.01.
  • Latent knowledge preservation (v4.3): Four layers automatically protect trade_knowledge, never decay, and automatically classify reusability.
  • Session memory and auto-summary: Session-isolated save/search, automatically generates a session summary after 20 saves.
  • MCP server: FastMCP server provides 39 tools, supporting clients such as Claude Desktop and OpenCode.
  • Optional TypeSafe integration: Delegates semantic judgments to the TypeSafe model, returns calibrated probabilities, supports batch calls and graceful fallback.

How to use Provides a one-click installation script (Linux/macOS) that automatically installs PostgreSQL + pgvector, embeddings, the database, a virtual environment, the MCP client, and systemd maintenance services. Windows requires running via WSL2. You can also connect to Hugging Face Spaces' free MCP server for testing (data is temporary and lost on restart), or run locally and connect to an external database (Neon, Supabase, etc.). The embedding model uses sentence-transformers/all-MiniLM-L6-v2 (384 dimensions) via the Hugging Face Inference API.

Use cases Suitable for autonomous AI agent development that requires cross-session memory, learning from errors, code regression protection, and project knowledge reuse, especially for client integrations using the MCP protocol.

Limitations Hugging Face free-tier data is temporary and only for testing. SSE transport has been deprecated since MCP specification 2025-03-26; Streamable HTTP is recommended. Windows pure CMD/PowerShell cannot run the installation script. TypeSafe is in early access, requires your own API key, and when enabled sends memory text to its API. Some features (such as SSC) are marked as experimental.