Skip to content

Commit d9ef4a7

Browse files
committed
docs: update MkDocs site for enterprise repositioning
- mkdocs.yml: updated site_description, added MCP and JDK API nav entries - index.md: enterprise tagline, MCP metrics, agent integration nav section - about.md: MCP as #1 differentiator, agent-native comparison table, agentic AI memory use case, removed competitor name-drops - architecture/overview.md: added spector-mcp to module diagram, dependency graph, and new MCP agent data flow sequence diagram - roadmap.md: new Agentic AI section (MCP server, Streamable HTTP, LoRA adapter routing, ColBERT late interaction), updated summary table
1 parent 542ac03 commit d9ef4a7

5 files changed

Lines changed: 175 additions & 32 deletions

File tree

docs/docs/about.md

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
11
# 🌟 What is Spector Search?
22

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.
46
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.
68

79
---
810

911
## 🎯 What It Does
1012

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:
1214

1315
```mermaid
1416
graph LR
17+
subgraph Clients
18+
MCP["🤖 AI Agent (MCP)"]
19+
REST["🌐 REST API"]
20+
SDK["📦 Java SDK"]
21+
end
22+
1523
subgraph Search Modes
1624
A[Vector Search] --> D[Results]
1725
B[Keyword Search] --> D
@@ -25,6 +33,10 @@ graph LR
2533
C --> F
2634
C --> G[RRF Fusion]
2735
end
36+
37+
MCP --> A & B & C
38+
REST --> A & B & C
39+
SDK --> A & B & C
2840
```
2941

3042
| Mode | How It Works | Best For |
@@ -39,6 +51,20 @@ graph LR
3951

4052
## 💎 Key Differentiators
4153

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** |
59+
|:---|:---|:---|
60+
| Search latency | 2–10ms | **50–200µs** (100× faster) |
61+
| Network overhead | HTTP/gRPC round-trip | **Zero** (in-process) |
62+
| Concurrent queries | Limited by Python GIL | **10,000+ QPS** |
63+
| Dependencies | Python framework stack | **Single JAR** |
64+
65+
> [!TIP]
66+
> See the [MCP Server Guide](../sdk-usage/mcp-server.md) to connect Claude Desktop, Cursor, or any MCP client in minutes.
67+
4268
### 📦 Pure Java, Zero Dependencies
4369

4470
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
4975
### 🚀 Modern JVM Technologies
5076

5177
| Technology | Purpose |
52-
|-----------|---------|
78+
|-----------|---------|
5379
| Java Vector API | SIMD-accelerated math (AVX2/AVX-512/NEON) |
5480
| Panama FFM | Zero-copy memory-mapped storage, GPU interop |
5581
| Virtual Threads | Millions of concurrent operations without thread pools |
@@ -100,7 +126,7 @@ Spector offers two quantization paths:
100126
### Latency Comparison (100K docs, 128-dim, top-10)
101127

102128
| Engine | Language | Vector Avg | Vector P99 |
103-
|--------|----------|-----------|-----------|
129+
|--------|----------|-----------|-----------|
104130
| **⚡ Spector Search** | **Java 25** | **0.13 ms** | **0.26 ms** |
105131
| hnswlib | C++ | 0.1–0.5 ms | ~1 ms |
106132
| FAISS | C++ | 0.2–0.8 ms | 1–2 ms |
@@ -115,8 +141,9 @@ Spector offers two quantization paths:
115141
### Feature Comparison
116142

117143
| Feature | Spector | Elasticsearch | Qdrant | Milvus | hnswlib |
118-
|---------|---------|--------------|--------|--------|---------|
144+
|---------|---------|--------------|--------|--------|---------|
119145
| **Deployment** | Embedded + Server | Cluster only | Server only | Cluster only | Embedded only |
146+
| **MCP Server** | ✅ Built-in (6 tools) |||||
120147
| **Hybrid Search** | ✅ RRF built-in | ✅ RRF | ✅ Sparse+Dense | ✅ RRF ||
121148
| **Zero Dependencies** | ✅ JDK only | ❌ Heavy stack | ❌ Tokio runtime | ❌ etcd, MinIO, Pulsar | ✅ Header-only |
122149
| **Virtual Threads** | ✅ Project Loom | ❌ Platform threads | N/A (Rust async) | N/A (Go goroutines) | N/A |
@@ -133,9 +160,13 @@ Spector offers two quantization paths:
133160

134161
## 🛠️ Use Cases
135162

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+
136167
### 🤖 Retrieval-Augmented Generation (RAG)
137168

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.
139170

140171
### 🔍 Semantic Search Applications
141172

@@ -159,6 +190,7 @@ Drop Spector Search into existing Java applications without infrastructure chang
159190

