Skip to main content
ChromaDB is an open-source vector database designed to make it easy to build AI applications with embeddings. This guide shows you how to integrate ChromaDB into your Cycls agent to build a Retrieval-Augmented Generation (RAG) workflow. You will learn how to:
  1. Add ChromaDB as a dependency.
  2. Store and query document embeddings.
  3. Retrieve context to use in your agent’s response.

Prerequisites

  • Python 3.9+
  • cycls package installed
  • Docker installed (for local testing)
  • OpenAI API key

Step 1: Create the Agent

Create a new file called app.py and set up your agent with ChromaDB and OpenAI dependencies:

Step 2: Set Up Environment

Create a .env file with your OpenAI API key:

Step 3: Run the Agent

Execute your agent script:
Cycls will build the local Docker image and start your agent. You can then chat with it to test the semantic search functionality.

Full Code

Here is the complete app.py file: