Reflection Loop — Agent Self-Improvement
The reflection loop: a worker drafts, a critic reviews the draft against the brief and the orchestrator only approves once the revision closes every gap.
A planner decomposes the request on a shared board, specialized workers claim tasks, and the orchestrator delivers once every card is closed.
Copy and paste the following FlowZap code into a project in your FlowZap account to see this template diagram.
task_planner { # Planner
n1: rectangle label:"Orchestrator"
specialized_workers.n5.handle(right) -> final_result.n6.handle(left) [label="publish"]
shared_board.n2.handle(bottom) -> specialized_workers.n5.handle(top) [label="unblock writer"]
specialized_workers.n4.handle(right) -> shared_board.n2.handle(right) [label="complete"]
specialized_workers.n3.handle(right) -> shared_board.n2.handle(right) [label="complete"]
shared_board.n2.handle(right) -> specialized_workers.n4.handle(left) [label="claim task 2"]
shared_board.n2.handle(right) -> specialized_workers.n3.handle(left) [label="claim task 1"]
task_planner.n1.handle(right) -> shared_board.n2.handle(left) [label="create tasks"]
}
shared_board { # Coordination
n2: rectangle label:"Shared kanban.db"
}
specialized_workers { # Workers
n3: rectangle label:"Researcher A"
n4: rectangle label:"Researcher B"
n5: rectangle label:"Writer"
}
final_result { # Output
n6: circle label:"Deliverable"
}
Install the MCP packagenpm install -g flowzap-mcpMCP documentation
The reflection loop: a worker drafts, a critic reviews the draft against the brief and the orchestrator only approves once the revision closes every gap.
Shared host, per-client profiles and tool boundaries: how external clients reach their own Hermes workspaces without seeing another tenant's tools or data.
Option 1 of the Hermes multi-tenant setup: one external actor, one gateway, one isolated workspace inside an execution sandbox, and a single client profile.
Option 2: one client with several entry points, a prefix router that maps /eng or /support to a mode, and a single unified Hermes profile behind the gateway.
Option 3, the core multi-tenant setup: per-token entry points, one gateway per client, and isolated Hermes profiles running in separate containers.
Option 4: external participants, per-client gateways and routers, department prefixes inside each tenant, and a sandbox per client.