Skip to main content

Setup

Local Setup (Docker)

Run Couchbase locally using Docker:
  1. Access the Couchbase UI at: http://localhost:8091
  2. Login with username: Administrator and password: password
  3. Create a bucket named recipe_bucket, a scope recipe_scope, and a collection recipes

Managed Setup (Capella)

For a managed cluster, use Couchbase Capella:
  • Follow Capella’s UI to create a database, bucket, scope, and collection

Environment Variables

Set up your environment variables:
For Capella, set COUCHBASE_CONNECTION_STRING to your Capella connection string.

Install Dependencies

Example

agent_with_knowledge.py

Async Support ⚡

Couchbase also supports asynchronous operations, enabling concurrency and leading to better performance.

async_couchbase.py
Use aload() and aprint_response() methods with asyncio.run() for non-blocking operations in high-throughput applications.

Key Configuration Notes

Connection Profiles

Use KnownConfigProfiles.WanDevelopment for both local and cloud deployments to handle network latency and timeouts appropriately.

Couchbase Params