Opik observability plugin for the Hermes agent — traces conversations, LLM calls, and tool usage to Opik.
Project description
Plugin for the Hermes agent that exports conversation, LLM, and tool traces to
Opik for observability and monitoring.
Why this plugin
Opik is Comet's open-source LLM and agent
observability, tracing, evaluation, and optimization platform. opik-hermes
adds native Opik tracing for Hermes agent
runs — conversations, LLM calls, and tool usage — with no code changes to your
agent. Modeled on Hermes' bundled Langfuse observability plugin, swapped to the
Opik Python SDK.
What it captures
- A root trace per agent turn (
Hermes turn), grouped into Opik threads by Hermessession_id. - An LLM span (
type=llm) per API call, with input messages, assistant output, model/provider, token usage, and USD cost (via Hermes'agent.usage_pricing). - A tool span (
type=tool) per tool call, with arguments and results.
Install
Install the package into the same Python environment as Hermes, then enable the plugin:
pip install opik-hermes
hermes plugins enable observability/opik
pip install opik-hermes pulls in the opik SDK automatically (it's a
declared dependency) and registers the plugin with Hermes via the
hermes_agent.plugins entry point — no manual file copying.
Configure
Set these in ~/.hermes/.env (or via hermes tools).
Local open-source Opik needs no API key:
# ~/.hermes/.env
OPIK_URL_OVERRIDE=http://localhost:5173/api
OPIK_PROJECT_NAME=hermes
Comet-hosted Opik:
OPIK_API_KEY=...
OPIK_WORKSPACE=your-workspace
Use it
Talk to Hermes however you normally do — every turn is traced to the
hermes project (or whatever OPIK_PROJECT_NAME you set):
hermes chat -q "list the files here and tell me how many there are"
…or open the Hermes web UI at http://localhost:9119 and use the Chat tab. Then open Opik and look for a trace named after your message, with an LLM span and a span per tool call.
See observability/opik/README.md for the
full configuration and tuning reference.
Repository layout
opik-hermes/
├── pyproject.toml # pip package + hermes_agent.plugins entry point
├── observability/opik/ # the plugin, in Hermes' flat bundled-plugin shape
│ ├── plugin.yaml
│ ├── __init__.py # register(ctx) + hooks (Opik Python SDK)
│ └── README.md
└── tests/
The observability/opik/ directory is byte-compatible with Hermes' bundled
plugin layout, so it can be mounted as a user plugin, vendored into Hermes, or
shipped as the pip package above — all from one source.
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 opik_hermes-0.1.0.tar.gz.
File metadata
- Download URL: opik_hermes-0.1.0.tar.gz
- Upload date:
- Size: 35.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3b8e90d336672ecee745bbbd05f3893a1e8994c2ecdbc3475cd004a6fdaeab7
|
|
| MD5 |
a89e1705c7463bd10fc84e73e566aa55
|
|
| BLAKE2b-256 |
d533870f7853a9d5e0150e55dffb6c14a8f9373dfd95694fbe1a50a78e488e93
|
Provenance
The following attestation bundles were made for opik_hermes-0.1.0.tar.gz:
Publisher:
publish.yml on comet-ml/opik-hermes
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opik_hermes-0.1.0.tar.gz -
Subject digest:
d3b8e90d336672ecee745bbbd05f3893a1e8994c2ecdbc3475cd004a6fdaeab7 - Sigstore transparency entry: 2100477458
- Sigstore integration time:
-
Permalink:
comet-ml/opik-hermes@b1ae17363f6a3f1de1dc880420951cd5a6c58105 -
Branch / Tag:
refs/heads/danield/NA-publish-oidc-id-token - Owner: https://github.com/comet-ml
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b1ae17363f6a3f1de1dc880420951cd5a6c58105 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file opik_hermes-0.1.0-py3-none-any.whl.
File metadata
- Download URL: opik_hermes-0.1.0-py3-none-any.whl
- Upload date:
- Size: 30.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a097f3f001eeebfacee7d76be547819184acf32ac509847c045d03d5b81e8e0
|
|
| MD5 |
cf91f99382d59e89d29497d8e7084a5a
|
|
| BLAKE2b-256 |
943f7f09d8c29127850d511f6f35a3ab0d03f5b0026c6a7a2dad750cfd26da3a
|
Provenance
The following attestation bundles were made for opik_hermes-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on comet-ml/opik-hermes
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opik_hermes-0.1.0-py3-none-any.whl -
Subject digest:
5a097f3f001eeebfacee7d76be547819184acf32ac509847c045d03d5b81e8e0 - Sigstore transparency entry: 2100477564
- Sigstore integration time:
-
Permalink:
comet-ml/opik-hermes@b1ae17363f6a3f1de1dc880420951cd5a6c58105 -
Branch / Tag:
refs/heads/danield/NA-publish-oidc-id-token - Owner: https://github.com/comet-ml
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b1ae17363f6a3f1de1dc880420951cd5a6c58105 -
Trigger Event:
workflow_dispatch
-
Statement type: