| description | page_type | products | urlFragment | languages | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
This Python sample demonstrates how to build and deploy a durable AI agent using Azure Functions and the Microsoft Agent Framework with persistent conversation threads. |
sample |
|
durable-agents-quickstart-python |
|
This template repository contains a durable AI agent reference sample built with Python and deployed to Azure using the Azure Developer CLI (azd). The sample demonstrates how to create an AI agent with persistent conversation threads using Azure Functions, Azure OpenAI, and the Microsoft Agent Framework. This sample demonstrates these key features:
- Durable conversation threads. The agent maintains conversation context across multiple interactions using durable orchestration, allowing for natural multi-turn conversations.
- Microsoft Agent Framework integration. Built on the standard Microsoft Agent Framework pattern for creating AI agents with Azure OpenAI.
- Managed identity authentication. Uses Azure managed identity for secure, secret-free connections to Azure OpenAI.
This project is designed to run on your local computer. You can also use GitHub Codespaces if available.
Important
This sample creates several resources. Make sure to delete the resource group after testing to minimize charges!
- Python 3.10 or later
- Azure Functions Core Tools
- To use Visual Studio Code to run and debug locally:
- Azure CLI (for deployment)
- Azure Developer CLI
- An Azure subscription with Microsoft.Web and Microsoft.CognitiveServices registered resource providers
You can initialize a project from this azd template in one of these ways:
-
Use this
azd initcommand from an empty local (root) folder:azd init --template durable-agents-quickstart-python
Supply an environment name, such as
durableagentwhen prompted. Inazd, the environment is used to maintain a unique deployment context for your app. -
Clone the GitHub template repository locally using the
git clonecommand:git clone https://github.com/anthonychu/durable-agents-quickstart-python.git cd durable-agents-quickstart-pythonYou can also clone the repository from your own fork in GitHub.
You can follow the step-by-step tutorial for this sample at . The tutorial walks you through the code and deployment process in detail.