Code 2025
OpenAI + @Temporalio : Building Durable, Production Ready Agents - Cornelia Davis, Temporal
Overview
This talk explores building durable, production-ready AI agents by integrating the OpenAI Agents SDK with Temporal. It highlights how Temporal's distributed systems capabilities can provide essential durability, visibility, and scalability to agentic applications, which are often inherently stateful and prone to failures. The presentation demonstrates how to leverage Temporal's workflow and activity abstractions to manage agent execution, tool invocation, and error handling, ensuring that agent processes can reliably resume after interruptions.
Who should watch
- AI engineers building complex agentic systems.
- Product managers and builders looking to ship reliable AI applications.
- Developers seeking to add robustness and fault tolerance to their AI agents.
- Those interested in orchestrating multiple agents or microagents.
Key takeaways
- Temporal provides a durable backend for distributed systems, making it well-suited for AI applications that involve complex, stateful processes.
- The OpenAI Agents SDK simplifies agent creation by providing an agentic loop and tools for LLM interaction, but it lacks inherent durability.
- Integrating Temporal with the OpenAI Agents SDK allows agents to benefit from Temporal's durability, retries, and state management, preventing data loss and ensuring process resumption.
- Temporal's core abstractions, Activities (units of work) and Workflows (orchestrations of activities), can be used to build robust agent logic.
- Temporal's dynamic activities enable agents to invoke tools by name, allowing for flexible tool integration without tightly coupling the agent to specific tool implementations.
- The integration allows Temporal's visibility features, like the UI, to provide insights into agent execution, including LLM calls and tool invocations.
- Temporal's approach treats processes as logical entities, abstracting away the complexities of physical process management, which is particularly beneficial for long-running or human-in-the-loop agent scenarios.
- The concept of microagents, small agents designed to do one thing well, can be orchestrated using Temporal, mirroring the success of microservices in traditional software development.
Notable quotes
*For me personally the distinction that I make between Genai applications and then when they get to agents is when we give the LLMs agency when the LLMs are the ones that are deciding on the flow of the application.*
*What it is is distributed systems as a backing service.*
*So, what you get to do is you get to write your program thinking about a process as a logical entity and just let temporal map it down to the actual physical processes that are there.*
Unofficial community note. Prefer the recording for nuance.