mudler/LocalRecall
Snapshot of mudler/LocalRecall: 988★, Go. :brain: 100% Local Memory layer and Knowledge base for agents with WebUI
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Snapshot
Top contributors
Show top contributors
Your AI. Your Hardware. Your Rules.
A lightweight, no-frills RESTful API designed for managing knowledge bases and files stored in vector databases—no GPU, internet, or cloud services required! LocalRecall provides a simple and generic abstraction layer to handle knowledge retrieval, ideal for AI agents and chatbots to manage both long-term and short-term memory seamlessly.
Currently, LocalRecall is batteries included and supports multiple vector database engines:
- Chromem: Local file-based vector store (default)
- PostgreSQL: Production-ready PostgreSQL with TimescaleDB, pgvector, and pgvectorscale for hybrid search (BM25 + vector similarity)
It can easily integrate with LocalAI, LocalAGI, and other agent frameworks, offering an intuitive web UI for convenient file management, including support for raw text inputs.
Caller-supplied vectors
The PostgreSQL-only /api/raw/v1 API stores caller-supplied vectors without invoking an embedding model.
It supports vector, BM25, and hybrid retrieval in a namespace separate from legacy collections.
See the raw vector API guide for deployment, request examples, consistency limits, and verification.
In-process agent memory
Go consumers can use the optional rag.PersistentKB memory API for stable,
collection-scoped identities, immutable payload hashes, durable receipts,
backend-issued fences, recovery, and exact deletion with tombstones. PostgreSQL
supports distributed consumers; chromem is limited to a single lifetime owner
on a local filesystem and does not support distributed fencing. The LocalAI
RAG storage engine and unknown/custom engines explicitly report unsupported.
Check MemoryCapabilities before using BeginMemoryAttempt, WriteMemory,
ReconcileMemory, or DeleteMemoryEntry. Queue leases alone do not fence writes.
This additive Go API does not extend the mandatory rag.Engine interface, change
legacy Upload semantics, or add remote HTTP memory endpoints. See the
agent memory backend guide for the canonical hash
encoding, claim/fence handoff, errors, recovery states, engine limits, and the
model-download-free sh test/memory/verify.sh acceptance gate.
📚🆕 Local Stack Family
🆕 LocalAI is now part of a comprehensive suite of AI tools designed to work together:
|
LocalAILocalAI is the free, Open Source OpenAI alternative. LocalAI act as a drop-in replacement REST API that's compatible with OpenAI API specifications for local AI inferencing. Does not require GPU. |
|
LocalAGIA powerful Local AI agent management platform that serves as a drop-in replacement for OpenAI's Responses API, enhanced with advanced agentic capabilities. |
🌟 Features
- ⚡ RESTful API: Simple and intuitive REST interface for knowledge management.
- 📡 Fully Local: Operates offline without external cloud dependencies.
- 📚 RAG Knowledgebase: Retrieve-Augmented Generation (RAG) compatible with multiple vector databases.
- 🗃️ Memory Management: Ideal for AI-driven applications requiring memory abstraction.
- 📂 File Support:
- ✅ Markdown
- ✅ Plain Text
- ⏳ More formats coming soon!
⚙️ Prerequisites
- Go 1.16 or higher
- Docker (optional, for containerized deployment)
🚧 Quickstart
📥 Clone Repository
git clone https://github.com/mudler/LocalRecall.git
cd LocalRecall
🛠️ Build from Source
go build -o localrecall
▶️ Run Application
./localrecall
Your web UI will be available at http://localhost:8080.
🐳 Docker Deployment
Using Chromem (Default)
Build and run using Docker:
docker build -t localrecall .
docker run -ti -v $PWD/state:/state \
-e COLLECTION_DB_PATH=/state/db \
-e EMBEDDING_MODEL=granite-embedding-107m-multilingual \
-e FILE_ASSETS=/state/assets \
-e OPENAI_API_KEY=sk-1234567890 \
-e OPENAI_BASE_URL=http://localai:8080 \
-p 8080:8080 localrecall
# Or use the images already built by the CI:
docker run -ti -v $PWD/state:/state \
-e COLLECTION_DB_PATH=/state/db \
-e EMBEDDING_MODEL=granite-embedding-107m-multilingual \
-e FILE_ASSETS=/state/assets \
-e OPENAI_API_KEY=sk-1234567890 \
-e OPENAI_BASE_URL=http://localai:8080 \
-p 8080:8080 quay.io/mudler/localrecall
Using PostgreSQL (Recommended for Production)
For production deployments, PostgreSQL provides better performance, scalability, and hybrid search capabilities (combining BM25 keyword search with vector similarity search).
Quick Start with Docker Compose
The easiest way to get started with PostgreSQL is using Docker Compose:
docker compose up -d
This will start:
- LocalAI: For embeddings (port 8081)
- PostgreSQL: With TimescaleDB, pgvector, and pgvectorscale extensions (port 5432)
- LocalRecall: RAG server configured to use PostgreSQL (port 8080)
Manual Setup
- Start PostgreSQL (using the pre-built image):
docker run -d \
--name localrecall-postgres \
-e POSTGRES_DB=localrecall \
-e POSTGRES_USER=localrecall \
-e POSTGRES_PASSWORD=localrecall \
-p 5432:5432 \
-v postgres_data:/var/lib/postgresql/data \
quay.io/mudler/localrecall:latest-postgresql
- Start LocalRecall with PostgreSQL:
docker run -ti \
-e DATABASE_URL=postgresql://localrecall:localrecall@localhost:5432/localrecall?sslmode=disable \
-e VECTOR_ENGINE=postgres \
-e EMBEDDING_MODEL=granite-embedding-107m-multilingual \
-e FILE_ASSETS=/assets \
-e OPENAI_API_KEY=sk-1234567890 \
-e OPENAI_BASE_URL=http://localai:8080 \
-e HYBRID_SEARCH_BM25_WEIGHT=0.5 \
-e HYBRID_SEARCH_VECTOR_WEIGHT=0.5 \
-p 8080:8080 \
quay.io/mudler/localrecall
PostgreSQL Features
- Hybrid Search: Combines BM25 (keyword) and vector (semantic) search with configurable weights
- Advanced Indexing:
- GIN indexes for full-text search
- BM25 indexes for keyword search
- DiskANN/HNSW indexes for vector similarity search
- Extensions Included:
pg_textsearch: BM25 keyword searchvectorscale: Advanced vector search with DiskANNpgvector: Vector similarity search (fallback)timescaledb: Time-series capabilities
🌍 Environment Variables
LocalRecall uses environment variables to configure its behavior. These variables allow you to customize paths, models, and integration settings without modifying the code.
| Variable | Description |
|---|---|
COLLECTION_DB_PATH | Path to the vector database directory where collections are stored (for Chromem engine). |
DATABASE_URL | PostgreSQL connection string (required for PostgreSQL engine). Format: postgresql://user:pass@host:port/db?sslmode=disable |
EMBEDDING_MODEL | Name of the embedding model used for vectorization (e.g., granite-embedding-107m-multilingual). |
FILE_ASSETS | Directory path to store and retrieve uploaded file assets. |
OPENAI_API_KEY | API key for embedding services (such as LocalAI or OpenAI-compatible APIs). |
OPENAI_BASE_URL | Base URL for the embedding model API (commonly http://localai:8080). |
LISTENING_ADDRESS | Address the server listens on (default: :8080). Useful for deployments on custom ports or network interfaces. |
VECTOR_ENGINE | Vector database engine to use (chromem by default, postgres for PostgreSQL). |
MAX_CHUNKING_SIZE | Maximum size (in characters) for breaking down documents into chunks. Affects performance and accuracy. |
CHUNK_OVERLAP | Overlap in characters between consecutive chunks (word-aligned). Default: 0. Use to improve context across chunk boundaries. |
HYBRID_SEARCH_BM25_WEIGHT | Weight for BM25 keyword search in hybrid search (default: 0.5, PostgreSQL only). |
HYBRID_SEARCH_VECTOR_WEIGHT | Weight for vector similarity search in hybrid search (default: 0.5, PostgreSQL only). |
POSTGRES_LOCK_TIMEOUT | Per-connection lock_timeout for the PostgreSQL engine (default: 30s). Bounds how long a statement waits to acquire a lock so a single stuck operation cannot make every other statement on the table queue indefinitely. Set to 0/off to disable. |
POSTGRES_IDLE_IN_TRANSACTION_TIMEOUT | Per-connection idle_in_transaction_session_timeout for the PostgreSQL engine (default: 300s). Reaps abandoned transactions that would otherwise pin locks. Set to 0/off to disable. |
POSTGRES_STATEMENT_TIMEOUT | Per-connection statement_timeout for the PostgreSQL engine (default: unset). Bounds total statement runtime; useful to auto-abort a wedged query. Index builds are exempted, so it is safe to enable. Set to 0/off/empty to disable. |
POSTGRES_POOL_MAX_CONNS | Maximum number of connections in the pool of each collection for the PostgreSQL engine (default: 4). Every collection opens its own pool, so the total can reach this value times the number of collections. A pool_max_conns parameter in DATABASE_URL has priority. |
API_KEYS | Comma-separated list of API keys for securing access to the REST API (optional). |
GIT_PRIVATE_KEY | Base64-encoded SSH private key for accessing private Git repositories (optional). |
These variables can be passed directly when running the binary or inside your Docker container for easy configuration.
You can use an .env file to set the variables. The Docker compose file is configured to use an .env file in the root of the project if available.
📖 REST API
Base URL: http://localhost:8080/api
🔧 Manage Collections
- Create Collection:
curl -X POST $BASE_URL/collections \
-H "Content-Type: application/json" \
-d '{"name":"myCollection"}'
- Upload File:
curl -X POST $BASE_URL/collections/myCollection/upload \
-F "file=@/path/to/file.txt"
- List Collections:
curl -X GET $BASE_URL/collections
- List Files in Collection:
curl -X GET $BASE_URL/collections/myCollection/entries
- Get Entry Content:
curl -X GET $BASE_URL/collections/myCollection/entries/file.txt
Returns collection, entry, chunks (array of id, content, metadata), and count.
- Get Entry Raw File:
curl -X GET $BASE_URL/collections/myCollection/entries/file.pdf/raw
Returns the original uploaded binary file with the appropriate Content-Type header.
- Search Collection:
curl -X POST $BASE_URL/collections/myCollection/search \
-H "Content-Type: application/json" \
-d '{"query":"search term", "max_results":5}'
- Reset Collection:
curl -X POST $BASE_URL/collections/myCollection/reset
- Delete Entry:
curl -X DELETE $BASE_URL/collections/myCollection/entry/delete \
-H "Content-Type: application/json" \
-d '{"entry":"file.txt"}'
- Add External Source:
curl -X POST $BASE_URL/collections/myCollection/sources \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com", "update_interval":30}'
The update_interval is specified in minutes. If not provided, it defaults to 60 minutes.
External sources support various URL types:
- Web pages (https://example.com)
- Git repositories (https://github.com/user/repo.git or [email protected]:user/repo.git)
- Sitemaps (https://example.com/sitemap.xml)
For private Git repositories, set the GIT_PRIVATE_KEY environment variable with a base64-encoded SSH private key:
# Encode your private key
export GIT_PRIVATE_KEY=$(cat /path/to/private_key | base64 -w 0)
- Remove External Source:
curl -X DELETE $BASE_URL/collections/myCollection/sources \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com"}'
External sources are automatically monitored and updated in the background. The content is periodically fetched and added to the collection, making it searchable through the regular search endpoint.
🔌 Model Context Protocol (MCP) Integration
LocalRecall can be controlled via MCP (Model Context Protocol) through the LocalRecall MCP Server available in the mcps repository.
The MCP server provides tools for:
- 🔍 Search: Search content in collections
- ➕ Create Collection: Create new collections
- 🔄 Reset Collection: Clear collections
- 📄 Add Document: Upload documents to collections
- 📋 List Collections: List all available collections
- 📁 List Files: List files in a collection
- 🗑️ Delete Entry: Remove entries from collections
Quick Start with MCP
The MCP server can be configured to enable specific tools for security and flexibility:
docker run -e LOCALRECALL_URL=http://localhost:8080 \
-e LOCALRECALL_API_KEY=your-api-key \
-e LOCALRECALL_ENABLED_TOOLS="search,list_collections,add_document" \
ghcr.io/mudler/mcps/localrecall:latest
For more information and configuration options, see the LocalRecall MCP Server documentation.
📝 License
Released under the MIT License.
🤝 Contributing
We welcome contributions! Please feel free to:
- ✅ Open an issue for suggestions or bugs.
- ✅ Submit a pull request with enhancements.
Embedded PostgreSQL namespace isolation
Embedded multi-tenant callers can pass an explicit engine.PostgresScope to
rag.NewPersistentPostgresCollection, engine.NewPostgresDBCollection,
engine.ListPostgresCollections, and engine.PostgresCollectionExists.
Use engine.NewPostgresScope(identity) with a stable, unambiguous identity that
includes both the deployment and principal (including a distinct root identity).
It derives a 58-byte schema identifier using all 256 SHA-256 bits. Never derive
this identity from a transient frontend name or a local filesystem path.
Scoped backends qualify document, registry, journal and destructive operations;
registry discovery does not fall through to legacy tables on the connection's
search path. Scope creation records the full identity atomically. An existing
schema with absent or different identity metadata is rejected with
engine.ErrPostgresScope; it is never adopted. Scoped collection and index
identifiers also use bounded digests, avoiding punctuation/truncation aliases.
Memory document identities include the scope identity.
Omitting the optional scope (or passing its zero value) preserves the legacy API and on-disk/database identities. Scoped mode never migrates, copies, or opens legacy collections automatically. Applications upgrading existing deployments must provide their own explicit legacy-data admission and operator-resolution policy; this primitive does not determine who owns legacy data.
The database role needs schema/extension creation privileges during initial
provisioning. Scoped connections ignore arbitrary DSN search paths for extension
resolution, using PostgreSQL's catalog and the installed extension schemas.
Those schemas, particularly public, must be administered as trusted extension
locations, not be writable by untrusted tenants. This is application-level data
isolation, not a sandbox against arbitrary SQL executed with the same database
role. Missing extensions are provisioned in public; existing installations are
resolved from PostgreSQL's extension catalog.
Related repositories
Master programming by recreating your favorite technologies from scratch.
A curated meta-list of curated lists organized by technology domain. The repository acts as a directory pointing to hundreds of specialized awesome lists covering programming languages, platforms, frameworks, and tooling. All content is community-contributed under the CC0 public domain dedication.
Public APIs is a community-curated GitHub repository listing free, publicly accessible APIs across a wide range of categories, with auth type, HTTPS, and CORS noted for each entry. It's a browsable reference, not a library to install.
REA is an MCP server and CLI that gives AI coding agents the ability to reverse engineer binaries, JavaScript apps, .NET assemblies, and websites. It hooks into Hopper, Ghidra, or IDA Pro for native binary work, or runs static JavaScript analysis with just Node.js. Every investigation returns an Evidence bundle that includes what was found, what was not, and the reasoning path. Setup registers REA with supported agents and walks you through connecting an analysis engine. The CLI also works standalone for terminal-first workflows.
Quick answers
Does mudler/LocalRecall have a project website?
No homepage URL was recorded for mudler/LocalRecall in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
Is mudler/LocalRecall open source?
Yes — mudler/LocalRecall ships under the MIT license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/mudler/LocalRecall.
What is mudler/LocalRecall?
mudler/LocalRecall (mudler/LocalRecall) is a Go project on GitHub. From the project's own README: :brain: 100% Local Memory layer and Knowledge base for agents with WebUI
What license does mudler/LocalRecall use?
mudler/LocalRecall is released under the MIT license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
Where do I read more about mudler/LocalRecall?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/mudler/LocalRecall is the definitive source.
Read full README in the tab above.
Is LocalRecall worth your time?
ChatGPT, Claude and Perplexity can all read this page. Ask one of them what it makes of LocalRecall.