409 conversation_locked.
The sample is a Responses protocol agent that turns on resilience and steering with two options. It uses a simulated model stream, so you can run it without model credentials.
Long-running agents are in preview. APIs and package versions are subject to change.
Prerequisites
- An Azure subscription with Microsoft Foundry access.
- Python 3.13.
- The Azure Developer CLI (
azd) with the Foundry agents extension.
Get the sample
In an empty directory, initialize the resilient steering agent from itsazure.yaml manifest:
azure.yaml, creates an azd environment, and connects it to the Foundry project you select.
The agent enables resilience and steering when it constructs the host:
steerable_conversations=True, a second turn on a busy conversation is queued and the running handler is cooperatively cancelled, rather than returning 409 conversation_locked.
Provision and deploy
Provision the project and deploy the agent. When prompted for a location, choose a region that supports hosted agents.azd up prints the Responses endpoint and a playground link.
Steer the deployed agent
Steering needs stored background responses (store: true and background: true), so send each turn’s body from a file. Create the first turn’s request file:
azd reuses the saved session and conversation, so the new turn steers the response that’s already in progress: