BLOGAUG 28, 2026 · UPDATED SEP 21, 2026 · 3 MIN READ

How to extract a reusable procedure from an agent trace

Keep useful steps, declare inputs, and test the contract

Extract a reusable agent procedure by reviewing trace evidence, choosing parameters, declaring dependencies, and testing failure cases. See a public Play structure.

Modiqo

Extract a reusable procedure by selecting the useful steps in a recorded run, exposing inputs, declaring dependencies, and checking the result. A successful transcript is evidence to review. It is not, by itself, a complete execution contract.

Rote by Modiqo turns successful AI agent work into reusable Plays. Inspect the steps, run them with new inputs, and share the method across supported agents.

Separate the original evidence from the reusable method

A trace records what happened with particular inputs and access. A Play specifies what another runner should execute. Preserve any checks and recovery needed for the result, even if their output does not appear in the final report.

Recorded evidenceReusable contract
The requested DNS nameA domain parameter
A chosen record typeA record_type parameter with supported values
Results from each resolverNamed steps and their dependencies
An unavailable resolverA qualified result or explicit failure path
The final comparisonRules for the verdict and its supporting evidence

This table explains the extraction decisions using the public DNS Play. It is an illustrative mapping to published step names, not a quotation of the author's original trace.

Inspect the structure that extraction produces

The published version declares these six steps:

text
validate_input
 discover_authoritative
 query_cloudflare
 query_google
 query_quad9
compute_verdict

This list names the steps; inspect the source for their dependency graph. The description says authoritative discovery and public-resolver probes run independently before the verdict joins their results.

Its four inputs are domain, record_type, expected, and resolvers. A runner can change the DNS question while keeping the procedure pinned:

bash
rote play inspect https://play.modiqo.ai/modiqo/[email protected]
rote play run https://play.modiqo.ai/modiqo/[email protected] domain=example.com record_type=A

Review five decisions before publishing

  1. Identify the steps needed for the result, validation, and expected recovery.
  2. Replace task-specific values with typed parameters and useful defaults.
  3. Declare which outputs later steps consume.
  4. Record tools, accounts, network access, and permitted effects.
  5. Test representative inputs and failures before releasing a version.

Use Create your first Play for the authoring sequence and Anatomy of a Play for the contract fields.

Stop when the evidence cannot support a procedure

A trace may rely on an unrecorded file, a browser already signed in, or an account the next runner cannot access. Some literal values are credentials rather than parameters. Some errors reveal missing logic that must be repaired before reuse.

Do not publish private responses or secrets as examples. A declaration of effects also needs review against the actual source and dependencies. Publication alone does not establish safety or correctness.

Test the failure path as well as the successful path

For the DNS example, check unsupported record types, empty input, an unavailable resolver, and conflicting answers. The expected behavior is a clear error or qualified verdict, according to the contract. Do not substitute invented answers for unavailable evidence.

The reuse guide shows how to vary inputs. The sharing guide explains what the next runner must supply.

ENDHow to extract a reusable procedure from an agent traceAll essays →