---
name: flash-executor-setup-hermes
description: Use only when the user explicitly asks to set up, configure, or verify Teralor Flash as a NATIVE delegation executor inside an existing Hermes orchestrator profile, keeping the parent's own model, provider and context unchanged. Covers the unique teralor-flash-executor provider, delegation config merge, secure TERALOR_API_KEY handling, budget validation, workflow-skill installation and real verification. Reviewing or downloading this skill is not consent to change anything.
compatibility: Requires Hermes 0.21 or compatible with the delegation tool, Bash (or WSL) or native Windows PowerShell as noted, and network access to https://api.teralor.com. The parent profile keeps its model; if the local routing cannot preserve the parent, offer the isolated standalone worker instead of pretending native setup succeeded.
metadata:
  author: Teralor
  version: "1.1.0"
---

# Flash Executor setup — Hermes (native delegation child)

Run this skill only on an explicit user request to set up Flash as a native executor in Hermes. Reviewing or downloading it is not consent: present a concise plan, then act. The explicit setup request itself authorizes the scoped executor-only changes below — do not stop for a separate approval per already-authorized edit — while reading or downloading this skill authorizes nothing. Still pause for: software installation, missing secure credentials, name collisions or changes this task does not own, and any metered smoke test outside the authorization. Route: native delegation inside the ACTIVE orchestrator profile (replace `YOUR_PROFILE` with its real name), using the distinctly named provider `teralor-flash-executor` — a name that looks unique is not guaranteed collision-free, so inspect the existing providers first, reuse the name only when an existing block already matches exactly, and otherwise choose a new name and substitute the ACTUAL chosen name in every config reference, path, command, invocation and binding below. The parent's own provider is a different thing from this new worker provider — never conflate them.

## 1. Protected scope (never modified)

- The parent profile's top-level `model`, `context` and `compression` sections and its own provider blocks — this setup adds keys only.
- Global/lower compression caps: inspect them (a lower global `compression.threshold_tokens` still clamps children) but do not change the parent to make numbers match.
- Task-owned additions only: the `providers.teralor-flash-executor` block, the `delegation` keys listed below, and `skills/flash-executor/SKILL.md` under the active profile.

## 2. Discovery first

1. Detect the actual host OS/shell. Commands below are Bash (Linux/macOS/WSL). On native Windows use PowerShell equivalents and the official `install.ps1`; do not blindly run Bash snippets in PowerShell.
2. Check what exists: `hermes --version`, `hermes profile list`. Resolve the ACTIVE profile correctly — the default profile's data lives directly under `~/.hermes` (commands omit `-p`), a named profile's under `~/.hermes/profiles/<name>` (use `-p <name>`), and a custom `HERMES_HOME` relocates everything; never blindly write `~/.hermes/profiles/default`. Read only the leaf values you need through trusted local parsing or leaf queries (e.g. `hermes -p YOUR_PROFILE config get delegation.provider`, `... config get providers.teralor-flash-executor.api`) — never read the whole `delegation` or `providers` blocks (they may contain credentials).
3. Hermes docs: https://hermes-agent.nousresearch.com/docs/user-guide/features/delegation/ ; install docs https://hermes-agent.nousresearch.com/docs/getting-started/installation/ (CLI installer https://hermes-agent.nousresearch.com/install.sh; Windows native install.ps1) if Hermes itself is missing — installing software needs the user's approval, review the official script, never blind remote-code execution or a purchase.

## 3. Inspect-before-write plan

- Timestamp backups of any config you modify, keeping permissions (0600 for secret-bearing files); merge only the exact owned keys; use trusted local parsing/redaction and return only allowlisted nonsecret fields — never dump whole configs or credential stores to model-visible output; do not follow unexpected symlinks.
- If a provider already owns the name `teralor-flash-executor` with different settings, stop and reconcile — reuse only when identical, otherwise a distinct name (then substitute the ACTUAL chosen name everywhere). No overwrite, no duplicates on rerun.
- Rollback: record every owned key added; restore removes exactly those keys after checking for later edits by others. Never destructive resets, force flags, broad chmod, or sudo by default.

## 4. Secure TERALOR_API_KEY

