Repository navigation
Getting Started Developer Guide
This guide is for contributors who want to clone Spector, run it locally, make a focused change, and verify it before opening a pull request. If you only want to try the product, start with the Quick Start or Installation guide instead.
Project-level contribution rules live in the README and CONTRIBUTING files. Read those before you push a branch; commits require a sign-off.
Install these tools before cloning the repository:
| Tool | Required | Check |
|---|---|---|
| JDK 25 | Yes | java -version |
| Maven 3.9 or newer | Yes | mvn --version |
| Git | Yes | git --version |
| Ollama | Optional, useful for memory and auto-embedding examples | ollama --version |
| Docker | Optional, useful for container and integration workflows | docker --version |
Use a terminal that preserves normal shell quoting. On Windows PowerShell, prefer curl.exe in the examples below so PowerShell does not alias curl to Invoke-WebRequest.
git clone https://github.com/spectrayan/spector.git
cd spector
mvn clean verifyA successful first build ends with BUILD SUCCESS. For a faster compile-only check while iterating:
mvn clean compileTo build all modules without running tests:
mvn clean package -DskipTestsThe synapse module starts the embedded Armeria REST/gRPC/SSE server on port 7070 by default:
mvn spring-boot:run -pl synapse/spector-synapse -PsynapseIn another terminal, verify the service:
curl http://localhost:7070/health
curl http://localhost:7070/api/v1/statusTo use a different port or API key, pass environment variables or system properties:
SPECTOR_PORT=7071 SPECTOR_API_KEY=my-secret-key mvn spring-boot:run -pl synapse/spector-synapse -PsynapseIf you plan to test automatic embeddings or cognitive memory examples, start Ollama before the node:
ollama serve
ollama pull nomic-embed-textWith the node running, store a semantic memory:
curl -X POST http://localhost:7070/api/v1/memory/remember \
-H "Content-Type: application/json" \
-d '{
"id": "dev-guide-1",
"text": "Spector stores agent memories in semantic, episodic, working, and procedural tiers.",
"tier": "SEMANTIC",
"source": "USER_STATED",
"tags": "developer-guide,memory"
}'The endpoint returns an accepted task response with the generated task id and memory id. See the REST API reference for the full request schema and related recall endpoints.
Spector is a multi-module Maven project. Start with these areas when deciding where a change belongs:
| Area | Modules |
|---|---|
| Foundation & Acceleration |
nucleus/spector-bom, nucleus/spector-commons, nucleus/spector-config, nucleus/spector-core, nucleus/spector-cpu, nucleus/spector-gpu, nucleus/spector-hdc, nucleus/spector-index, nucleus/spector-events, nucleus/spector-test-support
|
| Cognitive Memory & Ingestion |
memory/spector-memory, memory/spector-provider-api, memory/spector-providers, memory/spector-ingestion, memory/spector-inspect, memory/spector-metrics
|
| Gateways & Integrations |
synapse/spector-synapse, synapse/spector-connector, synapse/spector-mcp, synapse/spector-cli, synapse/spector-spring, synapse/spector-batch
|
| Performance & Benchmarks | bench/spector-bench |
For a deeper walkthrough, read the architecture overview, module guide, and module-specific README files.
Run the full test suite before opening a pull request when practical:
mvn testFor focused work, test the touched module and any required upstream modules:
mvn test -pl memory/spector-memory -am
mvn verify -pl synapse/spector-synapse -Psynapse -amTo run a single test class:
mvn test -pl spector-core -Dtest=DotProductTestUse mvn clean verify before submitting changes that touch public APIs, module boundaries, packaging, or documentation snippets that are checked during the site build.
IntelliJ IDEA, Eclipse, and VS Code can import the root pom.xml as a Maven project. Set the project SDK to JDK 25 and let Maven manage compiler flags and module dependencies.
Useful defaults:
- Enable automatic Maven project import.
- Delegate build and test actions to Maven if IDE classpath resolution differs from the command line.
- Run the server from Maven with the
spector-synapsecommand above, or create a run configuration forcom.spectrayan.spector.synapse.SynapseApplication. - Keep generated build output under each module's
target/directory out of commits.
Before opening a pull request:
- Confirm the issue is still open and no existing pull request solves it.
- Create a branch with a focused name, for example
docs/getting-started-developer-guide. - Keep the change small enough to review in one pass.
- Add or update tests/docs for behavior changes.
- Ensure all markdown lists include a preceding blank line and 4-space nesting (
python3 scripts/validate_docs_lists.py). - Run the narrowest useful check, then the broader Maven check when the change warrants it.
- Commit with a conventional message and sign off:
git commit -s -m "docs: add developer getting started guide".
| Symptom | Fix |
|---|---|
| Maven uses an older JDK | Set JAVA_HOME to JDK 25 and reopen the terminal. |
curl behaves differently on PowerShell |
Use curl.exe instead of curl. |
Port 7070 is already in use |
Pass a different port with -Dexec.args="7071 384". |
| Memory examples fail to embed content | Start Ollama and pull nomic-embed-text, or inspect node logs for the configured embedding provider. |
| A module test cannot resolve local classes | Add -am so Maven also builds required upstream modules. |
- 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