NousResearch/hermes-agent · error · SystemExit

OPENROUTER_API_KEY not in environment. Run: set -a; source ~

Error message

OPENROUTER_API_KEY not in environment. Run: set -a; source ~/.hermes/.env; set +a  — then relaunch.

What it means

Error "OPENROUTER_API_KEY not in environment. Run: set -a; source ~/.hermes/.env; set +a — then relaunch." thrown in NousResearch/hermes-agent.

Source

Thrown at evals/readtool/runner.py:163

    ap.add_argument("--model", required=True)
    ap.add_argument("--provider", required=True)
    ap.add_argument("--reps", type=int, default=3)
    ap.add_argument("--label", required=True, help="e.g. baseline, feat-fifo-guard")
    ap.add_argument("--tasks", default="", help="comma-separated task ids (default all)")
    ap.add_argument("--timeout-mult", type=float, default=1.0)
    ap.add_argument(
        "--toolsets",
        default="file,terminal,search",
        help=(
            "Comma-separated toolsets. Use 'file' alone for the "
            "discriminative arm (no terminal escape hatch — the read tool "
            "must handle the hostile file itself)."
        ),
    )
    args = ap.parse_args()

    if not os.environ.get("OPENROUTER_API_KEY"):
        raise SystemExit(
            "OPENROUTER_API_KEY not in environment. Run: set -a; "
            "source ~/.hermes/.env; set +a  — then relaunch."
        )

    slate = (
        [TASKS_BY_ID[t] for t in args.tasks.split(",") if t]
        if args.tasks
        else TASKS
    )
    slug = args.model.replace("/", "_")
    out_dir = EVAL_DIR / "results" / args.label / slug
    out_dir.mkdir(parents=True, exist_ok=True)

    for rep in range(1, args.reps + 1):
        rep_path = out_dir / f"rep{rep}.json"
        if rep_path.exists():
            print(f"rep{rep} exists, skipping")
            continue

View on GitHub (pinned to c896c09c42)

Solutions

  1. Export OPENROUTER_API_KEY (e.g. `set -a; source ~/.hermes/.env; set +a`) and relaunch the eval.

When it happens

Trigger: Thrown at evals/readtool/runner.py:163 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of NousResearch/hermes-agent@c896c09c42 (2026-08-14). Data as JSON: /api/errors/2521c3b3265c46d5. Report an issue: GitHub.