← All AI Engineer talks

AI Engineer World's Fair 2025

Scaling AI agents without breaking reliability

Preeti Somal· Senior Vice President of Engineering, Temporal15:01

Read the talk

Scaling AI agents without breaking reliability

Temporal gives agent applications a durable workflow model for coordinating LLMs, tools and human input while keeping application code in developers’ own environments.

From a talk by Preeti Somal

Before you start: Familiarity with Python, API calls and basic distributed-system failures will help with the workflow example.

What happens when an agent cannot finish reliably?

An agent can produce an impressive interaction and still fail to earn anyone’s trust if it cannot work reliably. Temporal’s mascot makes that concern explicit: a tardigrade, or water bear, which Preeti Somal describes as the most resilient animal known to humankind. The engineering problem behind the mascot is concrete. Agents depend on LLMs, coordinate distributed components, and must continue working as demand grows. Reliability and durability are part of the application’s behavior, not infrastructure details that users can ignore.

Slide listing distributed architecture, probabilistic LLM responses, and requirements for scale, repeatability, and durability, alongside a quotation.
Agentic AI is a complex, distributed system.

The coordination quickly becomes a workflow. Multiple processes need to share state that may remain relevant for a long time. A human may need to approve an action; independent work may run in parallel; tools must be called and their results incorporated. Each interaction also needs enough visibility to explain what happened when the result is wrong or the process stops. A switch statement can choose the next action, but it does not by itself solve these operational responsibilities.

Somal asks whether anyone’s LLM calls succeed every time; nobody raises a hand. Failures in the surrounding toolchain compound that uncertainty. Tracing, debugging and testing the resulting system are difficult, particularly before production. Her reference to Agent Ops places observability alongside orchestration: keeping the process running and understanding its execution are related requirements.

0:220:38
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

0:22 · section reference included

Move reliability plumbing out of business logic

These difficulties have a history in distributed systems. Temporal’s proposal is to take responsibility for reliability and scalability so developers can concentrate on application logic. Its language-idiomatic SDKs make that division available through ordinary code. Somal reports that Python overtook the other SDK languages in January, without specifying the adoption metric or the year. The observation illustrates the prominence of Python in this agent-building audience, rather than establishing a measured market share.

The SDK model separates the application’s intended sequence of operations from the plumbing needed to execute it reliably. Temporal supplies execution infrastructure and guardrails, backed by use in mission-critical workloads. Somal describes the product as having more than a decade in production; the historical distinction is that Temporal’s first production release announcement dates to October 2020 and describes the founders’ earlier Cadence work. That lineage should not be read as ten years of Temporal production use by this 2025 talk.

Reliable, scalable AI orchestrator slide with three bullets about coding workflows, Temporal handling plumbing, and scaling, above customer logos.
Temporal separates workflow business logic from reliability plumbing.
3:153:29
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

3:15 · section reference included

Production workloads establish the stakes

The customer examples move the discussion from infrastructure promises to deployed applications. Somal names Dust as a company building agents on Temporal, alongside another company whose published technology stack includes it. She then describes Gorgias as running production AI customer-service agents on Temporal and identifies Reebok, Timbuk2 and Glossier as brands it serves. That establishes the customer-service setting; it does not identify which brands use the particular agent implementation.

The claimed benefit is agility: teams can spend more effort on business behavior instead of repeatedly building reliability mechanisms. A payments example raises the stakes further, showing that the platform is used for workloads where execution failures have direct consequences. Additional developer testimonials reinforce that operating agents is already a production concern, not just a question of making a compelling prototype.

4:454:55
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

4:45 · section reference included

A workflow is application code

In the before-Temporal architecture, developers implement both the interactions between services and the error handling around those interactions. Temporal reorganizes that coordination around a Workflow written with its SDKs. This is a developer tool: the workflow is code, rather than a diagram a business user configures.

For an agent, the workflow coordinates user interaction, the LLM, a chat-history database and tools. Those components still exist; the workflow gives their interaction a durable execution structure. The architectural change is therefore not the removal of the agent’s dependencies, but a different place to express and manage their coordination.

