NodeTool ships a lightweight ingestion pipeline for semantic search and retrieval-augmented generation (RAG) tasks. The indexing logic is split across @nodetool-ai/vectorstore (store and embedding) and @nodetool-ai/deploy (collection routes).
Overview
- Collection metadata (
CollectionResponsein@nodetool-ai/protocolpackages/protocol/src/api-types.ts) carries the collection’s name, document count, free-form metadata, andworkflow_name— the resolved name of the workflow id stored undermetadata.workflow, shown in listings. - Vector store – the default backend is SQLite-vec (
@nodetool-ai/vectorstorepackages/vectorstore/src/sqlite-vec-store.ts). Embeddings flow through theVectorProviderabstraction — see Vector Storage for swapping backends (Pinecone, Supabase/pgvector). - Indexing route –
handleCollectionIndex()(@nodetool-ai/deploypackages/deploy/src/collection-routes.ts) validates the upload and delegates the actual ingestion to a caller-suppliedindexFncallback (typedIndexFileToCollectionFn). The route itself does not resolve collections or run workflows; that logic lives in the provided callback.
Default Flow
- The HTTP layer receives an uploaded file and calls
handleCollectionIndex()with the collection name, file path, MIME type, and anindexFn. - The
indexFncallback performs the ingestion: it resolves the target collection (e.g. viaresolveCollection()in@nodetool-ai/vectorstorepackages/vectorstore/src/index.ts), splits the document withsplitDocument(), embeds it, and stores embeddings in SQLite-vec. handleCollectionIndex()returns anIndexResult({ path, error }) per file, or throws aCollectionHttpErroron failure.
Configuring the vector store
The default backend is local SQLite-vec. Switch backends with NODETOOL_VECTOR_PROVIDER.
| Variable | Description | Default |
|---|---|---|
NODETOOL_VECTOR_PROVIDER |
sqlite-vec, pinecone, or supabase |
sqlite-vec |
VECTORSTORE_DB_PATH |
Local SQLite-vec database file | ~/.local/share/nodetool/vectorstore.db |
PINECONE_API_KEY |
Required when provider is pinecone |
— |
SUPABASE_URL / SUPABASE_SERVICE_ROLE_KEY |
Required when provider is supabase |
— |
See Vector Storage for backend-specific setup.
CLI & API Integration
POST /api/collections/:name/index(see@nodetool-ai/websocketpackages/websocket/src/collection-api.ts) triggers ingestion via HTTP (multipart/form-data file upload).- The MCP server (
@nodetool-ai/websocketpackages/websocket/src/mcp-server.ts) exposes two tools,execute_codeandview_image. An IDE plug-in reads collections from inside an action —nodetool.collections.list()andnodetool.collections.query(). It does not index assets. - Admin routes under
@nodetool-ai/deploypackages/deploy/src/admin-routes.tsprovide remote ingestion endpoints for deployed servers.
Troubleshooting
- Remote backend errors – for
pineconeorsupabase, verify credentials and network reachability; fall back to local SQLite-vec by settingNODETOOL_VECTOR_PROVIDER=sqlite-vec. - Large files – ensure
VECTORSTORE_DB_PATHhas disk headroom, or move to a remote backend.
Related Documentation
- Providers – selecting embedding models for ingestion nodes.
- Workflow API – details on
RunJobRequest. - Storage Guide – configuring persistent storage for uploaded documents.