We introduced GAINs and HCINs as the architecture of multi-agent AI. The obvious question now is: how do you actually build one? The striking answer is that the agent tools developers already use — Claude Code, OpenAI Codex, OpenClaw, and Hermes — have each, independently, implemented the GAIN/HCIN primitives. Their defaults even encode the same lessons the architecture points to. GAINs and HCIN are the map; these tools are the implementation surface.
The mapping
Stripped to primitives, the correspondence is close to one-to-one:
- Coordinator (CCA / PAC) → Claude Code's team lead; Codex's orchestrator (or an Agents-SDK project-manager agent); an OpenClaw worker organization.
- Specialized ephemeral agents → subagents and teammates (Claude Code); subagents with custom agent files (Codex); isolated specialist workers (OpenClaw).
- Validation agents → Codex's gated hand-offs; Claude Code's plan-approval, task-completion hooks, and adversarial "scientific-debate" teammates.
- Privileged / asymmetric information flow → each worker's own context window, plus per-agent credentials.
- Shared memory (collective knowledge base) → Claude Code's shared task list + mailbox within a run; Hermes' persistent memory across runs.
Two patterns
A GAIN as subagents. The simplest network maps directly onto subagents: the parent agent is the coordinator — it decomposes the task, spawns one specialist per subtask in its own context window, runs them in parallel, and synthesizes the returned results. The children report only to the parent. Use this when specialists are independent and only their results matter (parallel research, parallel review, fan-out extraction). It's the cost-efficient GAIN, because each child's work is summarized back rather than dumped into the orchestrator.
A GAIN/HCIN as a coordinating team. When specialists need to share and challenge each other, use a coordinating agent team (Claude Code's). A lead coordinates teammates that each have their own context, share a task list with dependency tracking, message each other through a mailbox, and claim work with file locking. The documented "spawn teammates to disprove each other's theories, like a scientific debate" pattern is the architecture's verification idea made operational — independent critics surface the wrong answer a single agent would anchor on.
HCIN's best idea ships as the default
HCIN's load-bearing principle — privileged, need-to-know information flow — is not something you bolt on. Every one of these tools gives each worker its own context window, loaded with its task and the shared project context but not the coordinator's full history. OpenClaw states the rationale in its own terms: isolation by design… prevents context pollution and ensures each agent reasons clearly about its specific task. OpenClaw extends the same principle to credentials — authentication profiles are strictly per-agent, so a worker holds only the access it needs and can't leak it to peers. That is least-privilege (the ALARA principle from the HCIN write-up) applied to access, not just context. You don't design privileged flow from scratch on these tools; you configure each agent's scope, and the tool enforces it.
Verification at the seams
A single end-of-line check isn't enough; you verify at the seams to stop a confident error from cascading into false consensus. The tools provide the seams: Codex's gated hand-offs (a project-manager agent confirms an upstream deliverable before advancing); Claude Code's plan approval (a teammate works in read-only plan mode until the lead approves) and completion hooks (a hook can reject a task completion and send feedback). Implementing a GAIN's validation agents is a matter of choosing which seams to gate, not building a verifier from nothing.
The honest gap: recursion
HCIN's deep recursive-fractal nesting — agents made of sub-networks made of sub-agents — is the one place the architecture runs ahead of the tools, and it's worth being honest about. The tools deliberately bound recursion: Codex caps nesting depth at one by default (a child can spawn, but its children can't) and warns that raising it multiplies cost and latency; Claude Code disallows nested teams entirely (only the lead manages the team). Today, you get two or three explicit levels, not arbitrary depth — and that refusal to nest freely is not a deficiency, it's the bounded-recursion discipline the research recommends, enforced as a default. Design your hierarchy shallow on purpose.
Memory, realized
The collective knowledge base — durable memory that accumulates across runs — is the piece most tools leave to you, with one exception: Hermes builds it in, with a learning loop that remembers across sessions and turns repeated work into reusable skills. When a network needs institutional memory rather than per-run coordination, that's the component to add.
The takeaway
You don't have to choose between the architecture and the tooling. GAINs and HCIN tell you what to build — a coordinator, scoped specialists, verification at the seams, bounded depth, a knowledge base — and Claude Code, Codex, OpenClaw, and Hermes give you the primitives to build it, with the hard-won lessons already wired in as their defaults. Map the concept to the primitive, configure the scopes and the gates deliberately, keep the hierarchy shallow, and respect the cost — and you have a real, reliable agent network.
Comments