Persistent memory layer for AI agents and LLM applications.
Project description
🧠 AviMind
The open-source memory layer that gives AI agents long-term memory through semantic search, hybrid retrieval, intelligent ranking, and automatic deduplication.
AviMind is an open-source persistent memory engine for AI agents and LLM-powered applications. It enables applications to remember user preferences, business context, conversations, and long-term knowledge across sessions.
Unlike traditional chat history, AviMind combines semantic search, hybrid ranking, keyword awareness, and memory importance scoring to retrieve the most relevant context for your AI applications.
✨ Features
- ✅ Persistent long-term memory
- ✅ Semantic search with embeddings
- ✅ Hybrid retrieval (semantic + keyword ranking)
- ✅ Automatic duplicate detection
- ✅ Memory importance scoring
- ✅ Intelligent context retrieval
- ✅ FastAPI REST APIs
- ✅ SQLite backend (zero configuration)
- ✅ Docker support
- ✅ Python SDK
- 🚧 PostgreSQL support (planned)
- 🚧 pgvector integration (planned)
- 🚧 Redis session memory (planned)
💡 Why AviMind?
Most AI agents forget everything after a conversation ends.
AviMind acts as a reusable memory layer that enables applications to remember:
- User preferences
- Business context
- Long-term facts
- Agent decisions
- Tool outputs
- Organizational knowledge
- Previous conversations
Instead of relying solely on exact keyword matching, AviMind uses embeddings and hybrid retrieval techniques to surface the most relevant memories automatically.
🚀 Example Use Cases
- AI chatbots with persistent memory
- Enterprise AI copilots
- Agentic workflows
- Customer support assistants
- Personal AI assistants
- Research assistants
- Knowledge management platforms
- LLM applications requiring long-term context
⚡ Quick Start
Clone the repository
git clone https://github.com/avinashmhto/avimind.git
cd avimind
Create a virtual environment
python -m venv .venv
Windows (Git Bash)
source .venv/Scripts/activate
Linux / macOS
source .venv/bin/activate
Install dependencies
pip install -r requirements.txt
Run AviMind Locally
uvicorn avimind_server.main:app --reload
Open Swagger UI:
http://127.0.0.1:8000/docs
🐳 Run with Docker
Build and start AviMind:
docker compose up --build
Once the container is running, open:
http://localhost:8000/docs
To stop the service:
docker compose down
AviMind uses SQLite by default and stores its database in the local data/ directory, so no external database is required to get started.
🐍 Python SDK
AviMind ships with a lightweight Python SDK that makes integration straightforward.
Create a client
from avimind import AviMind
client = AviMind("http://localhost:8000")
Store a memory
client.remember(
user_id="avinash",
agent_id="sdk-agent",
session_id="chat-001",
memory_type="profile_memory",
content="User prefers AWS Singapore region.",
tags=["aws", "preference"],
importance=0.9,
)
Search memories
results = client.search(
user_id="avinash",
query="Which cloud region does the user prefer?"
)
print(results)
Retrieve context
context = client.context(
user_id="avinash",
query="Which cloud region does the user prefer?"
)
print(context)
Check server health
status = client.health()
print(status)
Delete a memory
client.delete("memory-id")
The SDK currently supports:
health()
remember()
search()
context()
delete()
---
# 📝 Example
## Store a Memory
```json
{
"user_id": "avinash",
"agent_id": "goal-agent",
"session_id": "goal-001",
"memory_type": "goal_memory",
"content": "User is building AviMind as an open-source persistent memory engine for AI agents.",
"source": "manual",
"created_by": "human",
"tags": [
"startup",
"avimind",
"opensource"
],
"importance": 1.0
}
Retrieve Context
Query:
What startup is the user building?
Response:
{
"context": [
"User is building AviMind as an open-source persistent memory engine for AI agents."
]
}
AviMind retrieves relevant memories using semantic understanding and hybrid ranking, even when the query wording differs from the original stored text.
🏗️ Core Capabilities
| Capability | Status |
|---|---|
| Persistent Memory | ✅ |
| Semantic Search | ✅ |
| Hybrid Retrieval | ✅ |
| Automatic Deduplication | ✅ |
| Memory Ranking | ✅ |
| Context Retrieval | ✅ |
| FastAPI REST API | ✅ |
| SQLite Backend | ✅ |
| Docker Support | ✅ |
| Python SDK | ✅ |
| PostgreSQL Backend | 🚧 Planned |
| pgvector Integration | 🚧 Planned |
| Redis Session Memory | 🚧 Planned |
🚧 Current Status
Version: v0.4
Implemented:
- Persistent memory storage
- Semantic search
- Hybrid retrieval (semantic + keyword ranking)
- Automatic duplicate detection
- Memory importance scoring
- Context retrieval APIs
- SQLite backend
- Docker support
- REST APIs with Swagger documentation
🛣️ Roadmap
v0.4
- Python SDK
- Memory update APIs
- Memory listing APIs
- Memory expiration policies
with:
v0.5
- Memory update APIs
- Memory listing APIs
- Memory expiration policies
- Publish SDK to PyPI
- Authentication support for SDK
v1.0
- PostgreSQL backend
- pgvector integration
- Redis session memory
- Multi-tenant support
- OpenAI integration
- Ollama integration
- LangGraph integration
- MCP compatibility
- Cloud deployment guides
🤝 Contributing
Contributions, ideas, feature requests, and pull requests are welcome.
If AviMind helps your AI applications become smarter and more context-aware, please consider giving the project a ⭐ on GitHub.
📄 License
Released under the MIT License.
👨💻 Author
Avinash Mahto
Building practical infrastructure for AI agents, enterprise GenAI, cloud-native platforms, and intelligent memory systems.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file avimind-0.4.0.tar.gz.
File metadata
- Download URL: avimind-0.4.0.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf68f20bbb94ef1e455a32dde014fb8c1cdb9c4c9888b873166812cd804df12b
|
|
| MD5 |
aec94fcfa2a764e6c9b93a582b113ad2
|
|
| BLAKE2b-256 |
0f1a9a2dd2a5edf74decb7bc8a1e3a705b6e8230ba7174a32e8fc502e0478914
|
File details
Details for the file avimind-0.4.0-py3-none-any.whl.
File metadata
- Download URL: avimind-0.4.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e428ae7ee6fc7f81502126060b826018b9a5eb4bf0ff796e348dff6cf9aeb4e
|
|
| MD5 |
fa3cc938cec1bd5fb0d0265f54ae29e5
|
|
| BLAKE2b-256 |
f7fe74eca8bb504c616e3e8a1f7708be9c89d3f7778bb534b3b4d0f36ae8b168
|