BrainBank

00 - Local Server "llmpowerhouse" Timeline

7/30/2026, 8:23:29 PM · updated 7/30/2026, 11:51:06 PM

#self-hosted#knowledge-management#best-practices#rag#local-ai#ollama#mac-studio#llm-harness#home-lab

This timeline chronicles the end-to-end assembly of a fully local, RAG-enabled AI infrastructure on a Mac Studio over a single week—from hardware preparation and model deployment to building an agent harness and resolving real-world latency bugs.

The llmpowerhouse project represents a fully local, DIY AI infrastructure built on a Mac Studio over one week in July 2026. Spanning hardware initialization to a fully operational agent server with RAG, memory, and tool use, this timeline tracks the exact dates, technical decisions, and iterative problem-solving that turned bare metal into a working knowledge engine.

The Build Week at a Glance

DateMilestone
Jul 24Mac foundation & initial documentation
Jul 25Ollama install, 3-model suite, public showcase site, API gateway
Jul 26Knowledge bank population & LLM Wiki automation
Jul 27Retrieval bug fixes & agent-server initialization (Phase 1)
Jul 28Core agent harness development ("Big Build Day")
Jul 29Real-time streaming, latency optimization, MCP tools, operations SOP
Jul 30Self-referential routing gate & study-note documentation suite

Roughly seven days turned a blank Mac into a working local AI server with retrieval-augmented generation, persistent memory, tool integration, and a public demonstration. Zero components were procured as managed cloud services; every piece runs entirely on the owner's hardware.

Daily Development Log

July 24: Foundation & Documentation-First Discipline

Before any AI software was installed, the project captured a comprehensive baseline: backups/hardware_info.txt (Mac Studio, Apple M3 Ultra, 28 cores, 96 GB RAM), backups/brew_packages.txt (git, python@3.12, ffmpeg, htop, jq, wget, VS Code, and codec libraries), and backups/disk_layout.txt (a dedicated 1.8 TB /Volumes/AI_DATA APFS volume isolated from the boot disk to ensure the entire system remains "one folder: portable, backupable, rebuildable").

Two structural documents were drafted before a single model was pulled: MAC_BASICS_CHEATSHEET.md (a terminal/shortcut reference for newcomers) and KNOWLEDGE_MANAGEMENT_GUIDE.md (outlining a three-tier RAG/Wiki/Graph strategy before knowledge existed). This "document-the-plan-before-building" discipline became a recurring pattern. The work mapped directly to Phase 0 of AI_SERVER_SETUP_GUIDE.md: macOS updates, disabled sleep mode, Homebrew/dev tools installation, SSH key generation for GitHub, and the initial AI_DATA folder structure (models/, knowledge-bank/, apps/, logs/, backups/).

July 25: Engine Architecture, Models, and Public Interface

Phase 1 & 2 (Ollama + Model Suite): Ollama was installed with weights directed to /Volumes/AI_DATA/models/ollama to keep model files off the boot disk. Three models were pulled, totaling 102 GB: gpt-oss:120b (~64 GB, primary deep reasoner/"MAIN"), qwen3.6:35b-a3b (~22 GB, fast mixture-of-experts daily driver), and qwen3-vl:30b (~18 GB, sole vision-capable model). Whisper (large-v3-turbo) was added for speech-to-text. Vision and audio were split across separate models due to macOS audio limitations with combined "omni" architectures at the time.

Phase 3 (Interface & Networking): Open WebUI was deployed as a ChatGPT-style interface within a dedicated Python virtual environment, exposed via LAN (llmpowerhouse.local:8080) and remotely through Tailscale. The companion showcase site apps/llmpowerhouse-site/ was built using Next.js/TypeScript/Tailwind, featuring an interactive setup checklist, roadmap, and a "Live Demo" bridging directly to the home server. Its git history shows 18 commits on 2026-07-25 alone, rapidly patching cold-load timeouts, history-log bugs, gateway process-kill patterns, and desktop Start/Stop/Restart buttons after rate limits were removed.

A gateway.py bridge (port 8787) was engineered to mediate between the public internet (via Tailscale Funnel) and Ollama, enforcing per-app API keys for isolated credential revocation. Finalized restart-ai-stack.command, stop-ai-stack.command, and initial knowledge-bank download scripts (download-omb-dfas-service-docs.sh, download-sap-oracle-platform-docs.sh, download-gao-audit-service-reports.sh, download-crs-fm-acquisition-reports.sh), establishing the foundational DOD-FM financial-management library.

July 26: Knowledge Banks and Automated Wiki Ingestion

