Setup
Local Setup (Docker)
Run Couchbase locally using Docker:- Access the Couchbase UI at: http://localhost:8091
- Login with username:
Administratorand password:password - Create a bucket named
recipe_bucket, a scoperecipe_scope, and a collectionrecipes
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: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
UseKnownConfigProfiles.WanDevelopment for both local and cloud deployments to handle network latency and timeouts appropriately.
Couchbase Params
Developer Resources
- View Cookbook (Sync)
- View Cookbook (Async)