MandAPI
English ▾
Coding tools

Connect Hermes Agent to MandAPI

Add MandAPI as a custom Chat Completions endpoint in Hermes.

Use this recipe with your coding assistant

Read the prompt
Configure Hermes Agent to use MandAPI as a custom OpenAI-compatible Chat Completions endpoint. Inspect the installed version and existing model settings, preserving unrelated options. Use model.provider=custom, model.base_url=https://api.mandapi.com/v1, the exact account-visible MODEL_ID and model.key_env=MANDAPI_API_KEY, or use the current hermes model wizard. Keep the key private and ensure the launched process inherits it. Do not use old LLM_MODEL configuration. Guide one short text check and then a read-only README task, reviewing MandAPI usage. Explain how to restore the prior model settings.
TXT

Set the custom provider

Use a current Hermes Agent installation and choose a MandAPI model available to your account with Chat Completions support. For coding tasks, also confirm tool calling for that model.

Outside an active chat, run hermes model and choose the custom endpoint option. Supply the MandAPI base, your private key and the exact model ID. This wizard is the route for adding a provider; the in-chat /model command switches configurations already set up.

Keep a reproducible configuration

For a manual setup, merge this into ~/.hermes/config.yaml, replacing MODEL_ID:

yaml
model:
  provider: custom
  base_url: https://api.mandapi.com/v1
  default: MODEL_ID
  key_env: MANDAPI_API_KEY

Supply MANDAPI_API_KEY through the environment inherited by Hermes. For one Bash terminal:

bash
read -rsp "MandAPI key: " MANDAPI_API_KEY
printf '\n'
export MANDAPI_API_KEY

Or PowerShell:

powershell
$env:MANDAPI_API_KEY = [Net.NetworkCredential]::new('', (Read-Host 'MandAPI key' -AsSecureString)).Password

Start Hermes from that same terminal. With the custom provider, put the endpoint in model.base_url; do not rely on a legacy LLM_MODEL or an unrelated provider's base-URL variable.

Check text, then tools

Start hermes, ask for a short explanation of a pasted code snippet and inspect the matching usage in MandAPI. Next, open a small project and ask for a README summary without file changes. This separates a model connection problem from a tool-execution problem.

Troubleshoot and switch back

If the key is missing, check that the Hermes process inherited the named variable without printing it. If /model cannot add the endpoint, exit and use hermes model. For a missing model, compare the exact account-visible ID rather than adding another provider's prefix. Keep a copy of your previous model settings and restore it when you want to switch back.

References

Topics inspired by public documentation; instructions and examples adapted for MandAPI.