ReadonlyrunnerStable, human-readable name for the runner. Must be set explicitly on each subclass so we don't break the logger and trace span names when minified.
ProtectedloggerProtectedexecutePrimary entry point for the runner. Subclass must implement this method to provide the
runner's logic. The optional ctx carries cross-cutting concerns (cancellation via
ctx.signal, request/user identity); simple runners may ignore it.
Optionalctx: RunnerContextProtectedrecordAdd a component's token usage to this run's total, surfaced as RunnerRun.usage. Call it for
every agent / prompt the runner invokes; anything not recorded is invisible to cost reporting.
Optionalctx: RunnerContextProtectedtraceOptional hook for subclasses to record the root LangSmith span's INPUTS — what was asked, rather than the metadata facets you filter runs by.
Returns {} by default, which is what every runner recorded before this hook existed: a root
span you had to open a child span to understand. Unlike traceMetadata this is the place free
text legitimately belongs, so only override it on surfaces where the payload is acceptable in
the trace, and keep it to what a human reading the run needs.
ProtectedtraceOptional hook for subclasses to attach non-PII metadata to the root LangSmith span.
Merged on top of the auto-extracted metadata and ctx.metadata
Safe by default: returns {} when not overridden.
Never include emails, names, dob, free-text, etc.
Pass/fail-only chart-review audit-question runner.
Two agent shapes answer the question. The default is one agent that gathers evidence and decides. With
enableSubClaimFanOutit becomes a GATHERER per decomposed sub-claim — each investigates its own claim and reports evidence, deciding nothing — and one JUDGE that reads their pooled evidence and writes the verdict. Both shapes return the same answer, so grading and post-processing do not change.execute()runs: validate -> prepareChartQuestion -> runAgentLoop -> gradeVerdict -> postProcess, short-circuiting to an abstention when the patient has no charts at all. The grade step (self-critique + verification/grounding gates) runs before the deterministic citation gate. Shaky verdicts are downgraded toneeds_reviewrather than shipping a confident wrong answer. The root trace, timing,Safe, andtraceUrlare owned byBaseRunner.run().