You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/about.md
+42-8Lines changed: 42 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,25 @@
1
1
# 🌟 What is Spector Search?
2
2
3
-
> **The fastest pure-Java semantic search engine — combining vector similarity, keyword search, and hybrid ranking in a single embeddable library with zero external dependencies.**
3
+
> **The Zero-Overhead, Agent-Ready AI Memory Backbone.**
4
+
>
5
+
> Legacy search engines bolted vectors onto text databases. Spector is designed from the ground up for modern AI — combining vector similarity, keyword search, and hybrid ranking in a single embeddable library with zero external dependencies. Connect any AI agent via the built-in MCP server, or embed directly in your application.
4
6
5
-
Spector Search is an open-source, high-performance search engine built entirely on modern Java 25. It's designed for developers who want sub-millisecond search without the complexity of managing external infrastructure. Drop in a JAR, write a few lines of code, and you have production-grade hybrid search.
7
+
Spector Search is an open-source, high-performance search engine built entirely on modern Java 25. It's designed for developers who want sub-millisecond search, native AI agent integration, and zero infrastructure complexity. Drop in a JAR, write a few lines of code, and you have production-grade hybrid search with built-in agent support.
6
8
7
9
---
8
10
9
11
## 🎯 What It Does
10
12
11
-
Spector Search indexes documents with their vector embeddings and text content, then retrieves them using multiple strategies:
13
+
Spector Search indexes documents with their vector embeddings and text content, then retrieves them using multiple strategies — directly from AI agents or your application code:
12
14
13
15
```mermaid
14
16
graph LR
17
+
subgraph Clients
18
+
MCP["🤖 AI Agent (MCP)"]
19
+
REST["🌐 REST API"]
20
+
SDK["📦 Java SDK"]
21
+
end
22
+
15
23
subgraph Search Modes
16
24
A[Vector Search] --> D[Results]
17
25
B[Keyword Search] --> D
@@ -25,6 +33,10 @@ graph LR
25
33
C --> F
26
34
C --> G[RRF Fusion]
27
35
end
36
+
37
+
MCP --> A & B & C
38
+
REST --> A & B & C
39
+
SDK --> A & B & C
28
40
```
29
41
30
42
| Mode | How It Works | Best For |
@@ -39,6 +51,20 @@ graph LR
39
51
40
52
## 💎 Key Differentiators
41
53
54
+
### 🤖 Agent-Native (MCP Protocol)
55
+
56
+
Includes a built-in [Model Context Protocol](https://modelcontextprotocol.io/) server with 6 tools. AI agents connect directly via JSON-RPC — no Python frameworks, no network round-trips.
57
+
58
+
| Feature | Python Vector DB MCP |**Spector MCP**|
> See the [MCP Server Guide](../sdk-usage/mcp-server.md) to connect Claude Desktop, Cursor, or any MCP client in minutes.
67
+
42
68
### 📦 Pure Java, Zero Dependencies
43
69
44
70
Unlike most vector databases that rely on C++, Rust, or Python bindings, Spector Search is 100% Java. It uses the JDK's own Vector API for SIMD acceleration — no JNI, no native libraries, no external infrastructure.
@@ -49,7 +75,7 @@ Unlike most vector databases that rely on C++, Rust, or Python bindings, Spector
49
75
### 🚀 Modern JVM Technologies
50
76
51
77
| Technology | Purpose |
52
-
|-----------|---------|
78
+
|-----------|---------|
53
79
| Java Vector API | SIMD-accelerated math (AVX2/AVX-512/NEON) |
54
80
| Panama FFM | Zero-copy memory-mapped storage, GPU interop |
55
81
| Virtual Threads | Millions of concurrent operations without thread pools |
@@ -100,7 +126,7 @@ Spector offers two quantization paths:
@@ -133,9 +160,13 @@ Spector offers two quantization paths:
133
160
134
161
## 🛠️ Use Cases
135
162
163
+
### 🤖 Agentic AI Memory
164
+
165
+
Connect AI agents (Claude, Cursor, custom) directly to Spector via the built-in MCP server. The agent autonomously ingests documents, searches for relevant context, and retrieves information — all with zero Python glue-code. *"Point your LLM at Spector's MCP port, and it instantly has mathematically-perfect long-term memory."*
166
+
136
167
### 🤖 Retrieval-Augmented Generation (RAG)
137
168
138
-
Ingest documents (PDF, HTML, Markdown), chunk them with token awareness, generate embeddings, and retrieve relevant context for LLM prompting — all through a single `/api/v1/rag` endpoint.
169
+
Ingest documents (PDF, HTML, Markdown), chunk them with token awareness, generate embeddings, and retrieve relevant context for LLM prompting — all through a single `/api/v1/rag` endpoint or the `rag_query` MCP tool.
139
170
140
171
### 🔍 Semantic Search Applications
141
172
@@ -159,6 +190,7 @@ Drop Spector Search into existing Java applications without infrastructure chang
159
190
160
191
> [!NOTE]
161
192
> **Choose Spector Search when:**
193
+
> - You want AI agents to autonomously search your data (MCP integration)
162
194
> - You want sub-millisecond hybrid search without infrastructure complexity
163
195
> - Your stack is Java/JVM and you want native integration
164
196
> - You need an embedded search library with server-mode option
@@ -169,14 +201,16 @@ Drop Spector Search into existing Java applications without infrastructure chang
169
201
> **Consider alternatives when:**
170
202
> - You need a managed cloud service with zero ops
171
203
> - Your team primarily works in Python/Rust/Go
172
-
> - You need built-in ML model serving (Weaviate, Milvus)
204
+
> - You need built-in ML model serving
173
205
174
206
---
175
207
176
208
## 🚀 Next Steps
177
209
178
210
-[Getting Started](getting-started/quickstart.md) — Build and run your first search in 5 minutes
179
211
212
+
-[MCP Server Guide](sdk-usage/mcp-server.md) — Connect an AI agent in 3 steps
213
+
180
214
-[Architecture Overview](architecture/overview.md) — Understand how it works under the hood
181
215
182
216
-[REST API Reference](api-reference/rest-endpoints.md) — Full API documentation
Copy file name to clipboardExpand all lines: docs/docs/architecture/overview.md
+31-1Lines changed: 31 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# 🏗️ Architecture Overview
2
2
3
-
> **Spector Search is a modular, JVM-native vector search engine organized as a Maven multi-module project.** This page covers the module structure, dependency graph, data flow, threading model, and memory architecture that make sub-millisecond search possible.
3
+
> **Spector Search is a modular, JVM-native AI memory backbone organized as a Maven multi-module project.** This page covers the module structure, dependency graph, data flow, threading model, and memory architecture that make sub-millisecond, agent-native search possible.
MCP-->>Agent: JSON-RPC response with search results
202
+
```
203
+
204
+
The MCP path is identical to the programmatic API path — the MCP server simply wraps `SpectorEngine` method calls with JSON-RPC transport. There is **zero network overhead** because everything runs in the same JVM process.
205
+
206
+
> [!TIP]
207
+
> For full MCP architecture details, tool schemas, and design patterns, see the dedicated [MCP Integration](mcp-integration.md) page.
208
+
209
+
---
210
+
181
211
## 🧵 Threading Model: Virtual Threads
182
212
183
213
Spector Search is designed from the ground up for Java virtual threads:
Copy file name to clipboardExpand all lines: docs/docs/index.md
+25-12Lines changed: 25 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,23 @@
1
1
# ⚡ Welcome to Spector Search
2
2
3
-
> **Ultra-fast, SIMD-accelerated semantic search engine built on Java Vector API + modern JVM technologies.**
3
+
> **The Zero-Overhead, Agent-Ready AI Memory Backbone.**
4
4
5
-
Welcome to the Spector Search wiki — your central hub for everything about Spector Search, a high-performance pure-Java vector search engine. Whether you're building RAG pipelines, powering recommendation systems, or need sub-millisecond search with zero infrastructure, you're in the right place.
5
+
Welcome to the Spector Search documentation — your central hub for the high-performance, agent-native AI search engine. Whether you're connecting AI agents via MCP, building RAG pipelines, powering recommendation systems, or need sub-millisecond search with zero infrastructure, you're in the right place.
@@ -29,8 +30,16 @@ Welcome to the Spector Search wiki — your central hub for everything about Spe
29
30
|------|-------------|
30
31
|[Getting Started](getting-started/quickstart.md)| Build, run, and search in 5 minutes |
31
32
|[What is Spector Search](about.md)| Product overview, use cases, and comparisons |
33
+
|[JDK API Status](getting-started/jdk-api-status.md)| Vector API, Panama FFM, and preview feature compatibility |
32
34
|[FAQ](faq.md)| Common questions answered |
33
35
36
+
### 🤖 Agent Integration (MCP)
37
+
38
+
| Page | Description |
39
+
|------|-------------|
40
+
|[MCP Integration Architecture](architecture/mcp-integration.md)| How the MCP server works under the hood |
41
+
|[MCP Server Guide](sdk-usage/mcp-server.md)| Setup for Claude Desktop, Cursor, and custom agents |
42
+
34
43
### 🏗️ Architecture & Concepts
35
44
36
45
| Page | Description |
@@ -65,17 +74,20 @@ Welcome to the Spector Search wiki — your central hub for everything about Spe
65
74
66
75
```mermaid
67
76
graph LR
68
-
A[📄 Document] --> B[🧩 Chunking]
69
-
B --> C[🧠 Embedding]
70
-
C --> D[⚡ HNSW + BM25 Index]
71
-
D --> E[🔍 Hybrid Search]
72
-
E --> F[🎯 RRF Fusion]
73
-
F --> G[🤖 LLM Re-ranking]
74
-
G --> H[✨ Results]
77
+
A["🤖 AI Agent"] --> B["📡 MCP Server"]
78
+
B --> C["⚡ SpectorEngine"]
79
+
C --> D["🧠 Hybrid Search"]
80
+
D --> E["🎯 RRF Fusion"]
81
+
E --> F["🤖 LLM Re-ranking"]
82
+
F --> G["✨ Results"]
83
+
84
+
H["📄 Document"] --> I["🧩 Chunking"]
85
+
I --> J["🧬 Embedding"]
86
+
J --> C
75
87
```
76
88
77
89
> [!TIP]
78
-
> New here? Start with [Getting Started](getting-started/quickstart.md) to build and run your first search in under 5 minutes.
90
+
> New here? Start with [Getting Started](getting-started/quickstart.md) to build and run your first search in under 5 minutes. Want to connect an AI agent? See the [MCP Server Guide](sdk-usage/mcp-server.md).
Copy file name to clipboardExpand all lines: docs/docs/roadmap.md
+73-10Lines changed: 73 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,7 +93,7 @@ The 4-byte `float32 exactNormSq` header can be compressed to 2 bytes using `floa
93
93
!!! note "Status: Future Research"
94
94
Very high implementation effort. Most aggressive compression option.
95
95
96
-
After FWHT rotation, instead of scalar INT8/INT4 quantization, apply **Product Quantization** to the rotated coordinates. The FWHT rotation makes coordinates near-independent (isotropized), which is the ideal input distribution for PQ — similar to how FAISS's OPQ (Optimized PQ) works, but using FWHT instead of a learned rotation.
96
+
After FWHT rotation, instead of scalar INT8/INT4 quantization, apply **Product Quantization** to the rotated coordinates. The FWHT rotation makes coordinates near-independent (isotropized), which is the ideal input distribution for PQ — similar to how Optimized PQ (OPQ) works with learned rotations, but using FWHT instead of an expensive SVD-based rotation matrix.
97
97
98
98
**Memory layout:**
99
99
```
@@ -173,6 +173,65 @@ Instead of uniform INT8 across all dimensions, assign more bits to high-variance
173
173
174
174
---
175
175
176
+
## Agentic AI
177
+
178
+
### ✅ Native MCP Server {#mcp-server}
179
+
180
+
!!! success "Completed"
181
+
Implemented in `spector-mcp` module. 6 tools, stdio transport, agent-native search.
182
+
183
+
Built-in [Model Context Protocol](https://modelcontextprotocol.io/) server that gives AI agents (Claude Desktop, Cursor, autonomous agents) direct, in-process access to Spector’s search engine. Zero network overhead — tool handlers call `SpectorEngine` directly via virtual threads.
-`McpToolHandler` abstract base (template method: timing, error handling, arg parsing)
189
+
-`ToolSchemaBuilder` fluent JSON schema construction
190
+
-`SpectorToolRegistry` for Open/Closed Principle tool registration
191
+
-`SpectorResourceProvider` + `SpectorPromptProvider` for MCP resources/prompts
192
+
-`ResultFormatter` shared formatting utilities
193
+
194
+
---
195
+
196
+
### 🔜 Streamable HTTP Transport {#mcp-http}
197
+
198
+
!!! info "Status: Planned (next)"
199
+
Stdio covers Claude Desktop, Cursor, and all local agents. HTTP needed for cloud/remote deployments.
200
+
201
+
Add HTTP-based MCP transport for scenarios where the agent and Spector run on different machines. The official MCP SDK supports Streamable HTTP transport — Spector would expose the same 6 tools over an HTTP endpoint.
Requires LoRA weight format specification and SIMD matrix multiply implementation.
211
+
212
+
Multi-tenant query projection via SIMD matrix multiply. Instead of creating separate indexes per tenant, store one base index and apply per-tenant LoRA weight matrices at query time using Panama FMA loops.
213
+
214
+
**How it works:**
215
+
- Ingest base model embeddings once
216
+
- Each tenant uploads a small LoRA matrix ($W_A$, typically 768×32 or similar)
217
+
- At query time: $q_{tenant} = q_{base} \times W_A$ (microseconds via Panama SIMD)
218
+
- Search the same index with the projected query
219
+
220
+
**Expected impact:** Zero-downtime multi-tenant customization without index duplication.
221
+
222
+
---
223
+
224
+
### 🔬 ColBERT Late Interaction Reranking {#colbert}
225
+
226
+
!!! note "Status: Future Research"
227
+
Requires token-level vector storage and MaxSim SIMD kernel.
228
+
229
+
Native ColBERT reranking using Panama FMA loops. ColBERT stores a vector for every token in a document, then computes relevance via MaxSim (maximum similarity per query token). Python struggles with this due to GIL contention when routing massive matrices between C++ and Python memory.
230
+
231
+
**Spector advantage:** Off-heap `MemorySegment` arrays and Fused-Multiply-Add Panama loops can natively execute ColBERT MaxSim reranking faster than almost any competitor.
232
+
233
+
---
234
+
176
235
## Compute & Hardware
177
236
178
237
### 🔜 GPU Kernel Dispatch {#gpu-dispatch}
@@ -240,12 +299,16 @@ Migrated all 6 concurrency sites from unstructured `ExecutorService` + `Future`
0 commit comments