v0.4.0

Hermes Agent v0.4.0 — The Platform Expansion Release


Overview

v0.4.0 — The Platform Expansion Release. Released March 23, 2026. Just 11 days after v0.2.0 (first public release) and v0.3.0 (streaming + plugin architecture), this version elevated Hermes Agent from a great CLI agent to a genuine platform product — with an API, multi-messaging-platform coverage, MCP ecosystem management, and enterprise-grade security hardening.

If v0.2.0 showed the world what Hermes could do and v0.3.0 made the experience seamless, v0.4.0 made Hermes embeddable into any system. From this point on, Hermes isn’t just an agent in your terminal — it can be your API backend, your chatbot, your automation hub.

The headline in one sentence: Turn Hermes into an API server callable via /v1/chat/completions, while connecting it to nearly every major messaging platform on the market.


Major Features

1. OpenAI-Compatible API Server — Hermes as a Backend Service

This is the most strategically significant feature of v0.4.0: Hermes can now be exposed as a standard /v1/chat/completions endpoint. Any OpenAI API-compatible client — other agents, automation scripts, web applications — can call Hermes directly.

Starting the API server:

# Start the Hermes API server
hermes serve

# External systems can now call Hermes via standard OpenAI SDK
# Any code using the OpenAI SDK can connect to Hermes
from openai import OpenAI

client = OpenAI(base_url="http://localhost:8000/v1")

response = client.chat.completions.create(
    model="hermes",
    messages=[{"role": "user", "content": "Review this code for security issues"}]
)

The companion /api/jobs REST API lets you manage cron jobs over HTTP — create, view, delete — all through standard REST endpoints.

Security was designed in, not bolted on:

  • Input limits + field whitelists: prevent malicious request attacks
  • SQLite-backed response persistence: survives restarts
  • CORS origin protection: blocks unauthorized browser-side access
  • These protections were built into the API server from day one

2. Six New Messaging Platform Adapters — Chat Everywhere

v0.4.0 adds 6 new messaging platforms at once. Combined with existing Telegram, Discord, and WhatsApp support, Hermes Gateway now provides unified messaging coverage across 9 major platforms:

Platform Highlights
Signal Full adapter with attachment handling, group message filtering, and Note to Self echo-back protection
DingTalk Gateway integration + setup docs, native support for Chinese enterprise workflows
SMS (Twilio) SMS channel for offline/low-connectivity scenarios
Mattermost @-mention-only channel filter, ideal for self-hosted teams
Matrix Decentralized communication protocol, vision support and image caching
Webhook Universal webhook adapter for any external event trigger system

Gateway core upgrades:

  • Auto-reconnect with exponential backoff: silently recovers from platform disconnections
  • Reply-to message context: automatically includes original message context for out-of-session replies
  • Ignore unauthorized DMs: configurable filtering of DMs from non-whitelisted users
# hermes.config.yaml — multi-platform configuration example
gateway:
  platforms:
    - signal
    - dingtalk
    - telegram
    - discord
  auto_reconnect: true
  ignore_unauthorized_dms: true

3. @ Context References — Claude Code-Style Interaction

Type @ in the CLI and Tab-complete file paths or URLs. Hermes automatically injects the referenced content into the conversation context.

# @file reference — inject file content into the conversation
> @src/auth/handler.ts Review this authentication logic

# @url reference — inject web page content into the conversation
> @https://docs.example.com/api Write a client based on this API doc

This borrows from Claude Code’s interaction model, but Hermes implements it as Tab completion + native CLI integration — no editor plugin required. Especially useful in pure terminal environments without any IDE, like SSH sessions into remote servers.

4. Four New Inference Providers — Freedom of Model Choice

Hermes’s provider system expanded further in v0.4.0:

GitHub Copilot (OAuth + Token Validation)

  • Full OAuth authentication flow, not hardcoded API keys
  • 400K context window for ultra-long code analysis
  • Automatic token validation and expiry handling Contributed by @mchzimm

Alibaba Cloud / DashScope

  • Full DashScope v1 runtime integration
  • Support for the full Qwen model family (qwen-*)
  • Dot-preserving model names (e.g., qwen-plus-v2)

Kilo Code

  • Inference provider optimized for coding scenarios

OpenCode Zen / Go

  • Lightweight provider backends Zen-related fixes contributed by @0xbyt4

Provider system enhancements:

  • Eager rate-limit fallback: auto-switch to backup model on rate-limit errors — conversations never break
  • Context length detection overhaul: models.dev integration, provider-aware resolution, fuzzy matching for custom endpoints, llama.cpp /v1/props support
  • Model catalog updates: added gpt-5.4-mini, gpt-5.4-nano, haiku-4.5, claude 4.6 (1M context), minimax-m2.7, and more
  • Custom endpoint polish: model.base_url config support, API-key-less local endpoints, fast-fail on missing keys instead of silent failure

5. MCP Server Management CLI — Full OAuth 2.1 PKCE Flow

The MCP (Model Context Protocol) ecosystem took a qualitative leap in v0.4.0: from manual config files to a complete CLI management experience.

# Install an MCP server
hermes mcp install <server-name>

# Configure an MCP server
hermes mcp configure <server-name>

# OAuth 2.1 PKCE authentication (fully guided)
hermes mcp auth <server-name>
  • Full OAuth 2.1 PKCE flow: browser redirect, callback handling, token refresh — all guided by the CLI
  • MCP servers exposed as standalone toolsets: each MCP server is a toggleable toolset
  • Interactive MCP tool configuration: configure MCP tools directly in hermes tools, no YAML editing required

6. Gateway Prompt Caching — Dramatic Cost Reduction for Long Conversations

