LycheeMem  by LycheeMem

Lightweight long-term memory for LLM agents

Created 3 months ago
1,116 stars

Top 33.6% on SourcePulse

GitHubView on GitHub
Project Summary

LycheeMemory provides a lightweight, long-term memory framework for LLM agents, enhancing their capabilities through efficient conversational memory management. It offers structured organization, lightweight consolidation, and adaptive retrieval, supporting diverse agent runtimes via plugins, MCP, or Python integration. The system aims to improve agent performance, reduce token consumption, and lower operational costs.

How It Works

The framework utilizes a four-tiered memory architecture: Working Memory (context window management), Semantic Memory (hierarchical tree of structured records using SQLite/LanceDB), Procedural Memory (skill store for reusable actions), and Visual Memory (multimodal understanding). A four-stage pipeline orchestrates request processing, featuring action-aware hierarchical retrieval and a background consolidation agent. Key innovations include conflict-aware record fusion, hierarchical memory trees, and multimodal memory with dual text/visual embeddings, enabling nuanced recall and knowledge persistence.

Quick Start & Requirements

  • Install: pip install lycheemem or pip install "lycheemem[rerank]" (for transformer reranker).
  • Prerequisites: Python 3.9+, LLM API key (OpenAI, Gemini, or litellm-compatible). PyTorch/Transformers required for [rerank] extra.
  • Run: Start backend with lycheemem-cli. Web demo available (web-demo/, npm install, npm run dev).
  • Config: .env file for LLM/embedder credentials.
  • Docs: Interactive API docs at /docs.

Highlighted Details

  • Demonstrated ~6% score improvement on PinchBench with OpenClaw, reducing token usage by ~71% and cost by ~55%.
  • Integrates with agent runtimes via native OpenClaw plugin, HTTP MCP endpoint, or Python API.
  • Features novel Visual (Multimodal) Memory and Procedural Memory (Skill Store) modules.
  • Transformer memory reranker v0 enhances semantic memory search evidence selection.

Maintenance & Community

The project is open-source on GitHub. No specific details on maintainers, sponsorships, or community channels (e.g., Discord, Slack) are provided in the README.

Licensing & Compatibility

The README does not explicitly state the software license. Compatibility notes for commercial use or closed-source linking are absent.

Limitations & Caveats

The transformer reranker is experimental. Integration relies on external LLM providers and specific runtime support (OpenClaw, MCP). The absence of a stated license may pose adoption risks.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
900 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.