Skip to content

Reference harness profile (agent-chat + meta-harness + LongMemEval)

This is the single stack to use when you want comparable regression numbers across machines and models. Change these env vars and you are not doing an apples-to-apples run.

Two gates (do not conflate them)

GateWhat it measuresPrimary commands / surfaces
Meta-harnessWorker stream health — NDJSON from POST /api/agent-chat-reply/stream: phases, runtime / runtime_raw (CompletionEvent-shaped tool telemetry), done with reply + finalized, errors, composite scorescripts/company-os-agent-chat-meta-harness-smoke.sh, scripts/meta-harness/evaluate_turn.py, scripts/meta-harness/meta_harness.py
LongMemEvalMemory QA accuracy — oracle match / temporal reasoning vs haystack JSONcargo run --bin hsm-longmemeval …, cargo run --bin hsm-longmemeval-agent-chat … (Rust API parity flags); optional hsm-eval / HsmRunner tuning

High meta-harness scores usually require forceWorkerDispatch so turns hit operator-chat → execute-worker (tool counts + runtime lines). LongMemEval cares about answers, not NDJSON tool density.

Locked URLs (defaults)

EnvDefaultMeaning
NEXT_URLhttp://127.0.0.1:3050Company Console (Next) — meta-harness reads this
HSM_URL / HSM_CONSOLE_URLhttp://127.0.0.1:3847Company OS (hsm_console)
HSM_COMPANY_CONSOLE_URLsame ideaNext origin for services/agent-chat-harness HTTP driver

Meta-harness Python defaults align with evaluate_turn.py (NEXT_URL, HSM_URL).

Operator chat / LLM (Next server-side)

Set these on the Company Console process (the Next app), not only in the shell running smoke tests:

EnvRole
OPENROUTER_API_KEYConversational path + many smoke configs
HSM_OPENROUTER_API_KEYAlternate name picked up by Next
OPENROUTER_API_BASEOptional override
HSM_AGENT_CHAT_MODEL / DEFAULT_LLM_MODELChat model id (e.g. Opus-class routing via OpenRouter id)
HSM_AGENT_CHAT_PROVIDERopenrouter vs ollama

Meta-harness worker routing

EnvDefaultRole
HSM_META_HARNESS_FORCE_WORKER1 (on)Adds forceWorkerDispatch: true in evaluate_turn.py so streams include runtime tool telemetry

Set to 0 only when intentionally testing OpenRouter-only conversational turns (different score shape).

Optional production temporal path (Console only)

These apply to web/company-console conversational LLM — not services/claude-harness:

EnvRole
HSM_AGENT_CHAT_TEMPORAL_TWO_PASS1 = timeline extract → answer for temporal-looking questions
HSM_AGENT_CHAT_TEMPORAL_VERIFY1 = third pass SUPPORTED/UNSUPPORTED vs thread corpus
HSM_AGENT_CHAT_TEMPORAL_MIN_CORPUS_CHARSMinimum thread size before two-pass (default 280)

Claude harness vs agent-chat (explicit split)

SurfaceRole
services/claude-harnessRuns Claude Code CLI → CompletionEvent NDJSON; session files under HSM_CLAUDE_HARNESS_SESSION_DIR. Does not implement Console temporal two-pass.
POST /api/agent-chat-reply/streamOperator chat — worker + OpenRouter/Ollama + optional temporal passes. This is what meta-harness drives for Company OS scoring.
services/agent-chat-harnessThin HTTP driver on port 3849 → proxies /api/agent-chat-reply/stream and logs sessions. Automation only; quality = Next + Rust + model.

LongMemEval / temporal reasoning benchmarks line up with OpenRouter + task memory + prompts (and Rust hsm-longmemeval). Claude harness line up with tool telemetry + execution shape for meta-harness-style gates when execution backend is Claude — not the same code path as Console temporal env flags.

Regression smoke thresholds

Script: scripts/company-os-agent-chat-meta-harness-smoke.sh

EnvDefaultRole
MH_MIN_MEAN_SCORE0.6Mean composite score gate
MH_MIN_FINALIZE_RATE0.65Fraction of turns finalized — tolerate occasional flaky worker telemetry locally; raise toward 1.0 for strict CI

Suggested model matrix (document yours here)

Record what you actually run so “good score” is reproducible:

SlotExampleNotes
Primary regressionYour OpenRouter id for Opus-classPaste the exact HSM_AGENT_CHAT_MODEL string
Fast smokeCheap/free OpenRouter modelFor PRs
LocalOllama modelWhen HSM_AGENT_CHAT_PROVIDER=ollama

One-liner checks

bash
# Meta-harness paper smoke (Next + hsm_console + Python)
bash scripts/company-os-agent-chat-meta-harness-smoke.sh

# Endpoint gate (reply + stream)
bash scripts/agent-chat-endpoint-check.sh
  • docs/EVAL_AND_META_HARNESS.md — meta-harness vs eval binaries
  • services/claude-harness/README.md — Claude Code harness
  • services/agent-chat-harness/README.md — optional NDJSON driver

HSM-II documentation built with VitePress