Somal says applications can reach production in weeks and reports customer case studies with more than 6× feature-delivery velocity after adopting Temporal. She does not name the case studies or give their baseline, observation period or measurement method. The intended engineering benefit is less time spent implementing infrastructure behavior before shipping a feature.

An unnamed consumer application supplies the scaling example: demand grows with events, and Somal says the team does not implement its own scale logic. Temporal Cloud is presented as taking on that coordination burden. The operational outcome she connects to it is straightforward—fewer reliability worries for engineers and fewer broken experiences for customers.

6:396:56
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

6:39 · section reference included

The ticket-booking agent’s interaction loop

The ticket-booking example connects these abstractions to a conversational application. Somal walks through its architecture rather than running it live onstage; a working demonstration is offered at the booth. The participants are the user, a system combining Temporal and AI, language models, goals and tools. Temporal concepts wrap the coordination between these pieces.

The workflow defines the application’s flow, including its interactive loops. A Signal supplies input to a running workflow, while a Query provides a way to inspect its state. This lets a conversation continue through multiple interactions instead of requiring the entire booking process to finish in one request.

Workflow sequence diagram with Human, ChatbotUI, Workflow, and LLM columns behind a Temporal Workflow callout listing orchestration, signals, queries, durable execution, and interaction history.
The workflow coordinates interactions, receives signals, and exposes queries.

The distinction matters when implementing the loop: application code describes what should happen next, while Temporal handles retry machinery. That does not mean every failure is automatically recoverable. Under the documented retry-policy defaults, Activities retry by default, whereas Workflow Executions do not have a default retry policy. Retry policies control backoff, limits and non-retryable errors. Developers still decide which failures should be retried and which require a different business outcome.

8:579:09
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

8:57 · section reference included

Execute tools and inspect the history

Temporal stores workflow history so an engineer can inspect how the agent moved through its interactions. Tools are wrapped in Activities, which are also application code. The model provider remains a choice for the application. Somal describes this arrangement as supporting input validation and progress toward the goal, with infrastructure failures handled through Temporal’s execution machinery. Validation rules and the meaning of a successful booking still belong in the application.

A compact Python workflow can express the same division. In this example, each incoming booking message triggers an agent_turn Activity, which returns a reply and whether the conversation has finished. A Query exposes the latest reply. The Activity owns the model and tool interaction; the workflow owns the conversational loop.

python

from datetime import timedelta
from temporalio import workflow


@workflow.defn
class TicketBooking:
    def __init__(self) -> None:
        self.pending: list[str] = []
        self.reply = "What trip would you like to book?"
        self.done = False

    @workflow.signal
    def message(self, text: str) -> None:
        if not self.done:
            self.pending.append(text)

    @workflow.query
    def latest_reply(self) -> str:
        return self.reply

    @workflow.run
    async def run(self) -> str:
        while not self.done:
            await workflow.wait_condition(lambda: bool(self.pending))
            text = self.pending.pop(0)
            result = await workflow.execute_activity(
                "agent_turn",
                text,
                start_to_close_timeout=timedelta(minutes=2),
            )
            self.reply = result["reply"]
            self.done = result["done"]
        return self.reply

The timeout bounds an individual Activity attempt; it is not a deadline for the whole conversation. There is no handwritten retry loop around the Activity call.

Somal groups Signals and Queries together when discussing recorded interactions, but their persistence semantics differ. The message-passing documentation makes the boundary explicit:

OperationPurposeAdds to Event History?
SignalSend input to a workflowYes
QueryRead workflow stateNo

For the example above, sending message contributes to the execution record; calling latest_reply does not. Workflow history is not a log of every read of the workflow.

Somal also describes exporting the entire workflow history for customers who need to investigate execution in test or development environments, or retain evidence for compliance-related work. That export makes the execution record usable outside the immediate running system; it does not turn unrecorded Queries into recorded events or establish a compliance certification.

10:4210:57
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

10:42 · section reference included

Cloud coordinates; your workers execute

Loops and other agent interaction patterns fit inside the workflow programming model. Temporal Cloud supplies the durable coordination infrastructure, but the agent and workflow code run in the customer’s environment. Somal describes Cloud as retaining execution state and managing failures and retries, using the call stack as an analogy for the execution context it preserves.

