Skip to main content
An agent that you train on Oumi can run outside Oumi. Hermes Agent is an open-source agent harness from Nous Research that runs in your terminal and in messaging apps. You deploy your fine-tuned model on Oumi, implement its tools as a Hermes plugin, and add your deployment to a Hermes profile as a custom provider. You do not write or maintain an agent loop of your own. Hermes supplies the loop, the terminal interface, and the session history, and your small fine-tuned model supplies the tool-calling behavior at a fraction of the cost and latency of a frontier model. In this guide, your model is the main model of a Hermes profile that you use only for your agent. To keep your usual model in Hermes and call your agent only when you need it, run it as a subagent instead. This guide uses a stock lookup agent as its example. The agent has two tools: search_company finds the ticker symbol for a company name, and get_stock_price returns the latest price for a ticker.
Hermes always builds its own system prompt around your instructions. Even in a profile with only your tools, the system prompt also contains Hermes guidance about tool calls, the current date and time, and details about your machine, such as the working directory. If your model did not see this text during training, its results in Hermes can differ from your evaluations. In that case, run it as a subagent, where your model receives only the system prompt from your training data.

HOW THE PIECES CONNECT

The Hermes agent loop on your machine sends messages and tools to your Oumi deployment, runs each tool call in your Hermes plugin, and returns the final reply to you The Hermes agent loop on your machine sends messages and tools to your Oumi deployment, runs each tool call in your Hermes plugin, and returns the final reply to you Oumi serves the model. Hermes runs everything else on your machine, including your tool code, so your tools can reach real data that Oumi cannot.

BEFORE YOU START

You will need:
  • An Oumi project.
  • Hermes, installed on your machine by following the Hermes installation instructions.
  • A personal Oumi API key from User Settings > API Keys.

1

Train a tool-calling model

Ask FAiE (Frontier AI Engineer Agent) to help you build the agent, or follow the Build an Agent tutorial yourself:
  1. Create a tool for each function that your agent calls. For the example, create search_company and get_stock_price.
  2. Give each tool a tool implementation. A simulated implementation is enough to generate training data. Hermes calls your real code later.
  3. Collect the prompts that your agent must handle, and generate training conversations with a strong teacher model.
  4. Train a base model that supports tool calling on the best conversations.
  5. Evaluate the trained model against the teacher with your tools attached.
Keep a copy of the system prompt from your training data. You use it again in Hermes.
2

Deploy the model

Deploy your trained model and wait until the deployment is Active. Copy the Deployment Path from the deployment page. This is your model path, in the form projects/{project_id}/deployments/{deployment_id}.
3

Create a Hermes profile for your agent

A Hermes profile is a separate Hermes home directory with its own configuration, plugins, and identity. A profile for your agent keeps its model, tools, and system prompt apart from your usual Hermes setup.
Hermes creates ~/.hermes/profiles/stock-agent/ and a stock-agent command that runs Hermes with that profile.Save the system prompt from your training data as the profile’s SOUL.md. Hermes uses SOUL.md as the agent’s identity, in place of its default identity:
Your agent needs two kinds of credentials: your Oumi API key for the model, and the credentials of the data sources that your tools call. Put all of them in the profile’s .env file, not in your shell profile, so that they apply only to this agent:
~/.hermes/profiles/stock-agent/.env
Make the file readable only by you:
4

Implement the tools in Hermes

During training or evaluation on the Oumi platform, a tool implementation answered each tool call. In Hermes, a plugin answers it. A plugin is a directory with a plugin.yaml manifest and an __init__.py file whose register function registers the tools that your model knows how to call.The model learned your tools from their Oumi definitions. Make each Hermes tool match its Oumi tool:
  • Name: The tool’s Function name in Oumi, for example search_company. If the names differ, the model calls a tool that Hermes does not have.
  • Parameters: The same parameter names, types, and required fields.
  • Description: The same text.
Create ~/.hermes/profiles/stock-agent/plugins/stock-tools/plugin.yaml:
plugin.yaml
Create ~/.hermes/profiles/stock-agent/plugins/stock-tools/__init__.py:
__init__.py
Each handler returns a JSON string, which is what the model reads. A tool that finds no match returns a result that says so. A tool whose data source fails raises an error, and Hermes sends that error to the model as the tool result. Neither path invents a value.
You can have Hermes write the plugin for you. Start Hermes with a frontier model, paste each tool’s Function name, Description, and Parameters JSON from its page in Oumi, and ask: “Write a Hermes plugin in ~/.hermes/profiles/stock-agent/plugins/stock-tools/ that registers these tools with the same names and parameters in a toolset named stock. Use <your data source> to answer them.” Review the code before you enable it, because a plugin runs with your user’s permissions.
Plugins are off until you enable them. Enable the plugin in the profile:
5

