Skip to content

Follow and steer experiments

for await (const e of pensieve.experiments.list("grade-audit", { status: "running" })) {
console.log(e.id, e.idea, `${e.seeds_done}/${e.seeds_total} seeds`, e.gains);
}

Agents run experiments on their own, within the model’s budget. You can follow every one, and steer them with what your team knows.

Each experiment lists its runs: the prep step, A and B on every seed, and the last check. A training run shows its steps so far; a finished one shows its score on your test.

for await (const run of pensieve.experiments.runs.list("exp_0420")) {
console.log(run.kind, run.arm, run.seed, run.status, run.steps_done, run.steps_total, run.score);
}

To hear when one ends, subscribe a webhook to experiment.ended.

Your team knows things the data doesn’t say: a new kind of case coming next quarter, a signal nobody has used, a reason the experts disagree. Suggest it in a line. Name a method and a cost cap if you have a view: a built-in method, or one you wrote. The agents write the hypothesis, build B and run it like their own.

const e = await pensieve.experiments.start("grade-audit", {
idea: "When two reviewers disagree, train on the senior reviewer's grade",
method: "fine-tuning",
max_cost_usd: 80,
});

It is judged like any other: kept only if it wins on every seed and the last check.

await pensieve.experiments.stop("exp_0420"); // finished runs keep their results
await pensieve.models.update("grade-audit", { monthly_budget_usd: 2000 }); // raise or lower the cap
await pensieve.models.update("grade-audit", { experimenting: false }); // pause the agents

A model’s budget shows this month’s cap and what experiments have spent. When it runs out, agents hold their ideas for next month, and experiments.start is refused with conflict until you raise the cap. While experiments are paused, suggestions are refused the same way. Pausing stops new experiments; running ones finish their current runs. The live version keeps answering either way.