Architecting my Home Lab 🌱

How everything in the home lab connects β€” from the physical hardware to the apps running on top. Do skip directly to Overview of Architecture if you’re more interested towards

Migrating from Coding Assistants to Persistent Agents

In my journey to build an AI-native workspace, I spent a significant amount of time optimising my developer workflows. Initially, I leaned heavily on terminal-based coding assistants like [Claude Code] to act as the primary engine for my automation pipelines.

While these tools excel at short-lived, context-isolated tasks, it was not inherently designed for continuous knowledge ecosystem – I needed long-term memory,

The Paradigm Shift: Assistant vs. Agent

Claude Code, Codex and similar tools are explicitly designed as ephemeral coding assistants. They operate on a stateless, session-bound model: you spin them up, pass a context window, execute a file mutation or bash command, and spin them down.

However, a true personal knowledge pipeline requires a stateful, persistent brain. This realisation led me to pivot from standard coding assistants to dedicated Agent Harness frameworks.

The difference became immediately clear across three core dimensions:

  • Long-Term Memory While an assistant re-evaluates context from scratch each session, a persistent agent maintains long-lived state, tracking historical decisions, preferences, and long-form project context across days or weeks.

  • Self-Learning Loops Persistent agents are architected for recursive self-improvement. They don’t just execute instructions; they evaluate the outcomes of their actions, log patterns, and optimise their execution strategy over time.

  • Continuous Orchestration Instead of waiting for a manual CLI trigger, a persistent agent can run as a background service, actively listening to events (like webhooks or file system changes) and autonomously managing data ingestion and synthesis.

By shifting my infrastructure to this persistent agent paradigm, I’ve moved away from a tool that merely helps me write code to a system that autonomously runs my workspace.


Overview

At the center is a UGREEN NAS handling storage and real-time syncing of Obsidian vault. At the same time it running Hermes Agent, the AI harness integrated with Telegram. Everything exposed securely via CloudFlare tunnels and TailScale virtual private network.

The whole setup is designed around one idea: own the data, own the compute, own the pipeline.

Architecture of Home Lab (V2).png

Component Map

Compute & Storage

  • UGREEN NAS β€” core storage node
    • Runs [Docker] containers for 24/7 access
    • RAID-1 (2x 4TB HDD) keeps the vault safe from crashes
  • Mac Mini (Planned) β€” primary compute node
    • Hosts the [Claude Code] for development work
    • [Ollama] server for local self-hosted LLMs

Networking & Access

  • CloudFlare β€” domain registrar + DNS + tunnel provider. Zero-trust tunnel means no open ports on the home network.
  • TailScale β€” VPN mesh connecting all devices. Clients, NAS, and Mac Mini all sit on the same TailNet.
  • Caddy Reverse Proxy – Forwards requests to bounded ports

Knowledge & Brain

  • [Obsidian] β€” Primary knowledge base, backed up to iujinwee-vault repository.
  • [CouchDB + Obsidian Self-hosted LiveSync] β€” Real-time vault replication across all devices.
    • NAS runs CouchDB as the master
    • Obsidian clients across devices sync against it
  • [Mirror Vault] β€” a local mirror of the CouchDB vault on the NAS
    • Used by [Hermes Agent] for direct reads and writes
    • Synced with headless Obsidian CLI
  • [Hermes Agent] β€” the AI harness layer
    • Handles Telegram messages as the primary UI
    • Dashboard for configuration & logs
    • Multiple integrations & plugins for memory management, connectors, skillsets
  • [OpenRouter API] β€” external AI provider
    • Primar
    • [Hermes Agent] routes requests here
  • [OpenViking] – Hermes-compatible vector database
    • Handles indexing of vault as well as retrieval of indexed chunks using viking protocol
    • Stores agent & session memory with progressive content loading

Web Presence

  • Portfolio (portfolio.iujinwee.cc) β€” personal site served via CloudFlare tunnel.
  • Garden (garden.iujinwee.cc) β€” public-facing blog
    • Automatically syncs from iujinwee-vault/00 Blogs via GitHub Actions
  • Github & LinkedIn β€” github.iujinwee.cc, linkedin.iujinwee.cc β€” simple URL redirects via Cloudflare.

Cross-Device Sync

The vault stays in sync across four surfaces:

DeviceHow
UGREEN NASSource of truth β€” runs CouchDB + LiveSync server
HERMES-AGENTReads/writes Mirror Vault on NAS directly via tailnet
Desktop (work/travel)Obsidian app β†’ TailScale β†’ LiveSync with NAS
Mobile (iPhone)Obsidian app + TailScale β†’ LiveSync with NAS

Data Flow

Hermes-Telegram Agentic Edit (To be Updated)

flowchart TD
    A[πŸ“± Telegram Message] --> B[HERMES-AGENT on Mac Mini]
    B --> C[Agency Provider\nClaude API]
    C --> B
    B --> D[Read / Write Mirror Vault on NAS]
    D --> E[(CouchDB)]
    E --> F[πŸ“± Mobile Obsidian]
    E --> G[πŸ’» Macbook Obsidian]
    F & G --> H{Conflict?}
    H -->|Yes| I[Surfaced in client for manual resolution]
    H -->|No| J[Changes reflected in real-time]

Obsidian Manual Edit

flowchart TD
    A[✏️ Edit in Obsidian\nMobile or Macbook] --> B[LiveSync Plugin]
    B --> C[(CouchDB on NAS)]
    C --> D[All other Obsidian clients]
    D --> E[Changes reflected in real-time]

Blog Publish

flowchart TD
    A[πŸ“ Changes in 00 Blogs/] --> B[Pushed to iujinwee-vault repo]
    B --> C[File watcher in iujinwee-garden]
    C --> D[GitHub Actions triggered on Mac Mini runner]
    D --> E[🌐 Published at garden.iujinwee.cc]

Thank you for reading up until here, just constantly my thoughts & learning from past experiences.