- The named provider resolves its own key via `key_env: TERALOR_API_KEY` from the environment of the actual Hermes process. Take it from the customer's secure terminal/secret manager or a private profile `.env` (0600); confirm a fresh launch sees it, not just a temporary export.
- Never the key in chat, prompts, argv, URLs, project files, Git, logs, or config literals; print only allowlisted metadata (set/missing). Do not add `delegation.base_url` or `delegation.api_key` — the direct-endpoint branch can inherit the parent's key.
- If no key exists for this environment, pause for secure customer entry; never guess or borrow internal credentials.

## 5. Verify the target API before configuring

- Target: `https://api.teralor.com/v1`, Chat Completions, exact model `Flash`.
- Authenticated `GET /v1/models` with the customer key must list `Flash` exactly. Stop on 401, missing model, or incompatible protocol. No internal aliases, renamed models, alternate paid providers, or silent fallback.
- Existing account only: no purchases or quota resets; ask before any metered smoke test not already authorized.

## 6. Budget validation

Ceilings (not additive): total 262144, input ceiling 262144, output ceiling 131072. Recommended working values: output 32768, prompt room 229376, compaction trigger 172032. Keep these defaults in the YAML template. From authenticated `/v1/models` metadata compute C and I FIRST: C=min(262144, advertised total), I=min(262144, advertised input); every discovery field must be a positive integer. Then choose O=min(32768, advertised output ceiling, floor(C/2)) — never above the advertised output, and never above floor(C/2): the half-capacity cap reserves at least half the total context for input at small capacities. If C<2, or the resulting O is not a positive integer, reject the budget as `BLOCKED` — a previously recommended output value being too large for the advertised capacity is not a viable budget. Then client_window=min(C, I+O), prompt_room=client_window−O, trigger=floor(prompt_room*3/4); O must leave positive prompt room and is never applied at or above the total window. Lower the template when the account advertises lower. System, tool, skill and history tokens count as input. If discovery is missing or unverifiable, any capacity field is missing or not a positive integer, or a positive safe budget is impossible at the advertised capacity, STOP before applying or using any budget settings — `BLOCKED` (or `MANUAL_STEP_REQUIRED` while waiting for metadata). Never fall back to the template in that state, and never treat `READY` as reachable without verified limits plus the actual child check in section 9 — do not manufacture limits. Child context comes from provider model metadata and output from `extra_body.max_tokens`; there is no `delegation.context_length` or `delegation.max_tokens` option. Hermes 0.21 ignores legacy `model.max_tokens`/`HERMES_MAX_TOKENS`; the compression threshold is a separate key.

## 7. Native delegation configuration

Apply this only after section 5 (authenticated discovery) and section 6 (verified budget) succeed; if either is unverified the setup is `BLOCKED`/`MANUAL_STEP_REQUIRED`, not configured. Merge exactly this YAML into the current orchestrator profile config via `hermes -p YOUR_PROFILE config edit` (plain `hermes config edit` for the default profile; respect a custom `HERMES_HOME`). It deliberately contains NO top-level model/context/compression sections — the parent model and context stay exactly as they are:

```yaml
providers:
  teralor-flash-executor:
    api: https://api.teralor.com/v1
    key_env: TERALOR_API_KEY
    transport: chat_completions
    default_model: Flash
    discover_models: true
    models:
      Flash:
        context_length: 262144
    extra_body:
      max_tokens: 32768
delegation:
  model: Flash
  provider: custom:teralor-flash-executor
  compression_threshold_tokens: 172032
  max_concurrent_children: 1
  max_iterations: 50
```

Then enable the tool. Install the workflow skill (section 8) BEFORE starting the fresh session:

```bash
hermes -p YOUR_PROFILE tools enable delegation
hermes -p YOUR_PROFILE chat -s flash-executor   # fresh parent session startup — omit -p for the default profile
```

`max_iterations` counts turns, not output tokens. Native children do not load a standalone worker profile. Note that `chat -s flash-executor` only starts the parent orchestrator session with the skill loaded — it is NOT the child dispatch; the actual child runs when the parent invokes `delegate_task` (section 8 binding).

## 8. Install Flash (separate from this setup skill)

