Hermes Agent Integration with The Grid | Provider Setup
Connect Hermes Agent to The Grid through the native Anthropic Messages API. Add your API key, configure one provider block, and start Hermes.
Hermes Agent supports the Anthropic Messages format natively. Point it at The Grid's Messages API beta endpoint and use your Grid consumption key—no client patch or redirect handling is required.
Prerequisites
Hermes Agent installed.
A Grid account at app.thegrid.ai with credits.
A Grid consumption API key from Settings → API Keys → Create Consumption Key.
Setup
1. Save your Grid key
hermes config set THEGRID_API_KEY your-consumption-api-keyHermes stores API keys in ~/.hermes/.env.
2. Configure The Grid in ~/.hermes/config.yaml
Add The Grid as the default and declare all three Agent instruments:
model:
default: agent-prime
provider: custom
base_url: https://messages-beta.api.thegrid.ai
api_key: ${THEGRID_API_KEY}
api_mode: anthropic_messages
context_length: 196608
custom_providers:
- name: thegrid
base_url: https://messages-beta.api.thegrid.ai
key_env: THEGRID_API_KEY
api_mode: anthropic_messages
models:
agent-standard:
context_length: 128000
agent-prime:
context_length: 196608
agent-max:
context_length: 1000000api_mode: anthropic_messages tells Hermes to use its native Anthropic Messages transport. Set base_url to the host root as shown; Hermes adds /v1/messages.
3. Start Hermes
Optional: keep The Grid alongside other providers
To switch to The Grid without replacing your default provider, keep the custom_providers: block from Step 2 and leave your existing top-level model: block unchanged.
Then switch inside Hermes based on the task:
See the current instruments list for current specifications.
Verification
Ask Hermes to complete a task that uses a tool, such as:
A coherent response with a successful tool call confirms the integration works end to end.
Troubleshooting
HTTP 401 Unauthorized. Confirm you used a Grid consumption key, not a trading key, and that api_key: ${THEGRID_API_KEY} matches the variable stored in ~/.hermes/.env.
HTTP 402 Payment Required. Your credits are depleted. Top up at app.thegrid.ai.
Requests go to another provider. The top-level model: block controls the default provider. Replace it with the block above, or use the named-provider configuration and switch with /model custom:thegrid:agent-prime.
Last updated
Was this helpful?