> ## 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](/setup-configuration/vector-stores) backend through this [community-maintained](/setup-configuration/community-maintained/overview) [adapter](https://github.com/topoteretes/cognee-community/tree/main/packages/vector/pinecone).
</Note>

## Installation

This adapter is a separate package from core Cognee. Before installing, complete the [Cognee installation](/getting-started/installation) and ensure your environment is configured with [LLM and embedding providers](/setup-configuration/overview). 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.

<Tabs>
  <Tab title="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>

  <Tab title="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
    ```
  </Tab>
</Tabs>

## Important Notes

<Accordion title="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>

<Accordion title="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>

<Accordion title="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>

<Accordion title="Embedding Dimensions">
  Ensure `EMBEDDING_DIMENSIONS` matches the dimensions configured in your Pinecone index. A mismatch will cause errors when upserting vectors.

  See [Embedding Providers](/setup-configuration/embedding-providers) for configuration details.
</Accordion>

## Resources

<CardGroup cols={2}>
  <Card title="Adapter Source" icon="github" href="https://github.com/topoteretes/cognee-community/tree/main/packages/vector/pinecone">
    GitHub repository
  </Card>

  <Card title="Pinecone Docs" icon="book" href="https://docs.pinecone.io/">
    Official Pinecone documentation
  </Card>
</CardGroup>

<Columns cols={3}>
  <Card title="Vector Stores" icon="database" href="/setup-configuration/vector-stores">
    Official vector providers
  </Card>

  <Card title="Community Overview" icon="users" href="/setup-configuration/community-maintained/overview">
    All community integrations
  </Card>

  <Card title="Setup Overview" icon="settings" href="/setup-configuration/overview">
    Configuration guide
  </Card>
</Columns>
