A lightweight memory service for AI applications with pluggable backends.
Project description
A unified memory service for AI applications with pluggable backends.
Kive is not a memory engine itself, but a universal adapter that lets you switch between different memory backends without changing your application code. Just focus on building your AI application, let Kive handle memory complexity.
Core Features
🌱 Unified Memory API
No matter which backend you choose, the API stays the same:
# Start server - choose your memory engine
from kive.server import Server
from kive.server.engines import Cognee
engine = Cognee(llm_provider="openai", llm_api_key="YOUR_KEY")
server = Server(engine=engine, port=12306)
server.run()
# Connect with client - same API for all engines
from kive.client import Client
client = Client("http://localhost:12306")
await client.add(text="AI is fascinating")
results = await client.search("tell me about AI")
Start the service once, call from anywhere. Kive keeps things simple.
🪴 Pluggable Memory Backends
Kive supports multiple memory engines with different strengths:
# Switch engine with one line
from kive.server.engines import Cognee, Graphiti, Mem0
# Deep knowledge relationships
engine = Cognee(llm_provider="openai", llm_model="gpt-4")
# Temporal awareness
engine = Graphiti(llm_provider="openai", llm_model="gpt-4")
# Fast vector search
engine = Mem0(llm_provider="openai", llm_model="gpt-4")
- Now: Three production-ready engines (Cognee, Graphiti, Mem0)
- Planning: More backends, expanding the ecosystem
No one else provides such a unified abstraction layer. Kive's adapter pattern makes memory backends fully pluggable and swappable.
🌻 Simple Integration
Use Kive your way - as library or service:
# As library - direct integration
from kive.server.adapters import CogneeAdapter
adapter = CogneeAdapter(
llm_provider="openai",
llm_api_key="YOUR_KEY"
)
await adapter.add(text="Python is great")
results = await adapter.search("programming languages")
# As service - HTTP API
from kive.client import Client
client = Client("http://localhost:12306")
await client.add(text="Python is great")
results = await client.search("programming languages")
- Now: Both modes work seamlessly
- Planning: Streaming responses, multi-tenancy support
Supported Memory Engines (3)
Quick Start
Installation
# Basic installation (client only)
pip install kive[client]
# With specific engine
pip install kive[cognee] # or [graphiti] or [mem0]
# Install all optional dependencies
pip install kive[all]
Use memory engines in a few lines
from kive.client import Client
client = Client("http://localhost:12306")
# Add data
await client.add(text="Python is a programming language")
# Search semantically
results = await client.search("what is Python?")
for memo in results.memos:
print(memo.text, memo.score)
Kive handles: backend initialization, format conversion, vector embedding, graph building, semantic search... You just need to add and search.
Switch Memory Backends
Three supported engines with different strengths:
- Cognee: Knowledge graph, deep reasoning, complex relationships
- Graphiti: Temporal knowledge graph, time-aware episodic memory
- Mem0: Fast vector search, optional graph, real-time queries
Quick start:
from kive.server import Server
from kive.server.engines import Cognee
engine = Cognee(
llm_provider="openai",
llm_model="gpt-4",
llm_api_key="YOUR_KEY"
)
server = Server(engine=engine, port=12306)
server.run()
See full examples:
- Server quickstart: examples/server_quickstart.py
- Client CRUD: examples/client_crud.py
- Configuration guide: examples/README.md
Unified Operations
All engines support the same operations:
from kive.client import Client
client = Client("http://localhost:12306")
# Add single or batch
await client.add(text="Knowledge to remember")
await client.add_batch([
{"text": "First fact"},
{"text": "Second fact"}
])
# Semantic search
results = await client.search("query", limit=10)
# Get by ID
memo = await client.get(memo_id="uuid-here")
# Update
await client.update(memo_id="uuid-here", text="Updated content")
# Delete
await client.delete(memo_id="uuid-here")
# Process/cognify (if supported)
await client.process()
Memory Engine Comparison
Choose the right engine for your use case:
| Use Case | Recommended Engine | Why |
|---|---|---|
| RAG chatbot | Mem0 | Fast vector search, real-time queries |
| Knowledge base | Cognee | Deep relationships, knowledge extraction |
| Conversational AI | Graphiti | Temporal awareness, episodic memory |
| Document Q&A | Cognee | Semantic search, reasoning |
| Personal assistant | Graphiti | Time-aware memory |
Is Kive for You?
If you:
- Need to work with multiple memory engines
- Want a unified, simple API across backends
- Want to switch memory strategies without code changes
- Want to focus on building AI applications, not wrestling with memory complexity
Then Kive is made for you.
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 kive-0.1.0.tar.gz.
File metadata
- Download URL: kive-0.1.0.tar.gz
- Upload date:
- Size: 42.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fad845d49b1ee423bc66e598fed1c18c08dc84580cc6aaccb915330c0a9fa693
|
|
| MD5 |
75609dc64a498eef691af751762aa77e
|
|
| BLAKE2b-256 |
872e692acd315f12506b585e12a704a4731aea1924fffa93ce920db28b150732
|
Provenance
The following attestation bundles were made for kive-0.1.0.tar.gz:
Publisher:
publish.yml on zhixiangxue/kive-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kive-0.1.0.tar.gz -
Subject digest:
fad845d49b1ee423bc66e598fed1c18c08dc84580cc6aaccb915330c0a9fa693 - Sigstore transparency entry: 732669290
- Sigstore integration time:
-
Permalink:
zhixiangxue/kive-ai@f4f96e98bc9fe42137e6698ce5350c95b3d9a7e4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/zhixiangxue
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f4f96e98bc9fe42137e6698ce5350c95b3d9a7e4 -
Trigger Event:
release
-
Statement type:
File details
Details for the file kive-0.1.0-py3-none-any.whl.
File metadata
- Download URL: kive-0.1.0-py3-none-any.whl
- Upload date:
- Size: 48.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2673967b72942539f7e72a66b145d518781c73e672a68c58ca0c15c79f66fcc2
|
|
| MD5 |
c9f12989188de703014712d21cc28e54
|
|
| BLAKE2b-256 |
f714019134a68ce864697b015efd6a26b9fba1a63d51e6e9fababfbfacdc6600
|
Provenance
The following attestation bundles were made for kive-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on zhixiangxue/kive-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kive-0.1.0-py3-none-any.whl -
Subject digest:
2673967b72942539f7e72a66b145d518781c73e672a68c58ca0c15c79f66fcc2 - Sigstore transparency entry: 732669293
- Sigstore integration time:
-
Permalink:
zhixiangxue/kive-ai@f4f96e98bc9fe42137e6698ce5350c95b3d9a7e4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/zhixiangxue
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f4f96e98bc9fe42137e6698ce5350c95b3d9a7e4 -
Trigger Event:
release
-
Statement type: