Tutorials¶
Four short, hands-on tutorials that build up the Python runtime piece by piece. Every code sample is real - copy it, run it, and you'll get exactly the output shown. None of them need an API key.
If you just want the fastest path to a scaffolded project, use the quickstart and the CLI instead - these tutorials are for understanding the runtime you're scaffolding.
-
Build the smallest possible loop: one goal, one step, six components. See the state machine move through a full iteration.
-
Make a step fail on purpose. Watch the engine retry it, then see how
AdaptiveRecoverychooses a different strategy per failure type. -
Reject bad input before it reaches a model call, following Stripe's "Minions" pattern - rule-bound checks stay out of the probabilistic model.
-
4. Persistence and Human Checkpoints
Survive a restart. Learn where the JSON round-trip is intentionally partial. Put a human at the one door that should stay open.
Prerequisites¶
git clone https://github.com/chillum-codeX/loop-engineering.git
cd loop-engineering
pip install -e .
Every snippet in this series uses plain Python components - no LLM client,
no API key. When you're ready to put a real model behind a component, swap
in LLMPlanner / LLMActor / LLMEvaluator from loop_engine.components,
which follow the exact same interfaces you'll have already seen.
After the series¶
- State machine specification - the full transition table these tutorials only sample from
- Step lifecycle specification - every
StepStatusand what causes it - Recovery execution specification - the failure lifecycle in full
- Starter patterns - production loop configurations you scaffold with the CLI