Skip to main content

Opik observability plugin for the Hermes agent — traces conversations, LLM calls, and tool usage to Opik.

Project description

Comet Opik logo
🔭 Opik Observability for Hermes

Plugin for the Hermes agent that exports conversation, LLM, and tool traces to
Opik for observability and monitoring.

License PyPI version Python versions

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 Hermes session_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 by adding it to plugins.enabled in ~/.hermes/config.yaml:

pip install opik-hermes
# ~/.hermes/config.yaml
plugins:
  enabled: [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 (name opik) — no manual file copying. Enable it through plugins.enabled as above; the entry-point name is opik.

This is the pip install path. A directory-based install (hermes plugins install comet-ml/opik-hermes, enabled via hermes plugins enable observability/opik) is tracked separately — see the follow-up work in the repo's issues.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

opik_hermes-0.1.1.tar.gz (36.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opik_hermes-0.1.1-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

File details

Details for the file opik_hermes-0.1.1.tar.gz.

File metadata

  • Download URL: opik_hermes-0.1.1.tar.gz
  • Upload date:
  • Size: 36.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for opik_hermes-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6c5ba7075344f467c5955a1c8cb60abca3f535fcbd7a9267a6e6bcac25cb275d
MD5 b3040a14c1ebf8b2190e048fe1886ed7
BLAKE2b-256 aed80ab24134d15b6c3f47e4dae39ae0c37a398ab3a55f67d26c5dd2b504df47

See more details on using hashes here.

Provenance

The following attestation bundles were made for opik_hermes-0.1.1.tar.gz:

Publisher: publish.yml on comet-ml/opik-hermes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file opik_hermes-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: opik_hermes-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 30.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for opik_hermes-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 681b5b7ef2e504cf04825d8875a54348fad91d87f153e9138cf455b72d8e71e9
MD5 d658dab224224fc6b22a8b0dfabe8302
BLAKE2b-256 b9e660197a4020da82ecb4609a26d0e9c0f5b5249c16e139311dfaeedbe629be

See more details on using hashes here.

Provenance

The following attestation bundles were made for opik_hermes-0.1.1-py3-none-any.whl:

Publisher: publish.yml on comet-ml/opik-hermes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page