Colab 02: PPT Creation#
This OpenRath v2.0.0 example converts a fixed brief into an editable six-slide PowerPoint. Its central lesson is that review is a durable workflow state: generation pauses for approval, then resumes to build, render, verify, and register the final presentation.
Open in Google Colab · View the workflow source · View the reference presentation
Input and Output#
Input |
Value in the published example |
|---|---|
Topic |
Upgrade a one-shot AI script into a recoverable OpenRath v2.0.0 workflow. |
Audience |
Technical product-demo viewers. |
Slide count |
Six editable slides. |
Approval mode |
The Notebook inspects the interrupt and submits an approval decision automatically. |
Output |
|
Workflow#
Step |
Durable behavior |
|---|---|
|
Produces validated JSON with a cover and five fixed content-slide types. |
|
Raises an |
|
Runs the public PowerPoint builder only after approval. |
|
Checks all six slide previews, copies the PPTX to its final path, and records the artifact digest. |
The validator fixes the slide structure and prevents the model from inventing percentages, customer data, performance gains, or external results. Program facts supply the statistics, chart values, and source list.
Approval and Resume#
The approval step is part of runtime state rather than an in-memory callback:
waiting = run_to_terminal(runtime, worker_id="ppt-drafter")
assert waiting.status is RunStatus.WAITING
(interrupt,) = store.list_interrupts(tenant_id="local")
queued = store.decide_interrupt(
interrupt.id,
decision=ApprovalDecision(
kind=ApprovalDecisionKind.APPROVE,
actor_id="notebook-reviewer",
reason="demo outline reviewed; proceed to editable PPTX",
),
expected_run_version=waiting.version,
)
completed = run_to_terminal(runtime, worker_id="ppt-builder")
Production applications can replace the Notebook’s automatic approval with a review UI. The same interrupt supports approve, edit, and reject decisions.
Run and Verify#
Open the Notebook in Google Colab.
Choose Runtime → Run all.
Enter the DeepSeek API key in the masked prompt.
Review the interrupt record, rendered slide previews, and final download.
The Notebook verifies:
the first worker stops in
WAITING;approval returns the run to
QUEUED;the resumed run finishes as
SUCCEEDED;all six slides have rendered PNG previews;
the PPTX contains the expected presentation and speaker-note structures;
no pending approval interrupt remains;
the presentation is registered under an
artifact://local/URI.
Temporary build files and previews stay in the ignored .workspace/
directory. Only the editable PPTX is copied to the example’s output/
directory.
Adapt It#
Change brief.json to use a new topic and audience. To change the six-slide
layout itself, update the outline validator and the portable builder together;
keeping them aligned preserves the approval and QA guarantees.