LanceDB is a fast, file-based vector database that serves as Cognee’s default vector store. It requires no server setup and provides excellent performance for development and production workloads.
LanceDB is perfect for serverless deployments and local development, offering fast vector search without the complexity of managing a separate database server.

Why LanceDB?

Zero Setup

No Server RequiredFile-based storage that works out of the box without any server configuration or management.

High Performance

Fast QueriesOptimized for fast similarity search with efficient indexing and caching mechanisms.

Serverless Ready

Cloud NativePerfect for serverless deployments with support for cloud storage backends.

Python Native

Easy IntegrationBuilt for Python applications with intuitive APIs and excellent Cognee integration.

Quick Setup

1

Install Dependencies

# LanceDB is included with Cognee by default
pip install cognee

2

Configure Cognee

import os
import cognee

# LanceDB is the default, but you can be explicit
os.environ["VECTOR_DB_PROVIDER"] = "lancedb"
os.environ["VECTOR_DB_PATH"] = "./lancedb_data"

print("LanceDB configured successfully!")
3

Test Setup

import asyncio

async def test_lancedb():
    # Add test data
    await cognee.add("LanceDB provides fast vector storage for Cognee.")
    await cognee.cognify()
    
    # Test vector search
    results = await cognee.search(
        "vector storage performance",
        query_type=SearchType.CHUNKS
    )
    
    print(f"Found {len(results)} relevant chunks")
    print(f"Top result: {results[0][:100]}...")

asyncio.run(test_lancedb())

Next Steps