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: RunnerContextProtectedtraceThe message being answered, so a chat run is readable in LangSmith without drilling into a
child span. Matches what legacy chat already records (inputs: { question }). History is
counted, not included — the turns are visible on the agent span that replays them.
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.
Case-chat runner: answers one conversational message about a patient's chart using the V3 retrieval pipeline. Shares
prepareChartQuestionwith the audit-question runner, then diverges on output: no verdict, and every caveat in the assistant's own voice.