In Gateway mode, AIAgent instances are now cached per session, preserving Anthropic prompt cache across turns.

What does this mean?

  • For long conversations, Anthropic prompt caching no longer invalidates and rebuilds every turn
  • Massive cost reduction (Anthropic prompt cache write vs. read pricing differs by orders of magnitude)
  • Cache is restored alongside session resume
# Automatically active in Gateway mode, no config required
# Each session's AIAgent instance is cached in memory
# Prompt cache is preserved across turns

7. Context Compression Overhaul — No Conversation Is Too Long

The context compression mechanism was completely rewritten in v0.4.0:

  • Structured summaries: no longer simple truncation — iterative, structured summary updates
  • Token-budget tail protection: preserves the most recent conversation content during compression
  • Configurable summary endpoint: summary_base_url lets you use a self-hosted model for summarization, saving API costs
  • Fallback model support: auto-switch to a backup model when the primary summarizer is unavailable

8. Streaming Enabled by Default — What You See Is What You Get

CLI streaming is now enabled by default starting in v0.4.0, with extensive polish:

  • Proper spinner and tool progress display during streaming mode
  • Fixed whitespace loss during stream chunk concatenation
  • Fixed linebreak issues at iteration boundaries causing stream corruption
  • Auto-suppress spinner animation in non-TTY environments
  • Reasoning/thinking block display support (show_reasoning)

New CLI Commands

Command Function Usage
/statusbar Toggle persistent status bar (model + provider info) /statusbar
/queue Queue prompts without interrupting the running agent /queue <message>
/permission Dynamically switch approval mode during a session /permission
/browser Launch interactive browser session from CLI /browser
/cost Real-time cost and usage tracking in Gateway mode /cost
/approve / /deny Explicit approve/deny commands in Gateway /approve or /deny

Configuration Management Upgrades

# Real-time config reload — edit config.yaml without restarting
# Takes effect automatically, no manual action needed

# Environment variable substitution — use ${ENV_VAR} in config.yaml
# Example:
# api_key: ${OPENAI_API_KEY}

# Custom models — custom_models.yaml
# Add your own models outside the official catalog
  • ${ENV_VAR} substitution: reference environment variables directly in config.yaml
  • Real-time config reload: config.yaml changes apply without restart
  • custom_models.yaml: user-managed model additions
  • Nested YAML merge: deep-merge on config update instead of blunt replacement
  • Priority-based context file selection + CLAUDE.md support

New Tools

Tool Description Usage
IMAP Email Read and send emails via IMAP protocol Agent can directly handle email
STT (Speech-to-Text) Speech recognition via Whisper API Transcribe audio files
Tavily Web search/extract/crawl backend hermes tools enable tavily
Parallel Alternative web search/extract backend hermes tools enable parallel
Configurable Web Backend Firecrawl / BeautifulSoup / Playwright selection Configure as needed
Route-Aware Pricing Precise cost estimates per provider route Automatic calculation

TTS Improvements

  • NeuTTS: local TTS provider with built-in setup flow, replacing the old optional skill
  • OpenAI TTS custom base_url support

Vision Tool Improvements

  • Configurable timeout
  • Tilde expansion in file paths
  • Gateway DM multi-image + base64 fallback

Security & Reliability

Security Hardening

  • SSRF protection: comprehensive for vision_tools and web_tools
  • Shell injection prevention: ~user path suffixes no longer interpreted by the shell
  • Browser origin protection: blocks unauthorized browser-origin access to the API server
  • Sandbox credential isolation: sandbox backend credentials never leak into subprocess environment variables
  • @ reference path restriction: blocks reading sensitive files outside the workspace (contributed by @Gutslabs)
  • Malicious code pre-execution scanner: scans terminal_tool commands for malicious patterns before execution
  • SQL injection elimination: all execute() calls converted to parameterized queries (contributed by @dusterbloom)
  • Jobs API hardening: input limits + field whitelist + startup checks

Reliability Enhancements

  • Thread locks on 4 critical SessionDB methods
  • File locking for concurrent memory writes
  • Graceful OpenRouter error handling
  • Agent loop robustness significantly improved: auto-recover from provider-rejected tool_choice, correct empty tool result handling, JSON parse errors returned to model instead of dispatching with empty args, preventing silent tool result loss

Cron System Enhancements

  • [SILENT] responses: cron agents can execute silently without pushing results
  • Missed-job grace window scales with schedule frequency
  • Recover recent one-shot jobs
  • ISO timestamp normalization fix (previously, timezone-less timestamps caused jobs to fire at wrong times)

Skills Ecosystem

New Skills

Skill Description
OCR-and-documents PDF/DOCX/XLS/PPTX/image OCR with optional GPU acceleration
Huggingface-hub Built-in HuggingFace Hub interaction
Sherlock OSINT Cross-platform username search
Meme-generation Image generation with Pillow
Bioinformatics Gateway skill indexing 400+ bioinformatics skills
3D-model-viewer 3D model viewer
FastMCP Rapid MCP development skill
Base blockchain Blockchain interaction

Skills System Improvements

  • Agent-created skills: Caution-level findings allowed, dangerous skills ask instead of blocking
  • --yes flag: skip confirmation on skill install/uninstall
  • Disabled skills respected globally: absent from banner, system prompt, and slash commands

Plugin System Enhancements

  • TUI extension hooks: build custom CLIs on top of Hermes
  • hermes plugins install/remove/list: full plugin lifecycle management
  • Slash command registration: plugins can register their own slash commands
  • session:end lifecycle event: plugins can hook into session-end events

Upgrade

hermes update

For new installations, visit the install guide.


Full changelog on GitHub

← Hermes Agent Changelog