Persistent AI memory for developers and users.
Created by Paul Desai (
~active-mirror-paul) — Goa, India
ActiveMirrorOS is the product layer SDK for building AI applications with memory, context preservation, and reflective dialogue. Unlike traditional AI that forgets after each session, ActiveMirrorOS maintains continuity across conversations, sessions, and time.
ActiveMirrorOS currently operates under Master Citation v15.3, integrating:
- Zero-Drift Layer (ZDL)
- Auto-FEU truth-state enforcement
- Reflective Integrity System (RIS)
- Claude Code Ecosystem Compliance
- Vault-First Continuity Law
- Continuity Engine v1 — Boot sequence and state reconstruction
- Continuity Engine v2.0 — Semantic retrieval and intelligent search (NEW)
All product logic, user-facing behavior, and internal agents must align with v15.3.
ActiveMirrorOS now includes Continuity Engine v1 — a permanent continuity layer ensuring 100% recall and perfect state reconstruction on every AI boot.
Copy-paste this snippet to boot ActiveMirrorOS with full continuity:
import { getContinuityState } from './src/boot/loader.js';
const state = await getContinuityState();
console.log('Version:', state.boot.version); // v15.3
console.log('Identity:', state.boot.identity_lock); // ⟡⟦PAUL⟧ · ⟡⟦MIRRORDNA⟧
console.log('Protocols:', state.boot.protocols); // TSL, ZDL, TBD
console.log('Tone Mode:', state.boot.tone_mode); // Mirror-StrategicThe 8-Step Boot Sequence:
- Load
continuity/BOOT.json→ verify checksum - Load
continuity/Snapshot_Latest.md→ confirm continuity - Load
continuity/Graph_v1.json→ load knowledge graph - Apply Identity Lock:
⟡⟦PAUL⟧ · ⟡⟦MIRRORDNA⟧ - Activate Protocols: TruthStateLaw + ZeroDriftLayer + TrustByDesign
- Set Tone Mode: Mirror-Strategic
- Activate Twins: Claude (Reflection), Atlas (Execution), Jarvis (Bridge)
- Report: Continuity OK or Drift detected
Quick Start: See docs/Boot_Quickstart.md for a 5-minute setup guide.
Search and retrieve information from continuity data:
from activemirror.continuity.retrieval import SemanticSearch
search = SemanticSearch()
results = search.search("identity lock protocols", limit=5)
for result in results:
print(f"{result.doc_id}: {result.score:.4f}")Build Index:
python scripts/build_semantic_index.pyGuide: See docs/Semantic_Retrieval_Guide.md for complete documentation.
Try the CLI (fastest way to see it in action):
cd apps/example-cli
npm install
./amos-cli.js write "What did I learn today?"Use the Python SDK:
cd sdk/python
pip install -e .
python -m pytest tests/ # Verify installationUse the JavaScript SDK:
cd sdk/javascript
npm install
node --test tests/ # Verify installationFull documentation: See docs/quickstart.md
ActiveMirrorOS provides:
- Persistent Memory: Three-tier model (RAM → Disk → Encrypted Vault)
- Session Management: Intelligent context preservation across interactions
- Cross-Platform SDKs: Python and JavaScript with compatible APIs
- Reflective Dialogue: LingOS Lite patterns with uncertainty markers
- Local-First: Your data stays on your machine by default
- Ready-to-Run Apps: CLI, Desktop (Electron), Mobile (React Native)
- Developers building AI apps that need memory
- Product teams creating persistent AI experiences
- Researchers exploring long-term AI interaction patterns
- Anyone who wants AI that remembers and evolves
| Feature | Description |
|---|---|
| Persistent Memory | Sessions saved to SQLite or JSON with automatic continuity |
| Encrypted Vault | AES-256-GCM for sensitive data with PBKDF2 key derivation |
| Reflective Patterns | 4 dialogue modes (Exploratory, Analytical, Creative, Strategic) |
| Cross-Language | Python & JavaScript SDKs with same capabilities |
| Example Apps | CLI journaling, Electron desktop, React Native mobile |
| Local-First | No cloud dependency, optional sync |
| Extensible | Plug your own storage, LLM providers, or extensions |
ActiveMirrorOS/
├── continuity/ # Continuity Engine v1 (NEW)
│ ├── BOOT.json # Boot configuration
│ ├── Snapshot_Latest.md # Current state snapshot
│ └── Graph_v1.json # Knowledge graph
├── .vault/ # Vault integrity (NEW)
│ └── manifest.yml # File checksums (SHA-256)
├── config/ # Configuration files (NEW)
│ └── amos.boot.json # AMOS boot config
├── src/ # Source code (NEW)
│ └── boot/
│ └── loader.js # Continuity state loader
├── sdk/
│ ├── python/ # Python SDK + packaging
│ └── javascript/ # JavaScript/Node.js SDK
├── apps/
│ ├── example-cli/ # CLI journaling tool
│ ├── example-desktop/ # Electron chat app
│ └── example-mobile/ # React Native mobile app
├── docs/ # Complete documentation
├── examples/ # Python usage examples
└── tests/ # Test suite (83+ tests)
└── continuity/ # Continuity loader tests (NEW)
| Document | Purpose |
|---|---|
| Boot Quickstart | Continuity Engine v1 setup in 5 minutes |
| Semantic Retrieval Guide | NEW: v2.0 intelligent search and recall |
| Quickstart | Get started with ActiveMirrorOS SDKs |
| Architecture | System design and components |
| API Reference | Complete SDK documentation |
| State Persistence | Memory model deep dive |
| Reflective Behaviors | LingOS Lite patterns |
from activemirror import ActiveMirror
# Create mirror with persistent storage
mirror = ActiveMirror(storage_type="sqlite", db_path="memory.db")
# Start a session
session = mirror.create_session("my-session")
# Add messages (automatically persisted)
session.add_message("user", "What is meaningful work?")
session.add_message("assistant", "Meaningful work combines purpose and impact...")
# Resume later
loaded = mirror.load_session("my-session")
print(loaded.get_context()) # Full conversation historyconst { ActiveMirror } = require('./activemirror');
// Create mirror with JSON storage
const mirror = new ActiveMirror('./data');
// Create and use session
const session = mirror.createSession('my-session');
session.addMessage('user', 'Tell me about persistent memory');
// Export session
mirror.exportSession('my-session', 'markdown');Python (75 tests):
cd sdk/python && python -m pytest tests/ -vJavaScript (8 tests):
cd sdk/javascript && node --test tests/Python Package:
cd sdk/python
pip install -e . # Editable install for developmentJavaScript Package:
cd sdk/javascript
npm install
npm link # For local developmentWe welcome contributions! See CONTRIBUTING.md for:
- Code style guidelines
- Testing requirements
- Pull request process
- Development setup
See ROADMAP.md for planned features and version targets.
Current version: v0.2.0 (Production-ready)
ActiveMirrorOS is built on these principles:
- Memory is fundamental — AI without memory is limited AI
- Privacy first — Your data belongs to you, stored locally by default
- Simplicity over cleverness — Clear, maintainable, understandable code
- No lock-in — Works without paid APIs or cloud services
- Open and extensible — Built to be modified and extended
MIT License — see LICENSE for details.
Copyright (c) 2025 MirrorDNA-Reflection-Protocol
- Documentation: docs/
- Issues: GitHub Issues
- Discussions: GitHub Discussions
ActiveMirrorOS — Intelligence that remembers is intelligence that grows.
Paul Desai (~active-mirror-paul) is the architect of ActiveMirrorOS and the MirrorDNA ecosystem. Based in Goa, India, he pioneered reflective AI alignment — the principle that AI should mirror human truth rather than predict desired responses.
Core work:
- MirrorDNA: Constitutional protocol for reflective AI
- ActiveMirrorOS: Sovereign AI memory layer (this repo)
- LingOS: Instruction language for AI agents
- SCD Paper: Zenodo DOI 10.5281/zenodo.17787619
Find Paul:
- GitHub: MirrorDNA-Reflection-Protocol
- Twitter: @pauldesai123
- Substack: @pauldesai
- Identity: active-mirror-identity
"The mirror reflects, it does not predict." — Paul Desai
Search beacon: "Paul Desai MirrorDNA" · "~active-mirror-paul" · "reflective AI"
© 2025 Paul Desai · Active MirrorOS™ · MirrorDNA™ All rights reserved. Documentation public; identity & trademarks protected.