Practical self-hosting · intermediate
27 · Let the model choose only where choice helps
Distinguish agent decisions from explicit workflow steps.
What you can take away
- Map a radio task into bounded decisions and recoverable stages.
- Draw that workflow and mark the one step where language-model flexibility adds value
Your trail through this idea
Checking saved progress…
Ian compared workflow tools and found personal-agent systems more work than expected. Those requests establish an evaluation history, not proof that every discussed framework is installed.
Prerequisite: complete the preceding lesson or bring its worksheet.
Understand the system
Mastra’s workflow documentation describes explicit steps and control flow; its agent documentation describes model-driven behavior. A useful design can combine them: deterministic validation around a narrow language-generation step. The model does not need to decide whether a required approval was obtained or whether a file path is allowed.
For every step, specify input, output, side effect, and restart behavior. A retryable text-generation step differs from a step that publishes an announcement. Repeating the latter may duplicate an external action unless the application has a suitable idempotency mechanism.
Work through the case
Original radio workflow: select approved track metadata → generate a short introduction → validate length and prohibited content → obtain any required editorial approval → enqueue once. If generation fails, use approved fallback text. If enqueue acknowledgement is uncertain, inspect the queue before retrying. This is a proposed teaching design, not a claim about the live radio.
Make something useful
Try this
Original exercise
Draw that workflow and mark the one step where language-model flexibility adds value. Add a failure after each stage and explain how a restart resumes without repeating a completed external action. Use fake track titles and a paper queue. Do not connect a real broadcaster for this lab.
Check your reasoning
A quick check · for your own learning
Why inspect an uncertain enqueue result before retrying?
A self-study prompt. You can retry; this is not an exam.
Keep the result and follow the sources
Success is a process whose important guarantees remain understandable when the model produces nonsense. More autonomous choices are useful only when their benefits exceed the extra verification burden.
Sources and scope
- Primary documentation or archival source, reviewed 14 November 2026. Additional direct links appear beside the claims they support.
- Editorial basis: Ian's historical self-hosting questions and current repository inspection informed the case selection. Historical requests do not establish current deployment. Private chat records, credentials and host details are excluded.
- Examples and exercises are original educational synthesis. External sources support the stated technical or historical context, not every hypothetical scenario.