> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nika.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Nika × Hermes

> Hermes orchestrates. Nika captures the repeatable work as a checkable file and runs it with receipts — budget-capped, trace-verified.

[Hermes](https://github.com/NousResearch/hermes-agent) is the always-on
orchestrator whose community pattern is delegation: Hermes plans and
coordinates, then hands work to specialist CLIs. Nika slots into exactly
that pattern as **the deterministic workflow worker** — not another coding
agent (that's OpenCode's seat), but the runner for work that should be
*repeatable, budgeted and auditable*.

> **Hermes orchestrates · Nika runs the plan with receipts.**

## Install the skill (day 1 — no catalog wait)

The Nika delegation skill lives in the public marketplace repo and installs
three ways:

```sh theme={"system"}
# as a tap (Hermes scans skills/ by default)
hermes skills tap add supernovae-st/nika-plugins
hermes skills install nika

# or single-file from the raw URL
hermes skills install https://raw.githubusercontent.com/supernovae-st/nika-plugins/main/skills/autonomous-ai-agents/nika/SKILL.md

# or via the skills.sh CLI
npx skills add supernovae-st/nika-plugins
```

New skills take effect next session (or `--now`). The skill teaches the
delegation idiom end-to-end: scaffold via `terminal()`, the
check-before-run law, budget caps on paid models, background+poll for long
runs, and the receipts loop (`nika trace show` · `nika trace verify`).

## Wire the oracle (optional, recommended)

For schema/validation answers without shell round-trips, `nika wire hermes`
(0.99+) writes the oracle into `~/.hermes/config.yaml` for you — or add it
by hand, then `/reload-mcp`:

```yaml theme={"system"}
mcp_servers:
  nika:
    command: nika
    args: [mcp]
    timeout: 120
```

Validation and learning only — running workflows stays on the terminal,
where the budget flags and traces live
([the oracle's contract](https://docs.nika.sh/reference/mcp-server.md)).

## Prove the delegation

In a Hermes session:

> Use the nika skill: smoke-test my nika install offline, then write
> hello.nika with `nika compile hello`, check it, and run it with the
> mock model. Report the trace verify verdict.

Expected: `nika --version` → `nika compile hello hello.nika`
(offline, zero keys, explicit destination) → `nika check --json` →
mock run → `nika trace verify` exit 0 (bare, it reads the workspace's
latest trace; pass the path from the run card's `trace:` line to pick
another). `nika compile chain` stays incomplete until its questions are
answered; it does not write a substitute file.

## The two clocks

Hermes runs live — its terminal is a pipe, and a long `nika run` renders
quietly until the final card. The skill teaches the fix: launch with
`background=true`, poll with `process(action="poll")`, then read
`nika trace show <trace>` for the run card.

## Cost honesty in delegation

* Always pass `--max-cost-usd` on paid cloud models. Since 0.99 the
  pre-start floor prices the **effective** model (`--model` override
  included): a workflow that prices above the budget **refuses to start**
  (exit 2, zero tokens). Mid-run, the ledger stops the moment real spend
  crosses — the crossing call completes, nothing new starts, the run fails
  `NIKA-1704` (exit 1) with spent-vs-budget.
* Prefer local models for drafts (`ollama/…`) — no key, no meter.
* A cloud model the catalog **cannot price** (uncataloged, or listed
  without a price) has no meter the cap can bound: the run refuses before
  any call, with or without `--max-cost-usd` (exit 3, `price unknown: …`,
  no `NIKA-` code), unless you confirm a one-time cost review in an
  interactive local `nika run`. Local and mock models stay admitted
  ([cost honesty](https://docs.nika.sh/guides/cost-honesty.md)).

## Field notes (verified on hermes v0.18.2)

Four traps from a real 10-step end-to-end, so you don't pay for them twice:

* **A 401 naming openrouter you never chose.** Hermes's provider
  auto-detect sees `OPENAI_API_KEY` in your shell and routes to OpenRouter
  — the first chat dies with `HTTP 401: Missing Authentication header`
  against `openrouter.ai`. Fix: set `provider:` explicitly in the config
  (`ollama` for local, or your actual vendor).
* **`~/.hermes/config.yaml` IS the live config.** Its header comment says
  "copy this file to cli-config.yaml" — that applies to the hooks layer,
  not the main config. Edit `config.yaml` itself; `mcp_servers:` blocks
  there load on the next session.
* **Trust the log, not the model's word.** The deterministic proof the
  oracle is wired is `~/.hermes/logs/agent.log`:
  `MCP server 'nika' (stdio): registered 9 tool(s)`. In-session the tools
  appear namespaced as `mcp__nika__nika_check`, so a prompt naming a bare
  tool verbatim can miss. Small local models can go further and *narrate* a
  delegation they never executed — receipts come from the terminal
  (`nika trace verify`), never from prose. Drive the delegation loop with a
  capable model.
* **Pass `workdir` on every terminal call.** The skill teaches it; a driver
  that skips it runs the workflow from Hermes's own cwd and relative reads
  fail (`NIKA-BUILTIN-READ-001` on a file that exists in your project).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.