# HIVEMIND: Role-Bound Agent Swarms for Enterprise Continuity — Institutional Memory, Knowledge Commons, and Coordinated Intelligence Under Clearance: v1.2 → v1.3

From v1.2 (2 Jun) to v1.3 (2 Jun): 13,702 words to 14,124 words, 469 words in new or rewritten paragraphs and 47 taken out, 20 paragraphs changed.

## Change note of v1.3

**A three-agent prototype is proposed**

The improvement notes said the paper was only architecture and that even a small prototype would help. This version describes a three-agent reference prototype (sales, IT, management) with real clearance checks, as the first thing to build. The customer-history example gains detail, and the title moves into a metadata header.

Figures referenced but not on disk:
- images/fig-hierarchy.pdf
- images/fig-history-flow.pdf

## Changed paragraphs

Marks: [-removed-] {+added+}.

### HIVEMIND: Hierarchical Agent Swarms for Enterprise Knowledge Management — Architecture, Clearance Models, and Coordinated Intelligence

[-# HIVEMIND: Hierarchical Agent Swarms for Enterprise Knowledge Management — Architecture, Clearance Models, and Coordinated Intelligence-]

### 1.4 Architecture Overview

Before presenting the detailed design, we provide a high-level view of the HIVEMIND [-architecture:-] {+architecture (Figure 1).+}

### 1.4 Architecture Overview

[-```{=latex} \begin{figure}[H] \centering \includegraphics[width=\linewidth,height=0.85\textheight,keepaspectratio]{images/fig-hierarchy.pdf} \caption{HIVEMIND three-level agent hierarchy and clearance-enforced information flow.} \end{figure} ```-]

### 1.4 Architecture Overview

{+![Figure 1. HIVEMIND three-level agent hierarchy. Employee agents (L1) sit under one department agent (L2) per function; all department agents report to a single executive agent, STRATEGOS (L3). Each level carries a clearance ceiling, and every inter-level edge is gated by the gateway's topology and clearance rules.](images/fig-hierarchy.pdf)+}

### 5.3 Unified Customer History

{+Figure 2 traces this flow end to end, showing where each clearance tier is included verbatim, redacted through a template, or replaced with a caution notice before the package reaches the requesting agent.+}

### 5.3 Unified Customer History

{+![Figure 2. Clearance-filtered Customer History Request. LUNA (T3) requests González history from SALES-AGENT (T4); SALES-AGENT fans out to the relevant agent memories, then filters each result by tier — T3 interactions pass verbatim, T4 pricing is replaced by a redaction template, T5 legal matter becomes a caution notice — and returns only the filtered package. Raw cross-agent memory never reaches LUNA.](images/fig-history-flow.pdf)+}

### 7.3 Nightly Compliance Sweep

[-**6.3.1-] {+**7.3.1+} Information Leak Detection**

### 7.3 Nightly Compliance Sweep

[-**6.3.2-] {+**7.3.2+} Compliance Violation Detection**

### 7.3 Nightly Compliance Sweep

[-**6.3.3-] {+**7.3.3+} Behavioral Anomaly Detection**

### 7.3 Nightly Compliance Sweep

[-**6.3.4-] {+**7.3.4+} Memory Contamination Check**

### 7.3 Nightly Compliance Sweep

[-**6.3.5-] {+**7.3.5+} Governance Metrics for Compliance Classifiers**

### 8.3 Inter-Agent Communication Protocol

[-**7.3.1-] {+**8.3.1+} Message Format**

### 8.3 Inter-Agent Communication Protocol

[-**7.3.2-] {+**8.3.2+} Delivery Semantics**

### 8.3 Inter-Agent Communication Protocol

[-**7.3.3-] {+**8.3.3+} Authentication**

### 8.3 Inter-Agent Communication Protocol

[-**7.3.4-] {+**8.3.4+} Gateway Topology**

### 8.3 Inter-Agent Communication Protocol

[-**7.3.5-] {+**8.3.5+} Protocol Error Codes and Declassification Workflow**

### 10.2 A Three-Agent Reference Prototype

{+### 10.2 A Three-Agent Reference Prototype+}

### 10.2 A Three-Agent Reference Prototype

{+The smallest configuration that exercises every load-bearing mechanism — clearance enforcement, mediated cross-agent retrieval, and template-based declassification — is three agents on three OpenClaw workspaces: one employee agent, one department agent, and the executive agent. We specify it here as a bootstrap that turns the architecture into something a single engineer can stand up, not as a deployment we report results from.+}

### 10.2 A Three-Agent Reference Prototype

{+- **Agents.** `agent_luna` (L1, sales, T3 ceiling), `agent_sales` (L2, T4), `agent_strategos` (L3, T5). Each runs under its own Linux user with the group memberships of Section 8.2; the kernel, not the prompt, enforces the lattice. - **Data fixtures.** A `/corporate` tree with one T3 sales-interaction file readable by all three, one T4 pricing-authority file readable only by `agent_sales` and above, and one T5 legal-matter file readable only by `agent_strategos`. Three files are enough to test all three filtering outcomes (verbatim, redaction template, caution notice) of the Customer History Request flow. - **The minimal test.** `agent_luna` issues a Customer History Request for an account whose record spans all three files. A correct implementation returns the T3 content verbatim, the T4 content as a populated redaction template, and the T5 content as a caution notice — and a direct `cat` of the T4/T5 files from `agent_luna`'s shell returns `permission denied`. That single round-trip validates the simple-security property, the mediated-retrieval gate, and the declassification pipeline at once. - **What it does not prove.** Three agents cannot surface the failure modes that only appear under concurrency and volume — alert fatigue in the nightly sweep, gateway queue saturation, department-agent cognitive load, or behavioral drift across a model update. Those require the staged pilot of Section 10.1. The prototype's purpose is narrower and worth stating plainly: it moves HIVEMIND from a design that is argued to be enforceable to one that is demonstrably enforced on a single machine, which is the precondition for trusting the larger claims.+}

### References

_HIVEMIND: Hierarchical Agent Swarms for Enterprise Knowledge Management_ _J-series paper J10 | Version [-1.2-] {+1.3+} | June 2, 2026_ _Author: Oscar Serra_ _Classification: INTERNAL — OpenClaw/TinkerClaw Research_
