This repository contains a hands-on workshop demonstrating how to build AI agents with Temporal Workflows. The workshop teaches the progression from fixed flow AI applications to production-ready, durable systems that handle failures gracefully and support human-in-the-loop interactions.
- To try this workshop, use in Codespace so that you don't need to download any software on their machines. To do so, refer to this document.
- This repository contains the Jupyter notebooks under the notebooks directory. The notebooks are used as an educational tool for to get practice with being hands-on with Temporal.
- The slides that accompany the Jupyter notebooks are here.
- When there is a a little icon of a person at a keyboard on the bottom right of the slides, this lets you know that it's time to get hands-on and move to the notebooks.
- If you start running out of time, in the
solutiondirectories, there aresolutionfiles (e.g.notebooks/Solutions_03_Human_in_the_Loop/03_Human_in_the_Loop_Solution.ipynb) with filled out versions of the notebooks
- If you start running out of time, in the
- There will also be time for you to practice working independently with the material in the exercises directory. The Jupyter notebooks will reference when it's time to do work on an exercise directory.
- For the self-serve version of this workshop (no need for slides), refer to the
self-serve-versionbranch on this repository.
This workshop demonstrates four key concepts:
- Fixed flow AI application - A simple research agent that calls an LLM and generates a PDF report
- Durable Execution - The same agent built with Temporal workflows for fault tolerance and automatic retries
- Human-in-the-Loop - Adding Temporal Signals to enable human decision-making within AI workflows
- AI Agents - An introduction into the Agentic Loop
├── notebooks/ # Interactive Jupyter notebooks for the workshop
│ ├── Solution # Solutions for the code-alongs during the workshop
│ ├── Content # Jupyter notebooks to run during workshop
├── exercises/ # Hands-on exercises for the workshop
│ ├── Practice # Every chapter will have a Practice dir where students do their work in
│ ├── Solution # Every chapter will have a Solution dir where students can refer
├── demos/ # Directory for demos for the instructor
│ ├── module_one_01_foundations_ai/ # Simple fixed flow
│ ├── module_one_02_adding_durability/ # Temporal-based durable workflow
│ └── module_one_03_human_in_the_loop/ # Adding human in the loop into our application
| └── module_one_04_agentic_loop/ # Agent that can make its own decisions
| └── README.md # Instructions on how to run demos
You can run this workshop on Codespaces as an Exercise Environment.
You can launch an exercise environment for this course using GitHub Codespaces by following this walkthrough.
By completing this workshop, you'll learn:
-
Why AI Agents are Distributed Systems - Understanding the complexity that emerges when AI agents call external APIs and other services
-
Durability and Fault Tolerance - How Temporal workflows provide automatic recovery from failures without losing progress
-
Human-in-the-Loop Patterns - Using Temporal Signals to incorporate human decision-making into AI workflows
- Creating basic LLM interactions
- Calling Actions from your LLM interactions
- Identifying distributed systems challenges
- Introduction to Temporal
- Converting agents to durable Workflows
- Implementing automatic retries
- Monitoring Workflow Execution
- Temporal Signals for real-time communication
- Workflow pause/resume patterns
- Sending Queries to your Workflows
- Introduction to Agentic loop
- Determining when the goal is complete
This workshop is designed for educational purposes. Feel free to:
- Submit issues for bugs or unclear instructions
- Propose improvements to the examples
- Share your own AI agent implementations