What is Hermes?
Hermes is a series of fine-tuned open-source LLMs developed by NousResearch. Built on top of base models (Llama 3, Mistral, Mixtral), Hermes is trained specifically for strong instruction following, tool/function calling, JSON output, and agentic multi-step reasoning — making it one of the most capable open models for building AI agents.
Tool Use
Native function calling with structured JSON arguments
Reasoning
Chain-of-thought and ReAct multi-step agent loops
Instruction
Superior instruction following with complex system prompts
JSON Mode
Reliable structured output for downstream pipelines
Open Weights
Fully open — run locally, privately, no API costs
Multi-Turn
Long context, coherent multi-turn conversations
Model Family Timeline
Hermes-2-Pro
Built on Mistral 7B. First Hermes with strong function calling. Still popular for lightweight agents.
NousResearch/Hermes-2-Pro-Mistral-7B
Hermes-2-Theta
Mistral 7B merge model. Combines multiple capabilities — good instruction following and tool use balance.
NousResearch/Hermes-2-Theta-Llama-3-8B
Hermes-3 (Llama 3.1 8B)
Major leap. Built on Llama 3.1 with 128k context. Best small Hermes for local agent deployments.
NousResearch/Hermes-3-Llama-3.1-8B
Hermes-3 (Llama 3.1 70B)
Flagship model. Competitive with GPT-4o on agent benchmarks. Excellent for production agentic use.
NousResearch/Hermes-3-Llama-3.1-70B
Hermes-3 (Llama 3.1 405B)
Largest open model. State-of-the-art open weights, matches frontier closed models on many evals.
NousResearch/Hermes-3-Llama-3.1-405B
Hermes-2-Pro (Llama-3 8B)
Updated Pro line on Llama 3 base. Strong structured output and tool calling in a compact package.
NousResearch/Hermes-2-Pro-Llama-3-8B
Architecture & Training Approach
Hermes models are fine-tunes of base models using curated datasets. NousResearch collects and synthesizes training data focused on agentic behavior, structured output, and multi-step reasoning.
<|im_start|> / <|im_end|> special tokens to delimit roles, giving it precise control over multi-turn conversations and tool injection.
ChatML Format
Hermes uses the ChatML conversation format. Every message is wrapped with special tokens indicating role boundaries. This is critical for agent loops where you inject tool results back into the context.
Role Types
system
Defines the agent's persona, capabilities, available tools, and behavioral rules. Set once at the start.
user
The human's message or task request. Also used for injecting context at the start of agentic tasks.
assistant
Model's response — may include reasoning, tool calls, or final answers. This is what the model generates.
tool
The result returned by executing a tool. Injected into context so the model can reason over the output.
Tool Calling
Hermes supports two tool-calling styles: XML-tag style (native Hermes) and OpenAI-compatible JSON (via API wrappers). Both require declaring available tools in the system prompt using JSON Schema.
Declaring Tools in System Prompt
Full Tool Call Loop
Agent Patterns
ReAct (Reason + Act)
ReAct is the most common pattern for Hermes agents: the model alternates between Thought (reasoning), Action (tool call), and Observation (tool result) until a final answer is reached.
Thought
Model reasons about what to do next. Often wrapped in <thinking> tags or as plain reasoning text before the tool call.
Action
Model emits a <tool_call> with name and JSON arguments. Your orchestration code parses this and executes the tool.
Observation
Tool result is injected back as a <tool> role message. The model continues reasoning with the new information.
Repeat or Answer
Loop continues until the model decides it has enough information and produces a final response without a tool call.
Multi-Agent Architecture
System Prompts for Agents
Hermes is trained to follow complex system prompts reliably. A well-structured system prompt is the foundation of every agent. Key sections to include:
System Prompt Anti-Patterns
❌ Avoid
- Vague persona ("Be helpful")
- No tool usage guidance
- Contradictory rules
- No output format guidance
- Excessively long, unfocused prompts
✅ Best Practice
- Named persona with clear role
- Explicit tool usage instructions
- Consistent, ordered rules
- Output format specification
- Short sections with clear headers
Structured Output (JSON Mode)
Hermes excels at producing reliable JSON output. You can enforce structured extraction without tool calling — useful for parsing, classification, and data extraction tasks.
Using Grammar Constraints (llama.cpp / Ollama)
Deployment
Hermes can be deployed locally for privacy-first workloads or on GPU servers for production scale.
Ollama (Local — Easiest)
vLLM (Production — GPU Server)
Cloud API Providers
| Provider | Models Available | Strengths | API Compatible |
|---|---|---|---|
| Together AI | Hermes-3 8B, 70B, 405B | Fast, cheapest inference | OpenAI |
| Fireworks AI | Hermes-3 8B, 70B | Lowest latency, speculative decoding | OpenAI |
| Groq | Hermes-2-Pro | Ultra-fast LPU inference | OpenAI |
| Hugging Face TGI | Any Hermes variant | Self-hosted, full control | OpenAI + Messages |
| Ollama (local) | Hermes-3 8B, 70B | Privacy, offline, zero cost | OpenAI |
Python SDK Integration (LangChain)
Benchmarks
Hermes-3 models consistently outperform their base models and are competitive with closed-source models on agentic benchmarks.
| Model | MMLU | GSM8K | HumanEval | Tool Use | Context |
|---|---|---|---|---|---|
| Hermes-3-8B | 71.2% | 84.6% | 72.1% | ★★★★☆ | 128k |
| Hermes-3-70B | 82.5% | 93.1% | 80.3% | ★★★★★ | 128k |
| Hermes-3-405B | 88.1% | 96.2% | 87.5% | ★★★★★ | 128k |
| Llama 3.1 8B (base) | 66.7% | 75.3% | 62.0% | ★★☆☆☆ | 128k |
| GPT-4o mini | 82.0% | 90.5% | 85.1% | ★★★★★ | 128k |
| Claude Haiku 3.5 | 80.5% | 91.0% | 80.0% | ★★★★★ | 200k |
Hermes vs Other Open Models
| Aspect | Hermes-3 | Mistral / Mixtral | Qwen2.5 | DeepSeek-V2 |
|---|---|---|---|---|
| Tool Calling | Excellent | Good | Excellent | Good |
| JSON Reliability | Very High | Medium | High | Medium |
| Context Window | 128k | 32k–128k | 128k | 128k |
| Local (CPU/GPU) | Yes (GGUF) | Yes (GGUF) | Yes (GGUF) | GPU recommended |
| License | Llama 3.1 License | Apache 2.0 | Qwen License | DeepSeek License |
| Agent Community | Very Active | Active | Active | Growing |
| Best For | Agents, tool use, JSON | General text, coding | Code, multilingual | Code, reasoning |
Best Practices
Temperature
Use temperature=0.1–0.3 for agent tasks requiring reliable tool calls and JSON. Use higher values (0.7+) only for creative tasks.
Stop Sequences
Set stop sequences to </tool_call> to intercept after tool invocation before the model continues generating. Parse and execute before resuming.
Validate Tool Output
Always validate and sanitize tool call arguments before executing. Hermes is reliable but treat JSON output as untrusted input — especially for shell/code execution tools.
Tool Descriptions
Write clear, specific tool descriptions. The model uses these to decide which tool to call. Vague descriptions lead to wrong tool selection. Include when NOT to use the tool.
Max Iterations
Always set a maximum iteration limit for agent loops (e.g., 10 steps). Without this, a confused model can loop indefinitely consuming tokens and compute.
Model Selection
Use 8B for local dev and prototyping, 70B for production agents. Only use 405B when the task genuinely requires maximum capability — it's 5x the cost of 70B.
Grammar Constraints
Use GBNF grammar constraints (llama.cpp) or format: "json" (Ollama) to guarantee valid JSON output. Eliminates format hallucinations entirely.
Logging
Log every tool call, arguments, and result during development. The agent loop is a state machine — visibility into each step is critical for debugging unexpected behavior.