TCVectorDB backend for the mem0 memory framework.
Project description
mem0-tcvectordb
mem0-tcvectordb adds Tencent Cloud’s TCVectorDB as a first-class vector store provider for mem0. Install it next to mem0ai to unlock Tencent Cloud hosting without patching the upstream library.
Highlights
- Registers a
tcvectordbprovider that works withMemory/AsyncMemory. - Re-exports the configuration schema so you get validation and editor hints.
- Keeps close parity with the implementation that ships in the upstream mem0 repo.
Installation
pip install mem0ai mem0-tcvectordb
mem0ai must already be available in your environment because this package only ships the TCVectorDB-specific modules.
Local Configuration
Copy .env.example to .env and fill in your Tencent Cloud + Neo4j credentials. The integration tests and helper scripts load this file automatically via python-dotenv so secrets never need to be committed to source control.
Usage
import mem0_tcvectordb # noqa: F401 - registers the provider with mem0
from mem0 import Memory
config = {
"vector_store": {
"provider": "tcvectordb",
"config": {
"collection_name": "memories",
"database_name": "mem0",
"embedding_model_dims": 1536,
"url": "https://<instance-id>.ap-singapore.tcvdb.tencentcs.com",
"username": "root",
"api_key": "tcvdb_api_key",
}
}
}
memory = Memory.from_config(config)
memory.add("Alice loves sci-fi movies", user_id="alice")
Configuration Reference
| Parameter | Description | Default |
|---|---|---|
collection_name |
Collection where memories are stored | mem0 |
database_name |
Database that owns the collection | mem0 |
embedding_model_dims |
Embedding dimension produced by mem0 | 1536 |
url |
TCVectorDB HTTP endpoint | required |
username |
Account username | required |
api_key |
API key | required |
password |
Optional password; defaults to api_key |
None |
read_consistency |
EVENTUAL_CONSISTENCY or STRONG_CONSISTENCY |
EVENTUAL_CONSISTENCY |
shards |
Number of shards | 1 |
replicas |
Number of replicas | 1 |
metric_type |
Distance metric (COSINE, IP, L2, HAMMING) |
COSINE |
index_type |
Index type (e.g., HNSW, FLAT) |
HNSW |
pool_size |
HTTP connection pool size | 10 |
proxies |
Optional proxy configuration | None |
client |
Pre-built VectorDBClient instance |
None |
mem0 ships embeddings, so TCVectorDB never runs an embedding model. Ensure embedding_model_dims matches the mem0 embedding size configured for your deployment.
Troubleshooting
ValueError: TCVectorDB requires url, username, and api_key: supply credentials in thevector_store.configblock or pass an authenticatedVectorDBClient.VectorStoreError: ... failed: verify the Tencent Cloud endpoint is reachable from your runtime and thatread_consistency,metric_type, and filters use values supported by TCVectorDB.
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 mem0_tcvectordb-0.1.0b0.tar.gz.
File metadata
- Download URL: mem0_tcvectordb-0.1.0b0.tar.gz
- Upload date:
- Size: 16.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ac328c6977fb1ae13911a62f1d3ec90283cd25a5009d7e15f8fb586fc1514aa
|
|
| MD5 |
9526e1713501a145b3b41d0c6b335b5b
|
|
| BLAKE2b-256 |
77b3950477000f9cddeb19c0a340dbcf2e25f5ca31863f9a1a873fe4737b6db6
|
File details
Details for the file mem0_tcvectordb-0.1.0b0-py3-none-any.whl.
File metadata
- Download URL: mem0_tcvectordb-0.1.0b0-py3-none-any.whl
- Upload date:
- Size: 19.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d6dca1cd0ee6403376611c2a828472befd47f785aa8147781921154373719b1
|
|
| MD5 |
32983d45c764dbfac8dae4a1e5ade782
|
|
| BLAKE2b-256 |
a39e1ee0deff750fe93c02ccc754731bd4dcc397a6d6a386cab3de3addf82816
|