Digital Persona: System Architecture Overview - Hackshaven/digital-persona GitHub Wiki

Digital Persona: System Architecture Overview

This document provides a high-level overview of the entire Digital Persona system, its modular design, and the key components that enable it to function as a local-first, privacy-preserving, user-aligned digital clone. The system integrates data ingestion, memory management, personality modeling, task planning, context retrieval, and secure generation workflows.

📊 Architectural Layers

1. Data & Storage Layer

  • Persona Memory Vault: Structured, user-owned local storage using JSON-LD, ActivityStreams, or FHIR formats.
  • Logs & Traces: Local ingestion logs, event traces, and audit trails.
  • Encrypted Filesystems: Optional full-disk or vault-level encryption.

2. Logic Layer

  • MCP Server(s): Serve context-aware JSON data to the LLM via REST endpoints.
  • Reflection Engine: Performs summarization, consolidation, and semantic tagging.
  • Goal Planner: Agent-based task manager with stateful logic.

3. Orchestration Layer

  • Persona Core: Central agent dispatcher routing requests to the correct modules.
  • Memory Retrieval Interface: RAG-style plugin for injecting relevant memories.
  • Tool Use Middleware: Enables model-based calls to external plugins (e.g., calendar or summarizer).

4. Interface Layer

  • CLI Interface: Command-line agent for developer use.
  • UI Extensions: Electron or browser-based local apps.
  • Third-Party Interfaces: Calendar apps, journaling tools, etc.

5. Integration Layer

  • Data Ingest Connectors: Tools like Huginn, n8n, AutoGPT, or Zapier to pipe in emails, photos, health logs.
  • MCP Clients & Servers: Optional cloud endpoints or local API servers.

📊 System-Wide Mermaid Diagram

flowchart TD
    U1[User Input]
    I1[Zapier/n8n/Huginn Connector] --> I2[Raw JSON Preprocessor] --> I3[Persona Memory Vault]
    M1[Health MCP Server]
    M2[Calendar MCP Server]
    M3[Limitless Log Server]
    C1[Persona Agent Dispatcher] --> C2[Goal Planner] --> C3[Tool Middleware]
    R1[Memory Retriever RAG] --> R3[Vector DB / Knowledge Graph]
    R2[Summarizer / Reflector] --> R3
    L1[Prompt + Retrieved Memory] --> L2[LLM Response] --> C1

    U1 --> C1
    C3 --> M1
    C3 --> M2
    C3 --> M3
    C1 --> R1
    I3 --> R3
    R1 --> L1

📌 Philosophy

  • Modular, pluggable agents.
  • Local-first, with optional cloud connectors.
  • MCP-compliant inter-process interfaces.
  • Human-centered safety and privacy enforcement.

🧩 This is the overview file. Other files will detail ingestion, memory subsystems, persona orchestration, retrieval, safety, and UI layers.