integrations/coding agent/Hermes

Hermes + AIgateway

Nous Research's self-hosted agent — one config block points it at any model.

Hermes is Nous Research's open-source autonomous agent: it lives on your server, keeps persistent memory, runs scheduled work, and reaches you over Telegram, Discord, or Slack. Its model section takes any OpenAI-compatible endpoint, so AIgateway drops in as the brain — and the agent can run on any of our 1000+ models without touching the agent itself.

Hermes homepage →
Setup

Three steps or fewer.

STEP 01

Install Hermes

One line on Linux / macOS / WSL2 (also Android via Termux). Reload your shell, then run setup; `hermes` on its own opens a chat once configured.

curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
hermes setup
STEP 02

Point its model at AIgateway

Hermes stores settings in ~/.hermes/config.yaml. Set provider: custom and Hermes calls base_url directly with your key. Set default explicitly — Hermes only auto-detects a model when the endpoint serves exactly one, and AIgateway serves the whole catalog.

# ~/.hermes/config.yaml
model:
  default: moonshot/kimi-k2.7-code
  provider: custom
  base_url: https://api.aigateway.sh/v1
  api_key: sk-aig-...
  context_length: 262144
STEP 03

Or configure it interactively

Prefer not to hand-edit YAML? Run `hermes model`, choose the custom-endpoint option, and enter the base URL (https://api.aigateway.sh/v1), your key, and the model slug (moonshot/kimi-k2.7-code).

hermes model
STEP 04

Swap models without touching the agent

Change default to any provider/slug from the AIgateway catalog — anthropic/claude-opus-4.7, openai/gpt-5.4, moonshot/kimi-k2.7-code. Same agent, same memory, different model.

Notes
  • provider: custom is the key — it tells Hermes to call any OpenAI-compatible base_url directly with the configured api_key.
  • Set model.default explicitly: Hermes auto-discovers a model from /v1/models only when the endpoint exposes a single one. AIgateway exposes the full catalog, so name the model you want.
  • Adding AIgateway never needs a funded model — config alone, no probe. moonshot/kimi-k2.7-code is on the $5 signup-credit shortlist, so a fresh key works on the first run; any topup unlocks the full catalog.
  • For an always-on autonomous agent, mint a sub-account key from AIgateway so its long-running spend lands under its own cap and shows up tagged in your dashboard.
  • Tool calling, streaming, and structured output pass through unchanged — AIgateway forwards the full OpenAI schema.
More integrations

Same key. Every other tool.