The concrete execution boundary is the Worker. As the Worker documentation explains, Workers poll the Temporal Service for tasks and execute Workflow and Activity code. Cloud coordinates execution; it does not become the host process for the application’s Python code.

ComponentResponsibility
Customer-hosted WorkerExecute Workflow and Activity code
Temporal Service / CloudCoordinate durable execution and retry scheduling

Because the worker is application code in the developer’s environment, it can fit existing CI/CD practices. The intended change is where reliability responsibilities live, while developers retain control of their business logic and deployment process.

12:0812:28
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

12:08 · section reference included

From the worker example to a local application

The walkthrough ends with a screenshot of the example’s worker code and a route to implementations through Temporal Code Exchange. Temporal is also open source, so the next step is to inspect an application’s code and see how its workflow, Activities and worker fit together.

Slide titled AI Agent execution using Temporal, with an example description, a QR code, and the temporal.io/code-exchange address.
The Code Exchange example demonstrates AI agent execution using Temporal.

Somal closes with a practical starting path: choose an example, run it in a local development environment, and connect it to Temporal Cloud. She mentions Cloud signup and promotional credits available at the time of the talk, without specifying an amount. The useful progression is from readable application code to a running workflow, with the same separation between customer-hosted execution and durable service coordination.

13:4213:58
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

13:42 · section reference included

Resources

From the talk

  • A conversational agent example with goals, tool calls, human approvals, and Temporal workflows, plus setup instructions and production considerations.

  • Explains how applications read workflow state and send asynchronous or synchronous requests.

  • Details retry defaults, exponential backoff, retry limits, and non-retryable errors.

  • Temporal WorkersDocumentation

    Explains how Workers execute application code and receive tasks from the Temporal Service.

  • A June 2025 webinar overview featuring Dust cofounder Stan Polu on production AI orchestration and its GitHub connector.

Updates since the talk

