Hermes Agent plugin that streams sessions to Latitude as OTLP traces
Project description
latitude-telemetry-hermes
Stream Hermes Agent (Nous Research's open-source agent harness) sessions to Latitude as OTLP traces — user prompts, model turns, tool calls, tool results, token usage, and the real system prompt — so you get full-fidelity observability of your agent runs in Latitude.
This is the Hermes counterpart to the other harness integrations
(@latitude-data/claude-code-telemetry,
@latitude-data/pi-telemetry,
@latitude-data/openclaw-telemetry). Hermes is a Python harness and loads
plugins from Python, so this connector ships as a pip package rather than npm.
Install
pip install latitude-telemetry-hermes
hermes plugins enable latitude
Hermes discovers the plugin automatically through the hermes_agent.plugins entry point —
there are no files to copy. Set your credentials in the environment (or in ~/.hermes/.env,
which Hermes loads at startup):
export LATITUDE_API_KEY=lat_xxx
export LATITUDE_PROJECT=my-project
That's it — every session is now streamed to Latitude as OTLP traces. To export
structure and timing without prompt/response/tool content, set LATITUDE_NO_CONTENT=true.
Self-hosted / local Latitude? The plugin defaults to Latitude Cloud (
https://ingest.latitude.so). Point it at your own ingest by settingLATITUDE_BASE_URLto the ingest origin only — e.g.http://localhost:3002for a local dev stack — without the/v1/tracessuffix (the plugin appends it). YourLATITUDE_API_KEYandLATITUDE_PROJECTmust come from that same instance.
How it works
Hermes loads pip-installed plugins via the hermes_agent.plugins entry point and calls
the module's register(ctx) function, which subscribes to the lifecycle hooks
(pre_api_request / post_api_request, pre_llm_call / post_llm_call,
pre_tool_call / post_tool_call) — the same hooks the bundled langfuse plugin uses.
The plugin owns the OTLP mapping for that hook stream. It assembles one trace per turn:
interaction (one user turn)
├── llm_request (one per model call: model, provider, tokens, finish reason, system prompt)
├── tool_execution (one per tool call: name, arguments, result, success)
└── llm_request (the final answer)
Spans follow Latitude's GenAI semantic conventions (gen_ai.*), so they render natively
in the Latitude trace viewer. Content-bearing attributes are tagged :gated and dropped
before export when content capture is disabled. The plugin is fail-open — a telemetry
error never affects the agent — and depends only on the Python standard library (plus
certifi, which Hermes already ships, for TLS verification).
Configuration
All configuration is read from environment variables:
| Env | Default | Description |
|---|---|---|
LATITUDE_API_KEY |
— | API key (required) |
LATITUDE_PROJECT / LATITUDE_PROJECT_SLUG |
— | Project slug (required) |
LATITUDE_BASE_URL |
https://ingest.latitude.so |
Ingest origin (no path; the plugin appends /v1/traces). Set to your own ingest for self-hosted/local, e.g. http://localhost:3002 |
LATITUDE_HERMES_TELEMETRY_ENABLED / LATITUDE_TELEMETRY_ENABLED |
true |
Master switch |
LATITUDE_HERMES_NO_CONTENT / LATITUDE_NO_CONTENT |
false |
Export structure/timing only (no prompts, responses, or tool I/O) |
LATITUDE_DEBUG |
false |
Verbose logging |
Telemetry stays off until both LATITUDE_API_KEY and a project are set.
Development
uv sync
uv run pytest
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file latitude_telemetry_hermes-0.1.0.tar.gz.
File metadata
- Download URL: latitude_telemetry_hermes-0.1.0.tar.gz
- Upload date:
- Size: 17.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e7bd43a4d9f7930d2e8c9c56d4f3ce5d603816af809660f078902286c4cf80d
|
|
| MD5 |
b3a498061e552dcf5f14d28b37c3c34f
|
|
| BLAKE2b-256 |
01e8407c20c12194ff04c42dcd31df99453c9697efc9fd46b7badfe0540086a8
|
File details
Details for the file latitude_telemetry_hermes-0.1.0-py3-none-any.whl.
File metadata
- Download URL: latitude_telemetry_hermes-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
246af4b630d7423d59e0ab1d0d4ccc0ce6dd1a934b447fbeb7f115d13d108312
|
|
| MD5 |
ee7515e76ef96f19b457c3a8eaf55c6a
|
|
| BLAKE2b-256 |
3e4d889ce0e9acb191dad4e891ff704cc086fd3d789280d8b8786a6b7f4d1950
|