Add production-grade memory with hybrid search to any AI agent
A

Add production-grade memory with hybrid search to any AI agent

Add production-grade memory with hybrid search to any AI agent

4,444 stars
N/A forks
N/A contributors

README

Project documentation from GitHub

Give Your AI Agent a Real Memory

Building an AI agent that can hold a coherent conversation beyond a single session is tough. You can bolt on a vector store, but getting production-ready, long-term memory with the nuance of semantic and keyword search often means a complex, multi-service setup. What if you could add that capability in a few lines of code?

That's the idea behind memory-lancedb-pro. It's a drop-in memory module designed to give any AI agent—whether it's a chatbot, an analysis tool, or an automation assistant—a persistent, searchable memory using LanceDB's hybrid search. No more starting from scratch every time.

What It Does

In short, this package provides a production-grade memory system for AI agents. It uses LanceDB as the backend, which is an embedded vector database that's fast and doesn't require a separate server. The key feature is hybrid search: it combines semantic (vector) search with traditional keyword (full-text) search. This means your agent can find relevant past interactions based on the meaning and specific terms used, making memory retrieval much more accurate and context-aware.

You feed it conversation turns, documents, or any text data. It stores them with embeddings and metadata. Later, when your agent needs context, you query this memory, and it returns the most relevant snippets using that hybrid approach.

Why It's Cool

The "pro" in the name hints at its focus on being ready for real use. It's not just a prototype.

  • Hybrid Search Out-of-the-Box: Combining BM25 keyword scoring with cosine similarity for vector search is a known best practice for relevance, but implementing it yourself is a chore. This handles it automatically.
  • LanceDB is a Great Fit: Being an embedded database, it simplifies deployment dramatically. You get powerful vector search without managing a separate database process. It's just files on disk.
  • It's an Agent-First Module: It's designed to be integrated into existing agent frameworks or custom loops. You can slot it into a LangChain agent, an AutoGen workflow, or your own Python-based bot with minimal fuss.
  • Handles the Chunking and Embedding: It manages the process of breaking down text into sensible chunks and generating embeddings for you, though you can customize this if needed.

How to Try It

Getting started is straightforward. You'll need Python and an OpenAI API key (or another compatible embedding provider).

  1. Install the package:

    pip install memory-lancedb-pro
    

Did you like this issue?

Join our weekly newsletter

Love discovering amazing projects?

Help us continue bringing you the best open-source discoveries every week.

Back to Projects
Last updated: Apr 5, 2026