SI
Sentinel Integrations
← Back to Research Index

ARCHITECTURAL STANDARD: THE 7-LAYER AI AGENT TECH STACK (HERMES ALIGNMENT)

Document ID: SI-AS-2026-7LAS1

Author: Sentinel Systems Architecture (Otto)

Date: June 29, 2026

Source Analysis: Industry Agent Tech Stack (MachineLearningMastery Architecture, June 2026)

Objective: Map industry-standard production agent layers directly to Sentinel's sovereign, local-first implementations.


THE 7-LAYER PRODUCTION STACK

This document translates the industry's standard 7-layer production AI agent stack into Sentinel's active, local-first technical stack. This mapping serves as our core architecture reference and standardizes how we present our capabilities to enterprise buyers during B2B consulting engagements.

+------------------------------------------------------------+
|  Layer 1: Foundation Model    --> Multi-Model Tiered/Local |
+------------------------------------------------------------+
|  Layer 2: Orchestration       --> Hermes ReAct Control Loop|
+------------------------------------------------------------+
|  Layer 3: Memory Systems      --> SQLite state.db + FTS5   |
+------------------------------------------------------------+
|  Layer 4: Retrieval (RAG)     --> Local Vector nomic-embed |
+------------------------------------------------------------+
|  Layer 5: Tools & Sandbox     --> Hardened Linux Tools/PTY |
+------------------------------------------------------------+
|  Layer 6: Observability/Eval  --> SIA-E Regression Harness |
+------------------------------------------------------------+
|  Layer 7: Deployment Infra    --> Tailscale + Bare-Metal   |
+------------------------------------------------------------+

LAYER-BY-LAYER MAPPING

LAYER 1: THE FOUNDATION MODEL (The Cognitive Core)

* Tiered Inference: Standardizes model selection based on cost-per-successful-outcome. Front-end RAG analysis is routed to high-context Gemini-Flash/Pro APIs, while final sign-off is delegated to Claude.

* On-Premise Core: Direct-to-hardware local inference on Local Inference Node (Apple M4 Pro Mac mini) running high-speed, local open-weights reasoning models (e.g., Gemma-2-9B-It / Qwen-2.5-Coder-7B) via Ollama v0.30.11 under Tailscale.

LAYER 2: THE ORCHESTRATION FRAMEWORK (The Control Loop)

* Hermes ReAct Engine: Our runtime loop operates a robust, synchronous Python-based ReAct loop.

* Safety Boundaries: Outfitted with strict wall-clock timeout thresholds (--target_timeout), execution budget guardrails, and automated exception fallbacks, preventing runaway infinite loops.

LAYER 3: MEMORY SYSTEMS (Short-Term & Long-Term Context)

* Sovereign state.db: A local SQLite database (~/.hermes/state.db) configured in high-speed WAL mode.

* Semantic Retrieval: Equipped with FTS5 virtual tables to allow instant keyword/phrase searches across all historical turns.

* Declarative Memory Tool: Persistent, curated user preferences and environmental facts are actively saved to local JSON/YAML stores. These are injected into the context window dynamically, bypassing token-bloated sliding context windows.

LAYER 4: VECTOR DATABASES AND RETRIEVAL (RAG)

* Local Embedding Engine: Semantic search executed on Local Inference Node utilizing local SQLite vector caches paired with Local Inference Node's Ollama nomic-embed-text embedding engine.

* Hybrid Search: Standardized keyword-search (FTS5) combined with semantic vector distance calculations via custom SQLite extensions. Fully exposed via the local knowledge-vault MCP tool.

LAYER 5: TOOLS AND EXTERNAL INTEGRATIONS (The Hands)

* Hardened File & Patch Tools: Native, robust file-read pagination and unified diff patching (patch tool with fuzzy matching strategies) replacing insecure, fragile shell scripts like sed/awk.

* PTY-Enabled Terminal: Fully interactive Linux pseudo-terminal (PTY) allowing foreground/background process execution, process log polling, and interactive CLI inputs.

* Automated Browser: Automated web browser interaction engine allowing sandboxed navigation, dynamic JS evaluation, form submissions, and vision-based analysis.

LAYER 6: OBSERVABILITY AND EVALUATION (Quality Gates)

* Token Usage Reporting: Automated, daily token cost reporting based on local metadata.

* SIA-E Evaluation Harness: A custom Model Regression and Evaluation Harness built on Local Inference Node that dynamically runs JSON-integrity, regex, and semantic validations against local weights to detect performance drift. It includes automatic parsing/stripping of modern reasoning blocks ().

LAYER 7: DEPLOYMENT INFRASTRUCTURE (The Foundation)

* Sovereign Mesh: Headless, bare-metal nodes (Orchestrator Node, Local Inference Node, Vault Node NUCs) secured locally. No inbound open ports.

* Secure Overlay: Overlay networking managed securely via Tailscale.

* ZTP (Zero-Touch Provisioning): Our custom Sovereign Provisioning Protocol (SPP) boots bare-metal nodes, executes hardware discovery scans (spp_inventory.py), auto-scales local container models based on available VRAM tiers, and spins up local Telegram-based onboarding wizards.