Ingestion machinery expanded rapidly with four additional download scripts for a K12 education standards bank (AMC/AP/SAT/PSAT materials, state curricula, elite-school catalogs). A critical validation bug was discovered and patched: some "downloaded" files were actually HTML error pages saved with a .pdf extension, passing a naive size-only validity check. Post-audit corrections revealed accurate counts: K12 (280 valid / 15 broken / 3 unobtainable) and DOD-FM (58 valid / 0 broken / 26 unobtainable).

SYSTEM_OVERVIEW_SUMMARY.md was documented as a one-page architectural map that remains the primary orientation guide. A key operational constraint was noted: the AI's sandbox cannot make outbound requests (403 blocked-by-allowlist), necessitating manual execution of all download scripts by the user in their local Terminal.

Tier 2 of the knowledge strategy was automated: apps/llm-wiki/llm_wiki.py was deployed alongside a launchd-managed file watcher (com.llmpowerhouse.wiki-watch.plist) to auto-draft wiki pages within ~10 seconds of new document ingestion, pending human review. Same-day crash fixes addressed launchd's stripped PATH hiding the fswatch binary, bare TimeoutError exceptions halting runs, stdout buffering delaying progress feedback, and unsanitized filenames containing /. The day closed with 257 live wiki pages (75 DOD-FM, 182 K12).

July 27: Retrieval Integrity and Agent Initiation

A cross-contamination bug was traced and resolved where DOD-FM content leaked into K-12 chats. Root cause analysis revealed Open WebUI's knowledge attachment was scoped to the model level rather than per-conversation. The fix involved deploying a custom Open WebUI "inlet filter" (apps/open-webui-filters/knowledge_scope_filter.py) as a deterministic second line of defense, paired with test-questions.md (10 real questions per bank) to convert subjective validation into a pass/fail checklist.

