Multi-gateway: один диспетчер kanban на несколько процессов
Hermes поддерживает несколько gateway-процессов, но диспетчер kanban только у одного, остальные отключают через конфиг.
Hermes поддерживает несколько gateway-процессов, но диспетчер kanban только у одного, остальные отключают через конфиг.
Прямой связи с моей работой нет: это внутренняя архитектура Hermes, но принцип single-dispatcher можно применить при проектировании оркестрации агентов, чтобы избежать дублирования задач.
расшифровка ролика ↓
Title:
URL Source: https://raw.githubusercontent.com/NousResearch/hermes-agent/main/docs/kanban/multi-gateway.md
Markdown Content: # Multi-gateway deployment
Hermes supports multiple gateway processes running concurrently — one per profile (default, writer, admin, coder, researcher). Each gateway opens its own connection to platform APIs and delivers messages for its profile's subscribers.
## Single-dispatcher posture
Only one gateway owns the kanban dispatcher. The owning gateway keeps `kanban.dispatch_in_gateway: true` (the default); every other gateway sets it to `false`.
**Why this matters:** dispatching is single-owner so multiple gateways do not race to spawn the same work. Notification delivery is profile-owned instead: each gateway polls only subscriptions for profiles whose platform adapters it hosts. The atomic event claim prevents duplicate delivery across watcher processes.
## Configuration
On the dispatch-owning gateway (typically the `default` profile), no change is needed. On every other profile gateway, add to `~/.hermes/config.yaml`:
```yaml kanban: dispatch_in_gateway: false ```
Or set the env var: `HERMES_KANBAN_DISPATCH_IN_GATEWAY=false`
## What each gateway does
| Gateway role | dispatch_in_gateway | Opens subscribed board DBs? | Dispatcher | Notifier | |---|---|---|---|---| | default (confirmed dispatch-lock owner) | true (default) | yes | yes | owned profiles + legacy unstamped subscriptions | | writer, admin, coder, etc. | false | yes, when the profile has subscriptions | no | that gateway's owned profiles |
Non-dispatch gateways still deliver messages for their own platform adapters (Telegram, Discord, etc.). They do not dispatch tasks, and they skip boards that have no subscriptions owned by their profiles.