mem9  by mem9-ai

Persistent cloud memory for AI agents

Created 2 months ago
1,083 stars

Top 34.7% on SourcePulse

GitHubView on GitHub
Project Summary

Persistent Memory for AI Agents. mem9 provides a server-based persistent memory solution, mnemo-server, to overcome the amnesia and memory silos inherent in AI coding agents like Claude Code, OpenCode, and OpenClaw. By enabling shared, cloud-persistent memory, it allows agents to retain knowledge across sessions, break down data silos, and facilitate team collaboration through a unified memory pool.

How It Works

The architecture centers on stateless agent plugins that communicate with a central mnemo-server. This server leverages TiDB Cloud Starter as its backend, offering a free tier, native VECTOR data type for hybrid vector and keyword search, and server-side auto-embedding (EMBED_TEXT) without requiring external API keys for semantic operations. This design decouples memory from agent instances, simplifying deployment and enabling seamless memory sharing across multiple agents and users.

Quick Start & Requirements

Deployment involves running the mnemo-server (via Go or Docker) and installing platform-specific agent plugins. Server setup requires Go or Docker and a TiDB connection string (MNEMO_DSN). Agent plugins are integrated via configuration files or marketplace commands. After deploying the server, a tenant is provisioned via API (POST /v1alpha1/mem9s), and MEM9_API_URL and MEM9_API_KEY environment variables are set for agent communication. TiDB Cloud Starter provides a free tier and zero-ops provisioning for the first 30 days.

Highlighted Details

  • Stateless Agents: Agent plugins are designed to be state-agnostic, with all memory managed centrally by mnemo-server, simplifying scaling and multi-instance deployments.
  • Hybrid Search: Utilizes TiDB's native VECTOR type for efficient combined vector and keyword-based memory retrieval.
  • Server-Side Embeddings: The EMBED_TEXT function in TiDB generates embeddings directly, removing the dependency on external LLM API keys for semantic search functionality.
  • TiDB Cloud Starter Integration: Offers a generous free tier (25 GiB storage, 250M RUs/month), zero-ops database management, and MySQL compatibility.

Maintenance & Community

The project roadmap indicates Phase 1 (core server, CRUD, auth, hybrid search, upsert, plugins) is complete. Planned future phases include LLM-assisted conflict merging, auto-tagging, a web dashboard, bulk import/export, and a CLI wizard. Contribution guidelines are available via CONTRIBUTING.md. No specific community links (Discord, Slack) are listed in the README.

Licensing & Compatibility

The project is licensed under the Apache-2.0 license. This permissive license generally allows for commercial use and integration into closed-source projects without significant restrictions.

Limitations & Caveats

The project is actively under development, with significant features like LLM-assisted conflict merging, auto-tagging, and a web dashboard planned for future releases. The Vector Clock CRDT feature has been deferred and removed from the roadmap. The current state suggests it may not yet be feature-complete for all advanced memory management scenarios.

Health Check
Last Commit

9 hours ago

Responsiveness

Inactive

Pull Requests (30d)
73
Issues (30d)
19
Star History
147 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.