
A note up front: I wrote this article before founding AI Solutions, while I was working through the technical possibilities of OpenClaw and the Hermes Agent Framework. The architecture described here – a deep integration via the Agent Client Protocol (ACP), where OpenClaw spawns Hermes subagents directly through sessions_spawn – was my first draft of how the two systems could work together. In practice, our actual collaboration today looks different: Hermes runs bernd-zuther.de, Ketovavaria (a team built on OpenClaw) runs ketovavaria.de, and we coordinate over a shared Discord channel and a shared workboard – not an ACP subagent binding. Still, this technical deep dive is worth reading: it shows what’s architecturally possible, and it’s the foundation I derived today’s more pragmatic structure from.
The landscape of artificial intelligence has shifted from purely reactive language models to proactive, autonomous agents that can coordinate complex task chains across different platforms. In this context, OpenClaw represents one of the most advanced open-source solutions, functioning as a personal AI assistant that runs on your own devices. The need for specialized multi-agent environments stems from the realization that a single, monolithic system often hits its limits when it has to write creative text, analyze code, and conduct complex research all at once. The deep integration of the standalone Hermes Agent Framework into the OpenClaw architecture makes it possible to create specialized subagents with their own, self-improving learning loops.
The Evolution and Philosophy of OpenClaw
OpenClaw’s origin story is closely tied to the vision of Peter Steinberger, an Austrian developer who originally released the system in November 2025 under the name Clawdbot. The software descends from an earlier assistant called Clawd (later Molty), whose name was a homage to Anthropic’s Claude models. After trademark disputes and a brief phase as Moltbot, the project was finally renamed OpenClaw, keeping the metaphorical connection to the crab. Today, OpenClaw sees itself as a cross-platform system that runs on macOS, Linux, and Windows (via WSL2) and serves as a central gateway for a wide range of messaging channels.
Unlike commercial “walled garden” solutions, OpenClaw places great value on keeping the agent’s context and capabilities on the user’s own computer. This local control makes it possible to hack, modify, and adapt agents to your own needs without depending on the infrastructure of big tech companies. The architecture is built on a gateway daemon that acts as the control instance, managing communication between channels – such as WhatsApp, Telegram, Slack, or Discord – and the runtime environments operating in the background.
Technical Foundation and System Requirements
OpenClaw’s technical base consists of TypeScript and Node.js, with current versions such as Node 24 recommended for developing capabilities. The system is modular and uses a gateway model that acts as a central nervous system.
| System component | Requirement / specification |
| Runtime environment | Node.js 22.16+ (Node 24 recommended) |
| Operating system | macOS, Linux, Windows (via WSL2) |
| RAM requirement | At least 1 GB for gateway operation |
| Programming languages | TypeScript (core), JavaScript/TypeScript (skills) |
| Licensing | MIT License |
The gateway not only manages message routing but also coordinates agent workspaces and runs configurable heartbeat cycles to trigger scheduled tasks. This structure allows multiple isolated agents to coexist within the same gateway process, forming the foundation for complex multi-agent scenarios. With around 394,000 GitHub stars (as of 11/06/2026), OpenClaw is among the fastest-growing open-source infrastructure projects of all.
Fundamentals of the Multi-Agent Environment in OpenClaw
A multi-agent setup in OpenClaw doesn’t simply mean running several instances of the same assistant. Rather, it’s about creating completely isolated “brains,” each with its own workspace, memory, authentication profile, and tools. This isolation is technically enforced through the directory structure and session management in the gateway.
Each agent is defined by a directory under ~/.openclaw/workspace/, where identity files are stored in Markdown. In a multi-agent environment, different agent IDs can be bound to different channels, or even to different accounts within the same channel.
Agent Types and Interaction Patterns
Two primary patterns have emerged within the OpenClaw ecosystem for managing multiple agents: persistent agents and subagents. Persistent agents are long-lived identities, usually tied directly to a communication channel. Subagents, on the other hand, are task-oriented instances created dynamically for a specific job and often archived or deleted once the task is complete.
| Characteristic | Persistent agents | Subagents (spawns) |
| Lifespan | Long-lived, often permanently active | Short-lived, task-bound |
| Binding | Directly to channels (e.g. Telegram bot) | Indirectly via an orchestrator |
| Memory | Persistent in MEMORY.md and session history | Often stateless, context is passed in the prompt |
| Purpose | Main interaction point for users | Specialized tasks (research, code fixes) |
An efficient system often uses an orchestrator agent that handles the primary communication and spawns specialized subagents for parallel tasks as needed. This pattern is called “hub-and-spoke” and allows the strengths of different systems to be deployed in a targeted way.
Integrating the Hermes Agent Framework via ACP
When it comes to the targeted use of subagents, it’s crucial to distinguish between a simple language model and a full-fledged framework. The Hermes Agent Framework, developed by Nous Research, is built on Python (version 3.11 and up) and is characterized by its “self-improving learning loop,” in which the agent independently evaluates and adapts its capabilities over time.
To seamlessly embed this external framework as a subagent in OpenClaw, the Agent Client Protocol (ACP) comes into play. ACP is an open standard that lets OpenClaw communicate with external agent runtimes via asynchronous JSON-RPC over stdio.
How OpenClaw and Hermes Agent Work Together
Instead of running the Hermes Agent as an isolated bot, OpenClaw takes on the role of orchestrator and router, while Hermes handles the actual task execution.
- ACP server mode: The Hermes Agent Framework natively offers the
hermes acpmode (orpython -m acp_adapter). This starts a local ACP server. - Delegation via OpenClaw: When an OpenClaw main agent wants to delegate a task, it uses the
sessions_spawntool with the special parameterruntime: "acp"andagentId: "hermes". - Execution loop: OpenClaw forwards the task to the Hermes agent via the ACP bridge. The Hermes agent then runs its own autonomous “agentic loop” (including tool calls like
read_fileorexecute_code) completely independently in its Python environment.
This hybrid approach combines the best of both worlds: OpenClaw’s excellent multi-channel connectivity and session management with Hermes’s research-oriented, learning execution logic.
Technical Implementation: The Spawning System
The heart of delegation in OpenClaw is the sessions_spawn tool. It allows the orchestrator agent to start a new, isolated session for a background task and hand it off to the Hermes Agent Framework.
Syntax and Parameters of sessions_spawn
To integrate the Hermes agent, the orchestrator uses a specific configuration of sessions_spawn.
| Parameter | Data type | Description |
task | String | The exact task description for the subagent (required). |
agentId | String | The target ID, e.g. "hermes" for Hermes subagents. |
runtime | String | Must be set to "acp" to address the Hermes Python environment via the Agent Client Protocol. |
taskName | String | An optional stable identifier for later targeted control (format: [a-z][a-z0-9_]{0,63}). |
label | String | A human-readable label for tracking in logs. |
runTimeoutSeconds | Number | Time limit for task execution. |
A key advantage of sessions_spawn is that it works asynchronously. The calling agent immediately receives a run ID back and can use sessions_yield to wait until the Hermes subagent’s result is available. Once the subagent finishes its task, the result is automatically announced in the user’s chat channel, unless this is explicitly suppressed.
Hierarchical Control and Depth Limits
OpenClaw implements a strict policy for agent permissions based on their nesting depth. An agent at the first level (orchestrator) gets access to session tools like sessions_spawn, subagents, sessions_list, and sessions_history to manage its children. Agents at deeper levels (leaf workers) are denied access to these powerful tools by default, to prevent uncontrolled cascades of agent spawns. On top of that, calling sessions_spawn strictly enforces the subagents.allowAgents list, so an agent can only start subagents whose IDs have been explicitly allowed in its configuration.
File-Based Configuration of Agent Identities
Native OpenClaw roles are controlled through Markdown files in each agent’s workspace. This architecture makes it possible to define agent behavior without code changes – what’s called “vibe coding.”
The Role of SOUL.md and AGENTS.md
The SOUL.md file acts as the agent’s “character sheet.” It defines personality, values, tone, and behavioral boundaries. Without a SOUL.md, the agent behaves like a generic language model with no persistent identity.
The AGENTS.md file, on the other hand, contains operational instructions for collaboration between agents. It sits above SOUL.md in the hierarchy and defines things like escalation rules or formats for internal communication.
| File | Primary purpose | Contains |
IDENTITY.md | Public ID | Name, agent ID, role, avatar metadata. |
SOUL.md | Inner disposition | Tone, ethical boundaries, communication style. |
AGENTS.md | Collaboration rules | Routing instructions, interaction protocols. |
TOOLS.md | Capabilities | List of allowed integrations and CLI helpers. |
MEMORY.md | Knowledge base | Curated long-term knowledge and key facts. |
An important aspect of spawning subagents is that the orchestrator must explicitly pack all necessary context information into the task prompt when calling sessions_spawn, since subagents don’t automatically inherit the user’s full history.
Management and Orchestration: The “Hub-and-Spoke” Pattern
For advanced users looking to build a complex environment with multiple subagents, the “hub-and-spoke” or “specialist swarm” pattern has proven effective. In this scenario, a human user interacts with an orchestrator agent. This orchestrator delegates tasks to a series of specialized subagents (including Hermes instances), each taking on a different role.
A typical swarm might consist of the following roles:
- Researcher: Uses web search and data extraction to gather facts.
- Hermes coder: Analyzes codebases via the ACP interface and proposes fixes.
- Validator/tester: Checks the other agents’ results for errors or inconsistencies.
This setup prevents uncontrolled loops and keeps task handling targeted. It also enables “model arbitrage,” where a high-performance cloud model is used for orchestration while specialized Hermes agents work cost-effectively on local hardware.
Tools for Managing Workspaces
As the number of subagents grows, it becomes tedious to keep the Markdown files consistent across all workspaces. This is where the community turns to the open-source tool openclaw-multi-agent-tool, provided by CDNsun.
Synchronizing with openclaw-multi-agent-tool
This CLI tool (a bash script) scans the various workspaces under ~/.openclaw/ and compares file contents via md5sum. It produces a clear, color-coded table showing at a glance which agents have identical or different versions of SOUL.md or AGENTS.md.
The script also offers a handy -p function to generate safe push commands, letting you consistently roll out changes from a “master file” (e.g. SOUL-all.md) to all agent workspaces, without relying on often-unreliable symlinks.
Security and Sandboxing in Multi-Agent Systems
Since autonomous agents can hold far-reaching permissions, security is a central concern. OpenClaw offers granular control options here via Docker isolation.
| Sandbox mode | Description | Recommended use |
off | Tools run directly on the gateway’s host system | Trusted main agent |
non-main | Only sessions outside the main conversation (subagents, groups) are locked in sandboxes | Standard security level for external subagents |
all | Every session is required to run in a container | High-security environments |
Beyond that, the sandbox scope can be defined either per session (session), per agent (agent), or as a shared container (shared). Specific commands can be blocked for individual agents via tools.deny lists.
Monitoring and Troubleshooting
A complex multi-agent system requires seamless monitoring of activity. OpenClaw logs all operations to the gateway log (tail -f ~/.openclaw/gateway.log) and stores run status in a SQLite database.
Chat commands like /subagents or /status let the user see which agents are currently active. If a Hermes subagent gets stuck in an infinite loop, it can be stopped via /subagents kill.
A known issue in the SQLite database (task_runs) is that the agent_id field is often empty for subagent spawns, which makes it harder to attribute tasks. A robust workaround is to reliably extract the identity from child_session_key, which uses the format agent:<agentId>:subagent:<uuid>.
Summary and Outlook
Building a multi-agent environment with OpenClaw and the specialized Hermes Agent Framework is an ambitious undertaking. By using the Agent Client Protocol (ACP) interface in combination with the sessions_spawn tool, OpenClaw becomes an extremely capable orchestrator that controls the autonomous, self-learning capabilities of Hermes agents as sub-processes.
This “best of both worlds” approach – OpenClaw for routing, governance, and multi-channel connectivity, Hermes Agent for specialized, research-oriented execution loops – represents the cutting edge of current open-source AI architectures. Combined with tools like openclaw-multi-agent-tool for workspace maintenance and strict Docker sandbox rules, this makes it possible to build extremely robust, highly automated digital ecosystems.
What actually came of it
This deep ACP integration was my first technical draft, before AI Solutions even existed. In the real collaboration between Ketovavaria and me, a simpler but more everyday-practical approach has taken hold since then: instead of direct sessions_spawn calls, we communicate over a shared Discord channel, run a shared task board, and explicitly coordinate on Claude budget and shared local hardware (Strata) – with clear rules on who gets how much allowance and who needs to register GPU-heavy work and when. It’s less elegant than a native subagent binding, but more robust against the real problems that come up day to day: different budgets, shared hardware, and two teams that don’t share the same codebase.
The ACP architecture described here still remains relevant, though – it shows the more technically ambitious path, and I keep it in mind for scenarios where tighter coupling would actually make sense.