How to Use TokenAir with Hermes Agent
TokenAir can cut Hermes Agent model spend significantly when repeatable jobs can use a more affordable model and still finish correctly. Hermes Agent accepts custom OpenAI-compatible endpoints, so you can use TokenAir as the main model provider without changing the agent's tools.
Compatibility verdict
Direct setup
Direct setup is available. Hermes Agent documents an interactive custom endpoint flow and a model.base_url configuration for services that expose /v1/chat/completions.
The tool documents a custom OpenAI-compatible endpoint path.
Before you start
- A TokenAir API key and one account-enabled model ID.
- Hermes Agent installed and able to run the hermes model setup command.
- A test task with a clear completion rule, such as a file summary or bounded repository edit.
Setup and compatibility steps
Step 1
Open the provider setup wizard
Run hermes model outside a chat session and choose Custom endpoint. Enter the TokenAir API key in the wizard so the secret stays out of your project files.
Step 2
Enter the TokenAir connection values
Use https://api.tokenair.ai/v1 as the API base URL and enter an exact model ID enabled for your account.
Step 3
Confirm the saved model configuration
Hermes persists the provider, model, and base URL in its config. Review those non-secret values before starting a long-running gateway or background task.
Step 4
Run a short agent task
Test one tool-using task, then inspect whether the final answer is complete and whether the agent required extra retries or fallback work.
Non-secret config.yaml shape
model:
default: YOUR_TOKENAIR_MODEL_ID
provider: custom
base_url: https://api.tokenair.ai/v1Replace placeholders with values from your own TokenAir account. Never commit an API key to source control.
How to verify it
- Hermes starts without a provider, authentication, or model-not-found error.
- The agent completes a small chat request through TokenAir.
- A tool-using task returns a final answer instead of stopping after a tool call.
- Review background and auxiliary model slots before enabling unattended work.
How to lower cost without hiding quality loss
TokenAir gives the client access to premium and lower-cost model choices through one OpenAI-compatible API. Savings depend on matching each task with a model that still passes review.
- Begin with short, repeatable tasks where completion is easy to judge.
- Review the main, auxiliary, compression, and fallback model slots because each can create spend.
- Track total model calls and cost per completed task, especially for scheduled or background agents.
Limits to know before production
- Changing the main model leaves auxiliary, compression, and fallback model configuration unchanged.
- Long-running agents can make many calls after the first prompt, so token price alone is not a safe budget limit.
- Keep the API key out of shared config examples and rotate it if it is exposed.
FAQ
Does Hermes Agent work with TokenAir's OpenAI-compatible API?
Yes. Hermes Agent documents custom endpoints for services that implement /v1/chat/completions, which matches TokenAir's public API surface.
Should I put the TokenAir key in config.yaml?
Prefer the Hermes setup flow or its supported secret storage. Do not commit an API key to a repository or paste it into public troubleshooting output.
What should I measure for an agent workload?
Measure total calls, retries, tool loops, latency, and cost per completed task. Include auxiliary and fallback calls when they are enabled.
Official sources and related TokenAir docs
Tool settings change between releases. We checked these notes on July 17, 2026. Review the linked tool docs again before a production rollout.
Try one workflow before changing the default.
Use the cost checkup to choose a bounded test, then compare cost per accepted result with your current route.