search_company finds the ticker symbol for a company name, and get_stock_price returns the latest price for a ticker.
HOW THE PIECES CONNECT
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:
- Create a tool for each function that your agent calls. For the example, create
search_companyandget_stock_price. - Give each tool a tool implementation. A simulated implementation is enough to generate training data. Hermes calls your real code later.
- Collect the prompts that your agent must handle, and generate training conversations with a strong teacher model.
- Train a base model that supports tool calling on the best conversations.
- Evaluate the trained model against the teacher with your tools attached.
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 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 Make the file readable only by you:
~/.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:.env file, not in your shell profile, so that they apply only to this agent:~/.hermes/profiles/stock-agent/.env
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 Create 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.Plugins are off until you enable them. Enable the plugin in the profile:
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.
~/.hermes/profiles/stock-agent/plugins/stock-tools/plugin.yaml:plugin.yaml
~/.hermes/profiles/stock-agent/plugins/stock-tools/__init__.py:__init__.py
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
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:Then ask a question such as “How is Nucor doing today?”. The model calls Restarting only the profile, for example with
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:- Select the
stock-agentprofile in the profile rail at the bottom of the sidebar. - Start a new session. A session that was open before you changed the profile keeps its old tools and model.
- If the model does not have your tools, open Capabilities and enable the
stock-toolsplugin and itsstocktoolset. - Ask the same question as in the terminal.
hermes -p stock-agent gateway restart, reloads the profile’s configuration but keeps the old plugin code.TROUBLESHOOTING
429with “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_lengthinconfig.yamlis below 64K tokens. Set it to65536. - The model sees
tool_search,tool_describe, andtool_callinstead of your tools: Tool search is on. Settools.tool_search.enabledtooffinconfig.yaml, then start a new session. - The desktop app still runs old plugin code: You restarted only the profile. Run
hermes gateway restartto restart the gateway. 400with “Invalid model format”: The model inconfig.yamlis not a model path. Set the key undermodelsandmodel.defaulttoprojects/{project_id}/deployments/{deployment_id}.401from the deployment: Hermes did not send your Oumi API key. Make sure thatOUMI_API_KEYis in~/.hermes/profiles/stock-agent/.env, and thatkey_envnames 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, runHERMES_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 stockas 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.