Skip to content
yuezhiyePublic

About

Hermes desktop status-bar plugin: real-time tokens/s for llama-server (disk-door plugin, no build step)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

tokmeter ⚡

A Hermes Agent desktop status-bar plugin that shows real-time generation speed (tokens/s) of your local llama-server — right in the app's status bar. No build step, no dependencies: one plain ESM JavaScript file.

Hermes 桌面端状态栏插件:实时显示本地 llama-server 的生成速度(tok/s)。 单个纯 ESM 文件,无需构建、无需依赖。

Features

  • ⚡ Live tokens/s — polls llama-server's /slots every 500 ms and diffs the decoded-token counters (EWMA-smoothed, so the number doesn't jitter)
  • 🧠 Prompt-processing speed — shows the ingestion rate while the model chews through the system prompt
  • 💤 Three states — generating / idle / offline (red when the server is unreachable)
  • 🔧 Configurable — base URL and API key via one localStorage entry (for the managed llama-server that binds a random port with an API key)
  • 📦 One file — plain ESM, installed by dropping it into a folder

Requirements

  • Hermes Agent desktop app (verified on v0.21.5+3169)
  • A llama.cpp llama-server instance (external on :8080, or the Hermes-managed runtime)

Install (desktop disk door)

Copy the plugin into Hermes' desktop-plugin disk door:

# Windows (PowerShell)
New-Item -ItemType Directory -Force "$env:LOCALAPPDATA\hermes\desktop-plugins\tokmeter" | Out-Null
Copy-Item desktop\tokmeter\plugin.js "$env:LOCALAPPDATA\hermes\desktop-plugins\tokmeter\plugin.js"
# Linux / macOS
mkdir -p ~/.hermes/desktop-plugins/tokmeter
cp desktop/tokmeter/plugin.js ~/.hermes/desktop-plugins/tokmeter/plugin.js

Then restart the Hermes desktop app (or toggle the plugin off/on in Settings → Plugins). A ⚡ tokmeter chip appears in the status bar.

Configure (optional)

Only needed for the Hermes-managed llama-server (random port + API key). The external run.bat-style server on :8080 works with defaults. In the desktop app's devtools console:

localStorage.setItem('tokmeter.settings', JSON.stringify({
  base: 'http://127.0.0.1:18434',   // your llama-server base URL
  apiKey: 'your-server-api-key'     // the server's --api-key value
}))

Reload the app afterwards.

How it works

every 500 ms  ->  GET <base>/slots
              ->  delta(next_token[0].n_decoded) / delta(t)   = generation tok/s
              ->  delta(n_prompt_tokens_processed) / delta(t) = prompt-processing tok/s
              ->  EWMA(0.6/0.4) smoothing

llama-server sends permissive CORS headers, so the plugin reads it straight from the renderer — no proxy, no backend, no polling of your conversations.

The source tree also contains a dashboard (web UI) variant of the same idea (plugin/tokmeter/dashboard/), registered into the dashboard's chat:bottom slot — use that if you want the widget inside the browser dashboard instead of the desktop status bar.

Uninstall

Delete %LOCALAPPDATA%\hermes\desktop-plugins\tokmeter\ (Windows) or ~/.hermes/desktop-plugins/tokmeter/ (Linux/macOS). Nothing else is touched.

License

MIT

About

Hermes desktop status-bar plugin: real-time tokens/s for llama-server (disk-door plugin, no build step)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages