Expand description
Mira Subject adapter for everruns-runtime.
RuntimeSubject drives a real InProcessRuntime session for each sample —
the in-process path to evaluating everruns-based agents (the canonical
migration target for everruns’ llm-tests and the everruns coding CLI).
Mira’s core stays provider-agnostic: a Target carries only
(provider, model) labels. The embedder owns runtime/driver/tool wiring
via a RuntimeFactory closure that maps a Target onto a built runtime
and the session to drive. This crate just normalizes the runtime’s
TurnResult and Event stream into a Mira Transcript, so every Mira
scorer and report works unchanged.
use std::sync::Arc;
use mira::{Eval, scorer::contains};
use mira_everruns::RuntimeSubject;
// The embedder builds a runtime for each matrix case (provider/model from
// the Target) and returns it with the session id to drive.
let subject = RuntimeSubject::new(|model| Box::pin(async move {
// ... construct an InProcessRuntime registering a driver for
// `target.provider` / `target.model`, then return (runtime, session_id).
}));
let _eval = Eval::new("greet")
.sample("hi", "Say hi and tell me the answer.")
.subject(subject)
.scorer(contains("42"));See mira_everruns::target_to_resolved for mapping a Target onto an
everruns ResolvedModel inside your factory.
Structs§
- Runtime
Subject - Drives a real
everruns-runtimesession: sends each input turn, then normalizesTurnResult+ the event stream into a MiraTranscript.
Functions§
- atif_
from_ events - Fold a typed everruns
Eventstream into an ATIFTrajectory— one agent step per reasoning iteration (reason.startedopens a step; thinking, the iteration’s tool calls, their observations, and the final assistant message attach to it). - classify_
runtime_ error - Classify a runtime/provider error string as infrastructure vs. subject.
- target_
to_ resolved - Map a Mira
Targetonto an everrunsResolvedModel. A convenience for factory authors; reads the provider’s API key from the conventional env var. Unknown providers default toDriverId::LlmSim(offline).
Type Aliases§
- Runtime
Factory - Builds a fresh runtime for a given matrix case. The embedder owns platform/capability/tool/driver wiring here — Mira stays agnostic to it.
- Runtime
Handle - A built runtime plus the session to drive for one matrix case.