Backend
Vectora’s backend infrastructure is designed to solve the biggest bottleneck for modern AI agents: state management at scale. While the Vectora runtime processes intelligence, the backend ensures that this intelligence is grounded in persistent, secure, and searchable data.
Vectora uses a unified architecture based on MongoDB Atlas, allowing vectors, metadata, and operational memory to coexist within the same ecosystem.
The Engine Behind Context
Topics in this Section
| Page | Description |
|---|---|
| MongoDB Atlas | Why we chose Atlas and how it serves as our data foundation. |
| Vector Search | Technical deep dive into embeddings, cosine similarity, and the HNSW algorithm. |
| Persistence and Memory | How Vectora maintains state between sessions and builds long-term memory (AGENTS.md). |
Architecture Overview
Vectora’s backend is not just a storage location; it is an extension of the Harness Runtime.
graph TD
A[Vectora Runtime] --> B{Service Layer}
B --> C[Vector Service]
B --> D[Session Service]
B --> E[Audit Service]
subgraph "MongoDB Atlas (Managed by Kaffyn)"
C --> F[(Documents & Vectors)]
D --> G[(Operational State)]
E --> H[(Audit Logs)]
end
Backend Principles
- Namespace Isolation (RBAC): The backend enforces strict boundaries. Data from one project never mixes with others, ensuring multi-tenant privacy.
- Atomicity: Code vectors and metadata are stored together. If a file is updated, the vector index and the document are updated simultaneously.
- Transparent Scalability: Using MongoDB Atlas, Vectora scales from small individual projects to enterprise codebases with millions of lines of code without performance loss.
- Active Governance: Every interaction is persisted and auditable, allowing full transparency over AI actions.
Backend Modes
| Mode | Description | Ideal Use |
|---|---|---|
| Managed (SaaS) | MongoDB Atlas backend provisioned by Kaffyn. Zero configuration. | Free, Pro, and Team plans. |
| Hybrid (BYOK) | You provide Voyage API keys, but Atlas is managed by Kaffyn. | API cost control with easy infrastructure. |
| Enterprise / Custom | Connection to your own MongoDB Atlas cluster or on-premise infrastructure. | Strict data sovereignty requirements. |
Frequently Asked Questions
Q: Where are my vectors physically stored? R: In MongoDB Atlas clusters managed by Kaffyn, typically located in low-latency AWS or Google Cloud regions.
Q: Is my backend data used to train Kaffyn’s models? R: No. We follow a strict privacy policy. Your vectors and metadata are your exclusive property and used only to provide context to your agent.
Q: Is the backend required for offline mode? R: Vectora allows local caching of some metadata, but full semantic vector search and long-term persistent memory depend on backend connectivity.
External Linking
| Concept | Resource | Link |
|---|---|---|
| MongoDB Atlas | Atlas Vector Search Documentation | www.mongodb.com/docs/atlas/atlas-vector-search/ |
| MCP | Model Context Protocol Specification | modelcontextprotocol.io/specification |
| MCP Go SDK | Go SDK for MCP (mark3labs) | github.com/mark3labs/mcp-go |
| RBAC | NIST Role-Based Access Control Standard | csrc.nist.gov/projects/rbac |
| RAG | Retrieval-Augmented Generation for Knowledge-Intensive NLP | arxiv.org/abs/2005.11401 |
| HNSW | Efficient and robust approximate nearest neighbor search | arxiv.org/abs/1603.09320 |
Phrase to remember: “The runtime is the brain; the backend is the library. Without an organized library, the brain has nowhere to look for answers.”
Part of the Vectora ecosystem · Open Source (MIT) · Contributors