160191
> [!NOTE]
161192
> **Choose Spector Search when:**
193+
> - You want AI agents to autonomously search your data (MCP integration)
162194
> - You want sub-millisecond hybrid search without infrastructure complexity
163195
> - Your stack is Java/JVM and you want native integration
164196
> - You need an embedded search library with server-mode option
@@ -169,14 +201,16 @@ Drop Spector Search into existing Java applications without infrastructure chang
169201
> **Consider alternatives when:**
170202
> - You need a managed cloud service with zero ops
171203
> - 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
173205
174206
---
175207

176208
## 🚀 Next Steps
177209

178210
- [Getting Started](getting-started/quickstart.md) — Build and run your first search in 5 minutes
179211

212+
- [MCP Server Guide](sdk-usage/mcp-server.md) — Connect an AI agent in 3 steps
213+
180214
- [Architecture Overview](architecture/overview.md) — Understand how it works under the hood
181215

182216
- [REST API Reference](api-reference/rest-endpoints.md) — Full API documentation

docs/docs/architecture/overview.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 🏗️ Architecture Overview
22

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.
44
55
---
66

@@ -39,6 +39,7 @@ graph LR
3939
subgraph "⚡ Engine & Interfaces"
4040
engine["spector-engine<br/><i>Unified facade + lifecycle</i>"]
4141
server["spector-server<br/><i>REST API + SSE streaming</i>"]
42+
mcp["spector-mcp<br/><i>MCP Server — Agent-native</i>"]
4243
cluster["spector-cluster<br/><i>Distributed gRPC search</i>"]
4344
cli["spector-cli<br/><i>spectorctl CLI</i>"]
4445
client["spector-client<br/><i>Java client SDK</i>"]
@@ -61,6 +62,7 @@ graph LR
6162
graph TD
6263
server["🖥️ server"] --> cluster["🌐 cluster"]
6364
server --> engine["⚡ engine"]
65+
mcp["🤖 mcp"] --> engine
6466
6567
cluster --> engine
6668
engine --> query["🔍 query"]
@@ -94,6 +96,7 @@ graph TD
9496
|------|-------------|
9597
| `cluster → engine → query → index → storage → core` | Main data path |
9698
| `server → engine` | REST API entry point |
99+
| `mcp → engine` | MCP agent entry point (in-process, zero network) |
97100
| `engine → ingestion` | Document ingestion pipeline |
98101
| `engine → rag` | RAG context assembly pipeline |
99102
| `engine → gpu` | Optional GPU acceleration |
@@ -178,6 +181,33 @@ sequenceDiagram
178181

179182
---
180183

184+
## 🤖 Data Flow: MCP Agent Path
185+
186+
```mermaid
187+
sequenceDiagram
188+
participant Agent as 🤖 AI Agent (Claude/Cursor)
189+
participant MCP as 📡 MCP Transport (stdio)
190+
participant Handler as 🔧 McpToolHandler
191+
participant Engine as ⚡ SpectorEngine
192+
participant SIMD as 🔬 SIMD Kernels
193+
194+
Agent->>MCP: tools/call {"name": "semantic_search", "arguments": {"query": "..."}}
195+
MCP->>Handler: SemanticSearchTool.execute(engine, args)
196+
Handler->>Engine: engine.search(query, topK)
197+
Engine->>SIMD: HNSW traversal (off-heap MemorySegment)
198+
SIMD-->>Engine: ScoredResult[] (~100µs)
199+
Engine-->>Handler: SearchResponse
200+
Handler-->>MCP: CallToolResult
201+
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+
181211
## 🧵 Threading Model: Virtual Threads
182212

183213
Spector Search is designed from the ground up for Java virtual threads:

docs/docs/index.md

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
# ⚡ Welcome to Spector Search
22

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.**
44
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.
66

77
---
88

99
## 🔥 Why Spector Search?
1010

1111
| Metric | Value |
1212
|--------|-------|
13+
| 🤖 MCP Tools | **6 agent-ready tools** (semantic, hybrid, RAG, ingest, delete, status) |
1314
| ⚡ Vector Search Latency | **0.05 ms** avg @ 10K docs (128-dim) |
1415
| 🔍 Keyword Search Latency | **0.98 ms** avg @ 100K docs |
1516
| 🧬 Hybrid Search Latency | **0.17 ms** avg @ 10K docs |
1617
| 🚀 Vector Throughput | **18,800 queries/sec** @ 10K |
1718
| 🧵 Concurrent Hybrid | **14,000+ ops/sec** @ 16 threads (384-dim) |
1819
| 🗜️ IVF-PQ + TurboQuant | **8–32× memory reduction** |
19-
| ✅ Test Suite | **316+ tests**, all passing |
20+
| ✅ Test Suite | **331+ tests**, all passing |
2021
| 📦 Dependencies | **Zero** (JDK only) |
2122

2223
---
@@ -29,8 +30,16 @@ Welcome to the Spector Search wiki — your central hub for everything about Spe
2930
|------|-------------|
3031
| [Getting Started](getting-started/quickstart.md) | Build, run, and search in 5 minutes |
3132
| [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 |
3234
| [FAQ](faq.md) | Common questions answered |
3335

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+
3443
### 🏗️ Architecture & Concepts
3544

3645
| Page | Description |
@@ -65,17 +74,20 @@ Welcome to the Spector Search wiki — your central hub for everything about Spe
6574

6675
```mermaid
6776
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
7587
```
7688

7789
> [!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).
7991
8092
---
8193

@@ -85,10 +97,11 @@ graph LR
8597
|---|---|
8698
| **Language** | Java 25 |
8799
| **License** | Apache 2.0 |
88-
| **Modules** | 16 Maven modules |
100+
| **Modules** | 18 Maven modules |
89101
| **Dependencies** | Zero (JDK only) |
90102
| **SIMD** | AVX2 / AVX-512 / NEON |
91103
| **GPU** | CUDA via Panama FFM |
104+
| **MCP** | Built-in, 6 agent-ready tools |
92105
| **Distributed** | gRPC fan-out + consistent hashing |
93106

94107
---

docs/docs/roadmap.md

Lines changed: 73 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ The 4-byte `float32 exactNormSq` header can be compressed to 2 bytes using `floa
9393
!!! note "Status: Future Research"
9494
Very high implementation effort. Most aggressive compression option.
9595

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.
9797