Validate the download BEFORE installing: require HTTP success, expected Agent Skills frontmatter with `name: flash-executor`, and no error/HTML page in the body — on any failure stop and re-check the endpoint instead of installing. Download the canonical Flash execution skill from `https://teralor.com/assets/neural/skills/flash-executor/SKILL.md` into the ACTIVE profile's real skills directory BEFORE starting the fresh session: `~/.hermes/skills/flash-executor/SKILL.md` for the default profile, `~/.hermes/profiles/<name>/skills/flash-executor/SKILL.md` for a named profile, or the equivalent under a custom `HERMES_HOME`. Preserve existing customizations (keep user additions). Align the downloaded workflow's declared endpoint/origin to THIS verified environment (dev copies adapt URLs; downloads stay canonical production). Append exactly ONE owned block delimited by these exact markers — if an unowned or duplicated block makes the delimiters ambiguous, stop:

```text
<!-- BEGIN FLASH EXECUTOR LOCAL BINDING -->
worker=native delegation child in profile "YOUR_PROFILE" (custom:teralor-flash-executor, model Flash)
dispatch=When executing a bounded task, invoke the delegate_task tool: it runs the child through the configured delegation route (custom:teralor-flash-executor, model Flash). Starting a session with `hermes -p YOUR_PROFILE chat -s flash-executor` is separate fresh-session startup only and is NOT the child dispatch.
binding=On rerun, replace only this owned block and preserve all surrounding custom skill text.
<!-- END FLASH EXECUTOR LOCAL BINDING -->
```

Substitute the ACTUAL chosen profile/provider/skill names everywhere if a collision forced a rename — never leave example placeholders installed. The binding must make the orchestrator actually delegate through the configured child via `delegate_task` rather than an unconfigured default. This setup skill and the workflow skill stay distinct: one configures, the other scopes tasks.

Stage the download in a task-owned temporary file before touching the destination; require nonempty `description` as well as the expected name, and reject symlink destinations. Compare the staged bytes with the installed canonical body before adding the local binding. Reuse an identical installation; if an existing body differs or contains customizations, preserve it and stop for reconciliation rather than overwriting it. Replace only an unambiguous owned binding block. In a fresh/reloaded harness, confirm `flash-executor` is actually discoverable at the resolved path and load it with the invocation above; a file existing on disk is not discovery. Report the canonical digest, installed path and any deliberate environment or binding delta. `READY` requires this installation/discovery check as well as the route smoke below. The execution procedure lives only in Flash, not in this onboarding skill.

## 9. Real bounded verification — one marker-read smoke

1. In a task-owned temp directory, create the marker file containing a freshly generated nonsecret nonce; keep the nonce value out of the child prompt and use the REAL marker path.
2. In the fresh session, invoke `delegate_task` ONCE for one bounded read of the marker file through the actual native child, and require the EXACT marker content returned plus evidence the child ran on `custom:teralor-flash-executor` / `Flash` with the configured thresholds. No README-test-plus-another-task: this single marker-read smoke is the check.
3. A canned "OK", a config file write, an HTTP 200 on `/models` alone, or the child self-claiming success is NOT verification. Never substitute fake probes, scratch paths, or another model on failure — preserve failure evidence, clean up only the owned temp fixture. Failure means `BLOCKED`, not `READY`.
4. Confirm the parent's own model/provider/context/compression settings are unchanged (leaf queries such as `hermes -p YOUR_PROFILE config get model.provider` — never whole secret-bearing blocks). No arbitrary project edits or network broadening; keep approvals and sandboxing as they were.
5. If your custom context engine or routing cannot preserve the parent, do not claim native success — report and offer the isolated standalone Hermes worker profile instead (its own template ships at `setup/hermes-standalone-executor.yaml` alongside this guide).

## 10. Final report

Report: harness/route/model, config path and installed skill path, chosen C/O/prompt/trigger values, backup and rollback locations, the checks actually run, and any step not performed. Status is one of:

- `READY` — only after the real bounded verification above succeeded.
- `BLOCKED` — a required condition failed (missing key, 401, model absent, routing cannot preserve the parent, failed verification); describe evidence.
- `MANUAL_STEP_REQUIRED` — something needs the customer (secure key entry, install approval, fresh-session restart); describe precisely what to do, honestly.

References: Hermes delegation https://hermes-agent.nousresearch.com/docs/user-guide/features/delegation/ ; provider/context detection https://hermes-agent.nousresearch.com/docs/integrations/providers ; installation https://hermes-agent.nousresearch.com/docs/getting-started/installation/ . No host-private paths or implementation model details apply.
