Skip to content

Reference

Versions

Verified against the Monocle source. OKAHU_MAX_FACTS and the setup_test_cases discovery window arrived in 0.8.15 (the current release). The three scenario-test variables (marked † below) ship with scenario testing, which is on Monocle main and not yet in a published release — see Create test scenarios. The lg-simple-agent example pins 0.8.9; run pip install -U monocle_apptrace monocle_test_tools for the released features.

Environment variables

Variable Used by Purpose
OKAHU_API_KEY Monocle, test tools, skills Okahu credential
MONOCLE_EXPORTER Monocle Where traces go: okahu, console, otlp, … (comma-separated)
MONOCLE_WORKFLOW_NAME Monocle (zero-code) Workflow name
MONOCLE_TEST_WORKFLOW_NAME Test tools Workflow name on test traces (default: git repo name)
MONOCLE_EXPORT_FAILED_TESTS_ONLY Test tools Export only failing tests' traces
MONOCLE_TEST_AGENT_MODEL † Scenario tests Model that plays the user, e.g. openai:gpt-4.1-mini. Required (no default — raises if unset)
MONOCLE_TEST_JUDGE_MODEL † Scenario tests Model that judges each reply (default: same as MONOCLE_TEST_AGENT_MODEL)
MONOCLE_TRACE_TEST_AGENT † Scenario tests Also trace the simulated user and judge (default false)
MONOCLE_EVAL_MATRIX Test tools Write a per-test eval results file
OKAHU_MAX_FACTS Test tools Max facts a setup_test_cases discovery window may hold before it refuses. Precedence: max_facts argument → this → 1000 (since 0.8.15)

† Scenario testing is on Monocle main, not yet in a published release. | Provider keys (OPENAI_API_KEY, …) | Scenario tests | For the models named above |

API quick reference

Auth on every call: x-api-key: okh_...

Purpose Method and path
List evals GET https://eval.okahu.co/api/v1/eval/templates (add ?kind=custom for your own)
Save or version a custom eval POST / PUT https://eval.okahu.co/api/v1/eval/templates[/{id}]
Run an eval POST https://eval.okahu.co/api/v1/eval/jobs?workflow_name=…&fact_name=…&(trace_id=… \| start_time=…&end_time=…)
Eval job status GET https://eval.okahu.co/api/v1/eval/jobs/{job_id}/status
Record a label POST https://eval.okahu.co/api/v1/eval/label?trace_id=…&fact_name=…&workflow_name=…
Train an eval from labels POST https://eval.okahu.co/api/v1/eval/training/jobs?… then GET …/training/jobs/{job_id}
Eval results report POST https://api.okahu.co/api/v1/workflows/{name}/evals/report
SLAs PUT https://api.okahu.co/api/v1/apps/{app}
Measures GET https://api.okahu.co/api/v1/insights/apps/{app}/facts/{fact}
Error groups GET https://ml-analysis.okahu.co/api/v1/insights/apps/{app}/error_groups
Schedules POST / GET https://api.okahu.co/api/v1/schedules
Usage POST https://api.okahu.co/api/v1/usage/query
MCP server https://mcp.okahu.co/mcp