Anchor Engine ⚓
June 23, 2026 · View on GitHub
Deterministic semantic memory for local‑first AI systems
⚠️ FIRST READ THIS: The Documentation Policy is the single source of truth for all abstractions, file locations, and developer conventions. All runtime objects are stored in
$HOME/.anchor/and are never in the project root. Read it before coding.
🎯 Quick Navigation
👨💻 Developers - Building, Testing, Debugging
Start here:
- Documentation Policy - Required read (abstractions, paths, conventions)
- Project Specs - Architecture, API, data model, test framework
- Current Standards - Active architecture standards (001-038)
Quick reference:
- Test Framework - How to test (P0, Vitest, integration, operational)
- Test Usability - Automated runtime verification
🧠 Users - Understanding, Using, Exploring
Start here:
- Whitepaper - The STAR Context Protocol (conceptual, no code)
- API Endpoints - Available API routes and usage
- Architecture Overview - How it works (high-level)
For deeper knowledge:
- STAR Algorithm - The physics-inspired retrieval engine
- Data Model - Compound → Molecule → Atom hierarchy
📚 Documentation Structure
| Directory | Audience | Purpose | Key Files |
|---|---|---|---|
specs/ | 🧑💻 Developers | Technical architecture, implementation, API | spec.md, current-standards/ |
docs/ | 🧠 Users | Conceptual understanding, whitepaper, theory | whitepaper.md |
engine/ | 🧑💻 Developers | Source code, tests, API routes | src/, tests/ |
🚀 Quick Start
Installation (All Users)
# Clone and install
git clone https://github.com/RSBalchII/anchor-engine-node
cd anchor-engine-node
pnpm install
# Start the engine
pnpm start
Development (Developers)
# Run tests
pnpm test
# Start with logging
pnpm start
# Run operational verification
python tests/test_us006.py
Windows 11 Startup Notes ⚠️
On Windows, pnpm.cmd is a PowerShell wrapper that can cause startup issues in git-bash/MSYS environments. If you encounter errors like:
ERR_MODULE_NOT_FOUND: Cannot find module 'C:\nvm4w\nodejs\node_modules\pnpm\dist\pnpm.mjs'pnpm: command not found- Engine fails to start via
pnpm start
Use this workaround instead:
# Direct Node.js startup (bypasses pnpm wrapper)
node --expose-gc engine/dist/index.js
This approach:
- ✅ Works in git-bash/MSYS without path translation issues
- ✅ No dependency on nvm4w or global pnpm installation quirks
- ✅ More reliable than
pnpm starton Windows 10/11
Alternative methods:
# If you have pnpm installed globally
C:\Users\rober\AppData\Roaming\npm\npx.cmd pnpm start
# Or use the PowerShell wrapper directly
powershell -NoProfile -ExecutionPolicy Bypass -File "pnpm.ps1" start
Note: The compiled engine/dist/index.js is built via pnpm --filter anchor-engine build. If you need to rebuild after code changes, run:
C:\Users\rober\AppData\Roaming\npm\node_modules\pnpm\bin\pnpm.mjs --filter anchor-engine build
📖 What Anchor Engine Is
Anchor Engine is a semantic memory layer — not an agent framework, not a vector database, and not a cloud service.
It's a deterministic, explainable, CPU‑only system for storing and retrieving long-term memory for AI agents.
It replaces embeddings with a physics‑inspired graph algorithm (STAR) that retrieves context using structure, time, and meaning — not dense vectors.
What Anchor Engine Provides
- ✅ Deterministic retrieval — same query → same result
- ✅ Graph‑based semantics — not probabilistic similarity
- ✅ Temporal decay — older memories naturally fade
- ✅ Provenance receipts — every retrieval comes with proof
- ✅ CPU‑only performance — <1GB RAM, no GPU needed
- ✅ Local‑first architecture — your data never leaves your machine
Use Cases
Use it as:
- A drop‑in replacement for embeddings/vector DBs
- A memory backend for MCP‑compatible agents (Claude, Cursor, Qwen Code)
- A personal knowledge system for long‑term projects
What Anchor Engine Is Not
❌ Not an agent framework
❌ Not a cloud service
❌ Not a probabilistic vector search engine
❌ Not a tool that stores your data anywhere except your machine
Why This Exists
Most AI memory systems today assume:
- GPU‑heavy vector search
- Probabilistic retrieval
- Cloud dependence
- Opaque similarity metrics
I kept running into the same problem:
I needed a memory system that behaved like a mind, not a search engine.
Anchor Engine is built around three principles:
- Determinism — same query → same result
- Explainability — every retrieval comes with provenance
- Local sovereignty — your data stays on your machine
This project grew out of months of building agents that needed reliable memory — and discovering that existing tools weren't designed for that job.
🎓 Citation
If you use this software in your research, please cite:
DOI: https://doi.org/10.5281/zenodo.19324840
Citation: Balch II, R. S. (2026). STAR: Semantic Temporal Associative Retrieval - A Local-First Graph-Based Context Engine (v5.0.0). Zenodo.
Software: Anchor Engine Node
License: AGPL-3.0
⚡ Architecture & Technology Stack
Native Modules (Rust WASM)
Anchor Engine uses Rust-compiled WebAssembly modules for performance-critical operations. This eliminates the need for native compilation and provides universal platform support.
Published Packages:
| Package | Purpose | Version |
|---|---|---|
| @rbalchii/anchor-fingerprint-wasm | Content fingerprinting (MD5, SHA256) | 1.0.0+ |
| @rbalchii/anchor-atomizer-wasm | Text atomization & entity extraction | 1.0.0+ |
| @rbalchii/anchor-keyextract-wasm | Key-value extraction from text | 1.0.0+ |
| @rbalchii/anchor-tagwalker-wasm | Semantic tag traversal | 1.0.0+ |
Benefits:
- ✅ Zero native compilation required (works on Windows ARM64, macOS, Linux)
- ✅ ~90% smaller binary size (~1.4 MB WASM vs ~12 MB C++ DLLs)
- ✅ 8x faster module loading (benchmarks: ~50ms vs ~400ms for native)
- ✅ Universal platform support
Note: The older C++ native modules (
engine/src/native/directory) have been deprecated and removed in favor of these Rust WASM packages. Seeengine/src/README.mdfor full architectural details.
QwenPaw Agent Configuration Protection 🔒
To protect sensitive QwenPaw agent configuration files from being accidentally committed to the repository, the following files are now gitignored:
BOOTSTRAP.mdMEMORY.mdPROFILE.mdSOUL.mdAGENTS.md
These files may contain private information and should never be shared. The .gitignore has been updated to prevent accidental commits of these sensitive configuration files.
🔗 Key Links
For Developers
For Users
For Everyone
Repository: https://github.com/RSBalchII/anchor-engine-node
License: AGPL-3.0
Version: 5.3.0 | Production: ✅ Ready