This marked the strategic shift from configuring tools to building a purpose-built agent. The apps/agent-server/ directory was initialized with commercial-grade scaffolding: keys_admin.py, keystore.py, and auth.py (hashed keys, scopes, rate limits, quotas), graph.py (a custom async task-graph engine replacing naive point-to-point wiring), and kb_ingest.py/kb_sync.py (ChromaDB-backed retrieval supplanting Open WebUI's native RAG). The architecture was codified in AGENT_SERVER_GUIDE_v2.md, superseding the original "Phase 7" placeholder.

July 28: The Core Harness Build

Nearly the entire agent framework was engineered in a single development cycle:

  • Ran an initial 20-question quality baseline (13 PASS / 7 FAIL, 65%).
  • Implemented the skills system (skills/loader.py with keyword-matched Markdown rule files) and base system prompt (AGENT.md).
  • Developed a Model Context Protocol (MCP) client alongside a curated catalog of candidate servers.
  • Added source-authority re-ranking to correct regulation precedence issues where lower-authority documents out-ranked primary regulations.
  • Layered critical safeguards: write-path guards restricting file operations to the knowledge-bank directory, auto-resync triggers post-write, and a per-user memory backend (memory_store.py, SQLite-backed tracking grade level, subjects, and knowledge gaps).
  • Added a feedback endpoint, eval dashboard, LLM-as-judge grading mode to the evaluation script, and initiated a fine-tuning pipeline, concluding with a successful LoRA training smoke test on a substitute model.

July 29: Streaming, Latency Optimization, and Operations

Real-time token streaming was implemented, resolving a 502 error caused by Ollama's SSE format mismatching .json() parsing. A pooled HTTP client was deployed alongside measured baseline latency metrics (p50: 26.3s, p90: 88.7s from logged traffic). Two broken MCP servers (fetch, secedgar) incompatible with the installed SDK were silently disabled rather than left in a failed state. Executable setup scripts (Setup-MCP-Fetch.command, Setup-MCP-WebSearch.command) were built for one-click tool expansion. SOP-LLM-OPERATIONS.md was authored, formalizing fragmented tribal knowledge into a standardized daily runbook.

July 30: Latency Diagnostics and Documentation

A 14.4-second delay on a trivial query was traced end-to-end through logs to its root cause: the model was needlessly filesystem-searching for non-existent documents rather than recognizing answers already in the system prompt. A layered fix was applied: initial prompt clarification, followed by a fast regex backstop, and finally a calibrated embedding-similarity threshold (0.80 based on logged scores). The diagnostic process and architectural reasoning were fully documented in AGENT_LATENCY_INVESTIGATION_SUMMARY.md, alongside this study-note set.

Key takeaways

  • Reactive over speculative: Every major architectural decision (memory scoping, retrieval ranking, latency gating, validity checks) emerged from debugging real usage, not theoretical planning.
  • Local-by-design: The entire stack runs on bare Mac Studio hardware with zero managed cloud dependencies, isolated to a dedicated 1.8 TB APFS volume for maximum portability and backup simplicity.
  • Documentation-first workflow: Drafting structural guides (KNOWLEDGE_MANAGEMENT_GUIDE.md, SYSTEM_OVERVIEW_SUMMARY.md) before implementation established the discipline needed to track rapid iteration.
  • Sandbox boundaries dictate workflow: The AI's inability to make outbound requests (403 blocked-by-allowlist) necessitated manual script execution and shaped the entire knowledge-ingestion pipeline.
  • Iterative stabilization: From initial baseline gaps (65% pass rate) to streaming fixes, MCP SDK compatibility checks, and embedding threshold calibration, continuous operational tuning transformed a prototype into a reliable system.

Learning map

Local AI Infrastructure Roadmap

Phase 0: Hardware & Storage Foundation

Define your compute baseline (e.g., Apple Silicon M3 Ultra, dedicated APFS volumes) and isolate all AI data (/Volumes/AI_DATA) from the boot disk to ensure portability and maintainable backups.

Phase 1 + 2: The Base Engine & Model Triage

Install Ollama for local inference and pull an aligned model trio (e.g., a deep reasoning model like GPT-OSS, a fast MoE daily-driver like Qwen3.6, and a dedicated vision/audio model). Implement a gateway proxy to enforce API keys and secure remote access via Tailscale.

Phase 3: Public Interface & Security Layers

Deploy a ChatGPT-style wrapper (Open WebUI) on the LAN and build a showcase site to bridge external traffic securely back to your local machine. Hardened routing scripts and per-app rate-limiting are essential here.

Phase 4: Knowledge Ingestion & RAG Preparation

Download external documents (e.g., DOD-FM, K-12 standards) into curated banks. Automate file validation early to prevent broken HTML files from corrupting your PDF ingestion pipeline, then seed a vector database like ChromaDB for retrieval.

Phase 5: The Agent Harness & Memory System

Shift from configuring tools to building a custom agent server in Python. Integrate task-graph engines, per-user memory tracking (SQLite), and a skills system based on keyword-matched Markdown contexts.

Phase 6: Operational Hardening & Latency Fixes

Enable real-time token streaming, establish baseline latency measurements, and build fallback mechanisms (regex or similarity backstops) to stop the model from looping when searching for nonexistent local documents.

Get hands-on — step by step

  1. Establish the physical foundation: Install Homebrew on your Mac, disable sleep settings, format a dedicated secondary volume (e.g., AI_DATA), and set up SSH keys for secure GitHub integration.
  2. Deploy the inference engine and models: Run the Ollama installer and pull your designated model trio (gpt-oss:120b, qwen3.6:35b-a3b, and a vision model or Whisper) tailored to your Mac’s maximum RAM.
  3. Secure and expose the interface: Install Open WebUI in its own Python virtual environment. Expose the service over LAN (local:8080), then bridge it to the outside world through a lightweight gateway script and Tailscale Funnel for authenticated, internet-facing access.
  4. Build your Knowledge Banks: Download raw documents (e.g., financial reports or standardized test data) into an apps/knowledge-bank/ directory. Immediately write a validation bash script that checks file sizes and parses out hidden HTML error pages masquerading as .pdfs.
  5. Set up the retrieval pipeline: Sync your validated knowledge banks to a local vector store (ChromaDB). Configure source-authority re-ranking so that high-level regulations consistently outrank lower-level summaries.
  6. Engineer the Agent Server backbone: Build your primary Python agent server. Implement hashed API key management (keys_admin.py), asynchronous task graphs (graph.py) for complex requests, and a per-user SQLite memory store to track knowledge gaps over time.
  7. Finalize operations with real-world tuning: Run a baseline quality test on 20 questions. Monitor p50/p90 latency times natively using the Mac Activity Monitor and local logs; introduce 'skills' markdown files to route queries more efficiently.

Top 3 sources

  1. 1
    Ollama Documentation

    The official reference for installing local models, customizing API gateways, and scaling inference workloads on Apple Silicon.

    https://github.com/ollama/ollama/blob/main/docs

  2. 2
    Open WebUI

    The open-source web interface used to bridge Ollama's backend with a functional ChatGPT-style frontend for local and remote LAN access.

    https://docs.openwebui.com/

  3. 3
    ChromaDB Vector Store Documentation

    The core Python library used for ChromaDB-backed retrieval to replace built-in RAG systems in personal LLM stacks.

    https://docs.trychroma.com/docs/overview/introduction

Links are AI-suggested — worth a quick sanity check before diving in.