Fabryka · Guides · 001Hermes + Auto RouterUpdated 29 Aug 2026
From endpoint to background agent

Build a Hermes agent
with Fabryka.

Install Hermes Agent, connect the Fabryka Auto Router through one OpenAI-compatible endpoint, enable only the tools you need, and run scheduled work in the background.

§ 01 · Fastest path

Ask your coding agent to configure it.

Copy this prompt into your coding agent from the root of the project you want to connect.

AI AGENT PROMPT
Configure this machine to run Hermes Agent with Fabryka AI as its OpenAI-compatible model provider.

Use:
- Base URL: https://fabryka.ai/v1
- Model: auto
- API key environment variable: FABRYKA_API_KEY

Install Hermes only from its official repository. Ask me for the API key without printing it. Store it in the Hermes environment file with mode 600. Configure streaming and preserve OpenAI-format tool calls. Enable only the minimum toolsets required. Install the background gateway, run one harmless tool-call test, and show me the selected model, resulting service status, and changed files. Do not expose the gateway publicly.
§ 02 · Requirements

What you need.

  • Linux or macOS with Python and terminal access.
  • A Fabryka key generated on the homepage.
  • A persistent host if the gateway and scheduled tasks must run continuously.

You do not need a local GPU. Inference runs behind https://fabryka.ai/v1.

§ 03 · Install

Install Hermes Agent.

SHELL
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
hermes --version

Review remote installation scripts before executing them, especially on a shared or production host.

§ 04 · Provider configuration

Connect Fabryka.

Run hermes model and select a custom OpenAI-compatible endpoint, or add the provider values to the Hermes environment and configuration files.

ENVIRONMENT
FABRYKA_API_KEY=your_key_here
OPENAI_API_KEY=your_key_here
OPENAI_BASE_URL=https://fabryka.ai/v1
MODEL
model:
  default: auto
  provider: custom
  base_url: https://fabryka.ai/v1
chmod 600 ~/.hermes/.env
§ 05 · Verification

Test the endpoint first.

CURL
curl https://fabryka.ai/v1/chat/completions \
  -H "Authorization: Bearer $FABRYKA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"auto","messages":[{"role":"user","content":"Reply with: connected"}],"stream":true}'

The response header X-Fabryka-Selected-Model and each completion's model field report the model actually used.

§ 06 · Tools

Enable tool calling deliberately.

With model: auto, tool requests are routed to Qwen. The OpenAI tool contract supports tools, tool_choice, assistant tool_calls, and results using role: tool. Hermes executes the selected tool on your host; the model only chooses the function and arguments. Pin qwen3.8-27b only when deterministic Qwen selection matters.

hermes tools
§ 07 · Background work

Install the gateway.

SHELL
hermes gateway install
hermes gateway status
hermes cron status

Keep terminal-capable gateways private or loopback-bound. Use an authenticated tunnel for remote access.

§ 08 · Diagnostics

Common failures.

Signal Meaning Action
401 Missing or invalid Bearer token Check the environment file and active service environment.
402 Available credit exhausted Open the dashboard and inspect account usage.
429 Rate or demo limit Back off and retry within a bounded policy.
503 No compatible route or selected model unavailable Retry within a controlled policy or pin another published model.
No tool call Toolset disabled or malformed tool schema Confirm model: auto, validate the OpenAI tool schema, and run hermes tools.