> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cognee.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Pinecone

> Use Pinecone as a vector store through a community-maintained adapter

Pinecone is a managed vector database service that provides high-performance similarity search. It is available as a community-maintained adapter for Cognee.

> [!NOTE]
>
> Cognee can use Pinecone as a [vector store](https://docs.cognee.ai/setup-configuration/vector-stores.md) backend through this [community-maintained](https://docs.cognee.ai/setup-configuration/community-maintained/overview.md) [adapter](https://github.com/topoteretes/cognee-community/tree/main/packages/vector/pinecone).

## Installation

This adapter is a separate package from core Cognee. Before installing, complete the [Cognee installation](https://docs.cognee.ai/getting-started/installation.md) and ensure your environment is configured with [LLM and embedding providers](https://docs.cognee.ai/setup-configuration/overview.md). After that, install the adapter package:

```bash theme={null}
pip install cognee-community-vector-adapter-pinecone
```

## Registration

Unlike built-in providers, community adapters must be explicitly registered at the start of your script **before** calling any Cognee functions. This registers Pinecone in Cognee's list of known vector database providers:

```python theme={null}
from cognee_community_vector_adapter_pinecone import register

register()
```

If you skip this step, Cognee will not recognize `pinecone` as a valid provider and will raise a runtime error even if the package is installed.

## Configuration

Get your API key from the [Pinecone console](https://app.pinecone.io/) and configure Cognee to use it.

> [tab] Python (Programmatic)
>
> ```python theme={null}
> from cognee_community_vector_adapter_pinecone import register
> from cognee import config
>
> # Must register before configuring or using Cognee
> register()
>
> config.set_vector_db_config({
>     "vector_db_provider": "pinecone",
>     "vector_db_url": "https://your-index-host.pinecone.io",
>     "vector_db_key": "your_pinecone_api_key",
> })
> ```

> [tab] Environment Variables
>
> Set these in your `.env` file. **Remember**: you must still call `register()` in your code even when using environment variables.
>
> ```dotenv theme={null}
> VECTOR_DB_PROVIDER="pinecone"
> VECTOR_DB_URL="https://your-index-host.pinecone.io"
> VECTOR_DB_KEY="your_pinecone_api_key"
> ```
>
> Then in your script:
>
> ```python theme={null}
> from cognee_community_vector_adapter_pinecone import register
>
> register()
>
> import cognee
> # ... proceed with cognee operations
> ```

## Important Notes

> [accordion] Community adapter required
>
> Pinecone is not bundled with the default Cognee package. You must install and register the community adapter before configuring `VECTOR_DB_PROVIDER=pinecone`.

> [accordion] Registration is required every run
>
> The `register()` call must happen **before** any Cognee vector operations in each process. It is not persisted — you cannot register once and skip it on subsequent runs. Add it at the top of your entry-point script or application startup code.

> [accordion] Unsupported provider error
>
> If you set `VECTOR_DB_PROVIDER=pinecone` before installing and registering the adapter, Cognee will raise this runtime error:
>
> ```text theme={null}
> EnvironmentError: Unsupported vector database provider: pinecone
> ```
>
> Complete the installation and registration steps above before configuring Pinecone.

> [accordion] Embedding Dimensions
>
> Ensure `EMBEDDING_DIMENSIONS` matches the dimensions configured in your Pinecone index. A mismatch will cause errors when upserting vectors.
>
> See [Embedding Providers](https://docs.cognee.ai/setup-configuration/embedding-providers.md) for configuration details.

## Resources

> [card] [Adapter Source](https://github.com/topoteretes/cognee-community/tree/main/packages/vector/pinecone)
>
> GitHub repository

> [card] [Pinecone Docs](https://docs.pinecone.io/)
>
> Official Pinecone documentation

> [card] [Vector Stores](https://docs.cognee.ai/setup-configuration/vector-stores.md)
>
> Official vector providers

> [card] [Community Overview](https://docs.cognee.ai/setup-configuration/community-maintained/overview.md)
>
> All community integrations

> [card] [Setup Overview](https://docs.cognee.ai/setup-configuration/overview.md)
>
> Configuration guide


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.