hermes-agent/hermes_cli/subcommands
emozilla 3e28eaccde feat(telemetry): local-first telemetry & observability
Add a built-in telemetry system that records what the agent does — workflows,
model calls, tool calls, errors — to the local machine, powers `/insights`, and
can export to an operator-chosen destination. Default-on locally; nothing leaves
the machine unless the user exports it or opts into the aggregate plane.

Three planes with a hard wall between them:
  - local: full-fidelity observability (real model/provider/tool names), on by
    default, never leaves the machine.
  - aggregate: opt-in metadata, default off. No uploader ships — consent is
    recorded via telemetry.consent_state, and `preview` shows what would be
    produced, computed locally.
  - trajectories: full message content, opt-in, exported only to the operator's
    own destination.

Mechanism:
  - Bundled `telemetry` plugin registers observational lifecycle hooks
    (on_session_start / post_api_request / post_tool_call / on_session_finalize).
    No core call sites are edited; hooks already carry the data.
  - Fire-and-forget emitter: emit() returns in microseconds, never blocks or
    raises into a model/tool call. A daemon thread writes events to an
    append-only JSONL log and the tel_* tables in state.db (its own sqlite
    connection, separate from SessionDB).
  - tel_runs / tel_model_calls / tel_tool_calls live in the declarative
    SCHEMA_SQL and are reconciled automatically; SCHEMA_VERSION 16 -> 17.
  - metrics derives rollups for /usage and /insights; rollup builds per-run
    summaries for `hermes telemetry preview`.

Consent is config, not a parallel command surface. The config file is the root
of trust: set telemetry.consent_state with `hermes config set`, or pin any
telemetry.* key (including allow_aggregate) via managed scope, which overrides
the user's value per key. `hermes telemetry` exposes only what config cannot:
status (report), preview (query), and export.

Export:
  - exporter_bulk writes telemetry (and, when the trajectories plane is enabled,
    session content) to ndjson/json.
  - otlp_exporter streams spans to a configured OpenTelemetry Collector over
    OTLP/HTTP. The SDK is an optional extra (hermes-agent[otlp]), lazily
    installed via tools.lazy_deps on first use.
  - Secrets are always redacted on every export path
    (redact_sensitive_text(force=True)); content export is gated by the
    trajectories plane, and PII scrubbing follows telemetry.content_redaction.
    OTLP auth headers reference environment variable names, never inline values.

No outbound emission to Nous. The aggregate uploader is intentionally not built.
2026-07-24 18:54:45 +00:00
..
__init__.py
_shared.py
acp.py
auth.py feat(auth): make xAI Grok OAuth device-code-only, drop loopback login 2026-07-02 13:17:41 -07:00
backup.py
claw.py
config.py fix(config): warn-after-write for unrecognized keys instead of refusing 2026-07-20 05:38:59 -07:00
console.py Add safe Hermes console REPL 2026-07-03 20:18:00 +05:30
cron.py fix(cron): harden execution attempt ledger 2026-07-17 04:58:35 -07:00
dashboard.py feat(serve): add secure Desktop SSH bootstrap contract 2026-07-16 14:43:14 +02:00
debug.py fix(security): require explicit consent before uploading debug logs 2026-07-01 00:38:17 -07:00
doctor.py
dump.py
gateway.py fix(gateway): preserve external supervisor ownership 2026-07-16 05:08:56 -07:00
gui.py
hooks.py
import_cmd.py
insights.py
login.py fix(cli): deprecated hermes login fails gracefully for any provider 2026-06-17 12:55:40 +05:30
logout.py
logs.py
mcp.py feat(cli): add --connect-timeout flag to hermes mcp add 2026-07-05 19:10:00 -07:00
memory.py
model.py feat(auth): make xAI Grok OAuth device-code-only, drop loopback login 2026-07-02 13:17:41 -07:00
pairing.py
plugins.py feat(plugins): enable-time consent prompt for tool_override grant 2026-06-30 04:00:42 -07:00
profile.py
prompt_size.py
security.py
setup.py
skills.py fix(skills-hub): surface per-tap providers (NVIDIA/OpenAI/...) in runtime search (#53191) 2026-06-26 11:04:41 -07:00
skin.py feat(themes): hermes skin set — deterministic one-color tweak, bg untouched 2026-07-21 21:00:43 -05:00
slack.py feat(slack): support long app descriptions in the manifest generator 2026-07-23 12:01:24 -07:00
status.py
telemetry.py feat(telemetry): local-first telemetry & observability 2026-07-24 18:54:45 +00:00
tools.py
uninstall.py feat: add uninstall dry-run mode 2026-07-07 05:12:24 -07:00
update.py fix(update): consolidate pre-update backups into one gated mechanism (#65754) 2026-07-16 08:47:25 -07:00
version.py
webhook.py feat(gateway): add webhook payload filters 2026-07-08 08:10:55 -07:00
whatsapp.py