Repository navigation
Home
Agent-ready cognitive memory that forms associations — sub-millisecond recall, zero infrastructure.
Spector gives AI agents real memory: it remembers, forgets, consolidates, and forms associations across working, episodic, semantic, and procedural tiers, linked by co-activation, temporal, and entity graphs. Retrieval fuses dense semantic search with hybrid lexical signals and 6-phase cognitive scoring for sub-millisecond recall.
Connect your agents through the built-in MCP server (Claude Desktop, Cursor, custom agents), call it over REST/gRPC, use the Python, TypeScript, or Java Client SDKs, or embed it directly in the JVM — no external database, no infrastructure to run. Every user, agent, or tenant is physically isolated in its own on-disk namespace. The Sealed Memory Kernel (spector-kernel) keeps it all off-heap via Java 25 Foreign Function & Memory (FFM) with zero GC pressure.
Connect your agent or application to Spector in seconds:
```python
from spector_client import SpectorClient, MemoryTier
# Connect to running daemon or local test instance
client = SpectorClient.builder().with_rest("http://localhost:7070").build()
# 1. Remember with affective & contextual metadata
record = client.memory.remember(
text="User is designing a low-latency RAG system with pgvector and Spector",
tier=MemoryTier.SEMANTIC,
tags=["rag", "architecture", "database"],
interest=0.9,
valence=1,
)
print(f"Memory recorded: {record.get('id', 'stored')}")
# 2. Recall with associative cognitive scoring
memories = client.memory.recall("database architecture preferences", top_k=3)
for m in memories:
print(f"[{m.id}] score={m.score:.4f} | {m.text}")
```
```typescript
import { SpectorClient, MemoryTier } from '@spectrayan/spector-client';
const client = SpectorClient.createDefault('http://localhost:7070');
// 1. Remember with contextual tags
const record = await client.memory.remember({
text: 'User prefers dark mode, high contrast, and TypeScript examples',
tier: MemoryTier.SEMANTIC,
tags: ['preferences', 'ui'],
interest: 0.85,
});
console.log(`Stored engram: ${record.id}`);
// 2. Recall with 6-phase scoring
const results = await client.memory.recall('user ui preferences', { topK: 5 });
results.forEach(m => console.log(`[${m.id}] ${m.text}`));
```
```java
import com.spectrayan.spector.client.SpectorClient;
import java.util.List;
// Lightweight client SDK — zero vector/Panama preview flags required
try (var client = SpectorClient.builder().baseUri("http://localhost:7070").build()) {
// 1. Remember
var record = client.memory().store(
"User prefers concise responses with architectural diagrams",
List.of("preferences", "formatting")
);
System.out.println("Stored engram: " + record.getId());
// 2. Recall
var results = client.memory().recall("user formatting preferences", 5);
results.forEach(m -> System.out.println(m.getText()));
}
```
```bash
# 1. Remember
curl -X POST http://localhost:7070/api/v1/memory/remember \
-H "Content-Type: application/json" \
-d '{
"text": "User prefers dark mode and high-contrast syntax highlighting",
"tier": "SEMANTIC",
"tags": "preferences,ui",
"interest": 0.9,
"valence": 1
}'
# 2. Recall
curl -X POST http://localhost:7070/api/v1/memory/recall \
-H "Content-Type: application/json" \
-d '{"query": "user ui preferences", "topK": 5}'
```
```bash
# 1. Remember with cognitive metadata
spector memory remember \
--id "pref-dark-mode" \
--text "User prefers dark mode and high-contrast syntax highlighting" \
--tier SEMANTIC \
--tags "preferences,ui" \
--interest 0.9 \
--valence 1
# 2. Recall with 6-phase fused cognitive scoring
spector memory recall "user ui preferences" --top-k 5 --profile BALANCED
```
| Metric | Value | Architectural Significance |
|---|---|---|
| 🧠 Cognitive Recall | Ultra-low latency | Hardware-accelerated in-process SIMD scoring |
| ⚡ Scoring Loop | ~200 cycles | 6-Phase SIMD fused scan eliminating dead candidates early |
| 🚀 Peak QPS | 61,011 | Concurrent queries running lock-free across Virtual Threads |
| 🤖 MCP Tools | 37+ tools | In-process stdio + Streamable HTTP Model Context Protocol |
| 🛡️ Inline Bloom Tags | 128-bit Bloom | Offsets 24–39: 60× lower false-positive rate than 64-bit filters |
| 🗜️ Compression | 4×–32× | SVASQ-8 to IVF-PQ SIMD quantization |
| 📦 Storage Engine | V4 Bundles | Single-VMA runtime.bundle, partition.bundle, identity.bundle
|
| ⚙️ Dependencies | Zero | Pure Java 25 (JDK only) — no external databases, no Docker required |
-
:material-memory:{ .lg .middle } Sealed Memory Kernel
Java 25 Panama FFM off-heap storage, single-VMA V4 Bundles, 8 typed memory shapes, 64-byte pure encoding headers, and crash-resilient WAL recovery.
-
:material-brain:{ .lg .middle } Cognitive Pathways
Formal Remember, Recall (6-phase SIMD scoring loop), Reflect (consolidation), and Dream pathways across 4 memory tiers.
-
:material-robot:{ .lg .middle } 37+ Agent MCP Tools
In-process Model Context Protocol server for Claude Desktop, Cursor, and autonomous agents across memory, context, RBAC, and soul governance.
-
:material-code-tags:{ .lg .middle } Multi-SDK Ecosystem
Lightweight client SDKs for Python, TypeScript, and Java Client, plus Spring AI starter, OpenAPI REST endpoints, and the standalone CLI.
-
:material-lightning-bolt:{ .lg .middle } Spector Synapse
Application server and agentic gateway — persona enactment, dual-process cognitive appraisal, and multi-tenant namespace governance.
-
:material-eye:{ .lg .middle } Cortex Dashboard
Angular 22 real-time Cortex dashboard — 3D interactive galaxy visualizer, live SSE telemetry inspector, and namespace administration.
-
:material-speedometer:{ .lg .middle } Vector Nucleus
Hardware SIMD acceleration (AVX2/AVX-512), SVASQ quantization (4×–32×), HNSW graphs, Okapi BM25, and learned sparse SPLADE indexing.
-
:material-shield-lock:{ .lg .middle } Physical Isolation & Security
True on-disk directory separation per namespace, AES-256-GCM encryption at rest, HMAC blind tags, BYOK encryption, and hierarchical soul contexts.
| Technology | Specification | Details |
|---|---|---|
| Language & Runtime | Java 25+ | Pure Java with Foreign Function & Memory (FFM) API |
| License | Apache 2.0 | 100% open source under the Apache License, Version 2.0 |
| Modules | 25 Maven Modules | Reactor architecture: nucleus, memory, synapse, sdks |
| SIMD Acceleration | AVX2 / AVX-512 / NEON | Java Vector API for zero-copy vectorized arithmetic |
| Off-Heap Storage | MemorySegment & Bundles | Zero-GC guarantees via single-VMA mmap containers |
| MCP Integration | 37+ Agent Tools | Stdio and Streamable HTTP JSON-RPC 2.0 |
| Multi-Tenancy | Physical Sharding | Cryptographically isolated directories with AES-256-GCM |
Built with ⚡ by Spectrayan · GitHub · Apache 2.0
- Home
-
Getting Started
- Quick Start
- Installation
- Developer Guide
- JDK API Status
- MCP Server
- Java SDK
- Java API Reference
- Python SDK
- TypeScript SDK
- Spring AI Integration
- CLI Reference
- REST API
- API Playground
- Error Codes
- Configuration
- Deployment
-
Cognitive Memory
- Overview
- Getting Started
- Use Cases
- API Reference
- Concepts
- Pathways
- Scoring features
- Profiles
- Experimental
- Internals
- Design ancestry
-
Memory Kernel
- Overview
- Bundle Architecture
- Memory Shapes
- Binary Layouts & Tags
- WAL & Durability
-
Region Reference
- Overview & Index
- Partition Regions
-
Runtime Regions
- Working Memory
- Co-Activation Matrix
- Index MIDX
- Index IDPL
- Hebbian Graph
- Temporal Chains
- Temporal Facts
- Entity Directory
- Entity Names Pool
- HyperEntity Graph
- Entity Types Registry
- Relation Types Registry
- BM25 Lexical Index
- Checkpoint
- Insula (Somatic Self-Model)
- Continuity
- Provenance
- SPLADE Sparse Index
- Entity Reverse Index
- Identity Regions
- Synapse & Cortex
-
Architecture
- System Overview
- Core Concepts
- Ingestion Pipeline
- MCP Integration
- Distributed Mode
- Event Notifications
- Namespace Sharding
- Single-Namespace Scale & Capacity Limits
- Scale Benchmark Empirical Results
- Writer Quiesce Pause Empirical Results
- Kill-Owner Failover Empirical Results
- Salience & Importance Architecture
- GPU Acceleration
- Performance Tuning
- Test Framework & LLM Judge
- Chat & Visual Test Infrastructure
- Security & Data
-
Architecture Decision Records (ADRs)
- Overview
- Template
- Master Catalog (0001-0085)
-
Memory Kernel & Storage Formats
- ADR-0001: Graph Compression Strategy for Entity Graph
- ADR-0002: Multi-Partition Recall Fan-Out & Frozen Reten...
- ADR-0003: Completing Hypergraph Entity-Graph Graduation
- ADR-0004: Mmap Bundle Architecture & File Descriptor Sc...
- ADR-0005: spector-memory Technical Debt Hardening
- ADR-0042: Graph Recall Architecture and Cognitive Trave...
- ADR-0043: Single-VMA Bundle Layout Specification
- ADR-0044: Memory Kernel Isolation, Composition, and Layout
- ADR-0045: Spector Memory Import & Export Pipeline
- ADR-0046: Single Engram, Four Stores Storage Architecture
- ADR-0047: Episodic Memory and Engram Model Hierarchy
- ADR-0057: Remediation of Hardcoded Memory Offsets and Alignment Constants
- ADR-0062: Spector Memory Organization — Three-Plane Architecture
- ADR-0082: Index Plane Lifecycle, Derived Views, and Reconciliation
-
Active Inference Self-Model Engine (AISME)
- ADR-0006: Episodic Conversation Architecture
- ADR-0007: ReflectPathway — Biological Sleep Consolidation
- ADR-0008: Cognitive Substrate Evolution (TANGLE, GPM, M...
- ADR-0009: AISME Phase 1 — Homeostatic Affective Core
- ADR-0010: AISME Phase 2 — Free-Energy Guided Recall
- ADR-0011: AISME Phase 3 — Modern Hopfield Associative M...
- ADR-0012: AISME Phase 4 — Neural Manifold Distance (NMD)
- ADR-0013: AISME Phase 5 — Predictive Coding Narrative Self
- ADR-0014: AISME Phase 6 — Consciousness Continuity Metr...
- ADR-0015: AISME Phase 7 — Synaptic Relay Wiring & Pathw...
- ADR-0016: AISME Phase 8 — Closed-Loop Epistemic Learning
- ADR-0017: AISME Phase 9 — Generative Counterfactuals & ...
- ADR-0018: AISME Phase 10 — WanderPathway & Kernel Conti...
- ADR-0019: AISME Phase 11 — Expected Free Energy Policy ...
- ADR-0020: AISME Phase 12 — Continuous Self-Dynamics
- ADR-0023: AISME Complete Loop Closure & CognitiveVector...
- ADR-0024: Polymorphic SoulContext Hierarchy in AISME
- ADR-0027: Soul-Conditioned & Salience-Modulated Persona...
- ADR-0048: Cross-Capture Graph & CoActivation Kernel
- ADR-0049: Identity Trajectory Lyapunov Stability
- ADR-0050: Event Density Gating and Dynamic Epistemic Co...
- ADR-0051: Bayesian Online Change-Point Episode Segmenta...
- ADR-0052: Differential Privacy and Edge Anonymization
- ADR-0053: Multimodal Composite Importance Scoring
- ADR-0054: Lifespan-Adaptive Forgetting & Retention Kernel
- ADR-0055: LSR & RFF Dense Associative Memory Engineerin...
- ADR-0056: Log-Sum-ReLU (LSR) & Random Fourier Features ...
- ADR-0058: Linguistic & Vocal Prosody Expression Engine
- ADR-0063: Spacetime Vector Search and Synaptic Relay Architecture
- ADR-0064: Spacetime Simulation on Wander, Dream, and Express Pathways
- ADR-0071: Remember Cognitive Pathway Architecture
- ADR-0072: Six-Phase Fused Cognitive Scoring Pipeline
- ADR-0073: Recall Cognitive Pathway and Multi-Phase Retrieval Architecture
- ADR-0074: Reflect Cognitive Pathway and Sleep Consolidation Architecture
- ADR-0078: Salience Network and Thalamic Cognitive Profiles Architecture
-
Platform, Synapse & Clustering
- ADR-0021: Nucleus Symmetric Hardware Abstraction Layer ...
- ADR-0022: Embodied Kinesics & Phenomenological MCP Engine
- ADR-0025: Declarative MCP Tool Definitions via JSON Sch...
- ADR-0026: Dual-Plane Concurrency & Async Queue Backpres...
- ADR-0028: Dual-Plane Memory Audit Architecture (Separat...
- ADR-0029: Episodic→Semantic Lineage Provenance Region
- ADR-0030: Unified Engram Encoding Header Architecture
- ADR-0031: Unified Configuration Architecture & Bypass E...
- ADR-0032: Persona Enactment — Soul as Policy over Memory
- ADR-0033: Decoupling Cognitive & Mathematical Kernels t...
- ADR-0034: Cell Topology, Namespace Ownership, and HA Cl...
- ADR-0035: Cognitive Pathway Framework Rearchitecture
- ADR-0036: Pathway Error Handling, Isolation, and Circui...
- ADR-0037: Ingestion Boundary and Sensory Relocation
- ADR-0038: SIMD-Accelerated BM25 Lexical Scoring Optimiz...
- ADR-0039: Robust Unified Rate Limiting Architecture
- ADR-0040: Universal Apache Camel Messaging Channels
- ADR-0041: Unified Connector Architecture for Ingestion
- ADR-0059: Java 27 Upgrade Strategy and Value Class Migration
- ADR-0060: Cognitive Continuity Layer and Decoded Mind Streams
- ADR-0061: In-Memory Multi-Tenant Quartz Scheduler
- ADR-0065: Client SDK Architecture, OpenAPI, and MCP Integration
- ADR-0066: Engine & CLI Stabilization — Issue #727 Hardening
- ADR-0067: Cell-Based High Availability and Namespace-Sticky Sharding
- ADR-0068: Phileas PII Redaction Engine for Spector Synapse
- ADR-0069: Synapse-Owned Tool Access Policy
- ADR-0070: Unified Error Taxonomy and Exception Handling Architecture
- ADR-0075: Extensible LLM and Multimodal Embedding Provider SPI
- ADR-0076: Zero-Dependency Pluggable Cache Abstraction
- ADR-0077: Model B Asynchronous Task Queue and Concurrency
- ADR-0079: Asynchronous Memory Event and Telemetry Notification Bus
- ADR-0080: Observed Memory and Pathway Metrics Telemetry Architecture
- ADR-0081: Dedicated Reactive Ingress and In-Process Path Router
- ADR-0083: Namespace-Isolated Memory Analytics & Telemetry
- ADR-0084: Dual-Plane Conversation Persistence
- ADR-0085: Dynamic Synapse Configuration Overrides and Runtime Propagation
-
Modules Registry
- Overview
- Foundation Layer (/nucleus)
- Cognitive Layer (/memory)
- Gateway Layer (/synapse)
- Benchmarks & UI
- Deep Dives
-
Community
- Governance
- Contributing
- FAQ
- Glossary
- Roadmap
- 🔬 Labs
- Third-Party Legal