Skip to content

Upstream Hermes Contract

This page documents the upstream routes Hermes-Relay actually consumes. It is not a complete reference for Hermes Agent.

Vanilla path

Everything on this page works without installing the Relay plugin. Runtime capabilities win over version assumptions.

API Server

Base URL: http(s)://<server>:8642

When API_SERVER_KEY is configured, send:

http
Authorization: Bearer <API_SERVER_KEY>
MethodRouteHermes-Relay useAvailability
GET/healthConnectivity indicatorUpstream
GET/v1/capabilitiesRoute and feature discoveryUpstream; probe first
GET/v1/modelsAuthentication validation and model inventoryUpstream
GET/v1/skillsRead-only skill discoveryCapability-gated
GET/v1/toolsetsRead-only toolset discoveryCapability-gated
POST/v1/chat/completionsOpenAI-compatible chat fallbackFallback
POST/v1/runsStructured-run fallbackFallback
GET/v1/runs/{run_id}/eventsStructured run event streamFallback
POST/v1/runs/{run_id}/approvalApprove a pending run actionCapability-gated
POST/v1/runs/{run_id}/stopStop a running turnCapability-gated

Native session API

The native session surface is the preferred API-server chat path when the dashboard Gateway is unavailable.

MethodRoutePurpose
GET/api/sessionsList sessions
POST/api/sessionsCreate a session
GET/api/sessions/{id}Read one session
PATCH/api/sessions/{id}Rename or update client-safe metadata
DELETE/api/sessions/{id}Delete a session
GET/api/sessions/{id}/messagesRead message history
POST/api/sessions/{id}/forkBranch a session from existing lineage
POST/api/sessions/{id}/chatRun one synchronous persisted turn
POST/api/sessions/{id}/chat/streamRun one persisted turn over SSE

The Android client accepts current list envelopes and older compatibility shapes, but new integrations should follow the response shapes advertised by the running server's capability contract.

Session stream events

The SSE stream carries lifecycle events rather than one untyped text channel. Hermes-Relay currently handles these families:

FamilyEvents
Session and runsession.created, run.started, run.completed
Assistantmessage.started, assistant.delta, assistant.completed
Tools and reasoningtool.progress, tool.pending, tool.started, tool.completed, tool.failed
Terminal stateerror, done

Clients must ignore unknown event types so upstream can add events without breaking older Hermes-Relay releases.

Dashboard & Gateway

Base URL: http(s)://<server>:9119

Dashboard routes use the dashboard login session. They do not accept the API Server bearer unless upstream explicitly documents that route otherwise.

Authentication and chat

MethodRouteHermes-Relay use
GET/api/statusDashboard reachability and feature status
GET/api/auth/meCurrent Manage session
POST/api/auth/ws-ticketMint a short-lived Gateway WebSocket ticket
WS/api/wsPreferred chat transport with live reasoning and session events

The WS ticket is short-lived and scoped to the Gateway connection. Do not store it as a replacement for the dashboard session.

Manage surfaces

Hermes-Relay consumes selected Dashboard routes for the Manage UI. Route availability varies with upstream version, so the app treats 404 as an unsupported capability rather than silently substituting a Relay write.

Route familyPurpose
/api/config, /api/config/schemaConfiguration and safe field metadata
/api/model/*Model options, defaults and selection
/api/profiles/*Profiles, active profile, SOUL and profile-scoped state
/api/envServer-owned environment configuration
/api/mcp/*MCP servers, catalog, testing and authentication
/api/cron/*Jobs, runs, delivery targets and controls
/api/sessions/*Dashboard/profile-aware session history, export and cleanup

Vanilla Hermes voice

MethodRoutePurpose
POST/api/audio/transcribeSpeech to text
POST/api/audio/speakOne-shot text to speech; request body is { "text": "..." }
GET/api/audio/elevenlabs/voicesElevenLabs voice choices when configured

These routes are upstream Dashboard routes. Every /voice/* route belongs to the optional Relay server instead.

Failure and fallback rules

  • A failed dashboard login does not invalidate API-server chat.
  • A missing /api/ws falls back to native session SSE when advertised.
  • A missing native session API falls back to completions or runs.
  • A 404 on a Manage route means unsupported; it does not authorize a Relay compatibility write.
  • Profile-aware session history must stay on the dashboard/profile-aware transport rather than being mixed with a different database surface.

See Compatibility for older-host routes and Relay API for plugin-owned features.