/knowledge/. It is useful when you already have a
chunked knowledge base in Chroma and want agents to use normal filesystem
commands like ls, cat, grep, find, and chroma-query.
For collection setup, see Chroma Setup.
Config
Filesystem Layout
Chroma paths come from the path tree document stored in the collection with ID__path_tree__. The document body must be a JSON object whose keys are virtual
file paths below the mount prefix.
/knowledge/, this becomes:
size, created_at, and updated_at metadata values are used by tree and
listing operations when present.
Reading Documents
Each file is assembled from Chroma chunk documents whose metadata slug matches the path. Chunks are sorted by the configured chunk index field and joined with a single newline.Exact Search with Grep
grep uses Chroma document filtering as a coarse prefilter when possible, then
applies Mirage’s grep matching over assembled file text. Scoped paths restrict
the candidate files before querying Chroma.
Vector Search
Thechroma-query command calls Chroma’s native vector query API. Use it when
semantic similarity matters more than exact text matching.
1 - distance.
Cache
The resource uses Mirage’s index cache for the virtual tree. The first directory listing or path resolution fetches__path_tree__; later ls,
find, tree, and path resolution reuse the cached tree until the index cache
expires or the workspace is recreated.
File content is still read from Chroma when commands materialize document text.
Examples
Runnable examples live underexamples/python/chroma/:
chroma.py— command workflow withls,tree,find,cat,head,tail,grep, andchroma-query.chroma_vfs.py— in-process VFS workflow withos.listdir(),open(), andos.path.*.
Shell Commands
| Command | Notes |
|---|---|
ls | List folders and files from the path tree |
tree | Print the mounted path tree |
find | Search the virtual tree by name, type, depth, and size |
cat | Read full file text assembled from Chroma chunks |
head / tail | Read the first or last lines/bytes |
grep | Exact or regex matching over assembled file text |
chroma-query | Vector retrieval through Chroma |