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

# Couchbase

Couchbase is a NoSQL database management system that is designed for high-performance, scalability, and flexibility. Integrate Couchbase with Prod AI to build applications and other custom internal tools on top of your Couchbase documents.

## Setting up Couchbase

### Create Cluster Access Credentials

To connect to Couchbase, you'll need a `username` and `password`. For self-managed clusters, refer to Couchbase's guide on how to [Connect a Self-Managed Cluster](https://docs.cloud.couchbase.com/cloud/BETA/clusters/connect-self-managed-cluster.html).

For Couchbase Cloud, use the following instructions to create Cluster Access Credentials.

1. Navigate to your Couchbase Cluster
2. Click **Settings**
3. In the navigation menu, click **Cluster Access**
4. Click **Create Cluster Access**
5. Specify a cluster access name and secret, these will serve as the `username` and `password` when connecting
6. Specify the buckets and scope the credentials should have access to
7. Once you have finished making the desired configurations, click **Create Cluster Access**

Learn more about how to [Configure Cluster Access Credentials](https://docs.couchbase.com/cloud/clusters/manage-database-users.html#create-database-credentials)

### Set up allowed IP Addresses

On Dedicated Cloud, add your [Prod AI data plane IP addresses](https://docs.prod.ai/deployment/security/overview.md#ip-addresses) as allowed IPs for your cluster. On Managed BYOC, connect over private networking within your AWS account. Learn how in Couchbase's guide on [Configuring Allowed IP Addresses](https://docs.couchbase.com/cloud/clusters/allow-ip-address.html).

### Add integration

1. In the web app, navigate to the **Integrations** page
2. Click the **Couchbase** tile
3. **Name** the integration
4. Fill out the connection configuration as follows:

| Field | Required | Description |
| - | - | - |
| URI | ✓ | Comma-delimited list of IP addresses and/or hostnames to connect to. Learn more about the format of Couchbase connection strings in Couchbase's guide on [Managing Connections](https://docs.couchbase.com/nodejs-sdk/current/howtos/managing-connections.html). |
| Username | ✓ | Cluster access credential name or username. |
| Password | ✓ | Cluster access credential secret or cluster password. |

5. Optionally, add more configurations to set credentials for [different environments](https://docs.prod.ai/development-lifecycle/build/data-tags.md)
6. Click **Test Connection** to check that Prod AI can connect
7. Click **Create**

**Couchbase connected!**
You can now build
[apps](https://docs.prod.ai/coding-agents/apps.md) and [agents](https://docs.prod.ai/coding-agents/agents.md) with Couchbase.

## Use Couchbase in APIs

Once your Couchbase integration is created, you can start using Couchbase actions in Prod AI APIs.

> [tab] Raw query
>
> Write [SQL++ queries](https://docs.couchbase.com/server/current/n1ql/n1ql-intro/queriesandresults.html) to issue queries to Couchbase.
>
> ![Query Couchbase with SQL++](https://mintcdn.com/prod-ai/PgFRt41j3RlUW19_/images/integrations/integrations-library/couchbase/couchbase_query.png?fit=max\&auto=format\&n=PgFRt41j3RlUW19_\&q=85\&s=7e90576cce4477b086bb0c578146bc0e)

> [tab] Insert Item
>
> Insert new documents into Couchbase collections with the **Insert item** action.
>
> ![Insert item into Couchbase](https://mintcdn.com/prod-ai/PgFRt41j3RlUW19_/images/integrations/integrations-library/couchbase/couchbase_insert_item.png?fit=max\&auto=format\&n=PgFRt41j3RlUW19_\&q=85\&s=c0a0d29701c31ba8825e8a1dbfb4bdf8)

> [tab] Get Item
>
> Get a single document from your Couchbase collection with the **Get item** action.
>
> ![Get item from Couchbase](https://mintcdn.com/prod-ai/PgFRt41j3RlUW19_/images/integrations/integrations-library/couchbase/couchbase_get_item.png?fit=max\&auto=format\&n=PgFRt41j3RlUW19_\&q=85\&s=a66cc9a5d9ffef9ef1dcfdc2ebe08f43)

> [tab] Remove Item
>
> Remove individual documents from a Couchbase collection with the **Remove item** action.
>
> ![Remove item from Couchbase](https://mintcdn.com/prod-ai/PgFRt41j3RlUW19_/images/integrations/integrations-library/couchbase/couchbase_remove_item.png?fit=max\&auto=format\&n=PgFRt41j3RlUW19_\&q=85\&s=a5fc543349bff0c0b82be72aad645af5)


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