Read the complete timestamped transcript
  1. 0:00

    [on hold music] Uh, my name is Preeti, and I am part of the engineering team at Temporal.

  2. 0:19

    How many people here have heard of Temporal?

  3. 0:22

    Perfect. Great. So Temporal is the company that takes reliability incredibly seriously. So seriously that our mascot is a tardigrade. Does anybody know what a tardigrade is? Yes, some folks.

  4. 0:38

    Well, it is what is also called a water bear and is the most resilient animal known to humankind. And so that's how seriously we take reliability. Definitely stop by our booth for some stickers and some pins to just show how much you care about reliability.

  5. 0:55

    All right, so my goal in the next seventeen minutes or so is to convince all of you that Temporal is the right choice of platform as you go out to build agentic AI applications.

  6. 1:09

    So let's dive right in. We've heard a lot about how, uh, you know, agents are just software. However, they are complex distributed systems. They need to cope with LLMs, and they must scale and provide durability and reliability.

  7. 1:28

    Otherwise, no one's gonna trust your agent. Uh, you know, we can build, like, really cool stuff, but if it doesn't work, nobody's using it.

  8. 1:38

    We also know that complex systems need orchestration. Uh, Dex used the word workflow a few times, and essentially at the core of agentic AI applications is a complicated workflow, uh, that orchestrates multiple processes, uh, needs to handle state potentially over long periods of time.

  9. 1:59

    There needs to be human interaction for approvals or other reasons. And of course, they need to be able to be, uh, able to run in parallel for efficiency, call tools.

  10. 2:12

    There's just a lot of things going on. You know, how, how many of you feel like building agents is really simple? You're just calling one switch statement, right? Yeah.

  11. 2:21

    I mean, there's a lot of things that are interacting here, and how can you actually keep track of that, make sure it's running reliably, as well as tracing and looking at the visibility of all of these pieces.

  12. 2:35

    And again, you know, these systems are inherently unreliable. How many of you have called an LLM, and it succeeded a hundred percent of the time? Yeah. Nobody's raising their hands.

  13. 2:46

    So we've dealt with this. As you're building these applications, you are seeing inherently how unreliable some of the tool chain here is.

  14. 2:57

    And then, uh, you know, difficult to debug and test, and Alex has been talking about Agent Ops being kind of built around this. But clearly, the insight into what's happening has been incredibly hard to get.

  15. 3:10

    It's been incredibly difficult to test this in pre-production.

  16. 3:15

    Well, the interesting thing here is that these problems have existed for some time in building complex distributed systems. And Temporal is a company that was founded around solving these problems.

  17. 3:29

    Our mission really is to outsource the reliability and scalability parts of building a complex distributed, uh, uh, application seamlessly. So again, you can focus on the hard parts of writing your business logic.

  18. 3:46

    The way that Temporal works is that we, we built, uh, language idiomatic SDKs. We-- The languages are available there, and in fa- in fact, one of the fun facts here is that Python has overtaken all the other languages in the month of January, and, and that sort of is showing how much of Python is being used in

  19. 4:08

    building these applications. We handle all the plumbing code for you, making sure that every process executes reliably and providing you guardrails. And this is a battle-tested product. Temporal has been in production for over a decade.

  20. 4:26

    Temporal is used in mission-critical applications. These are just a few examples of our customers using Temporal in production today. So we feel that using Temporal for running these-- for building your agentica-- uh, AI applications gives you reliability out of box.

  21. 4:45

    But, you know, I can stand here and talk all day about it. You, you probably don't believe me. Uh, so we have some customer quotes here that will help you understand this.

  22. 4:55

    Uh, one of them is from a customer called Dust that is building their agents on top of Temporal. And the other is a company you may have heard of that recently talked about the tech stack they use, and Temporal is very clearly featured there as well.

  23. 5:14

    We also have a number of use cases published. So Gorgias, for instance, is using AI agents today in production built on Temporal. This is the company that does customer service for brands like Reebok or Timbuk2 or Glossier.

  24. 5:31

    These are all household names. And, and the reason I'm bringing this up is just to help you understand that customers are today running agents on Temporal at scale in production.

  25. 5:45

    And what's this-- what, what Temporal is bringing to them is incredible agility and speed because they can focus on writing their business logic and don't need to worry about reliability.

  26. 5:58

    The reason I put up the payments example here is to show you how mission-critical some of the workloads that are running on Temporal are.

  27. 6:07

    And finally, you know, some more quotes here from customers, developers using Temporal around building agentic applications. I hope some of this is resonating in terms of the issues that you are seeing as well as you're going out and building these applications.

  28. 6:25

    All right. Let's talk a little bit about architecture and code, because no talk here can be complete if we don't talk architecture and code, right? All right. I was hoping I would get some claps, so let's get this going. [clapping]

  29. 6:39

    All right. So this is, this is an example of an architecture before Temporal. What, what we're seeing here is there is a lot of interaction and error handling that developers are being forced to code.

  30. 6:56

    And when you use code using Temporal, essentially we can abstract all of that out into this concept of a workflow. A workflow is something that you write. This is, this is very much a developer-focused tool.

  31. 7:09

    This is not a tool that a business user or a non-technical per- person would use. This is a developer going in and coding and building their applications using these SDKs around the concept of a workflow abstraction.

  32. 7:25

    And at the end of the day, when you think about agents, you essentially are just orchestrating a number of pieces around the interaction, the large language models, the chat history database, and the tools, right?

  33. 7:39

    These are, are the key abstractions that are in play, and you're orchestrating that using Temporal.

  34. 7:47

    What's the impact? You know, everybody's gonna tell you they've got the best platform here, but what, what, what is the impact for engineers? What we really are able to do is accelerate development.

  35. 8:00

    And you-- what you can do is take Temporal, and you can put applications out in production in weeks. We've had customers with case studies where we've sped up their velo-- feature delivery velocity by over six X once they've started using Temporal.

  36. 8:19

    You can reach greater scale. Um, one of our customers is a consumer application that is scaling with events and, and they don't need to worry about handling any of that scale logic at all.

  37. 8:33

    So we, we, our cloud will handle the scale for you. Uh, of course, you know, once you've got reliability nailed, you can sleep better at night, and that's always important.

  38. 8:44

    Uh, and with reliable applications, customers are happier. Now, I've talked a lot. I wanted to walk through a q-- example. I, I'm not doing a demo because of all the various issues.

  39. 8:57

    Uh, and it also seems like for some reason, travel is like the, the classic use case everybody seems to be demoing. So let's dive right in. So we've got a demo of a ticket booking agent.

  40. 9:09

    This demo is live at our booth as well. So if you're interested, you can go look at that at the booth. Um, and what we'll do is I'll quickly walk you through a little bit of the architecture and how Temporal would work here.

  41. 9:22

    And so clearly, you know, some of the key pieces here are around the user, the system, which is Temporal and AI, your language models, goals and tools. And w- the way that Temporal works here is, um, essentially going to be able to take this flow and in wrap pieces of this in Temporal concepts.

  42. 9:47

    So for instance, the workflow defines the flow of the application, and it's written as code. So this is where you would orchestrate the interactive loops. You would receive... We have this notion of a signal, which is how the workflow gets input.

  43. 10:06

    We have a notion of a query. So there's a, a rich set of abstractions that you program against to build that workflow that will essentially take kind of all of the pieces of this model that I'm showing you and translate that into code.

  44. 10:22

    And nowhere in there will you have any statements or code that we call plumbing code, code. At-- That is, you, you-- nowhere in there will there be statements like, "If something fails, you know, keep retrying it."

  45. 10:37

    All of those pieces are handled by Temporal.

  46. 10:42

    We also store all of the workflow history, uh, so that you can go in and you can look at the visibility of what is happening as your agent is navigating this complex set of interactions.

  47. 10:57

    Temporal has the notion of activities, and so the tools that you use can be wrapped into activities, and again, this is just code.

  48. 11:09

    And of course, with LLMs, you can use whatever provider you need. We are able to help you validate the inputs and drive towards the goal. Um, and again, failures are handled transparently by Temporal.

  49. 11:26

    Um, and then interactions are managed through Temporal signals and queries, um, and they're stored in the workflow history. So there's a very clear sort of record of how your agent is executing, and you can go in and look at that.

  50. 11:44

    You can also export that. One of the things we are hearing is customers want access to that history for compliance reasons or for the-- for kind of being able to go and debug in their test dev environment.

  51. 11:57

    So we allow the capability to export that entire history, and you can use it for whatever sort of purpose you might need.

  52. 12:08

    Uh, and finally here, you know, you can kind of look at the fact that we've got the ability to have loops. We can... You know, it, it's a, it's a very rich programming model where you can take the various, uh, sort of, uh, use case patterns for your agent, and you can build them as a workflow pretty

  53. 12:28

    quickly and get up and running. Uh, and then Temporal Cloud, of course, is where we do all of the heavy lifting around the reliability and scalability pieces for you.

  54. 12:40

    So your agent, your workflow, the code actually runs in your environment, and Temporal Cloud is where all of the execution state, the call stack, the... You know, looking at all of the failures and retries, all of that is happening within Temporal Cloud.

  55. 13:01

    I know I'm speeding through a lot here, but, um, definitely come by our booth as well. Uh, the worker is what I was just talking about. This is your code.

  56. 13:10

    It runs in your environment. It is essentially fitting into any of your own CI/CD practices. A big part of the Temporal focus has been on meeting developers where they are.

  57. 13:24

    We don't want you to change how you write code. We just want you to get more efficient and help you focus on writing your business logic and not having, having to worry about all of the reliability and scalability issues here.

  58. 13:42

    And this, for instance, is, uh, the, the worker code for the, um, uh, use case that I was just showing. I know this is a screenshot. I- what I wanted to show here is we've got this concept of co- a code exchange.

  59. 13:58

    Temporal, if you weren't aware, is an open source product as well. So you can go in, and I know this conference loves QR codes for some reason, so you can go in, and you can actually look at the code at the code exchange and see how Temporal operates there.

  60. 14:16

    Finally, Temporal Cloud is available. Uh, you can go sign up. We are giving away credits, so getting started and kicking the tires on using Temporal is fairly easy. You can go to Code Exchange.

  61. 14:30

    You can look at any example you want. You can run that in your local dev environment. You can run it against cloud, and you can be up and running pretty quickly here.

  62. 14:42

    And we are, like I said, we are on the, uh, on the expo floor. Come by and chat with us. We are booth G3.

  63. 14:52

    Perfect. Thank you. [applause] [outro jingle]