Hermes Function Calling
Nous Research's prompt standard that places JSON tool schemas in <tools> and invocations in <tool_call> tags.
What is Hermes Function Calling?
Hermes Function Calling is Nous Research's prompt standard for teaching a model how to use tools with structured XML tags and JSON payloads. It places available tool schemas in
Understanding Hermes Function Calling
In practice, Hermes Function Calling is a formatting convention for tool use. The model is shown a list of tools, each with a JSON schema, then asked to return a single JSON object naming the tool and its arguments inside
This approach is useful when you want an LLM to choose among functions, pass structured arguments, and resume the conversation after a tool response. The Hermes docs and repository show examples for recursive function calling, JSON mode, and schema validation, which makes the pattern practical for agents, assistants, and workflow automations. (github.com)
Key aspects of Hermes Function Calling include:
- Tool schema block: Available tools are presented in a
section so the model can inspect names, descriptions, and parameters. - Structured call output: The model returns a JSON object with a function name and arguments inside
tags. - Parser-friendly format: XML wrappers and JSON payloads make tool calls easy to extract in downstream code.
- Schema alignment: The prompt encourages arguments that match the declared JSON schema, reducing formatting drift.
- Agent compatibility: The format fits recursive tool use, where the system can execute a tool and feed the result back to the model.
Advantages of Hermes Function Calling
- Clear machine parsing: The tool call is wrapped and structured, which simplifies automation.
- Better control: The schema tells the model what arguments are valid before it acts.
- Reusable prompt pattern: Teams can apply the same format across many tools.
- Fits agent loops: The format works well with iterative tool execution and follow-up reasoning.
- Portable across stacks: The pattern can be adapted to different backends and orchestration layers.
Challenges in Hermes Function Calling
- Strict formatting: Small tag or JSON mistakes can break parsing.
- Prompt sensitivity: Tool selection can change if the schema or examples are rewritten.
- Validation overhead: Teams still need code to verify arguments and handle errors.
- Multi-step complexity: Recursive tool use adds state management and retries.
- Template dependence: The format works best when the serving stack matches the expected chat template.
Example of Hermes Function Calling in Action
Scenario: a user asks an assistant to look up a stock price and summarize it.
The system prompt provides a
That workflow is especially helpful when you want the model to decide when to act, but still keep execution deterministic in your application code. In PromptLayer, you can log the prompt, inspect the tool call, and compare how different prompt versions affect tool choice and argument quality.
How PromptLayer helps with Hermes Function Calling
PromptLayer gives teams a place to version prompts, inspect tool-call traces, and evaluate whether Hermes-style formatting is producing the right arguments at the right time. That makes it easier to iterate on tool schemas, prompts, and agent workflows without losing visibility.
Ready to try it yourself? Sign up for PromptLayer and start managing your prompts in minutes.