Cognee Community Vector Adapter - Moss
Use Moss as the vector database for Cognee.
Moss is a vector search service - indexes are built in the cloud and loaded locally for sub-10ms queries. No infrastructure to manage. Create an account, grab your credentials, and plug them in.
Prerequisites
- Create a Moss account at portal.usemoss.dev
- Create a project and copy your Project ID and Project Key
- An OpenAI API key (Cognee uses it for LLM and embeddings by default)
Installation
pip install cognee-community-vector-adapter-moss
Or install from source:
cd packages/vector/moss
pip install -e .
Configuration
Set environment variables:
export MOSS_PROJECT_ID="your-project-id"
export MOSS_PROJECT_KEY="your-project-key"
export LLM_API_KEY="your-openai-api-key"
Or create a .env file (see .env.example).
Usage
import asyncio
import os
from cognee_community_vector_adapter_moss import register # noqa: F401
from cognee import add, cognify, config, search
async def main():
config.set_vector_db_config(
{
"vector_db_provider": "moss",
"vector_db_key": os.getenv("MOSS_PROJECT_KEY"),
"vector_db_name": os.getenv("MOSS_PROJECT_ID"),
"vector_dataset_database_handler": "moss",
}
)
await add("Natural language processing is a subfield of computer science.")
await cognify()
results = await search(query_text="Tell me about NLP")
for r in results:
print(r)
asyncio.run(main())
How It Works
The adapter multiplexes all Cognee collections into a single Moss index (cognee-index-{timestamp}). This keeps usage within Moss's free tier (3 indexes). Each document is tagged with a _collection metadata field, and all searches filter by it.
- Embeddings are computed by Cognee's embedding engine and passed to Moss via
DocumentInfo(embedding=[...]) - The index is loaded locally via
load_index(auto_refresh=True)for fast sub-10ms queries - Async Moss jobs (
create_index,add_docs) are polled to completion internally
Running Tests
MOSS_PROJECT_ID="..." MOSS_PROJECT_KEY="..." LLM_API_KEY="..." python tests/test_moss.py
Tests cover: vector search (text + vector), nodeset filtering, graph completion, chunks, summaries, and prune cleanup.
Resources
Metadata
Release files for cognee-community-vector-adapter-moss 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| cognee_community_vector_adapter_moss-0.2.0.tar.gz | 8.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cognee_community_vector_adapter_moss-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.7 kB
Release files / cognee_community_vector_adapter_moss-0.2.0.tar.gz
| Download URL | cognee_community_vector_adapter_moss-0.2.0.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d31273d8eed6eccb3e2c6cd6c9d350ed0d24331007d40c1b897915dca555dbf
|
|
BLAKE2b-256 checksum How to use checksums |
509b888537b6923d76b2dc59638112dd5e8fecc57e2b7bb2c11bff0f43688b66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.10.18 Darwin/24.1.0
|
Release files / cognee_community_vector_adapter_moss-0.2.0-py3-none-any.whl
| Download URL | cognee_community_vector_adapter_moss-0.2.0-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
30ee244a2cfd603055f83e6f0aa44f54dd7db86be2452fe55578e7c681782f0c
|
|
BLAKE2b-256 checksum How to use checksums |
5dbd4c4b5a0b3f20fe67a824011c99d4253775d694dcc652dc651ce8d9f06bd1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.10.18 Darwin/24.1.0
|
Security for cognee-community-vector-adapter-moss 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.