Skip to content

v2: Local/embedded client mode #111

@oss-amikos

Description

@oss-amikos

Context

The Go client supports a local/embedded mode that runs Chroma in-process without requiring a separate server. The Java client has no equivalent.

Go client modes

Mode Description
Embedded Runs Chroma in-process via a Rust shim (chroma-go-local). No network calls.
Server Starts a local HTTP server in-process and delegates to the HTTP client.

Both modes support persistence to disk.

Suggested Java API

Client client = ChromaClient.local()
    .persistDirectory(Path.of("/data/chroma"))
    .build();

Implementation considerations

  • Would require JNI/JNA bindings to the Chroma Rust core, or a shim similar to chroma-go-local
  • Alternative: bundle a Chroma server binary and manage its lifecycle
  • This is likely a large effort — may be better suited for a separate library/module
  • Could leverage TestContainers approach for dev/test scenarios as an interim

Reference

  • Go client: NewLocalClient(opts ...LocalClientOption) (*LocalClient, error)
  • Go runtime modes: LocalRuntimeModeEmbedded, LocalRuntimeModeServer

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestv2v2 API support

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions