Hermes Agent and Gemma 4: local setup with llama.cpp

Learn to connect Hermes Agent in Docker to llama.cpp with Gemma 4, then test web research on an M4 machine with 48 GB of unified memory.

Player not loading? Watch on YouTube

Venelin walks through a Hermes Agent setup that uses llama.cpp for model inference and Docker for the agent itself. His machine is an M4 with 48 GB of unified memory. He runs a 4-bit quantized Gemma 4 model described as having 26 billion total parameters and 4 billion active parameters. This is the demonstrated configuration, rather than a stated minimum hardware requirement.

The setup binds a .hermes directory into the container to retain configuration and memory. Hermes connects to the host's llama.cpp server through host.docker.internal on port 8080 with a /v1 endpoint. Venelin selects the CLI, sets a 20-iteration tool limit and edits the persona file to adjust the agent's behavior. He also explains the tool execution loop and conversation compression.

The local LLM handles inference, but the research examples use Exa's external search API and browser access, so this workflow is not fully offline. Tests include researching a Bulgarian musician, checking MiniMax M2.7 specifications and summarizing a technical paper. Venelin checks several returned claims against sources and finds a broken link; he advises checking references and conclusions.

The final demonstration covers the web dashboard, where he inspects session messages, search results, token usage and skills. A proposed coding project is left for a later video.