Add live agent views and improve Codex monitoring

This commit is contained in:
William Valentin
2026-03-20 13:59:51 -07:00
parent a87bbc6983
commit 687a7aa79d
10 changed files with 1408 additions and 184 deletions
+13
View File
@@ -192,6 +192,19 @@ AGENTMON_VM_NAME=zap # or orb, sun
Deployment is automated via Ansible — see the [swarm ansible playbook](https://gitea-http.taildb3494.ts.net/will/swarm) `playbooks/customize.yml`.
## Codex Hook
The `hooks/codex/` directory contains a TypeScript handler for Codex CLI telemetry. Current Codex support is session/run oriented:
- `sessionStart` and `sessionEnd` map to `session.start`, `run.start`, `run.end`, and `session.end`
- `notify` maps turn-complete notifications into `run.end`
- prompt-submit hooks map user prompts into the next `run.start`
- usage payloads emit both `run.end.payload.usage` and a `metric.snapshot` event
Sample Codex hook configuration lives in [hooks/codex/hooks.json](/home/will/lab/agentmon/hooks/codex/hooks.json). On the local Codex CLI version we checked (`0.116.0`), `notify` is confirmed. Online reports suggest prompt-submit hooks may appear as `userpromptsubmit` or `userPromptSubmit`, so the sample config includes those aliases.
The current Codex integration does not assume tool or subagent span hooks exist. If a newer Codex CLI exposes official tool/span hooks, they can be added separately without changing the run/session flow above.
## Go SDK
Emit events from Go applications: