Teknium
32fe129324
perf(bot-mode): cold DM hops skip the live /models probe; relay replies land within 250ms
...
Every bot-to-bot DM is a fresh `hermes -p <bot> chat -Q` process, so it
pays agent startup on each hop. Profiling one hop showed the single
largest controllable cost was a live GET /models against the provider on
EVERY launch (0.3-0.6s normally, up to the 15s probe timeout on a slow
endpoint) — the in-memory endpoint-metadata cache is per process and the
Nous persistent context cache is bypassed by design so the portal stays
authoritative.
- model_metadata: memoize successful remote /models probes on disk
(cache/endpoint_model_metadata.json) with the SAME 300s TTL as the
in-memory cache, so authority semantics are unchanged (reconciliation
still lands within 5 minutes) but the answer is shared across
processes. Local endpoints are never memoized (LM Studio reloads).
- bot_relay: the cross-machine reply waiter polls the reply file every
250ms instead of every 2s — up to 2s of dead air on every relayed reply.
Nothing here changes turn ordering: DMs and group rounds stay serial.
Live (polis-hermes bot, spawn -> first API request, cold, 5-6 runs):
main median 1.23s (one 20.8s outlier = probe stall) -> 0.96s, no stalls.
2026-09-02 03:42:01 -07:00
..
2026-09-01 10:56:49 -07:00
2026-09-01 12:07:52 -07:00
2026-08-23 20:07:21 -07:00
2026-08-16 22:10:13 -07:00
2026-08-20 05:26:37 -05:00
2026-08-18 21:06:18 -05:00
2026-08-25 13:27:20 +05:30
2026-08-24 16:18:45 +05:30
2026-08-30 07:04:16 -07:00
2026-08-23 18:25:19 -07:00
2026-08-30 22:19:10 -07:00
2026-08-23 21:12:32 -07:00
2026-08-15 02:51:59 +05:30
2026-08-23 03:57:43 -07:00
2026-08-24 00:57:15 +05:30
2026-08-31 01:04:11 -07:00
2026-08-21 15:23:51 -07:00
2026-08-24 03:21:37 -07:00
2026-09-02 03:42:01 -07:00
2026-08-24 03:21:37 -07:00
2026-08-24 03:21:37 -07:00
2026-08-28 04:57:52 -07:00
2026-08-23 13:27:04 +05:30
2026-08-24 20:11:18 -07:00
2026-08-26 19:25:33 -07:00
2026-08-21 22:33:45 +05:30
2026-08-24 21:45:56 -07:00
2026-08-31 21:17:37 +05:30
2026-08-31 21:59:11 +05:30
2026-09-01 09:27:00 -07:00
2026-08-25 01:34:56 +05:30
2026-08-27 16:11:16 +05:30
2026-09-01 09:27:00 -07:00
2026-08-29 18:35:12 -07:00
2026-08-29 20:40:04 -07:00
2026-08-24 20:11:18 -07:00
2026-08-24 21:51:44 -07:00
2026-08-27 16:11:16 +05:30
2026-08-31 21:59:11 +05:30
2026-08-19 16:31:16 -07:00
2026-08-23 18:27:15 -07:00
2026-08-26 18:02:17 +05:30
2026-08-14 21:24:36 -07:00
2026-08-26 16:42:44 -07:00
2026-08-20 01:16:25 +05:30
2026-08-28 23:10:01 -07:00
2026-08-27 22:22:39 -07:00
2026-08-28 03:05:03 -07:00
2026-08-28 01:39:33 -07:00
2026-08-28 03:04:51 -07:00
2026-08-26 19:25:33 -07:00
2026-08-29 18:35:17 -07:00
2026-08-27 23:26:40 +08:00
2026-08-26 04:50:13 -07:00
2026-08-15 18:20:55 -07:00
2026-08-15 17:11:53 -07:00
2026-08-25 02:31:34 -07:00
2026-08-15 22:18:09 -07:00
2026-08-15 18:20:55 -07:00
2026-08-15 22:36:52 -07:00
2026-08-26 19:25:33 -07:00
2026-08-30 07:04:16 -07:00
2026-08-14 20:46:50 -07:00
2026-09-02 00:52:58 -07:00
2026-09-02 00:52:58 -07:00
2026-08-30 19:47:30 -07:00
2026-08-28 06:36:22 -07:00
2026-09-01 22:28:52 -07:00
2026-08-25 16:39:12 -07:00
2026-09-02 01:06:24 -07:00
2026-08-27 07:38:53 -07:00
2026-08-30 05:16:10 -07:00
2026-08-31 07:28:18 -07:00
2026-08-15 02:44:38 -07:00
2026-08-31 01:02:42 -07:00
2026-08-29 19:13:23 -07:00
2026-09-01 12:07:52 -07:00
2026-08-30 22:19:10 -07:00
2026-08-16 20:14:51 -07:00
2026-08-29 18:23:07 -07:00
2026-08-31 21:11:11 -05:00
2026-08-31 11:29:17 -07:00
2026-08-20 05:26:37 -05:00
2026-08-31 07:35:47 -07:00
2026-08-28 12:59:41 -07:00
2026-08-23 17:45:47 -05:00
2026-08-24 03:20:14 -07:00
2026-08-31 07:35:47 -07:00
2026-08-28 03:58:52 -07:00
2026-08-28 03:58:52 -07:00
2026-08-16 11:32:02 -07:00
2026-08-28 03:58:52 -07:00
2026-08-28 04:58:21 -07:00
2026-08-31 10:42:39 -07:00
2026-08-13 20:30:26 -07:00
2026-08-13 10:47:40 -07:00
2026-09-02 00:03:55 -07:00
2026-08-31 20:43:00 -05:00
2026-08-31 07:35:47 -07:00
2026-08-25 01:34:56 +05:30
2026-08-28 07:50:33 -07:00
2026-08-26 06:26:02 -07:00
2026-08-19 16:10:01 -07:00
2026-08-25 02:45:10 -07:00
2026-09-01 23:56:41 -07:00
2026-08-18 20:03:18 -07:00
2026-08-16 23:26:10 -07:00
2026-08-16 23:26:10 -07:00
2026-08-16 23:26:10 -07:00
2026-08-16 23:26:10 -07:00
2026-08-17 01:56:50 -07:00
2026-08-16 23:26:10 -07:00
2026-08-28 20:16:26 -07:00
2026-08-16 23:26:10 -07:00
2026-08-28 20:16:26 -07:00
2026-08-18 21:57:53 -07:00
2026-08-18 20:03:18 -07:00
2026-08-26 08:40:07 -07:00
2026-08-17 03:03:35 -07:00
2026-08-26 08:40:07 -07:00
2026-08-26 08:40:07 -07:00
2026-08-19 16:31:16 -07:00
2026-08-17 03:03:35 -07:00
2026-09-01 23:28:39 -07:00
2026-09-01 22:11:01 -07:00
2026-09-01 23:28:39 -07:00
2026-08-16 23:26:10 -07:00
2026-08-16 22:08:18 -07:00
2026-08-24 17:12:15 +05:30
2026-08-16 23:26:10 -07:00
2026-08-26 08:40:07 -07:00
2026-08-14 21:15:08 -07:00
2026-08-26 02:54:35 +05:30
2026-08-29 18:23:07 -07:00
2026-08-26 19:23:39 -07:00
2026-08-23 03:56:37 -07:00
2026-08-28 23:10:01 -07:00
2026-08-28 12:59:41 -07:00
2026-08-22 11:15:44 -07:00
2026-09-01 02:32:53 -07:00
2026-08-22 02:25:12 -04:00
2026-09-01 02:32:53 -07:00
2026-08-28 09:23:00 -07:00
2026-08-14 21:41:26 -07:00
2026-08-28 08:46:11 -07:00
2026-08-16 22:08:28 -07:00
2026-08-28 23:10:01 -07:00
2026-09-01 10:56:49 -07:00
2026-08-19 22:41:13 -07:00
2026-08-26 04:51:41 -07:00
2026-08-16 22:06:50 -07:00
2026-08-14 22:34:51 -07:00
2026-08-27 07:33:36 -07:00
2026-08-26 16:06:09 +05:30
2026-08-31 10:06:34 -07:00
2026-08-24 20:03:24 -07:00
2026-08-13 20:30:26 -07:00
2026-09-01 20:55:35 +05:30
2026-08-29 17:58:51 -07:00
2026-08-25 04:00:27 -07:00
2026-08-16 01:53:44 -07:00
2026-08-23 21:12:32 -07:00
2026-08-29 20:39:09 -07:00
2026-09-01 07:32:45 -07:00
2026-08-27 07:09:26 -07:00
2026-08-18 12:52:53 -07:00
2026-08-31 10:08:13 -07:00
2026-08-29 19:38:31 +05:30
2026-08-28 12:15:18 -07:00
2026-08-30 20:04:40 +05:30
2026-08-29 19:14:15 -07:00
2026-08-17 17:04:40 -07:00
2026-08-28 03:24:43 -07:00
2026-08-28 03:46:21 -07:00
2026-08-19 01:23:17 +05:30
2026-08-29 20:39:09 -07:00
2026-08-18 14:14:42 -07:00
2026-08-30 20:04:40 +05:30
2026-08-27 14:28:22 +05:30
2026-08-21 22:33:45 +05:30
2026-08-13 11:09:51 -07:00
2026-08-21 14:56:28 +10:00
2026-08-31 00:56:41 -07:00
2026-08-23 19:00:47 -07:00
2026-08-17 19:41:32 +05:30
2026-08-29 18:34:35 -07:00
2026-08-31 10:42:39 -07:00
2026-08-15 23:48:15 -07:00
2026-08-17 10:03:36 -07:00
2026-08-16 22:05:59 -07:00
2026-08-31 09:59:39 -07:00
2026-08-29 20:39:31 -07:00
2026-09-01 21:49:14 -07:00
2026-08-29 07:25:12 -07:00
2026-08-28 08:58:12 -07:00
2026-08-14 20:24:42 -07:00
2026-08-29 18:40:51 -07:00
2026-08-19 16:31:16 -07:00
2026-08-25 16:39:12 -07:00
2026-09-01 23:30:33 -07:00
2026-09-01 21:50:19 -07:00
2026-08-23 18:25:35 -07:00
2026-08-19 16:10:01 -07:00
2026-09-01 21:43:59 -07:00
2026-08-19 16:10:01 -07:00
2026-08-16 21:20:29 -07:00
2026-08-16 22:08:05 -07:00
2026-08-16 22:08:28 -07:00
2026-08-13 20:30:26 -07:00
2026-08-15 12:53:37 +05:30
2026-08-28 05:10:33 -07:00
2026-08-28 05:10:33 -07:00
2026-08-28 05:10:33 -07:00
2026-08-28 04:58:21 -07:00
2026-08-23 13:27:04 +05:30
2026-08-28 04:58:21 -07:00
2026-08-23 03:54:52 -07:00
2026-08-26 19:23:39 -07:00
2026-09-01 10:56:49 -07:00
2026-08-31 00:56:41 -07:00
2026-08-31 00:56:41 -07:00
2026-08-31 00:56:41 -07:00
2026-08-31 00:56:41 -07:00
2026-08-31 00:56:41 -07:00
2026-08-31 00:56:41 -07:00
2026-08-31 00:56:41 -07:00
2026-09-01 10:56:49 -07:00
2026-09-01 10:56:49 -07:00
2026-08-13 23:36:25 -07:00
2026-08-31 10:41:54 -07:00
2026-08-20 20:20:23 -07:00
2026-08-16 21:20:29 -07:00
2026-08-16 21:20:29 -07:00