Chroma CreateCollection

Chroma CreateCollection

Certified

Create a Chroma collection

Creates a collection in the configured tenant and database. By default it is a get-or-create, so running it against an existing collection returns that collection instead of failing. Chroma infers the vector dimension from the first records you add.

yaml
type: io.kestra.plugin.chroma.CreateCollection

Create a collection with cosine distance

yaml
id: chroma_create_collection
namespace: company.team

tasks:
  - id: create_collection
    type: io.kestra.plugin.chroma.CreateCollection
    baseUrl: http://localhost:8000
    collectionName: docs
    distance: COSINE

Create a collection on Chroma Cloud using a token stored as a secret

yaml
id: chroma_cloud_create_collection
namespace: company.team

tasks:
  - id: create_collection
    type: io.kestra.plugin.chroma.CreateCollection
    baseUrl: https://api.trychroma.com
    tenant: "{{ secret('CHROMA_TENANT') }}"
    database: "{{ secret('CHROMA_DATABASE') }}"
    authToken: "{{ secret('CHROMA_TOKEN') }}"
    collectionName: docs
    distance: COSINE
Properties

Base URL of the Chroma server

The base URL of the Chroma HTTP server, for example http://localhost: 8000.

Collection name

The name of the collection to create.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

Authentication token

Token sent in the X-Chroma-Token header. Used by token-authenticated self-hosted servers and by Chroma Cloud. Mutually exclusive with username/password.

Database

The Chroma database that holds the collection (default: default_database).

Possible Values
L2COSINEIP

Distance metric

Distance function for similarity search. When unset, Chroma uses its default (L2).

Defaulttrue

Get or create

When true (default), returns the existing collection if one with the same name already exists instead of failing.

Collection metadata

Arbitrary key/value metadata stored on the collection.

Basic-auth password

Password for HTTP basic authentication. Requires username.

Tenant

The Chroma tenant that holds the database (default: default_tenant).

Basic-auth username

Username for HTTP basic authentication. Requires password.

Collection id

The UUID assigned to the collection by Chroma.

Collection name

The name of the collection.