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:

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


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.0.tar.gz (35.6 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.0-py3-none-any.whl (30.2 kB view details)

Uploaded Python 3

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

Hashes for opik_hermes-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d3b8e90d336672ecee745bbbd05f3893a1e8994c2ecdbc3475cd004a6fdaeab7
MD5 a89e1705c7463bd10fc84e73e566aa55
BLAKE2b-256 d533870f7853a9d5e0150e55dffb6c14a8f9373dfd95694fbe1a50a78e488e93

See more details on using hashes here.

Provenance

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

Hashes for opik_hermes-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5a097f3f001eeebfacee7d76be547819184acf32ac509847c045d03d5b81e8e0
MD5 cf91f99382d59e89d29497d8e7084a5a
BLAKE2b-256 943f7f09d8c29127850d511f6f35a3ab0d03f5b0026c6a7a2dad750cfd26da3a

See more details on using hashes here.

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

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