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.0.tar.gz (16.2 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.0-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file mem0_tcvectordb-0.1.0.tar.gz.

File metadata

  • Download URL: mem0_tcvectordb-0.1.0.tar.gz
  • Upload date:
  • Size: 16.2 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.0.tar.gz
Algorithm Hash digest
SHA256 0db187860d9f490f4a125c493d0d2424fd95fb8ce72279ba78433cb95ed40633
MD5 fecfbf93c732d015728eabc9df22264e
BLAKE2b-256 4782baf430ca837d68825dc07e20944c409b9aaa62628a3c9e10e7db893e4162

See more details on using hashes here.

Provenance

The following attestation bundles were made for mem0_tcvectordb-0.1.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mem0_tcvectordb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c8205f3731e440ccde20a3aef597ba7f1b81f8c42392acdf396f0b143d36dd6
MD5 0da1379870802702ee6e50aa842900b1
BLAKE2b-256 0d02a644b3a6a86f277d05c005cd173df3190e56780dee150adc77ae078fbdd5

See more details on using hashes here.

Provenance

The following attestation bundles were made for mem0_tcvectordb-0.1.0-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