Hermes Agent - Complete Local Setup with Gemma 4

Published: April 16, 2026 | Tags: hermes-agent, gemma-4, llama.cpp, local-ai, tutorial, docker
Table of Contents

What is Hermes Agent?

Hermes Agent (by NousResearch) is a self-improving AI agent that:

Described as "the best alternative to OpenClaw" - it's an open-source agentic harness similar to OpenAI's Codex.

Prerequisites

Installation Steps

Step 1: Create Hermes Folder

mkdir ~/.hermes

Step 2: Start Docker with LM Studio Access

docker run -it -v ~/.hermes:/tmp/data \
  -p 3000:3000 \
  -v /tmp/data:/tmp/data \
  --add-host=host.docker.internal:host-gateway \
  nousresearch/hermes-agent:latest
Note: The --add-host=host.docker.internal:host-gateway flag allows the container to access your host machine's LM Studio server.

Step 3: Run Setup

hermes-agent setup

Configuration

Provider Setup

Model Settings

SettingRecommended ValueNotes
Context LengthAuto-inferredAutomatically detected from model config
Tool Calling Max Iterations20Prevents infinite loops
Tool Compression Threshold50%Compresses when context is 50% full
Session Reset ModesDefaultConfigurable per session

Select Tools

Custom Persona

Create your agent's personality by editing ~/.hermes/prompts/soMD:

Keep your responses to the point, clear, eliminate fluff.
Keep it ranked, your audience is ML/AI engineers.
Be friendly and responsive.

Key Features

FeatureDescription
MemoryAutomatic recall from previous sessions
SkillsSelf-creates skills during conversations
Self-ImprovingGets better over time based on interactions
Web SearchUses Tavily API for real-time information
Web ScrapingHeadless Chromium for page extraction
Multi-PlatformTelegram, Discord, Slack, Signal, Email
DashboardWeb UI to monitor agent status and sessions
Video Result: The presenter tested Gemma 4 (6B params, quantized 4-bit) on an M4 MacBook Pro with 48GB unified memory. The agent correctly: - Did web research on Bulgarian hip hop artists - Retrieved technical details on MiniMax 2.7 model with citations - Analyzed recent AI papers (SKU-code framework) - Created custom skills during conversations

Starting the Agent

Start without Setup (already configured)

docker run -it -v ~/.hermes:/tmp/data \
  -p 3000:3000 \
  -v /tmp/data:/tmp/data \
  --add-host=host.docker.internal:host-gateway \
  nousresearch/hermes-agent:latest

Access Dashboard

Navigate to http://localhost:3000 to see:

Resources


Based on tutorial by Venelin Valkov (@venelin_valkov). Video embedded above.