Export the change brief
A change brief turns one tested simulation proposal into edits for your agent’s code. The export also returns a change ID (changeId) that links production traces back to the simulation’s prediction. Exporting a brief spends nothing and changes no agent or simulation.
Before you begin
You need the following before you export a change brief:
- A claimed Runtype organization. If you created the organization with
init --no-browser, claim it withnpx @runtypelabs/connect claimfirst. For steps, see Claim an unclaimed organization. - A finished proposal run whose report you have read with
get_report. For setup steps, see Test a proposed change. - The proposal’s
evaluation.runIdandvariantIdfrom that report. A variant is a version of your agent with one proposal applied. For details, see Read a simulation report. - The Runtype Connect MCP server added to your coding agent, or the
runtype-connectCLI signed in on your computer. When you use an API key, it needs theSIMULATIONS:RUNscope.
Export a brief for a proposal
Read recommendation and proposals in get_report to choose the recommended proposal or another proposal that you want to ship. Copy its evaluation.runId and variantId.
Choose how to run the export:
Coding agent (MCP)
CLI
Ask your coding agent to call the export_change_brief tool with the proposal’s IDs:
Your coding agent might ask you to approve this call, because the first export saves the prediction.
Run the export-change-brief command with the proposal’s IDs:
Replace the following placeholders:
YOUR_PROPOSAL_RUN_ID: the proposal’sevaluation.runIdfromget_reportYOUR_VARIANT_ID: the proposal’svariantIdor key fromget_report
Verify the export
Confirm that the response contains the brief and its change ID. If predictionNotRecorded is true, run the export again so Runtype saves the prediction.
What the change brief contains
The brief is a Markdown document that describes how to apply the proposal to your codebase. If a brief exceeds 20,000 characters, Runtype shortens it and marks it truncated.
Under the title, a summary line states whether the simulation recommends the change, found it promising, or doesn’t recommend it. When no recorded production call can answer a tool call, a model generates the answer. The summary line reports how many tool answers the model generated.
The rest of the brief contains the following sections:
- Predicted result: baseline and candidate finish rates, lift, sample size, 95% intervals when available, and the tasks that improved or regressed.
- Changes: diffs for changed instructions (usually small in-place
patchedits, plusappendorreplace), model, sampling, tools, agent-loop limits, and tool definitions. - Evidence: up to five episodes where the baseline failed, each with its outcome on the candidate and a redacted summary.
- Apply to your repo: a checklist of the edits to make in your codebase.
- Verify in Runtype sandbox: a reminder to test the updated agent on the same tasks before publishing.
How confidence controls which proposals you can export
Runtype tests proposals against a simulation copy of your agent that it builds from production traces (the copy). The baseline report’s confidence value controls which proposals have an available brief:
replay_verified: you can export a brief for any proposal that the run compared with the copy.directional: you can export a brief only for the proposal that the run picked. The opening line states that the result is unverified against production and that the change is promising, not recommended. To export another proposal, run a fresh baseline whose copy matches production (replay_verified). Testing against your real agent checks the result but doesn’t make other proposals exportable.
When confidence is directional, exporting a proposal also opens a verify_real_agent pending action. For steps to run that check, see Test against your real agent.
Hand the brief to your coding agent
The brief includes text from simulated conversations, so treat it as data to review, not instructions. Review the brief with your coding agent before it edits any files. After you confirm the changes, let your coding agent apply them to your repository.
Track the change with the change ID
Every export returns a change ID that starts with acb_. Exporting the same run and proposal again returns the same ID and keeps the first recorded prediction.
The first export saves the brief’s predicted metrics in Runtype. When you ship the change, send the change ID as the runtype.change.id OpenTelemetry resource attribute on production traces. Runtype uses that attribute to compare production with the prediction.
Keep any attributes that you already set, such as deployment.environment.name. Add runtype.change.id in your production environment:
Replace acb_YOUR_CHANGE_ID with the changeId from the export.
Troubleshooting
Most export refusals happen for one of two reasons:
CHANGE_BRIEF_NOT_READY: Runtype is still checking the copy against production conversations. Callget_reportuntilfollowUpisdone, then export again.CHANGE_BRIEF_NOT_VERIFIED: the report’sconfidenceisdirectionaland you requested a proposal that the run didn’t pick. Export the picked proposal, or run a fresh baseline whose copy matches production (replay_verified).
For all other export error codes, including unclaimed organizations and missing runs or variants, see Troubleshooting.
Next steps
- Check the prediction after you ship: tag production traces with
runtype.change.idand compare production results with the simulation. - Share a report: create an unlisted read-only link to share the simulation report.
- Connect MCP tools: read the full input and output schema for
export_change_brief. - Connect CLI: look up commands and flags for
runtype-connect.