Chroma
Chroma HTTP API v2 (lokal atau Chroma Cloud, satu database per konfigurasi), collection, ambil, query dan cari record. Add dan upsert oleh agent harus diizinkan, hapus hanya lewat node
Tentang
Plugin Graphrt untuk Chroma lewat HTTP API v2 (OpenAPI di api.trychroma.com/openapi.json), untuk server lokal, self hosted atau Chroma Cloud. Plugin ini menampilkan dan membuat collection, mengambil, meng-query dan mencari record, serta menambah, meng-upsert dan mengubahnya. Dibuat dengan lapisan REST deklaratif (definition.mjs).
Yang bisa dilakukan
- Server: heartbeat, get_identity (tenant and databases of the token)
- Collections: list_collections, count_collections, get_collection (by name, returns the id), create_collection (get-or-create by default), delete_collection (node only)
- Records (by collection id): count_records, get_records (ids, where, where_document), query_records (nearest neighbours of query embeddings), search_records (Search API with rank expressions such as $knn), add_records, upsert_records, update_records, delete_records (node only)
- api_request: other GET endpoints of the database, e.g. /collections/<collection_id>/indexing_status (agents: GET only, on an allowlist)
Aksi
Setiap aksi adalah langkah yang bisa ditambahkan ke workflow. Agent juga bisa memakai sebagian besar aksi sebagai tool.
- Heartbeat
chroma.heartbeat - Get identity
chroma.get_identity - List collections
chroma.list_collections - Count collections
chroma.count_collections - Get collection
chroma.get_collection - Create collection
chroma.create_collection - Delete collection
chroma.delete_collection - Count records
chroma.count_records - Get records
chroma.get_records - Query records
chroma.query_records
Tampilkan semua 16 aksi
- Search records
chroma.search_records - Add records
chroma.add_records - Upsert records
chroma.upsert_records - Update records
chroma.update_records - Delete records
chroma.delete_records - Chroma API (database-scoped) request
chroma.api_request
Pengaturan
Graphrt menyalakan plugin dengan environment yang bersih. Hanya nilai ini yang sampai ke plugin, dan secret tidak masuk log.
-
CHROMA_URLOpsionalServer URL, default http://localhost:8000, Chroma Cloud: https://api.trychroma.com. Must be https unless the host is localhost. -
CHROMA_API_KEYFor Cloud / secured serversToken, sent as x-chroma-token, leave unset for a local server without auth -
CHROMA_AUTH_HEADEROpsionalauthorization to send the token as Authorization: Bearer (servers configured for bearer tokens) -
CHROMA_TENANTOpsionalTenant, default default_tenant (Chroma Cloud: your tenant id) -
CHROMA_DATABASEOpsionalDatabase, default default_database -
CHROMA_TOOL_ALLOW_WRITESOpsional1 lets agent tools create collections and add, upsert and update records -
CHROMA_TOOL_API_EXTRA_PATHSOpsionalMore GET paths (relative to the database) for agent api_request, comma-separated, * = one segment
Cara memakainya
Di Graphrt Desktop
- Buka Plugins dan cari Chroma.
- Klik Install lalu setujui.
- Ikuti langkah setup di halaman plugin, lalu tempel pengaturan yang dibutuhkan.
- Jelaskan pekerjaan yang membutuhkannya, dan builder menambahkan langkahnya.
Dengan CLI
$ graphrt plugin install chroma - id: collection
type: chroma.get_collection
collection_name: articles
- id: hits
type: chroma.query_records
collection_id: "{{#collection.data.id#}}"
query_embeddings: ["{{#embed.data.embedding#}}"]
n_results: 5
where: { lang: id }