Lesson 416 of 2116
Hermes For Function Calling: Tool-Use Without OpenAI
Hermes ships with a documented function-calling format. That makes it one of the few open-weight models you can wire into agent frameworks without months of prompting hacks.
Lesson map
What this lesson covers
Learning path
The main moves in order
- 1Why function calling matters more than chat quality
- 2function calling
- 3tool use
- 4structured grammar
Concept cluster
Terms to connect while reading
Section 1
Why function calling matters more than chat quality
For most production workloads, the model has to do something — call an API, query a database, write to a calendar. That is function calling. A model that handles it reliably is more valuable in agent stacks than one that writes prettier prose. Hermes was tuned with this in mind, and it shows.
What the Hermes format looks like
Hermes uses a tool-use grammar that the model card documents in detail. The exact tags vary by version, but the pattern is consistent: the system prompt declares the available tools as JSON schemas, the model emits a structured tool-call block, your harness executes it and returns results, and the model continues. This is the same shape OpenAI and Anthropic use — Hermes just exposes it for an open-weight model.
The dance is the same in any tool-using model. Hermes documents the exact grammar in its model card.
Pattern (illustrative, not exact tags):
[SYSTEM]
You have access to the following tools:
search_inventory(query: string) -> list of items
send_email(to: string, subject: string, body: string)
[USER]
Find us 5 size 10 hiking boots and email John the list.
[MODEL]
<tool_call>
search_inventory({"query": "size 10 hiking boots"})
</tool_call>
[HARNESS RETURNS]
[ {sku: ..., name: ...}, ... ]
[MODEL]
<tool_call>
send_email({"to": "john@...", "subject": "Boots", "body": "..."})
</tool_call>Where it shines
- Building agents that should work without an OpenAI dependency.
- Self-hosted assistants where the tool list is sensitive (internal databases, private endpoints).
- Cost-sensitive agent workloads — Hermes 8B handles a lot of routine tool calls cheaply.
- Latency-sensitive use cases on dedicated hardware — local inference avoids round-trip to a cloud API.
Where to be careful
Compare the options
| Risk | What goes wrong | Mitigation |
|---|---|---|
| Schema drift | Model emits a slightly malformed tool call | Validate every call against the schema before executing |
| Hallucinated tool names | Model invents a tool you didn't declare | Allowlist tool names; refuse anything else |
| Argument hallucination | Model fills required fields with plausible-but-wrong values | Prompt to confirm before destructive actions |
| Multi-step planning | Model gets confused after 3-4 tool calls | Use a smaller plan-then-execute split or a larger model for planning |
Applied exercise
- 1Read the function-calling section of the Hermes model card for the version you run.
- 2Implement a single tool — a fake 'lookup_user(id)' that returns canned data.
- 3Wire Hermes to call it and verify the model emits the documented format.
- 4Add a deliberately invalid tool call to your test set and confirm your harness rejects it gracefully.
Key terms in this lesson
The big idea: Hermes makes open-weight tool use practical. The work is in the harness — validate everything, allowlist always.
End-of-lesson quiz
Check what stuck
15 questions · Score saves to your progress.
Tutor
Curious about “Hermes For Function Calling: Tool-Use Without OpenAI”?
Ask anything about this lesson. I’ll answer using just what you’re reading — short, friendly, grounded.
Progress saved locally in this browser. Sign in to sync across devices.
Related lessons
Keep going
Creators · 9 min
MiniMax For Agentic Tasks: Strengths And Gaps
MiniMax models can drive agents, but their tool-use shape, refusal patterns, and ecosystem differ from Western frontier. Plan for it.
Creators · 10 min
Kimi as an Agent: Browsing, Tools, and Multi-Step Tasks
Kimi isn't just a chat model — its newer variants act on tools, browse the web, and chain steps. Here is what the platform actually offers and where the rough edges are.
Creators · 40 min
Tool Use Quality Across Claude, GPT, Gemini, Llama
Compare native tool-calling reliability and patterns across model families.
