overmind-mcp 2.8.21 โ†’ 2.8.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,775 @@
1
+ # ๐Ÿ“ก Documentation โ€” Hermes Gateway
2
+
3
+ > Gateway multi-plateforme de Hermes Agent par Nous Research
4
+ > Version : 2.1+ | Derniรจre MAJ : 2026-05-30
5
+
6
+ ---
7
+
8
+ ## 1. Architecture Gรฉnรฉrale
9
+
10
+ ```
11
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
12
+ โ”‚ HERMES GATEWAY โ”‚
13
+ โ”‚ โ”‚
14
+ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
15
+ โ”‚ โ”‚Telegram โ”‚ โ”‚ Discord โ”‚ โ”‚ Slack โ”‚ โ”‚WhatsApp โ”‚ โ”‚
16
+ โ”‚ โ”‚ Adapter โ”‚ โ”‚ Adapter โ”‚ โ”‚ Adapter โ”‚ โ”‚ Adapter โ”‚ โ”‚
17
+ โ”‚ โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜ โ”‚
18
+ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚
19
+ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ” โ”‚
20
+ โ”‚ โ”‚ SESSION ROUTER (state.db) โ”‚ โ”‚
21
+ โ”‚ โ”‚ โ€ข Route messages to agent sessions โ”‚ โ”‚
22
+ โ”‚ โ”‚ โ€ข Channel โ†’ Session mapping โ”‚ โ”‚
23
+ โ”‚ โ”‚ โ€ข Topic/Thread support โ”‚ โ”‚
24
+ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
25
+ โ”‚ โ”‚ โ”‚
26
+ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
27
+ โ”‚ โ”‚ AGENT LOOP (run_agent.py) โ”‚ โ”‚
28
+ โ”‚ โ”‚ โ€ข System prompt construction โ”‚ โ”‚
29
+ โ”‚ โ”‚ โ€ข LLM API calls (OpenAI format) โ”‚ โ”‚
30
+ โ”‚ โ”‚ โ€ข Tool dispatch (MCP + native) โ”‚ โ”‚
31
+ โ”‚ โ”‚ โ€ข Context compression โ”‚ โ”‚
32
+ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
33
+ โ”‚ โ”‚ โ”‚
34
+ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
35
+ โ”‚ โ”‚ TOOL LAYER โ”‚ โ”‚
36
+ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚
37
+ โ”‚ โ”‚ โ”‚ Terminal โ”‚ โ”‚ File I/O โ”‚ โ”‚ Browser โ”‚ โ”‚ โ”‚
38
+ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚
39
+ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚
40
+ โ”‚ โ”‚ โ”‚ Web/HTTP โ”‚ โ”‚ Cron โ”‚ โ”‚ Delegat. โ”‚ โ”‚ โ”‚
41
+ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚
42
+ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚
43
+ โ”‚ โ”‚ โ”‚ MCP Servers (HTTP/stdio) โ”‚ โ”‚ โ”‚
44
+ โ”‚ โ”‚ โ”‚ memory, discord, postgres, x, etc. โ”‚ โ”‚ โ”‚
45
+ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚
46
+ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
47
+ โ”‚ โ”‚
48
+ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
49
+ โ”‚ โ”‚ SERVICES ANNEXES โ”‚ โ”‚
50
+ โ”‚ โ”‚ โ€ข Cron Scheduler (jobs.py + scheduler.py) โ”‚ โ”‚
51
+ โ”‚ โ”‚ โ€ข Curator (skill lifecycle) โ”‚ โ”‚
52
+ โ”‚ โ”‚ โ€ข Kanban (multi-agent work queue) โ”‚ โ”‚
53
+ โ”‚ โ”‚ โ€ข TTS / STT โ”‚ โ”‚
54
+ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
55
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
56
+ ```
57
+
58
+ ### Composants clรฉs
59
+
60
+ | Composant | Fichier | Rรดle |
61
+ |-----------|---------|------|
62
+ | Gateway runner | `gateway/run.py` | Boucle principale, dispatch messages |
63
+ | Platform adapters | `gateway/platforms/*.py` | Un adapter par plateforme |
64
+ | Session router | `hermes_state.py` | SQLite state.db, routing |
65
+ | Agent loop | `run_agent.py` | Conversation LLM + tools |
66
+ | Tool dispatch | `model_tools.py` | Appels outils natifs + MCP |
67
+ | Cron scheduler | `cron/scheduler.py` | Jobs planifiรฉs |
68
+ | Curator | `skills/curator.py` | Maintenance skills |
69
+
70
+ ---
71
+
72
+ ## 2. Plateformes Supportรฉes
73
+
74
+ | Plateforme | Adapter | Auth requise | Features |
75
+ |------------|---------|-------------|----------|
76
+ | **Telegram** | `telegram.py` | Bot Token | Topics, DMs, groupes, inline |
77
+ | **Discord** | `discord.py` | Bot Token | Embeds, threads, rรฉactions, boutons |
78
+ | **Slack** | `slack.py` | Bot Token + Signing Secret | Channels, DMs, threads |
79
+ | **WhatsApp** | `whatsapp.py` | WhatsApp Business API | Messages, mรฉdias |
80
+ | **Signal** | `signal.py` | signal-cli | Messages, groupes |
81
+ | **Email** | `email.py` | IMAP/SMTP | Envoi/rรฉception, piรจces jointes |
82
+ | **SMS** | `sms.py` | Twilio / Vonage | Envoi/rรฉception SMS |
83
+ | **Matrix** | `matrix.py` | Homeserver + Token | Rooms, DMs |
84
+ | **Mattermost** | `mattermost.py` | Bot Token | Channels, DMs |
85
+ | **Home Assistant** | `homeassistant.py` | HA Webhook | Intentions, contrรดle |
86
+ | **DingTalk** | `dingtalk.py` | App Key/Secret | Messages, groupes |
87
+ | **Feishu (Lark)** | `feishu.py` | App ID/Secret | Messages, docs |
88
+ | **WeCom** | `wecom.py` | Corp ID + Secret | Messages |
89
+ | **BlueBubbles** | `bluebubbles.py` | BB Server URL | iMessage |
90
+ | **Weixin (WeChat)** | `weixin.py` | App ID/Secret | Messages |
91
+ | **API Server** | `api_server.py` | Clรฉ API custom | REST endpoint |
92
+ | **Webhooks** | `webhook.py` | Route config | POST entrants |
93
+ | **Open WebUI** | via API Server | Clรฉ API | Interface web |
94
+
95
+ ### Configuration plateforme
96
+
97
+ ```bash
98
+ # Setup interactif
99
+ hermes gateway setup
100
+
101
+ # Ou รฉdition manuelle
102
+ hermes config edit
103
+ ```
104
+
105
+ Exemple config Discord :
106
+ ```yaml
107
+ discord:
108
+ bot_token: ${DISCORD_BOT_TOKEN}
109
+ enabled: true
110
+ prefix: "!"
111
+ allowed_channels: [] # vide = tous
112
+ ```
113
+
114
+ ---
115
+
116
+ ## 3. Commandes CLI Gateway
117
+
118
+ ```bash
119
+ # Dรฉmarrer le gateway (foreground)
120
+ hermes gateway run
121
+
122
+ # Installer comme service systรจme
123
+ hermes gateway install
124
+
125
+ # Contrรดle du service
126
+ hermes gateway start
127
+ hermes gateway stop
128
+ hermes gateway restart
129
+
130
+ # ร‰tat du gateway
131
+ hermes gateway status
132
+
133
+ # Configuration initiale
134
+ hermes gateway setup
135
+ ```
136
+
137
+ ### Options avancรฉes
138
+
139
+ ```bash
140
+ # Lancer avec un profil spรฉcifique
141
+ hermes gateway run --profile sniper
142
+
143
+ # Mode verbose (debug)
144
+ hermes gateway run --verbose
145
+
146
+ # Port custom pour API server
147
+ hermes gateway run --port 8080
148
+ ```
149
+
150
+ ---
151
+
152
+ ## 4. Configuration (config.yaml)
153
+
154
+ ### Sections pertinentes pour le gateway
155
+
156
+ ```yaml
157
+ # === MODรˆLE ===
158
+ model:
159
+ default: glm-5.1
160
+ provider: z-ai
161
+ context_length: 128000
162
+
163
+ # === AGENT ===
164
+ agent:
165
+ max_turns: 90
166
+ tool_use_enforcement: true # Oblige ร  utiliser les outils
167
+
168
+ # === TERMINAL ===
169
+ terminal:
170
+ backend: local # local, docker, ssh
171
+ timeout: 180
172
+
173
+ # === COMPRESSION ===
174
+ compression:
175
+ enabled: true
176
+ threshold: 0.50 # Dรฉclenche ร  50% du context
177
+ target_ratio: 0.20 # Cible 20% du context
178
+
179
+ # === TTS ===
180
+ tts:
181
+ provider: elevenlabs
182
+ voice: charlie
183
+ voice_id: IKne3meq5aSn9XLyUdCD
184
+ model: eleven_multilingual_v2
185
+
186
+ # === STT ===
187
+ stt:
188
+ enabled: true
189
+ provider: local # local, groq, openai, mistral
190
+ local:
191
+ model: base
192
+
193
+ # === Mร‰MOIRE ===
194
+ memory:
195
+ memory_enabled: true
196
+ user_profile_enabled: true
197
+ provider: built-in # built-in, honcho, mem0
198
+
199
+ # === Sร‰CURITร‰ ===
200
+ security:
201
+ redact_secrets: false
202
+ tirith_enabled: true
203
+ website_blocklist: []
204
+
205
+ # === APPROBATIONS ===
206
+ approvals:
207
+ mode: manual # manual, smart, off
208
+
209
+ # === MCP ===
210
+ mcp_servers:
211
+ memory-server:
212
+ url: "http://localhost:3099/mcp"
213
+ discord-server:
214
+ url: "http://localhost:3141/mcp"
215
+
216
+ # === Dร‰Lร‰GATION ===
217
+ delegation:
218
+ max_concurrent_children: 3
219
+ max_spawn_depth: 1
220
+
221
+ # === CRON ===
222
+ # Gรฉrรฉ via l'outil cronjob, pas de config yaml directe
223
+
224
+ # === CANVAS ===
225
+ display:
226
+ skin: default
227
+ tool_progress: true
228
+ show_reasoning: false
229
+ show_cost: false
230
+ ```
231
+
232
+ ---
233
+
234
+ ## 5. Slash Commands (Mode Gateway)
235
+
236
+ ### Contrรดle de session
237
+ ```
238
+ /new (/reset) Nouvelle session
239
+ /clear Effacer + nouvelle session
240
+ /retry Renvoyer dernier message
241
+ /undo Annuler dernier รฉchange
242
+ /title [name] Nommer la session
243
+ /compress Compression manuelle du contexte
244
+ /stop Tuer processus en arriรจre-plan
245
+ /rollback [N] Restaurer checkpoint filesystem
246
+ ```
247
+
248
+ ### Configuration
249
+ ```
250
+ /config Afficher config
251
+ /model [name] Changer de modรจle
252
+ /personality [name] Changer personnalitรฉ
253
+ /reasoning [level] Niveau de raisonnement (noneโ†’xhigh)
254
+ /verbose Cycle verbose
255
+ /voice [on|off|tts] Mode vocal
256
+ /yolo Bypass approbations
257
+ /status Info session
258
+ ```
259
+
260
+ ### Outils & Skills
261
+ ```
262
+ /tools Gรฉrer outils (CLI)
263
+ /skills Installer skills
264
+ /skill <name> Charger un skill
265
+ /reload Recharger .env
266
+ /reload-mcp Recharger serveurs MCP
267
+ /cron Gรฉrer cron jobs
268
+ ```
269
+
270
+ ### Gateway
271
+ ```
272
+ /approve Approuver commande en attente
273
+ /deny Refuser commande
274
+ /restart Redรฉmarrer gateway
275
+ /sethome Dรฉfinir canal home
276
+ /update MAJ Hermes
277
+ /platforms Statut plateformes
278
+ ```
279
+
280
+ ### Info
281
+ ```
282
+ /help Aide
283
+ /commands Lister toutes les commandes
284
+ /usage Utilisation tokens
285
+ /insights [days] Analytics
286
+ /debug Upload rapport debug
287
+ /profile Info profil actif
288
+ ```
289
+
290
+ ---
291
+
292
+ ## 6. Cron Jobs
293
+
294
+ ### Fonctionnement
295
+
296
+ ```
297
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
298
+ โ”‚ CRON SCHEDULER โ”‚
299
+ โ”‚ โ”œโ”€โ”€ cron/jobs.py โ†’ Stockage jobs โ”‚
300
+ โ”‚ โ”œโ”€โ”€ cron/scheduler.py โ†’ Tick loop โ”‚
301
+ โ”‚ โ””โ”€โ”€ .tick.lock โ†’ Anti-doublon โ”‚
302
+ โ”‚ โ”‚
303
+ โ”‚ CHAQUE TICK : โ”‚
304
+ โ”‚ 1. Vรฉrifie .tick.lock โ”‚
305
+ โ”‚ 2. Charge jobs actifs โ”‚
306
+ โ”‚ 3. Pour chaque job รฉligible : โ”‚
307
+ โ”‚ โ†’ Nouvelle session fraรฎche โ”‚
308
+ โ”‚ โ†’ Injecte le prompt โ”‚
309
+ โ”‚ โ†’ Exรฉcute l'agent โ”‚
310
+ โ”‚ โ†’ Dรฉlivre le rรฉsultat โ”‚
311
+ โ”‚ โ†’ Dรฉtruit la session โ”‚
312
+ โ”‚ 4. Libรจre .tick.lock โ”‚
313
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
314
+ ```
315
+
316
+ ### Syntaxe de planification
317
+
318
+ | Format | Exemple | Signification |
319
+ |--------|---------|---------------|
320
+ | Durรฉe | `30m` | Toutes les 30 minutes |
321
+ | Every | `every 2h` | Toutes les 2 heures |
322
+ | Every day | `every monday 9am` | Chaque lundi ร  9h |
323
+ | Cron | `0 9 * * *` | Tous les jours ร  9h |
324
+ | ISO timestamp | `2026-06-01T10:00:00` | Une seule fois |
325
+
326
+ ### Options par job
327
+
328
+ ```python
329
+ cronjob(
330
+ action="create",
331
+ name="analyse_crypto", # Nom unique
332
+ schedule="every 2h", # Planification
333
+ prompt="Analyse BTC...", # Prompt auto-suffisant
334
+ skills=["web", "terminal"], # Skills ร  charger
335
+ deliver="origin", # Livraison (origin, all, platform:chat:thread)
336
+ model={"model": "glm-5.1"}, # Override modรจle
337
+ workdir="/path/to/project", # Rรฉpertoire de travail
338
+ enabled_toolsets=["web", "terminal", "file"], # Restreindre outils
339
+ context_from=["job_id_abc"], # Chaรฎner avec sortie d'un autre job
340
+ script="collect_data.sh", # Script pre-run (data collection)
341
+ no_agent=False, # True = script seul, pas d'agent
342
+ repeat=None, # None = rรฉcurrent, int = nombre de runs
343
+ )
344
+ ```
345
+
346
+ ### Invariants cron
347
+
348
+ - **Timeout hard** : 3 minutes par run
349
+ - **skip_memory=True** par dรฉfaut (pas de mรฉmoire auto)
350
+ - **Pas de cron en chaรฎne** : un cron ne peut pas crรฉer d'autres cron
351
+ - **Lock file** empรชche doubles ticks
352
+ - **Session fraรฎche** ร  chaque tick (pas d'injection dans session active)
353
+
354
+ ---
355
+
356
+ ## 7. Intรฉgration MCP
357
+
358
+ ### Architecture MCP dans le gateway
359
+
360
+ ```
361
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
362
+ โ”‚ AGENT SESSION โ”‚
363
+ โ”‚ โ”‚ โ”‚
364
+ โ”‚ โ”œโ”€โ”€ Outils natifs (terminal, file...) โ”‚
365
+ โ”‚ โ”‚ โ”‚
366
+ โ”‚ โ””โ”€โ”€ MCP Servers โ”‚
367
+ โ”‚ โ”œโ”€โ”€ HTTP Stream โ”‚
368
+ โ”‚ โ”‚ โ”œโ”€โ”€ memory-server :3099 โ”‚
369
+ โ”‚ โ”‚ โ”œโ”€โ”€ discord-server :3141 โ”‚
370
+ โ”‚ โ”‚ โ”œโ”€โ”€ x-mcp-server :3142 โ”‚
371
+ โ”‚ โ”‚ โ””โ”€โ”€ postgresql-server :5433 โ”‚
372
+ โ”‚ โ”‚ โ”‚
373
+ โ”‚ โ””โ”€โ”€ stdio (si configurรฉ) โ”‚
374
+ โ”‚ โ””โ”€โ”€ custom-command --mcp โ”‚
375
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
376
+ ```
377
+
378
+ ### Configuration MCP
379
+
380
+ **3 niveaux par agent :**
381
+
382
+ 1. **`.mcp.json`** โ€” Dรฉclare les serveurs disponibles
383
+ ```json
384
+ {
385
+ "mcpServers": {
386
+ "memory-server": {
387
+ "type": "http",
388
+ "url": "http://localhost:3099/mcp"
389
+ }
390
+ }
391
+ }
392
+ ```
393
+
394
+ 2. **`settings.json`** โ€” Active/filtre les serveurs
395
+ ```json
396
+ {
397
+ "enabledMcpjsonServers": ["memory-server", "discord-server"],
398
+ "enableAllProjectMcpServers": false
399
+ }
400
+ ```
401
+
402
+ 3. **`config.yaml`** โ€” Gateway runtime
403
+ ```yaml
404
+ mcp_servers:
405
+ memory-server:
406
+ url: "http://localhost:3099/mcp"
407
+ ```
408
+
409
+ ### Rechargement MCP
410
+
411
+ ```
412
+ /reload-mcp # Recharger sans restart
413
+ /restart # Restart complet du gateway
414
+ ```
415
+
416
+ ---
417
+
418
+ ## 8. Sรฉcuritรฉ
419
+
420
+ ### Redaction des secrets
421
+
422
+ ```bash
423
+ # Masquer les API keys dans le context
424
+ hermes config set security.redact_secrets true
425
+
426
+ # Dรฉsactiver
427
+ hermes config set security.redact_secrets false
428
+ ```
429
+
430
+ โš ๏ธ **Restart requis** โ€” ne prend pas effet mid-session.
431
+
432
+ ### Redaction PII
433
+
434
+ ```bash
435
+ # Hasher les user IDs, strip numรฉros de tรฉlรฉphone
436
+ hermes config set privacy.redact_pii true
437
+ ```
438
+
439
+ ### Modes d'approbation
440
+
441
+ | Mode | Comportement |
442
+ |------|-------------|
443
+ | `manual` | Prompt avant chaque commande risquรฉe (dรฉfaut) |
444
+ | `smart` | LLM auxiliaire auto-approuve les commandes safe |
445
+ | `off` | Bypass total (รฉquivalent `--yolo`) |
446
+
447
+ ```bash
448
+ hermes config set approvals.mode smart
449
+ ```
450
+
451
+ ### Allowlist shell hooks
452
+
453
+ Fichier : `~/.hermes/shell-hooks-allowlist.json`
454
+ Premiรจre exรฉcution d'un hook โ†’ prompt interactif.
455
+
456
+ ---
457
+
458
+ ## 9. Gestion des Sessions
459
+
460
+ ### Architecture
461
+
462
+ ```
463
+ ~/.hermes/
464
+ โ”œโ”€โ”€ state.db # Session store (SQLite + FTS5)
465
+ โ”œโ”€โ”€ sessions/
466
+ โ”‚ โ”œโ”€โ”€ routing.json # Channel โ†’ Session mapping
467
+ โ”‚ โ””โ”€โ”€ *.jsonl # Transcripts (optionnel)
468
+ โ””โ”€โ”€ logs/
469
+ โ””โ”€โ”€ gateway.log # Logs gateway
470
+ ```
471
+
472
+ ### Cycle de vie
473
+
474
+ ```
475
+ Message entrant
476
+ โ”‚
477
+ โ”œโ”€โ”€ Canal connu ? โ†’ Router vers session existante
478
+ โ”‚ โ”œโ”€โ”€ Topic/Thread ? โ†’ Sous-session
479
+ โ”‚ โ””โ”€โ”€ Canal principal โ†’ Session principale
480
+ โ”‚
481
+ โ””โ”€โ”€ Nouveau canal โ†’ Crรฉer nouvelle session
482
+ โ”œโ”€โ”€ Charger config agent
483
+ โ”œโ”€โ”€ Initialiser outils + MCP
484
+ โ””โ”€โ”€ Dรฉmarrer boucle agent
485
+ ```
486
+
487
+ ### Commandes session
488
+
489
+ ```bash
490
+ hermes sessions list # Lister sessions rรฉcentes
491
+ hermes sessions browse # Picker interactif
492
+ hermes sessions export OUT # Exporter en JSONL
493
+ hermes sessions rename ID T # Renommer
494
+ hermes sessions delete ID # Supprimer
495
+ hermes sessions prune # Nettoyer vieilles sessions
496
+ hermes sessions stats # Statistiques du store
497
+ ```
498
+
499
+ ---
500
+
501
+ ## 10. Webhooks
502
+
503
+ ### Configuration
504
+
505
+ ```bash
506
+ # Crรฉer une route webhook
507
+ hermes webhook subscribe myhook
508
+ # โ†’ Crรฉe /webhooks/myhook
509
+
510
+ # Lister
511
+ hermes webhook list
512
+
513
+ # Supprimer
514
+ hermes webhook remove myhook
515
+
516
+ # Test
517
+ hermes webhook test myhook
518
+ ```
519
+
520
+ ### Payload entrant
521
+
522
+ ```json
523
+ POST /webhooks/myhook
524
+ {
525
+ "message": "Analyse le marchรฉ BTC",
526
+ "source": "external_app",
527
+ "metadata": {
528
+ "priority": "high"
529
+ }
530
+ }
531
+ ```
532
+
533
+ Le gateway traite le payload comme un message utilisateur normal.
534
+
535
+ ---
536
+
537
+ ## 11. Profils
538
+
539
+ ### Concept
540
+
541
+ Les profils permettent de faire tourner plusieurs instances Hermes isolรฉes :
542
+
543
+ ```
544
+ ~/.hermes/ # Profil default
545
+ ~/.hermes/profiles/
546
+ โ”œโ”€โ”€ sniper/ # Profil sniper
547
+ โ”‚ โ”œโ”€โ”€ config.yaml
548
+ โ”‚ โ”œโ”€โ”€ .env
549
+ โ”‚ โ”œโ”€โ”€ skills/
550
+ โ”‚ โ””โ”€โ”€ sessions/
551
+ โ””โ”€โ”€ researcher/ # Profil researcher
552
+ โ”œโ”€โ”€ config.yaml
553
+ โ””โ”€โ”€ ...
554
+ ```
555
+
556
+ ### Commandes
557
+
558
+ ```bash
559
+ hermes profile list # Lister profils
560
+ hermes profile create sniper # Crรฉer (--clone, --clone-all)
561
+ hermes profile use sniper # Dรฉfinir comme dรฉfaut
562
+ hermes profile show sniper # Dรฉtails
563
+ hermes profile delete sniper # Supprimer
564
+ hermes profile rename A B # Renommer
565
+ hermes profile export sniper # Export tar.gz
566
+ hermes profile import file.tar.gz # Importer
567
+ ```
568
+
569
+ ### Lancer avec un profil
570
+
571
+ ```bash
572
+ hermes --profile sniper
573
+ hermes gateway run --profile sniper
574
+ ```
575
+
576
+ ---
577
+
578
+ ## 12. Credential Pools
579
+
580
+ Rotation automatique des clรฉs API pour รฉviter les rate limits.
581
+
582
+ ```bash
583
+ hermes auth add # Ajouter credential (wizard)
584
+ hermes auth list [PROVIDER] # Lister credentials
585
+ hermes auth remove P INDEX # Supprimer par provider + index
586
+ hermes auth reset PROVIDER # Reset exhaustion status
587
+ ```
588
+
589
+ ### Comportement
590
+
591
+ - Hermes essaie KEY_1 โ†’ si 429/401 โ†’ KEY_2 โ†’ si 429 โ†’ KEY_3
592
+ - Marque les clรฉs รฉpuisรฉes, les rรฉessaie aprรจs cooldown
593
+ - Configurรฉ dans `.env` avec clรฉs numรฉrotรฉes
594
+
595
+ ---
596
+
597
+ ## 13. TTS / STT en Gateway
598
+
599
+ ### TTS (Text โ†’ Voice)
600
+
601
+ | Provider | Variable | Coรปt |
602
+ |----------|----------|------|
603
+ | Edge TTS | Aucune | Gratuit (dรฉfaut) |
604
+ | ElevenLabs | `ELEVENLABS_API_KEY` | Freemium |
605
+ | OpenAI | `VOICE_TOOLS_OPENAI_KEY` | Payant |
606
+ | MiniMax | `MINIMAX_API_KEY` | Payant |
607
+ | Mistral | `MISTRAL_API_KEY` | Payant |
608
+
609
+ Commandes :
610
+ ```
611
+ /voice on # Voice-to-voice
612
+ /voice tts # Toujours voice
613
+ /voice off # Dรฉsactiver
614
+ ```
615
+
616
+ ### STT (Voice โ†’ Text)
617
+
618
+ Transcription automatique des messages vocaux entrants.
619
+
620
+ | Provider | Variable | Coรปt |
621
+ |----------|----------|------|
622
+ | Local faster-whisper | Aucune | Gratuit |
623
+ | Groq Whisper | `GROQ_API_KEY` | Freemium |
624
+ | OpenAI Whisper | `VOICE_TOOLS_OPENAI_KEY` | Payant |
625
+ | Mistral Voxtral | `MISTRAL_API_KEY` | Payant |
626
+
627
+ ---
628
+
629
+ ## 14. Troubleshooting
630
+
631
+ ### Gateway ne dรฉmarre pas
632
+
633
+ ```bash
634
+ hermes doctor # Diagnostic complet
635
+ hermes gateway status # ร‰tat du service
636
+ cat ~/.hermes/logs/gateway.log | tail -50
637
+ ```
638
+
639
+ ### Bot Discord silencieux
640
+
641
+ 1. Vรฉrifier le **Message Content Intent** dans Discord Developer Portal
642
+ 2. Vรฉrifier `discord.bot_token` dans config
643
+ 3. Tester : `hermes gateway status`
644
+
645
+ ### Bot Telegram silencieux
646
+
647
+ 1. Vรฉrifier `telegram.bot_token`
648
+ 2. Tester : `curl https://api.telegram.org/bot<TOKEN>/getMe`
649
+
650
+ ### Gateway meurt aprรจs SSH logout
651
+
652
+ ```bash
653
+ sudo loginctl enable-linger $USER
654
+ ```
655
+
656
+ ### Gateway crash loop (systemd)
657
+
658
+ ```bash
659
+ systemctl --user reset-failed hermes-gateway
660
+ hermes gateway restart
661
+ ```
662
+
663
+ ### Outils MCP non disponibles
664
+
665
+ ```bash
666
+ hermes mcp list # Voir serveurs configurรฉs
667
+ hermes mcp test NAME # Tester connexion
668
+ /reload-mcp # Recharger en session
669
+ ```
670
+
671
+ ### Modรจle auxiliaire (vision, compression) ne fonctionne pas
672
+
673
+ ```bash
674
+ hermes config set auxiliary.vision.provider openrouter
675
+ hermes config set auxiliary.vision.model anthropic/claude-sonnet-4
676
+ ```
677
+
678
+ ### Memory non persistante
679
+
680
+ ```bash
681
+ hermes memory status # ร‰tat du provider mรฉmoire
682
+ hermes config set memory.memory_enabled true
683
+ ```
684
+
685
+ ---
686
+
687
+ ## 15. Variables d'Environnement (.env)
688
+
689
+ Fichier : `~/.hermes/.env`
690
+
691
+ ```bash
692
+ # === PROVIDERS ===
693
+ OPENROUTER_API_KEY=sk-or-...
694
+ ANTHROPIC_API_KEY=sk-ant-...
695
+ GOOGLE_API_KEY=AIza...
696
+ DEEPSEEK_API_KEY=sk-...
697
+ XAI_API_KEY=xai-...
698
+ GLM_API_KEY=xxx.zai...
699
+ MINIMAX_API_KEY=xxx
700
+ ELEVENLABS_API_KEY=sk_...
701
+
702
+ # === CREDENTIAL POOL ===
703
+ OPENROUTER_API_KEY_2=sk-or-...
704
+ OPENROUTER_API_KEY_3=sk-or-...
705
+
706
+ # === PLATEFORMES ===
707
+ DISCORD_BOT_TOKEN=MTk...
708
+ TELEGRAM_BOT_TOKEN=123456:ABC...
709
+ SLACK_BOT_TOKEN=xoxb-...
710
+ TWILIO_ACCOUNT_SID=AC...
711
+ TWILIO_AUTH_TOKEN=...
712
+
713
+ # === MCP ===
714
+ POSTGRES_CONNECTION_STRING=postgresql://...
715
+ ```
716
+
717
+ ---
718
+
719
+ ## 16. Chemins Importants
720
+
721
+ | Chemin | Contenu |
722
+ |--------|---------|
723
+ | `~/.hermes/config.yaml` | Configuration principale |
724
+ | `~/.hermes/.env` | Secrets et clรฉs API |
725
+ | `~/.hermes/skills/` | Skills installรฉs |
726
+ | `~/.hermes/sessions/` | Routing + transcripts |
727
+ | `~/.hermes/state.db` | Session store SQLite |
728
+ | `~/.hermes/logs/` | Logs gateway |
729
+ | `~/.hermes/auth.json` | OAuth + credential pools |
730
+ | `~/.hermes/hermes-agent/` | Code source |
731
+ | `~/.hermes/shell-hooks-allowlist.json` | Allowlist hooks |
732
+
733
+ ---
734
+
735
+ ## 17. Flux de Message Complet
736
+
737
+ ```
738
+ 1. Utilisateur envoie message sur Discord
739
+ โ”‚
740
+ 2. Discord Adapter reรงoit via Gateway Intent
741
+ โ”‚
742
+ 3. Session Router lookup (channel_id โ†’ session_id)
743
+ โ”‚
744
+ โ”œโ”€โ”€ Session existe โ†’ Continue conversation
745
+ โ””โ”€โ”€ Nouvelle session โ†’ Crรฉe session fraรฎche
746
+ โ”‚
747
+ 4. Construction du system prompt
748
+ โ”œโ”€โ”€ Config agent (model, tools, persona)
749
+ โ”œโ”€โ”€ Memory injectรฉe (user profile + memory notes)
750
+ โ”œโ”€โ”€ Skills chargรฉs
751
+ โ””โ”€โ”€ MCP tools dรฉcouverts
752
+ โ”‚
753
+ 5. Appel LLM (OpenAI format)
754
+ โ”‚
755
+ 6. Si tool_calls โ†’ Dispatch via model_tools.py
756
+ โ”œโ”€โ”€ Outils natifs (terminal, file, web...)
757
+ โ””โ”€โ”€ MCP tools (HTTP request au serveur MCP)
758
+ โ”‚
759
+ 7. Rรฉsultat outil โ†’ Ajoutรฉ au context โ†’ Retour รฉtape 5
760
+ โ”‚
761
+ 8. Rรฉponse texte finale
762
+ โ”‚
763
+ 9. Gateway envoie via Platform Adapter
764
+ โ”œโ”€โ”€ Texte simple โ†’ Message texte
765
+ โ”œโ”€โ”€ Structurรฉ โ†’ Embed Discord / HTML Telegram
766
+ โ”œโ”€โ”€ Mรฉdia โ†’ Upload fichier
767
+ โ””โ”€โ”€ TTS โ†’ Audio + transcription
768
+ โ”‚
769
+ 10. Logs + mรฉtriques mis ร  jour
770
+ ```
771
+
772
+ ---
773
+
774
+ *Documentation gรฉnรฉrรฉe par SniperBot Analyst โ€” Overmind Ecosystem*
775
+ *Source : Hermes Agent v2.1+ by Nous Research*