9898
**Memory layout:**
9999
```
@@ -173,6 +173,65 @@ Instead of uniform INT8 across all dimensions, assign more bits to high-variance
173173

174174
---
175175

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.
184+
185+
**Tools:** `semantic_search`, `hybrid_search`, `rag_query`, `ingest_document`, `delete_document`, `engine_status`
186+
187+
**Architecture:**
188+
- `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.
202+
203+
**Use cases:** Cloud deployments, remote agent connections, multi-agent architectures.
204+
205+
---
206+
207+
### 🔬 LoRA Adapter Routing {#lora-routing}
208+
209+
!!! note "Status: Future Research"
210+
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+
176235
## Compute & Hardware
177236

178237
### 🔜 GPU Kernel Dispatch {#gpu-dispatch}
@@ -240,12 +299,16 @@ Migrated all 6 concurrency sites from unstructured `ExecutorService` + `Future`
240299
| # | Improvement | Compression | Recall Impact | Effort | Status |
241300
|---|------------|-------------|---------------|--------|--------|
242301
| 1 | **VASQ-4** | 6–8× vs float32 | -2 to -4% (mitigated w/ rescore) | Medium | ✅ Done |
243-
| 2 | **Padding-aware storage** | +25% (non-pow2 dims) | None (L2) | Low | 🔜 Next |
244-
| 3 | **Norm header f16** | +2 bytes/vec | Negligible | Very Low | 🔜 Next |
245-
| 4 | **VASQ-PQ hybrid** | 16–32× vs float32 | -7 to -15% | Very High | 🔬 Research |
246-
| 5 | **Flat-mode VASQ** | 3× on flat shards | None or -0.5% | Medium | 🔬 Research |
247-
| 6 | **Adaptive bit-width** | ~10–15% | Negligible | Very High | 🔴 Not planned |
248-
| 7 | **GPU kernel dispatch** | N/A (compute) | N/A | Medium | 🔜 Infra ready |
249-
| 8 | **NPU acceleration** | N/A (compute) | N/A | High | 🔬 Exploratory |
250-
| 9 | **WASM edge runtime** | N/A (deployment) | N/A | High | 🔬 Exploratory |
251-
| 10 | **Structured concurrency** | N/A (runtime) | N/A | Low | ✅ Done |
302+
| 2 | **Native MCP Server** | N/A (agent integration) | N/A | Medium | ✅ Done |
303+
| 3 | **Padding-aware storage** | +25% (non-pow2 dims) | None (L2) | Low | 🔜 Next |
304+
| 4 | **Norm header f16** | +2 bytes/vec | Negligible | Very Low | 🔜 Next |
305+
| 5 | **Streamable HTTP transport** | N/A (deployment) | N/A | Medium | 🔜 Planned |
306+
| 6 | **VASQ-PQ hybrid** | 16–32× vs float32 | -7 to -15% | Very High | 🔬 Research |
307+
| 7 | **Flat-mode VASQ** | 3× on flat shards | None or -0.5% | Medium | 🔬 Research |
308+
| 8 | **LoRA adapter routing** | N/A (multi-tenant) | N/A | High | 🔬 Research |
309+
| 9 | **ColBERT late interaction** | N/A (reranking) | N/A | High | 🔬 Research |
310+
| 10 | **Adaptive bit-width** | ~10–15% | Negligible | Very High | 🔴 Not planned |
311+
| 11 | **GPU kernel dispatch** | N/A (compute) | N/A | Medium | 🔜 Infra ready |
312+
| 12 | **NPU acceleration** | N/A (compute) | N/A | High | 🔬 Exploratory |
313+
| 13 | **WASM edge runtime** | N/A (deployment) | N/A | High | 🔬 Exploratory |
314+
| 14 | **Structured concurrency** | N/A (runtime) | N/A | Low | ✅ Done |

0 commit comments

Comments
 (0)