chromadb
2.0.0, released 2 months ago by langchaindart.dev
Dart client for the ChromaDB vector database API for AI applications.
What it does
Provides a pure Dart, type-safe client for ChromaDB with collections, vector search, multi-tenant storage, embeddings, and RAG pipelines across mobile, web, desktop, and server-side Dart.
AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to connect Dart or Flutter applications to a ChromaDB vector database.
- You are building RAG pipelines or semantic search features in Dart.
Skip it when
- You need an embedded local on-device SQLite database rather than a vector database client.
Strengths
- Pure Dart with no Flutter dependency, working across all platforms and backend.
- Type-safe request and response models with minimal dependencies.
- Includes both low-level resources and a high-level ChromaCollection wrapper for auto-embedding.
Weaknesses
- Requires a running ChromaDB instance or cloud deployment.
- Requires Dart 3.12 or later.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
Requires adding the dependency to pubspec.yaml and a running ChromaDB server instance.
import 'package:chromadb/chromadb.dart';
Future<void> main() async {
final client = ChromaClient();
try {
final collection = await client.getOrCreateCollection(name: 'my-documents');
await collection.add(
ids: ['doc-1'],
embeddings: [
[0.1, 0.2, 0.3],
],
documents: ['Hello from ChromaDB'],
);
final results = await collection.query(
queryEmbeddings: [
[0.1, 0.2, 0.3],
],
nResults: 1,
);
print(results.ids);
} finally {
client.close();
}
}Alternatives
Packages that do the same job and could replace chromadb.
- mobile_rag_engine
Build local, on-device RAG in Flutter with semantic search and hybrid retrieval.
77Compare - ollama_dart
Type‑safe Dart client for Ollama’s chat, generation, embeddings, audio and model management APIs.
88Compare - mistralai_dart
Pure Dart client for the Mistral AI API, supporting chat, embeddings, fine-tuning, agents, and more.
81Compare
Works with
Packages commonly used together with chromadb: ones it builds on, ones built on it, and its own family.