---
title: "AI Agent execution using Temporal"
description: "This demo shows a multi-turn conversation with an AI agent running inside a Temporal workflow."
canonical: "https://temporal.io/code-exchange/ai-agent-execution-using-temporal.md"
source: "https://temporal.io/code-exchange/ai-agent-execution-using-temporal"
published: "2025-03-14"
authors:
  - "Steve Androulakis"
company: "Temporal"
languages:
  - "Python"
tags:
  - "Demo"
  - "AI"
reviewed_by_temporal: true
---

# AI Agent execution using Temporal

This demo shows a multi-turn conversation with an AI agent running inside a Temporal workflow.

- [View repo](https://github.com/temporal-community/temporal-ai-agent)
- [Watch 5 min demo](https://www.youtube.com/watch?v=GEXllEH2XiQ)
- [Watch keynote demo](https://www.youtube.com/watch?v=YDxAWrIBQNE)

This demo shows a multi-turn conversation with an AI agent running inside a Temporal workflow. The purpose of the agent is to collect information towards a goal, running tools along the way. There's a simple DSL input for collecting information (currently set up to use mock functions to search for public events, search for flights around those events, then create a test Stripe invoice for the trip). The AI will respond with clarifications and ask for any missing information to that goal. You can configure it to use [ChatGPT 4o](https://openai.com/index/hello-gpt-4o/), [Anthropic Claude](https://www.anthropic.com/claude), [Google Gemini](https://gemini.google.com/), [Deepseek-V3](https://www.deepseek.com/) or a local LLM of your choice using [Ollama](https://ollama.com/).

Check out the 5 minute video demo below.

<style>.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }</style><div class='embed-container'><iframe src='https://www.youtube.com/embed/GEXllEH2XiQ' frameborder='0' allowfullscreen></iframe></div>

If you'd like to see recovery from failure LIVE in action, see our demo from Replay 2025!

<iframe width="560" height="315" src="https://www.youtube.com/embed/YDxAWrIBQNE?si=iSEtqtCyQTwdBH5o" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