Add the deployment to the profile

Add an oumi provider to ~/.hermes/profiles/stock-agent/config.yaml, and make it the profile’s model. Create the file if it does not exist.
~/.hermes/profiles/stock-agent/config.yaml
By default, Hermes hides plugin tools behind tool search. The model then sees the bridge tools tool_search, tool_describe, and tool_call instead of search_company and get_stock_price. Your model learned to call your tools by name from a small, fixed set, so it can fail when it sees the bridge tools instead. Keep tool search off for an agent that you trained on a fixed set of tools.To set the other fields of a provider entry, see Named custom providers in the Hermes documentation.
6

Run the agent

If your deployment uses scale-to-zero, the first prompt after an idle period can fail with 429: Deployment is warming up. This is not an authentication or configuration error. Wait a few minutes and send the prompt again.
You can run the agent in the terminal or in the Hermes desktop app.In the terminal, start Hermes with the profile and only the toolset from your plugin:
By default, Hermes also gives the model its own toolsets, such as terminal, file, web, and memory tools, and adds guidance for them to the system prompt. If your model did not see these during training, start Hermes with --toolsets stock, as in the command above. Otherwise, the model can call a Hermes tool instead of your tools, or answer without calling a tool.
Then ask a question such as “How is Nucor doing today?”. The model calls search_company to find the ticker NUE, calls get_stock_price with that ticker, and answers with the price that the tool returned. Hermes shows each tool call in the transcript.In the Hermes desktop app:
  1. Select the stock-agent profile in the profile rail at the bottom of the sidebar.
  2. Start a new session. A session that was open before you changed the profile keeps its old tools and model.
  3. If the model does not have your tools, open Capabilities and enable the stock-tools plugin and its stock toolset.
  4. Ask the same question as in the terminal.
The desktop app talks to the Hermes gateway, a background service that serves all of your profiles. After you edit your plugin or a package that it uses, restart the gateway:
Restarting only the profile, for example with hermes -p stock-agent gateway restart, reloads the profile’s configuration but keeps the old plugin code.

TROUBLESHOOTING

  • 429 with “Deployment is warming up”: Your deployment uses scale-to-zero and has no warm replica. Your configuration is correct. Wait a few minutes and send the prompt again. To prevent cold starts, set Min replicas to 1 under Info & Configuration > Runtime & scaling. That replica bills continuously.
  • Hermes does not start, and reports a context window below the minimum: context_length in config.yaml is below 64K tokens. Set it to 65536.
  • The model sees tool_search, tool_describe, and tool_call instead of your tools: Tool search is on. Set tools.tool_search.enabled to off in config.yaml, then start a new session.
  • The desktop app still runs old plugin code: You restarted only the profile. Run hermes gateway restart to restart the gateway.
  • 400 with “Invalid model format”: The model in config.yaml is not a model path. Set the key under models and model.default to projects/{project_id}/deployments/{deployment_id}.
  • 401 from the deployment: Hermes did not send your Oumi API key. Make sure that OUMI_API_KEY is in ~/.hermes/profiles/stock-agent/.env, and that key_env names that variable.
  • The model does not have your tools: The plugin is not enabled, or Hermes did not load it. Run stock-agent plugins enable stock-tools, then start a new session. To see why Hermes skips a plugin, run HERMES_PLUGINS_DEBUG=1 stock-agent plugins list.
  • The model calls a tool that Hermes does not have: A tool name in your plugin does not match the tool’s Function name in Oumi. Rename the Hermes tool, then start a new session.
  • The model answers without calling tools, or calls Hermes tools: Start Hermes with --toolsets stock as shown in the last step, so that the model sees only your tools.

WHAT’S NEXT

Run your agent as a subagent

Keep your usual model in Hermes and give it your agent as a tool.

Inference logs

Review the requests that Hermes sent to your deployment.

Compounding intelligence

Find where your deployed model struggles, and retrain it on targeted data.

Tools

Write tool definitions that a model calls correctly.