LLM Gateway
Guides

Hermes Agent Integration

Connect Hermes Agent to LLM Gateway using a custom endpoint, then verify tool use, file edits, and tests.

Hermes Agent supports custom OpenAI-compatible endpoints. This walkthrough was verified with Hermes Agent 0.21.0.

Video walkthrough

Install

Follow the official installation instructions, then open a new terminal and check:

hermes --version

Configure the connection

Run hermes setup and choose Custom OpenAI-compatible endpoint. Enter:

SettingValue
Base URLhttps://api.llmgateway.io/v1
API keyA key from your dashboard
Modeldeepseek-v4-flash
Terminal backendlocal for this walkthrough

You can also configure the files directly. Merge the following into ~/.hermes/config.yaml:

model:
  provider: custom
  default: deepseek-v4-flash
  base_url: https://api.llmgateway.io/v1
terminal:
  backend: local

Store the credentials in ~/.hermes/.env:

OPENAI_API_KEY=your_api_key
OPENAI_BASE_URL=https://api.llmgateway.io/v1

Keep the credentials file private. HERMES_HOME can point Hermes at a separate configuration directory.

Start coding

cd your-project
hermes chat

For a single task that exits when finished:

hermes chat --oneshot -q "Fix the failing test and run it again"

Use --toolsets terminal,file to limit this demo to shell and file tools. You can change the model for a session with --model.

Verify the connection

Open a small project and ask the agent to read a file, make a change, and run its tests. Our recorded example fixes a TypeScript slugifier and passes all three tests with deepseek-v4-flash through LLM Gateway.

Hello, LLM Gateway! becomes hello-llm-gateway; repeated separators collapse into one hyphen; empty and punctuation-only inputs stay empty. The demo uses Node.js 24 to run node --test slugify.test.ts directly.

Review the diff and test output, then check the request in your LLM Gateway dashboard. Choose other compatible models from the live catalogue.

Hermes Agent completing the coding task through LLM Gateway

Troubleshooting

Run hermes doctor to inspect the configuration. Missing credentials for optional providers do not prevent your configured custom endpoint from working.

If requests use another provider, check both model.provider: custom and model.base_url. If TypeScript tests fail before running, check the Node.js version inside Hermes's terminal tool; it can differ from the version in your outer shell.

How is this guide?

Last updated on

On this page

Ready for production?

Ship to production with SSO, audit logs, spend controls, and guardrails your security team will approve.

Explore Enterprise