# Scaling AI agents without breaking reliability

Preeti Somal, Temporal

AI Engineer World's Fair 2025

[Talk page](https://ai.engineer/talks/1izYWsokr9s-scaling-ai-agents-without-breaking-reliability) · [Video](https://www.youtube.com/watch?v=1izYWsokr9s)

## 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.

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

### What happens when an agent cannot finish reliably?

[0:22](https://www.youtube.com/watch?v=1izYWsokr9s&t=22s)

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.](https://ai.engineer/api/talk-essay-media/5c5277555fdc7630a67e88ad492d3dfc07af91ac2a64c54d6dd519daff645d93)

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.

### Move reliability plumbing out of business logic

[3:15](https://www.youtube.com/watch?v=1izYWsokr9s&t=195s)

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](https://temporal.io/news/temporal-raises-usd18-75m-series-a-increases-total-raised-to-usd25-5m) 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.](https://ai.engineer/api/talk-essay-media/c815e0a76a7f03b40df5ebe74d6b3c11f7fa253a5b6d0cc39492a8b2f12219f1)

Temporal separates workflow business logic from reliability plumbing.

### Production workloads establish the stakes

[4:45](https://www.youtube.com/watch?v=1izYWsokr9s&t=285s)

The customer examples move the discussion from infrastructure promises to deployed applications. Somal names [Dust](https://pages.temporal.io/dusts-ai-powered-vision) as a company building agents on Temporal, alongside another company whose published technology stack includes it. She then describes [Gorgias](https://pages.temporal.io/event-meetup-paris) 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.

### A workflow is application code

[6:39](https://www.youtube.com/watch?v=1izYWsokr9s&t=399s)

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.

### The ticket-booking agent’s interaction loop

[8:57](https://www.youtube.com/watch?v=1izYWsokr9s&t=537s)

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.](https://ai.engineer/api/talk-essay-media/fe4b22d070d7328dda6b1fcf46ed0be908cc2ceae1735a2c040ca125a55de77f)

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](https://docs.temporal.io/encyclopedia/retry-policies), 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.

### Execute tools and inspect the history

[10:42](https://www.youtube.com/watch?v=1izYWsokr9s&t=642s)

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](https://docs.temporal.io/encyclopedia/workflow-message-passing) makes the boundary explicit:

| Operation | Purpose | Adds to Event History? |
|---|---|---|
| Signal | Send input to a workflow | Yes |
| Query | Read workflow state | No |

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.

### Cloud coordinates; your workers execute

[12:08](https://www.youtube.com/watch?v=1izYWsokr9s&t=728s)

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](https://docs.temporal.io/workers) 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.

| Component | Responsibility |
|---|---|
| Customer-hosted Worker | Execute Workflow and Activity code |
| Temporal Service / Cloud | Coordinate 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.

### From the worker example to a local application

[13:42](https://www.youtube.com/watch?v=1izYWsokr9s&t=822s)

The walkthrough ends with a screenshot of the example’s worker code and a route to implementations through [Temporal Code Exchange](https://temporal.io/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.](https://ai.engineer/api/talk-essay-media/9a084b0dc5fa9753b5d9ed59e871249357e2a29e707a112de8c0910131fe1330)

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.

## Resources

- [Temporal Code Exchange](https://temporal.io/code-exchange) — Browse example applications and integrations built with Temporal.
- [Temporal AI Agent](https://github.com/temporal-community/temporal-ai-agent) — A conversational agent example with goals, tool calls, human approvals, and Temporal workflows, plus setup instructions and production considerations.
- [Signals, Queries, and Updates](https://docs.temporal.io/encyclopedia/workflow-message-passing) — Explains how applications read workflow state and send asynchronous or synchronous requests.
- [Temporal Retry Policies](https://docs.temporal.io/encyclopedia/retry-policies) — Details retry defaults, exponential backoff, retry limits, and non-retryable errors.
- [Temporal Workers](https://docs.temporal.io/workers) — Explains how Workers execute application code and receive tasks from the Temporal Service.
- [Dust's AI orchestration with Temporal](https://pages.temporal.io/dusts-ai-powered-vision) — A June 2025 webinar overview featuring Dust cofounder Stan Polu on production AI orchestration and its GitHub connector.
- [Gorgias: Scaling AI Agent Actions with Durable Execution](https://pages.temporal.io/event-meetup-paris) — A November 2025 meetup overview describing Gorgias's move from an internal state machine to Temporal for production agent actions.

## Slides

### Preeti Somal

Preeti Somal introduces herself and describes Temporal’s tardigrade mascot as a symbol of its focus on reliability.

[0:22](https://www.youtube.com/watch?v=1izYWsokr9s&t=22s) [Preeti Somal, Senior VP of Engineering at Temporal, with her portrait.](https://assets.ai.engineer/sites/aiecode2025/sha256/7c055569e426140719a22cba32958eb6b54e1de53c4322c5fbf50108738a8026.webp)

Preeti Somal
Senior VP, Engineering
at Temporal

### Agentic AI is a complex, distributed system

Preeti Somal frames agents as distributed systems that must handle probabilistic LLM responses while scaling and providing repeatability and durability. Reliability, she argues, earns users’ trust.

[1:11](https://www.youtube.com/watch?v=1izYWsokr9s&t=71s) [Slide lists distributed architecture, probabilistic responses, scalability, repeatability and durability, alongside a quotation about cooperation among human and robotic agents.](https://assets.ai.engineer/sites/aiecode2025/sha256/604091348b82ef0fbce8169b81edd85aff2c51400b2d7136c3c3b04aa984f51c.webp)

Agentic AI is a complex, distributed system

✓ Distributed, modular architecture
✓ Copes with LLMs and probabilistic responses
✓ Must scale, provide repeatability, and have durability

“We’re going to have multiple robots and multiple humans interacting, and the humans may not even be aware of how many robots there are. It’s a distributed system of intelligence, where agents—human and robotic—cooperate seamlessly.”

Manuela Veloso, Head of AI Research at J.P. Morgan

4

Interface text:
AIE
Microsoft
smol ai
AI Engineer World’s Fair

### Agentic application challenges: Complex

Agentic workflows coordinate processes across data stores and tools while retaining state over time, accommodating human approvals, running work in parallel, and scaling.

[1:36](https://www.youtube.com/watch?v=1izYWsokr9s&t=96s) [Slide lists orchestration, state, human intervention, parallel processing, and scalability challenges.](https://assets.ai.engineer/sites/aiecode2025/sha256/2d96db7aedf76cba0139c5034e2b79dc0b35b962474bd4057f66031ebe960144.webp)

AGENTIC APPLICATION CHALLENGES
Complex

• Orchestrate interactions across distributed data stores and tools
• Orchestrate multi-level processes
• Hold state, potentially over long periods of time
• Support for human intervention such as approvals
• Parallel processing for efficiency of data retrieval and tool use
• Require massive scalability

5

Interface text:
AIE
AI Engineer World’s Fair
Microsoft
smol ai

### Agentic application challenges: Inherently unreliable

Agentic applications must cope with service failures and timeouts, retry invalid LLM output, and handle LLM rate limits.

[2:32](https://www.youtube.com/watch?v=1izYWsokr9s&t=152s) [Slide describes service failures and timeouts, retries for valid LLM output, and rate limiting.](https://assets.ai.engineer/sites/aiecode2025/sha256/67896b4f60fe1808dadddb9469129fc1db6dddf7b282fd9a03bf72a3be3af900.webp)

AGENTIC APPLICATION CHALLENGES
Inherently unreliable

• Connect dozens of failure-prone services and cope with request timeouts
• Must be able to ability to ‘self-heal’ and retry until the (probabilistic) LLM returns valid data
• Must be able to handle rate limiting from LLMs

6

Event branding: AIE; AI Engineer World’s Fair; aws

### Agentic application challenges: Inherently unreliable

Agentic applications must handle service timeouts and LLM rate limits, while retrying probabilistic LLM outputs until they return valid data.

[2:38](https://www.youtube.com/watch?v=1izYWsokr9s&t=158s) [Slide describes service failures and timeouts, retries for valid LLM output, and rate limiting.](https://assets.ai.engineer/sites/aiecode2025/sha256/84615064553e85154ae03070459a3eb0a39057a1dd4f2acfdf400bdabf6f0082.webp)

AGENTIC APPLICATION CHALLENGES
Inherently unreliable

• Connect dozens of failure-prone services and cope with request timeouts
• Must be able to ability to ‘self-heal’ and retry until the (probabilistic) LLM returns valid data
• Must be able to handle rate limiting from LLMs

6

Other visible text:
AIE
Microsoft
smol ai
AI Engineer
World’s Fair

### Agentic application challenges: Difficult to debug and test

Debugging agents spans disparate services, but visibility into their performance can be limited. Testing them before production is also difficult.

[2:55](https://www.youtube.com/watch?v=1izYWsokr9s&t=175s) [Slide identifies limited performance visibility, troubleshooting across services, and pre-production testing as challenges.](https://assets.ai.engineer/sites/aiecode2025/sha256/7a1527798b7f0b2237a546eaa89cbf78399b69b2e0cc384d5dc0933ad5e349fc.webp)

AGENTIC APPLICATION CHALLENGES
Difficult to debug and test

• Insight into the agent’s performance is required but visibility can be limited
• Troubleshooting across many disparate services
• Difficult to test pre-production

7

Interface text:
AIE
AI Engineer
World’s Fair
aws

[3:00](https://www.youtube.com/watch?v=1izYWsokr9s&t=180s) [Slide lists limited agent visibility, troubleshooting across services, and pre-production testing as challenges.](https://assets.ai.engineer/sites/aiecode2025/sha256/a4d9d6c5b0e7ab498f2592da34127d8069e681cf1336ab0d1b4a1529e94c1fac.webp)

AGENTIC APPLICATION CHALLENGES
Difficult to debug and test

• Insight into the agent’s performance is required but visibility can be limited
• Troubleshooting across many disparate services
• Difficult to test pre-production

7

Interface text:
AIE
AI Engineer
World’s Fair
Microsoft
smol ai

### Temporal: Reliable, scalable AI orchestrator

Temporal lets developers write business logic as workflows while it handles execution reliability and guardrails. The slide points to customer deployments as evidence of scale.

[3:14](https://www.youtube.com/watch?v=1izYWsokr9s&t=194s) [Slide describes workflow programming, reliable execution, LLM guardrails, and scaling with Temporal.](https://assets.ai.engineer/sites/aiecode2025/sha256/bb8fc351b43ad988d54abfd22c043313abaff4110a2bf699f80a4f8a5f89c839.webp)

TEMPORAL
Reliable, scalable AI orchestrator

Develop production-grade AI agents

• Code your business logic as workflows with a flexible, intuitive programming model
Python, Go, Java, Typescript, PHP, .NET, Ruby
• Temporal handles plumbing code, ensures every process executes reliably, & provides guardrails for LLMs
Durable Execution makes failures irrelevant & persists session data
• Scale with a battle-tested product
The same tech that powers critical apps at leading companies

[Partially obscured logos] Cloudflare, mollie, descript, NETFLIX, GoDaddy, qualtrics, ClickHouse, vodafone
[Partially obscured logos] Airwallex, DOORDASH, Remitly, HashiCorp, ROBLOX, MACQUARIE, flexport., Retool

Interface text: AIE, aws

### Examples of Temporal use

Temporal’s post says Dust runs 10M+ workflows a day. A second post says OpenAI uses Temporal for asynchronous workflows and highlights image generation at scale.

[4:50](https://www.youtube.com/watch?v=1izYWsokr9s&t=290s) [Two social media posts discuss Temporal workflows for Dust and image generation.](https://assets.ai.engineer/sites/aiecode2025/sha256/673b9898e8c9204f85db264a04a3537664300527380e6ee363659bf2f44bbda7.webp)

Nico Chinot · 2nd
US GM at Dust, ex-Square, angel investor
22h · Following

It’s been a treat partnering with Temporal Technologies! Extremely high leverage piece of infrastructure for the Dust platform and a stellar team to collaborate with. If you’re aiming to build applications that never lose ...more

Temporal Technologies
16,374 followers
1d

We’ll be the ones to say it: most AI agents feel like Clippy with a language model. The good news is that Dust is doing it differently.

They’re building real AI teammates. We’re talking agents that live in your stack, follow your workflows, and actually get things done.

Under the hood is 10M+ Temporal Workflows a day, powering everything from GitHub sync to AI-led doc updates.

Here’s how Dust is building the future of work with durable infrastructure that scales. Read about it here 👉 https://lnkd.in/gM9xDKXZ

How Dust Builds Agentic AI with Temporal Workflows
temporal.io

Steve Androulakis · 1st
Sr. Staff Solutions Architect @ Temporal
2w

Python, FastAPI, C, and Temporal. That’s the tech stack that helped generate *700 million images* in ChatGPT Images’ first week! How Temporal Technologies helps OpenAI with dev velocity + reliability + scale: ...more

Tech stack

The technology choices behind the product are surprisingly simple; dare I say, pragmatic!

• Python: most of the product’s code is written in this language.
• FastAPI: the Python framework used for building APIs quickly, using standard Python type hints. As the name suggests, FastAPI’s strength is that it takes less effort to create functional, production-ready APIs to be consumed by other services.
• C: for parts of the code that need to be highly optimized, the team uses the lower-level C programming language
• Temporal: used for asynchronous workflows and operations inside OpenAI. Temporal is a neat workflow solution that makes multi-step workflows reliable even when individual steps crash, without much effort by developers. It’s particularly useful for longer-running workflows like image generation at scale

Handwritten annotation: NICE!!

Interface text:
Bilal Karim and 184 others
3 comments · 20 reposts
Like · Comment · Repost · Send
AIE
Microsoft
smol ai
AI Engineer World’s Fair
9

### Customer use cases

Gorgias runs AI agents on Temporal in production to support customer service for e-commerce brands. The slide pairs its case study with a payments modernization whitepaper.

[5:13](https://www.youtube.com/watch?v=1izYWsokr9s&t=313s) [A Gorgias customer service case study and a payments modernization whitepaper.](https://assets.ai.engineer/sites/aiecode2025/sha256/a13bb092771cd84b2d513e60de9fab450335cc6ee5922b34ba4c0e7b0566afba.webp)

RESOURCES > CASE STUDY

Gorgias uses AI agents to help over 15,000 e-commerce brands improve customer service

“We started working on our newest project three months ago and now we’re ready for production. To be clear, without a framework like Temporal, this wouldn’t be possible.”

RESOURCES > WHITEPAPER

Payments Modernization at Scale with MongoDB and Temporal

Interface text:
AIE
AI Engineer World’s Fair
Microsoft
smol ai
10

### Agentic AI

Temporal customers describe struggling to track branching AI calls with state machines, and pausing and restarting work when LLM calls are rate limited.

[6:06](https://www.youtube.com/watch?v=1izYWsokr9s&t=366s) [Two quotations discuss distributed state and rate limits in agentic applications.](https://assets.ai.engineer/sites/aiecode2025/sha256/b7d223fcd99c1e92dc793a818546dc966d1e8195fa4a458141f1f168b0679571.webp)

Agentic AI

• “The amount of distributed asynchronous work that's happening in agentic systems is unknown. So, one call to an AI might make two calls, and those calls to AIs could make their own calls to AIs. And then you have these graphs of calls, and I was using state machines to try to track all that. And they had bugs and they were failing, and they would get stuck into random states. I felt like I needed a framework to build within to basically prevent me from making these distributed state mistakes.”

• “One of the things we saw really early on in our work was that anytime you talk to an LLM you need to be prepared to be rate limited. And so you need to have all of your work pause and then start again. These things like Langchain, which do a series of calls all within a single process, those were non starters like for us. We needed a distributed system or else like I knew that it would fail.”

11

Interface text: AIE; AI Engineer World’s Fair; Microsoft; smol ai

### Architecture before Temporal

Chat flows through a session service and message bus to LLM orchestration and tools. Separate components handle failures, inactive sessions, and chat state.

[6:23](https://www.youtube.com/watch?v=1izYWsokr9s&t=383s) [Diagram of a chat system with a session service, message bus, orchestration, tools, failure queue, cron job and state database.](https://assets.ai.engineer/sites/aiecode2025/sha256/7752845b27d8112afbd13977929d3ed9e22c9064009435f4ae645c772195b34e.webp)

AGENTIC AI
Architecture before Temporal

Customer
Chat Message
CHAT UI
AGENTIC SESSIONS SERVICE API
LLM Direction User Input
MESSAGE BUS
DEAD LETTER QUEUE
Abandon chat on unrecoverable failure
On Task Failure
LLM ORCHESTRATION
Text
LLM API
AGENTIC TOOLS
CRON JOB
Expire Inactive Chat Sessions
Manage Chat History
CHAT STATE DATABASE

12

Interface text:
AIE
Microsoft
smol ai
AI Engineer World's Fair

### Architecture after Temporal

A developer-written Temporal workflow coordinates the chat UI, tools, LLM API, and chat history. The diagram places automatic retries and a timer around that workflow.

[6:55](https://www.youtube.com/watch?v=1izYWsokr9s&t=415s) [Diagram showing a Temporal workflow connecting the chat UI, tools, LLM API and chat history database.](https://assets.ai.engineer/sites/aiecode2025/sha256/5a34bbd0c58f8f3ab4c714d1273d7840f82be14d304d32d929cf70e57442b5f2.webp)

AGENTIC AI
Architecture after Temporal

TOOLS
Automatic Retries

Customer
Chat Message
CHAT UI
TEMPORAL WORKFLOW
LLM API
Automatic Retries Conversation
Prompts LLM Response Validation

Temporal Timer
Finished Chat History
CHAT HISTORY DATABASE

13

Interface text:
AIE
aws
AI Engineer World's Fair

### What's the impact?

Temporal presents faster development and greater scale alongside observability for resolving production issues and reliable applications that customers can trust.

[7:45](https://www.youtube.com/watch?v=1izYWsokr9s&t=465s) [Slide lists faster development, greater scale, fewer production issues and happier customers as claimed benefits.](https://assets.ai.engineer/sites/aiecode2025/sha256/ea69bf9b5d081f504e76009d691ad9484d6f2c16a642831bba63ee9a510e969b.webp)

TEMPORAL
What’s the impact?

ACCELERATE DEVELOPMENT
Code faster by focusing only on the business logic

REACH GREATER SCALE
Achieve production and handle more customers

SLEEP BETTER AT NIGHT
Minimize prod issues & resolve them quickly with great observability

MAKE CUSTOMERS HAPPIER
Ensure they trust your agentic application to be reliable & correct

14

Interface text:
AIE
Microsoft
smol ai
AI Engineer World’s Fair

### Example: Ticket Booking Agent

The speaker introduces a ticket booking agent as a walkthrough rather than a live demo.

[8:47](https://www.youtube.com/watch?v=1izYWsokr9s&t=527s) [Title slide introducing a ticket booking agent example.](https://assets.ai.engineer/sites/aiecode2025/sha256/141d2c83581ee194de4409655d493caebc828b88e20fa728d61539d27c2bbfb1.webp)

Example:
Ticket Booking Agent

15

AIE
aws
AI Engineer
World’s Fair

### User ↔ System

The user selects a goal and supplies arguments; the system prepares and executes tools, then returns to goal selection when the goal is complete.

[9:17](https://www.youtube.com/watch?v=1izYWsokr9s&t=557s) [Interaction diagram showing a user selecting a goal, supplying tool arguments, and a system preparing and executing tools, alongside definitions of user, system, goal, and tool.](https://assets.ai.engineer/sites/aiecode2025/sha256/1a67d202d2087c874ebe257905e13a68939b0141de8d0cb37e68c13433e1d87a.webp)

INTERACTION MODEL
User ↔ System

User
SYSTEM
LOOP
SELECT GOAL
PREPARE TOOLS FOR GOAL
PROMPT ARGUMENTS FOR TOOLS
INPUT ARGUMENTS
EXECUTE TOOLS
[WHEN GOAL COMPLETE, SET GOAL TO “SELECT AGENT GOAL”]
SYSTEM

Key Terms
• User: a person who wants to take action
• System: Temporal + AI + Goals + Tools
• Goal: something the user wants to finish
  ◦ Made up of one to many tools
• Tool: a custom capability our system has
  ◦ interact with public and private data sources or APIs

17

Interface text:
AIE
AI Engineer World’s Fair
Microsoft
smol ai

### Demo Interaction Model: Overview

The workflow asks the LLM to validate input. Valid input triggers a tool; invalid input prompts the user for correction or more information through the chatbot UI.

[9:37](https://www.youtube.com/watch?v=1izYWsokr9s&t=577s) [Sequence diagram showing a human, chatbot UI, workflow, and LLM handling valid and invalid input.](https://assets.ai.engineer/sites/aiecode2025/sha256/803d65954228bfaec879500ed6bf74444a5f74ba2153e5b1b926b26d8cc8a5dd.webp)

DEMO INTERACTION MODEL
Overview

HUMAN | CHATBOTUI | WORKFLOW | LLM

READS PROMPT AND SENDS INPUT
ACCEPTS INPUT AND PASSES IT ON
VALIDATES INPUT

VALID INPUT
VALID
INVOKE TOOL
PASSES PROMPT BACK TO VIA CHATBOT UI

INVALID INPUT
INVALID
PROMPT USER FOR CORRECTION OR MORE INFORMATION
REQUEST CORRECTION OR MORE INFORMATION

HUMAN | CHATBOTUI | WORKFLOW | LLM

Interface text:
AIE
AI Engineer World's Fair
Microsoft
smol ai
18

### Demo Interaction Model: Workflow

The Temporal workflow expresses the application flow as code, orchestrates the interactive loop, receives input through signals, and stores interaction history for debugging and analysis.

[9:47](https://www.youtube.com/watch?v=1izYWsokr9s&t=587s) [Temporal workflow overlay describes orchestration, signals, queries, durable execution, and interaction history.](https://assets.ai.engineer/sites/aiecode2025/sha256/aba463deefcc5179c567ee144bb185f5f48fba55869f3a8ba6978aca1377ac09.webp)

DEMO INTERACTION MODEL
Workflow

HUMAN
CHATBOTUI
WORKFLOW
LLM
READS PROMPT AND SENDS INPUT

Temporal Workflow

Steps that defines the flow of an application, written as code.
• Orchestrates interactive loop
• Prompts LLM, Users
• Receives input (Signals)
• Chat source of truth (Queries)
• Keeps record of all interactions
• Executes LLM durably
• Executes Tools durably
• Handles failures gracefully
• Human, LLM and tool interaction history stored for debugging and analysis

Interface text:
AIE
AI Engineer World's Fair
aws
19

### Interaction

Temporal Signals and Queries manage interactions, which Workflow History stores for analysis and debugging. Inputs can vary as long as they are serializable.

[11:24](https://www.youtube.com/watch?v=1izYWsokr9s&t=684s) [Interactions use Temporal Signals and Queries and are stored in Workflow History.](https://assets.ai.engineer/sites/aiecode2025/sha256/7fc82c6b6626cade0ce812517d6ddb054749450c8030847823bc3079f962c450.webp)

DEMO INTERACTION MODEL
Interaction

HUMAN
CHATBOTUI
WORKFLOW
LLM

READS PROMPT AND SENDS INPUT
ACCEPTS INPUT AND PASSES IT ON
VALIDATES INPUT
VALID INPUT

Interaction
• Managed with Temporal Signals and Queries
• Durably stored in Workflow History
  ◦ Can be used for analysis and debugging
• “Just code” - easy to add new Signals and Queries
• Input can be very dynamic, just needs to be serializable

HUMAN
CHATBOTUI
WORKFLOW
LLM

22

Event branding: AIE; Microsoft; smol ai; AI Engineer World's Fair

### Argument gathering

After the user selects a goal, the system loops through gathering arguments and executing tools. It continues until the goal is complete, then returns to goal selection.

[12:06](https://www.youtube.com/watch?v=1izYWsokr9s&t=726s) [User and system sequence for selecting a goal, gathering arguments, executing tools, and checking completion.](https://assets.ai.engineer/sites/aiecode2025/sha256/cac4551598606048d6e0820f1c04804f8b1bf211937cbcb2787bdce976b3aef8.webp)

DEMO INTERACTION MODEL
Argument gathering

USER                                    SYSTEM
SELECT AGENT GOAL
PROMPT: “HERE IS A LIST OF AGENT GOALS, WHICH ONE DO YOU WANT TO EXECUTE?”
ANSWER: “BOOK A FLIGHT TO AN EVENT”
CONFIRMATION: “OK BOOKING A FLIGHT TO AN EVENT.”

LOOP [GATHER ARGUMENTS]
GATHER ARGUMENTS FOR TOOLS TO COMPLETE GOAL
PROVIDE NECESSARY ARGUMENTS

LOOP [EXECUTE TOOLS]
EXECUTE TOOLS AND GATHER MORE ARGUMENTS
PROVIDE ADDITIONAL ARGUMENTS IF NEEDED

ALT [GOAL COMPLETE]
GOAL COMPLETE, SETTING GOAL TO SELECT AGENT GOAL
[GOAL NOT COMPLETE]
CONTINUE GATHERING AND EXECUTING UNTIL COMPLETE

READY FOR NEW AGENT GOAL SELECTION
USER                                    SYSTEM

23

Interface text:
AIE
AI Engineer World’s Fair
aws

[12:10](https://www.youtube.com/watch?v=1izYWsokr9s&t=730s) [Sequence diagram showing goal selection, argument gathering, tool execution, and completion.](https://assets.ai.engineer/sites/aiecode2025/sha256/274de0da8d00497f3988b8b9c3231b2d1aa78f7e226b97e88405fa9200798f03.webp)

DEMO INTERACTION MODEL
Argument gathering

USER                                    SYSTEM
SELECT AGENT GOAL
PROMPT: “HERE IS A LIST OF AGENT GOALS, WHICH ONE DO YOU WANT TO EXECUTE?”
ANSWER: “BOOK A FLIGHT TO AN EVENT”
CONFIRMATION: “OK BOOKING A FLIGHT TO AN EVENT.”

LOOP [GATHER ARGUMENTS]
GATHER ARGUMENTS FOR TOOLS TO COMPLETE GOAL
PROVIDE NECESSARY ARGUMENTS

LOOP [EXECUTE TOOLS]
EXECUTE TOOLS AND GATHER MORE ARGUMENTS
PROVIDE ADDITIONAL ARGUMENTS IF NEEDED

ALT [GOAL COMPLETE]
GOAL COMPLETE, SETTING GOAL TO SELECT AGENT GOAL
[GOAL NOT COMPLETE]
CONTINUE GATHERING AND EXECUTING UNTIL COMPLETE

READY FOR NEW AGENT GOAL SELECTION
USER                                    SYSTEM

23

Interface text:
AIE
AI Engineer World’s Fair
aws

## Full transcript

[0:00](https://www.youtube.com/watch?v=1izYWsokr9s&t=0s) [on hold music] Uh, my name is Preeti, and I am part of the engineering team at Temporal.

[0:19](https://www.youtube.com/watch?v=1izYWsokr9s&t=19s) How many people here have heard of Temporal?

[0:22](https://www.youtube.com/watch?v=1izYWsokr9s&t=22s) 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.

[0:38](https://www.youtube.com/watch?v=1izYWsokr9s&t=38s) 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.

[0:55](https://www.youtube.com/watch?v=1izYWsokr9s&t=55s) 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.

[1:09](https://www.youtube.com/watch?v=1izYWsokr9s&t=69s) 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.

[1:28](https://www.youtube.com/watch?v=1izYWsokr9s&t=88s) 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.

[1:38](https://www.youtube.com/watch?v=1izYWsokr9s&t=98s) 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.

[1:59](https://www.youtube.com/watch?v=1izYWsokr9s&t=119s) 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.

[2:12](https://www.youtube.com/watch?v=1izYWsokr9s&t=132s) 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.

[2:21](https://www.youtube.com/watch?v=1izYWsokr9s&t=141s) 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.

[2:35](https://www.youtube.com/watch?v=1izYWsokr9s&t=155s) 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.

[2:46](https://www.youtube.com/watch?v=1izYWsokr9s&t=166s) 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.

[2:57](https://www.youtube.com/watch?v=1izYWsokr9s&t=177s) 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.

[3:10](https://www.youtube.com/watch?v=1izYWsokr9s&t=190s) It's been incredibly difficult to test this in pre-production.

[3:15](https://www.youtube.com/watch?v=1izYWsokr9s&t=195s) 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.

[3:29](https://www.youtube.com/watch?v=1izYWsokr9s&t=209s) 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.

[3:46](https://www.youtube.com/watch?v=1izYWsokr9s&t=226s) 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

[4:08](https://www.youtube.com/watch?v=1izYWsokr9s&t=248s) 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.

[4:26](https://www.youtube.com/watch?v=1izYWsokr9s&t=266s) 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 agentic a-- uh, AI applications gives you reliability out of box.

[4:45](https://www.youtube.com/watch?v=1izYWsokr9s&t=285s) 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.

[4:55](https://www.youtube.com/watch?v=1izYWsokr9s&t=295s) 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.

[5:14](https://www.youtube.com/watch?v=1izYWsokr9s&t=314s) 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.

[5:31](https://www.youtube.com/watch?v=1izYWsokr9s&t=331s) 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.

[5:45](https://www.youtube.com/watch?v=1izYWsokr9s&t=345s) 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.

[5:58](https://www.youtube.com/watch?v=1izYWsokr9s&t=358s) 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.

[6:07](https://www.youtube.com/watch?v=1izYWsokr9s&t=367s) 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.

[6:25](https://www.youtube.com/watch?v=1izYWsokr9s&t=385s) 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]

[6:39](https://www.youtube.com/watch?v=1izYWsokr9s&t=399s) 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.

[6:56](https://www.youtube.com/watch?v=1izYWsokr9s&t=416s) 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.

[7:09](https://www.youtube.com/watch?v=1izYWsokr9s&t=429s) 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.

[7:25](https://www.youtube.com/watch?v=1izYWsokr9s&t=445s) 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?

[7:39](https://www.youtube.com/watch?v=1izYWsokr9s&t=459s) These are, are the key abstractions that are in play, and you're orchestrating that using Temporal.

[7:47](https://www.youtube.com/watch?v=1izYWsokr9s&t=467s) 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.

[8:00](https://www.youtube.com/watch?v=1izYWsokr9s&t=480s) 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.

[8:19](https://www.youtube.com/watch?v=1izYWsokr9s&t=499s) 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.

[8:33](https://www.youtube.com/watch?v=1izYWsokr9s&t=513s) 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.

[8:44](https://www.youtube.com/watch?v=1izYWsokr9s&t=524s) 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.

[8:57](https://www.youtube.com/watch?v=1izYWsokr9s&t=537s) 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.

[9:09](https://www.youtube.com/watch?v=1izYWsokr9s&t=549s) 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.

[9:22](https://www.youtube.com/watch?v=1izYWsokr9s&t=562s) 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 wrap pieces of this in Temporal concepts.

[9:47](https://www.youtube.com/watch?v=1izYWsokr9s&t=587s) 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.

[10:06](https://www.youtube.com/watch?v=1izYWsokr9s&t=606s) 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.

[10:22](https://www.youtube.com/watch?v=1izYWsokr9s&t=622s) 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."

[10:37](https://www.youtube.com/watch?v=1izYWsokr9s&t=637s) All of those pieces are handled by Temporal.

[10:42](https://www.youtube.com/watch?v=1izYWsokr9s&t=642s) 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.

[10:57](https://www.youtube.com/watch?v=1izYWsokr9s&t=657s) Temporal has the notion of activities, and so the tools that you use can be wrapped into activities, and again, this is just code.

[11:09](https://www.youtube.com/watch?v=1izYWsokr9s&t=669s) 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.

[11:26](https://www.youtube.com/watch?v=1izYWsokr9s&t=686s) 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.

[11:44](https://www.youtube.com/watch?v=1izYWsokr9s&t=704s) 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.

[11:57](https://www.youtube.com/watch?v=1izYWsokr9s&t=717s) So we allow the capability to export that entire history, and you can use it for whatever sort of purpose you might need.

[12:08](https://www.youtube.com/watch?v=1izYWsokr9s&t=728s) 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

[12:28](https://www.youtube.com/watch?v=1izYWsokr9s&t=748s) 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.

[12:40](https://www.youtube.com/watch?v=1izYWsokr9s&t=760s) 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.

[13:01](https://www.youtube.com/watch?v=1izYWsokr9s&t=781s) 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.

[13:10](https://www.youtube.com/watch?v=1izYWsokr9s&t=790s) 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.

[13:24](https://www.youtube.com/watch?v=1izYWsokr9s&t=804s) 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.

[13:42](https://www.youtube.com/watch?v=1izYWsokr9s&t=822s) 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.

[13:58](https://www.youtube.com/watch?v=1izYWsokr9s&t=838s) 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.

[14:16](https://www.youtube.com/watch?v=1izYWsokr9s&t=856s) 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.

[14:30](https://www.youtube.com/watch?v=1izYWsokr9s&t=870s) 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.

[14:42](https://www.youtube.com/watch?v=1izYWsokr9s&t=882s) 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.

[14:52](https://www.youtube.com/watch?v=1izYWsokr9s&t=892s) Perfect. Thank you. [applause] [outro jingle]
