hermesagent

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package hermesagent implements the Hermes Agent self-hosted dashboard provider (NousResearch/hermes-agent on GitHub).

Hermes Agent is Nous Research's self-hostable coding-agent product. It ships a FastAPI dashboard backed by SQLite, listening on 127.0.0.1:9119 by default. Users typically run it on their dev box or a Tailscale node, so the base URL is user-configurable in the PI (per provider, with per-button override). Distinct from the public portal.nousresearch.com provider in internal/providers/nousresearch/.

Auth: the dashboard generates a per-process ephemeral session token (secrets.token_urlsafe(32)) at server start and injects it into the SPA's index.html as window.__HERMES_SESSION_TOKEN__. The provider scrapes that string on first use and sends it as the X-Hermes-Session-Token header on subsequent /api/analytics/* calls. If the scrape fails (server changed the injection format, paranoid proxy strips it, …) the user can paste a session token in the PI as a fallback. Token cache is invalidated on 401 so a server restart auto-recovers.

Endpoints used:

GET  /                          — index.html, scraped for token
GET  /api/analytics/usage?days=N — gated; returns daily[], by_model[],
                                   totals (sum across N days) for the
                                   {1, 7, 30}-day windows we expose
GET  /api/status                — public; active_sessions count

Source pointers (commit-pinned, NousResearch/hermes-agent):

hermes_cli/web_server.py:74      — _SESSION_TOKEN
hermes_cli/web_server.py:3196-3204 — token injection format
hermes_cli/web_server.py:2697-2762 — /api/analytics/usage handler
hermes_cli/web_server.py:511-616 — /api/status (active_sessions)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct{}

Provider fetches Hermes Agent dashboard usage data.

func (Provider) BrandBg

func (Provider) BrandBg() string

BrandBg returns the deep complement of the emerald accent.

func (Provider) BrandColor

func (Provider) BrandColor() string

BrandColor returns the meter-fill accent — emerald-500. Distinct from the Nous Research portal's teal-500 so a deck running both providers reads them as separate at-a-glance.

func (Provider) Fetch

Fetch returns the latest Hermes Agent usage snapshot.

func (Provider) ID

func (Provider) ID() string

ID returns the provider identifier used by the registry.

func (Provider) MetricIDs

func (Provider) MetricIDs() []string

MetricIDs enumerates every metric this provider can emit.

Naming convention:

hermes-agent-<view>-<window>

where <view> ∈ {input-tokens, output-tokens, cache-tokens, total-tokens, cost} and <window> ∈ {daily, weekly, monthly}. Plus one extra: hermes-agent-active-sessions (no window — current sessions active in the last 5 min from /api/status).

func (Provider) Name

func (Provider) Name() string

Name returns the human-readable provider name.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL