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.2.tar.gz (40.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.2-py3-none-any.whl (32.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: opik_hermes-0.1.2.tar.gz
  • Upload date:
  • Size: 40.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.2.tar.gz
Algorithm Hash digest
SHA256 4a7391f8cf43fe4ed6ae09c795cf41884b6d083f89fd94fbab29e1535ed2d4dd
MD5 4c9d0b3377b71fb626b644eab6e69df7
BLAKE2b-256 6bd8c36cbd30b32e0cc1c6c393d55857f556e76227def27b23316798b24a4939

See more details on using hashes here.

Provenance

The following attestation bundles were made for opik_hermes-0.1.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: opik_hermes-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 32.7 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f549e8155cd422bb88191650e14837af0ff5cf2769cd1c6ffef001c3a5da8509
MD5 6b65dac8cb4758b5584f107996efe7de
BLAKE2b-256 988c0399b9827eeb0ea76b17d6b60e180a3bf0f8a27231d90ad79445b065259e

See more details on using hashes here.

Provenance

The following attestation bundles were made for opik_hermes-0.1.2-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