Mnemoverse Architecture Overview β
This document formalizes the layered architecture to prevent scope creep and clarify responsibilities across the system.
Layer Map (L1βL8) β
L1 β Knowledge Layer (Noosphere Layer)
- Global knowledge ingestion, validation, archiving, cataloging
- Multi-method search abstraction (vector | graph | agents)
- Analysis utilities (quality, metadata, provenance)
- NOT project-specific; entire world knowledge (including noise, filtered)
L2 β Project Library
- Project-scoped subset and links to L1 (references + project-authored docs)
- Strong emphasis on relevance, freshness, and indexing for quick access
- Graph-forward organization for traceability within project context
L3 β Workshop (Tooling & Lab)
- Tool registry, tool-building pipelines, validation and improvement loops
- Close coupling with Experience Layer for capturing tool usage outcomes
L4 β Experience Layer (Base of Experience)
- Task-level trails: '{task, nodes used, external refs/tools, result, validation}'
- Enables search over βhow tasks were solvedβ + outcomes comparison
L5 β Mnemoverse Memory
- Real-time context assembly focused on relevance for current step/query
- Text mode: prompt-assembler for LLM; Multimodal: filtered streams by LOD
L6 β Agent Runtime (Out of Scope here)
- Agent policies/skills/planning/execution (external), connected via adapters
L7 β Interfaces & Clients
- IDEs, CLIs, Desktops, Assistants; leverage MCP/HTTP adapters
L8 β Evaluation (CrossβCutting)
Benchmarks, metrics, and feedback loops that observe and influence L1βL7
Offlineβfirst evaluation with minimal online controls (thresholds, gates)
Boundaries & Responsibilities β
- L1 owns: ingestion, normalization, quality signals, multi-method search, global catalogs.
- L2 owns: project relevance, fast access indexes, curated views, project provenance.
- L3 owns: tools lifecycle + validation harnesses.
- L4 owns: experience records and validation of outcomes.
- L5 owns: on-demand context composition with budget/LOD policies.
- L6/L7 consume L5 via adapters; not part of this repoβs core implementation.
- L8 observes L1βL7 and feeds back signals (policies remain owned by respective layers).
Data Flows (simplified) β
L7 β L6 β L5 (context request) β L2 (project subset) β L1 (global lookup) β L4 (prior task trails) β L3 (tool hints)
Inter-Layer Communication Patterns β
Request Flow Architecture β
Error Handling & Resilience β
Layer Fault Tolerance:
- L1 Unavailable: L2 continues with project-only context, degraded mode
- L2 Unavailable: L1 provides global fallback, quality warning issued
- L4 Unavailable: Skip experience enhancement, basic context assembly
- L5 Partial Failure: Return best-effort context within time budgets
- L8 Unavailable: Continue operations, disable quality feedback loops
Circuit Breaker Thresholds:
layer_resilience:
L1_noosphere:
failure_threshold: 5
timeout_ms: 2000
fallback: "project_only_mode"
L2_project_library:
failure_threshold: 3
timeout_ms: 1000
fallback: "global_search_expansion"
L5_memory_assembly:
failure_threshold: 2
timeout_ms: 500
fallback: "simple_concatenation"
Operational Framework β
Security Model β
Trust Boundaries:
- L1/L2 Boundary: Content filtering, PII redaction before indexing
- L4/L5 Boundary: Privacy mode enforcement, sensitive data blocking
- L6/L7 Boundary: Authentication, authorization, rate limiting
- L8 Cross-cutting: Audit logging, compliance validation
Security Zones:
security_zones:
public:
layers: [L7]
access: "authenticated_users"
encryption: "TLS_1.3"
internal:
layers: [L1, L2, L4, L5, L6]
access: "service_mesh_mTLS"
encryption: "AES_256_GCM"
monitoring:
layers: [L8]
access: "admin_only"
encryption: "end_to_end"
Privacy Compliance:
- GDPR Article 17: Right to erasure across all layers
- Privacy by Design: Default redaction modes, minimal data collection
- Data Minimization: Layer-specific retention policies, automatic purging
Performance Characteristics β
Layer-Specific SLAs:
Layer | Operation | Target Latency (P95) | Throughput | Availability |
---|---|---|---|---|
L1 | Knowledge search | < 300ms | 1000 QPS | 99.9% |
L2 | Project search | < 100ms | 2000 QPS | 99.95% |
L4 | Experience lookup | < 50ms | 5000 QPS | 99.9% |
L5 | Context assembly | < 500ms | 500 QPS | 99.95% |
L8 | Quality evaluation | < 200ms | 100 QPS | 99.5% |
End-to-End Performance:
- Target: P95 < 800ms, P99 < 1.2s
- Degradation Handling: Graceful timeout with partial results
- Load Balancing: Layer-aware routing, predictive scaling
Monitoring & Observability β
Cross-Layer Metrics:
# Layer health indicators
mnemoverse_layer_health{layer="L1", component="vector_search"}
mnemoverse_layer_health{layer="L2", component="project_index"}
mnemoverse_layer_health{layer="L5", component="context_assembly"}
# Inter-layer communication
mnemoverse_interlayer_latency{from="L5", to="L1", operation="search"}
mnemoverse_interlayer_errors{from="L5", to="L2", error_type="timeout"}
# Quality signals
mnemoverse_context_quality{layer="L5", metric="relevance_score"}
mnemoverse_search_quality{layer="L1", metric="ndcg_at_10"}
Alerting Strategy:
- Critical: Service outages, data corruption, security breaches
- Warning: Performance degradation, quality drops, capacity issues
- Info: Deployment events, configuration changes, usage patterns
Validation & Quality Assurance β
Layer Validation Framework β
L1 (Noosphere) Validation:
- Data Quality: Content validation, metadata consistency, provenance tracking
- Search Quality: NDCG@K benchmarks, relevance scoring, result diversity
- Performance: Vector similarity computation time, graph traversal efficiency
L2 (Project Library) Validation:
- Relevance Accuracy: Project-specific content filtering effectiveness
- Freshness Validation: Update propagation time, stale content detection
- Index Consistency: Search result accuracy, ranking quality
L5 (Memory) Validation:
- Assembly Quality: Context coherence, contradiction detection, completeness
- Budget Compliance: Token limits, time constraints, resource utilization
- Policy Effectiveness: KV policy performance, eviction accuracy
Integration Testing Strategy β
Cross-Layer Integration Tests:
integration_tests:
L1_L2_consistency:
description: "Verify project references align with global knowledge"
frequency: "daily"
success_criteria: "consistency_rate > 0.95"
L2_L5_assembly:
description: "Test project context assembly under various budgets"
frequency: "continuous"
success_criteria: "assembly_time < 400ms, relevance > 0.8"
L4_L5_experience:
description: "Validate experience pattern integration"
frequency: "weekly"
success_criteria: "pattern_accuracy > 0.7, latency < 50ms"
end_to_end:
description: "Complete L7βL1βL7 user journey validation"
frequency: "hourly"
success_criteria: "p95_latency < 800ms, success_rate > 99%"
Quality Gates:
- Pre-deployment: All integration tests pass, performance benchmarks met
- Production: Continuous monitoring, automatic rollback triggers
- Post-deployment: Quality metric validation, user satisfaction tracking
Implementation Roadmap β
Phase 1: Foundation (Months 1-3) β
MVP Layers: L1, L2, L5, L8
- β L1: Basic vector search, simple graph traversal
- β L2: Project indexing, relevance filtering
- β L5: Simple context assembly, budget enforcement
- β L8: Basic metrics collection, offline evaluation
Deliverables:
- Working end-to-end query processing
- Basic quality evaluation framework
- Essential monitoring and alerting
Phase 2: Enhancement (Months 4-6) β
Extended Layers: L3, L4 + Advanced Features
- π L3: Tool registry, validation pipelines
- π L4: Experience capture, pattern learning
- π Enhanced L1: Multi-method search, AI agents
- π Enhanced L5: Advanced KV policies, conflict resolution
Deliverables:
- Complete layer functionality
- Advanced quality assurance
- Production-ready operational features
Phase 3: Scale & Polish (Months 7-9) β
Production Hardening + L6/L7 Adapters
- π Performance: Horizontal scaling, caching optimization
- π Security: Advanced threat protection, compliance certification
- π Adapters: VS Code extension, CLI tools, web interface
- π AI Integration: Agent runtime connectors, workflow automation
Deliverables:
- Production deployment capability
- Full adapter ecosystem
- Enterprise-grade security and compliance
Status β
- Current: Implementing L1 (Noosphere Layer) MVP with vector search foundation
- L2: Initial form in Research Library; schema alignment and API standardization in progress
- L3-L5: Architecture complete, implementation scheduled for Phase 2
- L6-L7: Out of scope for core but supported via standardized adapters
- L8: Basic framework operational, advanced features in development
Next Steps β
Immediate (Next 30 days):
- Finalize L1βL2βL5 contract specifications and API schemas
- Implement privacy/telemetry policies across data layers (L1/L2/L4)
- Deploy basic L8 evaluation framework for quality monitoring
Short-term (Next 90 days):
- Complete L1 MVP with multi-method search capabilities
- Integrate L2 project library with standardized relevance scoring
- Launch L5 context assembly with budget-aware policies
Medium-term (6 months):
- Deploy complete Phase 1 system with all MVP layers operational
- Begin Phase 2 development with L3/L4 experience capture
- Establish production monitoring and operational procedures