{ "cells": [ { "cell_type": "markdown", "id": "md-001", "metadata": {}, "source": [ "# Build iterative repair loops with Codex\n", "\n", "This cookbook is about closed-loop agent workflows: agents that produce an output, validate it, and use the feedback to improve the next pass.\n", "\n", "We'll explore a documentation reliability workflow that detects, repairs, and validates stale or broken API and SDK examples. The worked example uses intentionally stale notebooks adapted from this Cookbook repository.\n", "\n", "We'll build this agent loop with Codex. Codex reviews the current state, applies focused changes, runs validation, and repeats when the feedback shows remaining issues.\n", "\n", "The notebook task is only the example. The pattern applies wherever agent output can be measured with trustworthy feedback.\n", "\n", "The workflow has three phases:\n", "\n", "- **Review:** inspect the current artifact and return structured findings without editing files.\n", "- **Repair:** apply focused edits to a copied artifact using the findings and the latest validation feedback.\n", "- **Validate:** run the relevant checks and report what still needs work.\n", "\n", "Validation closes the loop. The repaired notebook has to satisfy the checks that matter, and any remaining issues become the next repair input.\n" ] }, { "cell_type": "markdown", "id": "md-002", "metadata": {}, "source": [ "
\n",
"
\n",
"