Skip to main content
All configuration lives on one frozen HarnessConfig object. Build it from the environment (every knob has a HARNESS_* variable) with explicit overrides winning:
from pandaprobe_harness import HarnessConfig

config = HarnessConfig.from_env(capture_eval_cases=True)   # env + overrides
harness = Harness.create(config)
Three fields have no environment variable and are set programmatically only: thresholds (a per-metric threshold map), signal_weights (forwarded to the platform’s signal aggregation), and session_metrics (the metric set to evaluate). Derived workspace paths (mailbox/, journal.jsonl, …) are computed from HARNESS_ROOT and cannot be overridden individually.

Workspace & CLI

VariableDefaultMeaning
HARNESS_ROOT/harnessWorkspace root (mailbox, journal, rules, traces, eval set, state).
HARNESS_CLI_BINARYpandaprobeThe CLI binary — every platform call goes through it.
HARNESS_CLI_TIMEOUT_S30Per-invocation subprocess timeout.

Evaluation & polling

VariableDefaultMeaning
HARNESS_POLL_INTERVAL_S1.0Delay between eval-run score polls.
HARNESS_POLL_MAX_ATTEMPTS20Poll budget per run.
HARNESS_EVAL_RETRY_ATTEMPTS3Retries for transiently unscoreable sessions (trace-ingestion lag).
HARNESS_EVAL_RETRY_BACKOFF_S1.0Linear backoff base between retries.
HARNESS_DRAIN_TIMEOUT_S15Budget for refresh / refresh_all / drain_validation joins.
HARNESS_EVAL_RELIABILITYtrueEvaluate agent_reliability.
HARNESS_EVAL_CONSISTENCYtrueEvaluate agent_consistency.

Thresholds & detection

VariableDefaultMeaning
HARNESS_RELIABILITY_THRESHOLD0.5Absolute breach floor for agent_reliability.
HARNESS_CONSISTENCY_THRESHOLD0.5Absolute breach floor for agent_consistency.
HARNESS_ENABLE_TRENDtrueDual-EWMA trend detection.
HARNESS_EWMA_FAST_SPAN3Fast EWMA span.
HARNESS_EWMA_SLOW_SPAN10Slow EWMA span.
HARNESS_TREND_MARGIN_CROSS0.05Fast-below-slow margin that flags a decline.
HARNESS_TREND_MIN_SAMPLES4Samples required before trend verdicts.
HARNESS_ADAPTIVE_THRESHOLDfalseRelative-drop detector (vs. the session’s own baseline).
HARNESS_ADAPTIVE_MARGIN_DROP0.15Drop below baseline that counts as a relative breach.
HARNESS_PERCENTILE_WINDOW0Percentile-corroborator window (0 = off).
HARNESS_PERCENTILE_FLOOR0.25Low-tail quantile for the corroborator.

Noticing

VariableDefaultMeaning
HARNESS_ALERT_COOLDOWN_TURNS0Re-notice cooldown for persisting conditions (0 = only on new conditions).
HARNESS_ENRICH_FLAGGED_TRACESfalseFetch the worst flagged trace’s TOOL spans into the notice dump.
HARNESS_OBSERVE_ONLYfalseShadow mode: evaluate + journal, never post notices.
HARNESS_CIRCUIT_BREAKER_MAX_NOTICES5Notices per window before escalating to needs_human (0 = off).
HARNESS_CIRCUIT_BREAKER_WINDOW_S600The breaker window.

Cost & sampling

VariableDefaultMeaning
HARNESS_EVAL_SAMPLE_EVERY1Evaluate every Nth turn per session.
HARNESS_SESSION_MIN_EVAL_INTERVAL_S0Per-session rate limit between eval launches.
HARNESS_MAX_CONCURRENT_EVALS4Global concurrency cap across sessions.
HARNESS_MAX_EVALS_PER_RUN0Hard per-process eval budget (0 = unlimited).

Rules & retrieval

VariableDefaultMeaning
HARNESS_MAX_ACTIVE_RULES50Live-rule cap, active + candidate (the agent must retire to add).
HARNESS_SANITIZE_MAX_LEN2000Length cap in the sanitization trust boundary.
HARNESS_RULE_RETRIEVALtrueTask-conditioned rule injection (false = render every active rule).
HARNESS_RULES_CONTEXT_TOPK8Tagged rules kept in the context per query.

Validation & the closed loop

VariableDefaultMeaning
HARNESS_RULE_VALIDATIONtrueCandidate lifecycle: promote only on evidence (false = add → active, pre-v0.6).
HARNESS_RULE_TRIAL_MIN_SESSIONS5Forward trial: distinct sessions observed before a verdict.
HARNESS_RULE_PROMOTE_MARGIN0.05Minimum targeted-metric improvement to promote.
HARNESS_RULE_REGRESS_MARGIN0.05Maximum tolerated drop before a case counts as regressed.
HARNESS_REPLAY_TIMEOUT_S300Hard bound per replay invocation (hung replays degrade, never wedge).
HARNESS_CAPTURE_EVAL_CASESfalseCapture breaching sessions as replayable eval cases.
HARNESS_EVAL_CASE_MAX200Eval-set cap; oldest failures evict first, wins never.
HARNESS_REGRESSION_SAMPLE0Cases replayed per regression run (0 = all).

Robustness & scale

VariableDefaultMeaning
HARNESS_HEALTH_CHECKtrueStartup CLI/auth verification (degrades gracefully on failure).
HARNESS_HYDRATE_HISTORY_FROM_BACKENDfalseSeed trend history from the backend once per session (for horizontally-scaled agents).

Platform credentials

The pandaprobe subprocess inherits your environment, so the standard SDK/CLI variables apply unchanged: PANDAPROBE_API_KEY, PANDAPROBE_PROJECT_NAME, and PANDAPROBE_ENDPOINT for self-hosting. The harness itself never reads them — authentication is entirely the CLI’s concern.