Please install this package via pip:
pip install agent-framework-durabletask --preThe durable task integration lets you host Microsoft Agent Framework agents using the Durable Task framework so they can persist state, replay conversation history, and recover from failures automatically.
from agent_framework import Agent
from agent_framework.azure import AzureOpenAIChatClient
from agent_framework_durabletask import DurableAIAgentWorker
from durabletask.worker import TaskHubGrpcWorker
# Create the worker
worker = TaskHubGrpcWorker(host_address="localhost:4001")
agent_worker = DurableAIAgentWorker(worker)
chat_client = AzureOpenAIChatClient()
my_agent = Agent(client=chat_client, name="assistant")
agent_worker.add_agent(my_agent)For more details, review the Python README and the samples directory.