# 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](https://colab.research.google.com/github/Rath-Team/example/blob/main/examples/02_ppt_creation/notebook.ipynb) · [View the workflow source](https://github.com/Rath-Team/example/blob/8db4d409e716458cea3040b905769a1222cb26e5/examples/02_ppt_creation/src/workflow.py) · [View the reference presentation](https://github.com/Rath-Team/example/blob/8db4d409e716458cea3040b905769a1222cb26e5/examples/02_ppt_creation/output/openrath-presentation.pptx) ## 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 | `output/openrath-presentation.pptx` | ## Workflow | Step | Durable behavior | | --- | --- | | `draft_outline` | Produces validated JSON with a cover and five fixed content-slide types. | | `approve_outline` | Raises an `APPROVAL` interrupt and persists the run as `WAITING`. | | `build_deck` | Runs the public PowerPoint builder only after approval. | | `qa_and_register` | 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: ```python 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 1. Open the Notebook in Google Colab. 2. Choose **Runtime → Run all**. 3. Enter the DeepSeek API key in the masked prompt. 4. 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.