Skip to main content
The Go client is primarily used for Chroma’s internal services and backend infrastructure. For application development, we recommend using the Python or JavaScript clients which provide more comprehensive client APIs.

Package Structure

Chroma’s Go codebase is organized into several key packages:

Core Packages

Types Package

The types package provides fundamental type definitions:
types.go

Common Package

Provides shared constants and component interfaces:

SysDB Coordinator

The coordinator package manages metadata and system state:

Dependencies

Key dependencies used in the Go codebase:
go.mod

Building from Source

To build the Go components:

Prerequisites

  1. Go 1.23+ - The project requires Go 1.23.0 or later
  2. Protocol Buffers - Install protoc, protoc-gen-go, and protoc-gen-go-grpc
  3. PostgreSQL (for development) - Required for local testing
Refer to the source Dockerfile for exact version requirements.

Database Setup

For local development with PostgreSQL:

Schema Migrations

Chroma uses Atlas for schema migrations:

gRPC Services

The Go backend provides gRPC services for internal communication:

Development Workflow

  1. Make changes to Go source files
  2. Generate protobuf files: make build
  3. Run tests: go test ./...
  4. Apply migrations if schema changed

Architecture Overview

The Go backend serves as Chroma’s distributed system coordinator:
  • Coordinator Service: Manages metadata, collections, and segments
  • gRPC APIs: Internal service communication
  • SysDB: Metadata storage using PostgreSQL
  • Storage Integration: S3 and local filesystem support

Python Client

Recommended client for application development

JavaScript Client

Browser and Node.js client library

CLI Reference

Command-line interface documentation

GitHub Repository

View source code and contribute