SuperAPI AI Directory

context-keeper

LLM-driven context and memory management: short- and long-term memory with vector, timeline and knowledge graph retrieval plus reranking.

Open website

About this tool

Context-Keeper is an LLM-driven intelligent memory and context management system, positioned as an AI memory management and intelligent context-awareness platform, and also involving RAG retrieval-augmented generation and vector retrieval engines. Its goal is to redefine the memory boundaries of AI assistants, making every conversation meaningful.

Purpose

Context-Keeper mainly solves the problem that AI tools lack continuous memory capability, avoiding the need for developers to repeatedly explain project background to AI assistants every day. By building a continuous memory and knowledge accumulation system, it reduces repetitive explanations and discussions, shortens new employee training time, provides intelligent suggestions based on historical experience, and systematically accumulates team wisdom.

Main Capabilities

The system has undergone two versions of iteration, and its core capabilities include:

  • Short-term memory: stores complete recent conversations, uses the local file system, and ensures high-speed access.
  • Long-term memory: stores summaries of key information, uses a vector database for permanent storage.
  • Progressive compression: information gradually transforms from detailed records in short-term memory into semantic summaries in long-term memory.
  • Session isolation: each user has an independent session space, ensuring data security and privacy protection.
  • Workspace isolation: the context of different projects/workspaces is completely isolated, avoiding information cross-talk.
  • Personalized memory strategy: automatically adjusts memory thresholds and summarization strategies according to the user's work style.
  • Cross-session knowledge transfer: establishes intelligent associations between different sessions of the same user.
  • Memory ID (memoryID): the "complete memory" from the user's perspective, corresponding to a work task or topic.
  • Batch ID (batchID): the "storage unit" from the system's perspective, corresponding to a continuous conversation segment.
  • Intelligent importance assessment: automatically identifies key decision points, ensuring that core content is permanently preserved.

Phase two achieved two key breakthroughs on the basis of phase one:

  1. LLM-driven broad recall + fine ranking architecture: builds an LLM-driven architecture of "intent understanding → broad recall → fine ranking → intelligent synthesis".
  2. Intelligent context management: four-dimensional unified context model + LLM-driven full-lifecycle intelligent management.

The four-dimensional unified context model serves as the carrier of context information and, through an LLM-driven intelligent management mechanism, realizes full-lifecycle management of context from initial construction → filling and refinement → intelligent analysis & context update (repeating cyclically). Its features include: the unified context model as the data storage cornerstone of four-dimensional collaboration; full-lifecycle coverage of the complete management chain from initial construction to cyclic changes; every management step involves LLM participation in decision-making, rather than a traditional rule engine; based onreal-time context change detection through semantic analysis; LLM-driven intelligent conflict resolution and priority arbitration, achieving conflict-free merging.

Usage

Before deploying Context-Keeper, the following infrastructure needs to be prepared:

  • Vector storage: a unified vector storage interface has been designed, which can be extended as needed, supporting Alibaba Cloud DashVector (can be applied for in the Alibaba Cloud console), JD Cloud Vearch (can be applied for in JD Cloud), and custom implementation of other vector storages based on the unified interface (such as Milvus, Weaviate, etc.).
  • Timeline storage: TimescaleDB/PostgreSQL needs to be installed by yourself.
  • Knowledge graph and association analysis: Neo4j needs to be installed by yourself.
  • Large model configuration: supports local and cloud large models. Local is based on the Ollama framework, and the installation command is curl -fsSL https://ollama.ai/install.sh | sh, install models as needed such as ollama pull deepseek-coder-v2:16b, supports CodeQwen, DeepSeek Coder, Llama, etc.; for the cloud, simply apply for the corresponding LLM vendor API key, supporting OpenAI, DeepSeek, Claude, Tongyi Qianwen, etc.
  • Configuration file: based on the project's actual config/.env configuration file and config/llm_config.yaml Configuration file.

Applicable Scenarios

Context-Keeper is suitable for development scenarios that require an AI assistant to have continuous memory and context-awareness capabilities, such as reducing repeated explanations of project background in team collaboration, helping new members quickly become familiar with complex projects, assisting decision-making based on historical experience, cross-session knowledge transfer, and the accumulation of team knowledge assets.

Limitations and Planning

The project adopts a phased evolution strategy. The third phase is knowledge graph capability (the core has been completed), with a time window from Q4 2025 to Q1 2026. The core goal is deep integrated retrieval of knowledge graphs and vector semantics, including enterprise knowledge graph construction, a relationship reasoning engine, and cross-project knowledge reuse. The expected indicators are knowledge graph coverage of 90%+, relationship reasoning accuracy of 85%+, and cross-project knowledge reuse rate of 70%+. The fourth phase is enterprise-level deployment (Q1 2026), with the core goal of building enterprise-level SaaS services and global deployment capabilities, including a multi-tenant SaaS architecture, a security and compliance system, and global deployment.

The project is open-sourced under the MIT License, and free use, modification, and distribution are welcome. The project initiator and chief architect is @weixiaofeng, and the LLM architect is @lixiao.