Skip to main content

LoongSuite Hermes Agent Instrumentation

LoongSuite instrumentation for Hermes Agent.

Features

  • Agent tracing: invoke_agent Hermes spans for top-level agent runs
  • ReAct step tracing: react step spans for each Hermes reasoning round
  • LLM tracing: model request/response spans with token usage and TTFT
  • Tool tracing: execute_tool spans for Hermes tool calls
  • Content capture controls: honors OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT

Installation

# Step 1: install LoongSuite distro
pip install loongsuite-distro

# Step 2 (Option C): install this instrumentation from PyPI
pip install loongsuite-instrumentation-hermes-agent

# Optional app dependency
pip install hermes-agent

Usage

Auto-instrumentation

export OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_latest_experimental
export OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=SPAN_ONLY

loongsuite-instrument python your_hermes_app.py

Manual instrumentation

from opentelemetry.instrumentation.hermes_agent import HermesAgentInstrumentor
from run_agent import AIAgent

HermesAgentInstrumentor().instrument()

agent = AIAgent(
    model="qwen-turbo",
    provider="dashscope",
    quiet_mode=True,
)
result = agent.run_conversation("Hello from Hermes")

HermesAgentInstrumentor().uninstrument()

Configuration

Export to OTLP Backend

export OTEL_SERVICE_NAME=my-hermes-app
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=<trace_endpoint>
export OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=<metrics_endpoint>

loongsuite-instrument python your_hermes_app.py

Content Capture

export OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_latest_experimental

# Capture content in spans only
export OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=SPAN_ONLY

# Disable content capture
export OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=NO_CONTENT

Supported Signals

  • AGENT: top-level Hermes agent invocation
  • ENTRY: AI application entry spans when Hermes resolves an entry source from AIAgent.platform, HERMES_SESSION_SOURCE, or the default cli source used by platform-less AIAgent instances. Every top-level instrumented AIAgent.run_conversation now emits ENTRY -> AGENT.
  • STEP: Hermes ReAct step lifecycle
  • LLM: synchronous and streaming model calls
  • TOOL: Hermes tool execution, including tool call id, arguments, and result

License

Apache License 2.0

Metadata

Release files for loongsuite-instrumentation-hermes-agent 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for loongsuite-instrumentation-hermes-agent 0.9.0
File Interpreter ABI Platform Actions
loongsuite_instrumentation_hermes_agent-0.9.0-py3-none-any.whl Python 3 none any Details for loongsuite_instrumentation_hermes_agent-0.9.0-py3-none-any.whl

Release files / loongsuite_instrumentation_hermes_agent-0.9.0-py3-none-any.whl

Download URL loongsuite_instrumentation_hermes_agent-0.9.0-py3-none-any.whl
Size 19.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
80e856ad2c02b4d2a11db4080d2fb813b0351474196dc2a312090e7b4b474428
BLAKE2b-256 checksum
How to use checksums
00c47197db75b60b13e39091874e1bbe74098d0215391cf5ab89f9bef41fe88c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for loongsuite-instrumentation-hermes-agent 0.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page