Skip to main content

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 tcvectordb provider that works with Memory/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 mem0-tcvectordb

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 the vector_store.config block or pass an authenticated VectorDBClient.
  • VectorStoreError: ... failed: verify the Tencent Cloud endpoint is reachable from your runtime and that read_consistency, metric_type, and filters use values supported by TCVectorDB.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mem0_tcvectordb-0.1.1b0.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mem0_tcvectordb-0.1.1b0-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file mem0_tcvectordb-0.1.1b0.tar.gz.

File metadata

  • Download URL: mem0_tcvectordb-0.1.1b0.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mem0_tcvectordb-0.1.1b0.tar.gz
Algorithm Hash digest
SHA256 a1bf4f79cd1c82cf5c927eda317c0f0b73d7937b4589368abbc64fbd0c655c11
MD5 8dc99bc21d877c6af1fcf0bda421bade
BLAKE2b-256 cdf7545d1fea5443c573bb64b602ebf4f9aca96731ccec47580da4acbbc6ee87

See more details on using hashes here.

Provenance

The following attestation bundles were made for mem0_tcvectordb-0.1.1b0.tar.gz:

Publisher: release.yml on alviezhang/mem0-tcvectordb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mem0_tcvectordb-0.1.1b0-py3-none-any.whl.

File metadata

File hashes

Hashes for mem0_tcvectordb-0.1.1b0-py3-none-any.whl
Algorithm Hash digest
SHA256 12e68822934d07edff6acb63159ca498234d6d34b3c017ac60152a90a690c40a
MD5 e67ad8903102ae0b224579c98999ff2d
BLAKE2b-256 a942d76eaa2e695228e9a29e8e0e05af33ae8933a99f894a40014b1b833e6ad2

See more details on using hashes here.

Provenance

The following attestation bundles were made for mem0_tcvectordb-0.1.1b0-py3-none-any.whl:

Publisher: release.yml on alviezhang/mem0-tcvectordb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page