@sisu-ai/vector-vectra
v1.0.0
Published
Vectra vector-store adapter for Sisu RAG composition.
Readme
@sisu-ai/vector-vectra
Vectra vector-store adapter for Sisu RAG composition.
Exports
createVectraVectorStore
The created adapter exposes upsert, query, and delete, and is intended to be injected into backend-agnostic RAG tools such as @sisu-ai/tool-rag.
For reusable chunking, record preparation, and app-side seeding flows, pair this adapter with @sisu-ai/rag-core.
Philosophy
@sisu-ai/vector-vectra owns only Vectra-specific translation.
- It implements the shared
VectorStorecontract from@sisu-ai/vector-core. - It does not own chunking, prompt shaping, or tool schemas.
- It uses Vectra
LocalIndex, which fits Sisu's existing split where@sisu-ai/rag-corealready owns chunking and embeddings orchestration.
Setup
npm i @sisu-ai/vector-vectra vectraUsage
import { openAIEmbeddings } from '@sisu-ai/adapter-openai';
import { storeRagContent } from '@sisu-ai/rag-core';
import { createVectraVectorStore } from '@sisu-ai/vector-vectra';
const embeddings = openAIEmbeddings({ model: 'text-embedding-3-small' });
const vectorStore = createVectraVectorStore({
folderPath: '.vectra',
namespace: 'travel',
indexedMetadataFields: ['docId', 'source'],
});
await storeRagContent({
content: 'Malmö fika notes go here.',
source: 'seed',
metadata: { docId: 'malmo-guide' },
embeddings,
vectorStore,
namespace: 'travel',
});Namespaces
Vectra has no built-in namespace primitive, so this adapter maps each namespace to its own local folder under folderPath.
- base
folderPath:.vectra - namespace
travel:.vectra/travel - namespace
docs:.vectra/docs
Queries against a namespace that has not been written yet return an empty match set.
Metadata
- Scalar metadata values are stored directly.
- Non-scalar metadata values are JSON-stringified before persistence.
- Filterable fields should be listed in
indexedMetadataFieldswhen creating the adapter.
This keeps Vectra-specific metadata constraints inside the adapter package instead of leaking into rag-core or tool-rag.
How It Fits With The RAG Stack
@sisu-ai/vector-coredefines the shared storage contract@sisu-ai/vector-vectraimplements that contract with file-backed local indexes@sisu-ai/rag-corehandles chunking and direct store/retrieve flows@sisu-ai/tool-ragexposes model-facing retrieval/storage tools@sisu-ai/mw-ragcomposes deterministic middleware-driven retrieval over anyVectorStore
Contributing
We build Sisu in the open. Contributions welcome.
Contributing Guide · Report a Bug · Request a Feature · Code of Conduct
Star on GitHub if Sisu helps you build better agents.
Quiet, determined, relentlessly useful.
