Quick answer

How do I use Autohand models in Hermes Agent?

Save your key with hermes config set AUTOHAND_API_KEY, then set the model block in ~/.hermes/config.yaml to provider: custom, base_url: https://api.autohand.ai/v1, and default: fantail.

Status
Available through a custom OpenAI-compatible endpoint
Requires
An Autohand account, an Autohand API key, and Hermes Agent.
Configure with
~/.hermes/config.yaml and ~/.hermes/.env
Subagents
The delegation block, with model: fantail

Know before you start: This guide follows the Hermes Agent configuration reference. Check your installed version against it, because Hermes changes often.

Prerequisites

  • An Autohand account. Sign up or sign in to Console. The Free plan includes Fantail. Moa requires the Pro plan or above.
  • An Autohand API key. The first step shows how to create one.
  • Hermes Agent. Install it with curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash.

Step 1: Create an Autohand API key

  1. Sign in to Autohand Console.
  2. Open API Keys and select Create API Key.
  3. Enter a name that identifies the agent and machine, for example hermes-laptop.
  4. Select Create Key and copy the value. Console shows the key only once.

Step 2: Store the key

Hermes keeps secrets in ~/.hermes/.env. The hermes config set command saves any upper-case name to that file.

hermes config set AUTOHAND_API_KEY your-autohand-api-key

Confirm that the key works from a terminal where the variable is set. The request lists the models your plan can use.

curl https://api.autohand.ai/v1/models \
  -H "Authorization: Bearer $AUTOHAND_API_KEY"

Step 3: Point Hermes at Autohand

Run hermes config edit to open ~/.hermes/config.yaml, and set the model block:

model:
  provider: custom
  default: fantail
  base_url: https://api.autohand.ai/v1
  api_key: ${AUTOHAND_API_KEY}
  context_length: 262144

Hermes replaces ${AUTOHAND_API_KEY} with the value from your environment or ~/.hermes/.env. The context_length setting tells Hermes the Fantail context window.

You can also run hermes model, select Custom endpoint, and enter the base URL, key, and model name when prompted. Hermes checks the endpoint against /v1/models before it saves the settings.

Step 4: Choose Fantail or Moa

Model IDUse it forContextMax outputPlans
fantailFast agent loops, quick fixes, reviews, and subagents256K tokens16K tokensFree and above
moaPlanning, large refactors, and repository-wide changes1M tokens262,144 tokensPro and above

To use Moa for the main agent, set default: moa and context_length: 1048576.

Step 5: Run a test prompt

hermes chat -q "Summarize what this repository does in three sentences"

The -q option runs one prompt and exits.

Subagents and Fantail

Hermes starts subagents with its delegate tool. By default, subagents use the main model. To run them on Fantail while the main agent uses Moa, add a delegation block:

delegation:
  model: fantail
  base_url: https://api.autohand.ai/v1
  api_key: ${AUTOHAND_API_KEY}
  api_mode: chat_completions

When delegation.base_url is set, subagents call that endpoint directly. Set delegation.api_key as shown, because Hermes otherwise falls back to OPENAI_API_KEY. The api_mode setting tells Hermes to use Chat Completions.

Troubleshooting

SymptomCauseFix
${AUTOHAND_API_KEY} appears in errorsThe variable is not set, so Hermes keeps the placeholder.Run hermes config set AUTOHAND_API_KEY again.
Subagents use a different providerThe delegation block has no base_url or api_key.Add both keys as shown in the subagent section.
401 with Credential not recognisedThe key is wrong, revoked, or not set in the environment the agent reads.Create a new key in Console, set AUTOHAND_API_KEY again, and open a new terminal.
401 with Missing Autohand credentialThe request reached Autohand without an Authorization header.Check that the agent reads the variable name shown in this guide.
Model not foundThe model ID is misspelled, or your plan does not include it.Use fantail or moa in lowercase. Moa requires the Pro plan or above.
Context or output limit errorsThe agent uses default limits for a model it does not recognize.Set the limits for Fantail (262,144 context, 16,000 output) or Moa (1,048,576 context, 262,144 output).

Next steps

Common questions

Hermes Agent and Autohand FAQ

Which provider do I choose in Hermes for Autohand?

Use provider: custom with base_url: https://api.autohand.ai/v1.

Where does Hermes store my Autohand key?

In ~/.hermes/.env. Save it with hermes config set AUTOHAND_API_KEY.

How do I run Hermes subagents on Fantail?

Add a delegation block with model: fantail, the Autohand base URL, and api_key: ${AUTOHAND_API_KEY}.