Gemma 4 with Ollama: Hermes Agent and OpenClaw setup
Learn how the speaker connects Gemma 4 to Hermes Agent and OpenClaw through Ollama, including a suggested 32,768-token context setting.
Player not loading? Watch on YouTube
This tutorial outlines how to run Gemma 4 through Ollama and connect it to an AI agent. The speaker describes four model sizes: E2B and E4B for lighter systems, a 26B mixture of experts model, and a 31B dense model. They favor 26B as a practical balance and say it activates about 3.8 billion parameters during inference. Benchmark rankings are presented as supporting evidence, with the caveat that results depend on hardware, quantization, prompts and workload.
For Hermes Agent, the walkthrough covers pulling a model, starting Ollama and selecting a custom endpoint through the model configuration. The speaker recommends a 32,768-token context setting and an OpenAI-compatible endpoint ending in /v1, with no API key. They warn that a small context window can cause the agent to lose earlier instructions or tool schemas. The transcript garbles some model identifiers and command syntax, so those details need checking before use.
OpenClaw follows a different connection path: select Ollama during onboarding and use its native base URL without /v1. The speaker says this supports streaming, tool calling and automatic discovery of local models. For viewers unable to run models locally, the video also describes testing Gemma 4 31B through NVIDIA NIM's hosted API. That route uses remote inference rather than the viewer's hardware.