memori  by GibsonAI

LLM memory engine for context-aware AI

Created 1 month ago
942 stars

Top 38.8% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

The GibsonAI/memori repository provides an open-source memory engine designed to enhance Large Language Models (LLMs), AI agents, and multi-agent systems by enabling human-like memory capabilities. It addresses the challenge of LLMs lacking persistent context across conversations, allowing them to "remember" past interactions and information. This benefits developers building more sophisticated and context-aware AI applications by reducing repetitive context input and enabling more intelligent, personalized interactions.

How It Works

Memori operates through a "dual-mode" memory system: "Conscious Mode" for short-term working memory and "Auto Mode" for dynamic database search. Conscious Mode mimics human short-term memory by promoting key conversations to a readily accessible state, injected once at the start of a session. Auto Mode continuously analyzes user queries and searches the entire memory database for relevant context, injecting it with each LLM call. This approach leverages Pydantic for structured, validated memory processing and supports flexible database connections (SQLite, PostgreSQL, MySQL), aiming for a simple, reliable architecture.

Quick Start & Requirements

  • Install: pip install memorisdk
  • Prerequisites: OpenAI API Key (set via export OPENAI_API_KEY="sk-your-openai-key-here"). LiteLLM is recommended for easy integration with various LLM providers (pip install litellm).
  • Setup Time: Minimal, primarily involves setting the API key and running the provided Python script.
  • Docs/Demos: Examples, Framework Integrations, Interactive Demos.

Highlighted Details

  • Universal recording works with any LLM library (LiteLLM, OpenAI, Anthropic).
  • Supports integration with popular AI frameworks like LangChain, CrewAI, Agno, and Swarms.
  • Offers memory retrieval tools for function calling within LLMs.
  • Provides interactive demos for personal diary assistants, travel planners, and researcher agents.

Maintenance & Community

  • Community support is available via Discord.
  • Contribution guidelines are available in CONTRIBUTING.md.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: Permissive MIT license generally allows for commercial use and linking with closed-source projects.

Limitations & Caveats

The README does not explicitly detail limitations, performance benchmarks, or potential scaling issues with very large memory databases. The "conscious ingest" feature's automatic promotion of "essential conversations" is described but lacks specific algorithmic details on how "importance" is determined.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
36
Issues (30d)
13
Star History
826 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.