Let an AI agent do it
Already use an AI coding agent (any one: Codex, OpenCode, Cursor, another assistant)? Copy this prompt, paste it into that agent and press Enter. It installs Hermes Agent, writes the settings, saves your key and tests everything. It will ask you for your API key.
See what the prompt says
# Task: connect Hermes Agent to AllModelAPI You are a coding agent on my computer. Set up **Hermes Agent** so it uses **AllModelAPI** as its model provider. Work step by step, tell me briefly what you are doing, and ask me before doing anything not listed here. ## Facts - Service: AllModelAPI, an API gateway for DeepSeek, Qwen, GLM, Kimi and MiniMax models. - Hermes Agent talks to it with the Chat Completions API. - Base URL: `https://api.allmodelapi.com/v1` - Main model: `deepseek-v4-pro` (DeepSeek V4 Pro, 1000K context). Fast background model: `deepseek-flash`. - Model IDs are case-sensitive. Full list: https://api.allmodelapi.com/v1/models - API key: not included. **Ask me to paste my AllModelAPI API key** (I can create one at https://allmodelapi.com/customer/api-keys). - Human guide: https://allmodelapi.com/documentation/hermes ## Steps 1. Detect my operating system (macOS, Linux or Windows) and shell. 2. Check whether Hermes Agent is installed: `hermes --version`. If it is not, install it with the official command: - macOS: `curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash` - Linux: `curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash` - Windows (PowerShell): `iex (irm https://hermes-agent.nousresearch.com/install.ps1)` 3. Settings file location: - macOS / Linux: `~/.hermes/config.yaml` - Windows: `%LOCALAPPDATA%\hermes\config.yaml` 4. If the file exists, copy it to `<file>.bak` first. If it contains other settings, **merge**: keep everything unrelated and only add or replace the keys shown below. If it does not exist, create it with exactly this content: ```yaml # AllModelAPI for Hermes Agent model: provider: custom default: deepseek-v4-pro base_url: https://api.allmodelapi.com/v1 key_env: ALLMODELAPI_API_KEY context_length: 1000000 ``` 5. API key: Add the line `ALLMODELAPI_API_KEY=<key>` to Hermes' .env file (`~/.hermes/.env`, or `%LOCALAPPDATA%\hermes\.env` on native Windows). Replace an existing ALLMODELAPI_API_KEY line instead of adding a second one. 6. Verify. Run: ``` hermes doctor hermes chat --oneshot -Q -q "Reply with just: OK" ``` A short reply such as "OK" means it works. On 401 re-check the key; on 400 "unknown model" re-check the model ID; on 402 I need more credit. 7. Report: what you changed, where the backup is, and how I start Hermes Agent. ## Rules - Only touch the files named above. Do not remove other providers, models or settings. - Never print my full API key in your replies or logs, and never put it in a git repository or project file. - Use YAML that parses: no comments in JSON, no trailing commas.