Skip to Content
How-to GuidesConfiguration

Configuration

🚀 Configure Vector and Graph Stores

You can configure the vector and graph stores using the environment variables in your .env file or programmatically. We use Pydantic Settings

We have a global configuration object (cognee.config) and individual configurations on pipeline and data store levels

Check available configuration options:

from cognee.infrastructure.databases.vector import get_vectordb_config from cognee.infrastructure.databases.graph.config import get_graph_config from cognee.infrastructure.databases.relational import get_relational_config from cognee.infrastructure.llm.config import get_llm_config print(get_vectordb_config().to_dict()) print(get_graph_config().to_dict()) print(get_relational_config().to_dict()) print(get_llm_config().to_dict())

Setting the environment variables in your .env file, and Pydantic will pick them up:

GRAPH_DATABASE_PROVIDER = 'lancedb'

Otherwise, you can set the configuration yourself:

cognee.config.set_llm_provider('ollama')

Make sure to keep your API keys secure and never commit them to version control.