---
title: Building durable AI agents with Pydantic AI and Temporal
description: >-
  An API times out. A worker restarts. Your agent is halfway through a task.
  Temporal and Pydantic build an agent with Pydantic AI, make it durable with
  Temporal so it resumes after interruptions, let it write Python that calls
  your tools inside a Monty sandbox with Code Mode, and follow every model
  request and tool call in Logfire.
date: '2026-11-19'
dateDisplay: 'Thu, Nov 19 · 12pm ET (9am PT / 5pm GMT)'
duration: 60 min
status: upcoming
tags:
  - Pydantic AI
  - Logfire
speakers:
  - Cecil Phillip
  - Aditya Vardhan
canonical: 'https://pydantic.dev/events/durable-agents-pydantic-ai-temporal'
---

> Markdown version of [Building durable AI agents with Pydantic AI and Temporal](https://pydantic.dev/events/durable-agents-pydantic-ai-temporal) — the canonical HTML page.
>
> Thu, Nov 19 · 12pm ET (9am PT / 5pm GMT) · 60 min · Speakers: [Cecil Phillip](https://github.com/cecilphillip), [Aditya Vardhan](https://pydantic.dev/authors/aditya-vardhan.md)
>
> All events: [/events.md](https://pydantic.dev/events.md) · Site index: [/llms.txt](https://pydantic.dev/llms.txt)

---

# Building durable AI agents with Pydantic AI and Temporal

An API times out. A worker restarts. Your agent is halfway through a task. Temporal and Pydantic build an agent with Pydantic AI, make it durable with Temporal so it resumes after interruptions, let it write Python that calls your tools inside a Monty sandbox with Code Mode, and follow every model request and tool call in Logfire.

## What you'll learn

- Build an AI agent with Pydantic AI
- Add durability with Temporal so agent workflows resume after interruptions
- Use Code Mode and Monty to execute agent-generated Python in a sandbox
- Instrument the agent with Logfire to understand its behavior and investigate failures

## About

An API times out. A worker restarts. Your agent is halfway through a task. How do you keep it moving, and see what happened along the way?

Temporal and Aditya Vardhan, Software Engineer at Pydantic, walk through building durable AI agents with Pydantic AI and Temporal. The two teams are back together to revisit the foundations and go further: Code Mode, sandboxed execution with Monty, and observability with Logfire.

The session builds an agent, adds durable execution so it can recover from failures, and uses Code Mode to let it write Python that calls your tools inside a Monty sandbox. Throughout, Pydantic Logfire follows the model requests, tool calls and execution details as the agent works.

Registration is hosted by Temporal. Can't make it live? Register anyway and Temporal will send you the recording.

**Who it's for:** Developers building AI agents that have to keep working through timeouts, restarts and flaky APIs, whether you joined the previous Temporal and Pydantic session or are new to both.

## Register

Register with the host: https://pages.temporal.io/webinar-building-durable-agents-with-pydantic.html?utm_source=pydantic&utm_medium=partner&utm_campaign=webinar-2026-11-19-building-durable-agents-with-pydantic&utm_content=webinar-building-durable-agents-with-pydantic
