Items marked (preview) in this article are currently in public preview. This preview is provided without a service-level agreement, and we don’t recommend it for production workloads. Certain features might not be supported or might have constrained capabilities. For more information, see Supplemental Terms of Use for Microsoft Azure Previews.
reminder_preview tool enables a hosted agent to schedule itself to run again at a future time. Use this pattern when the agent decides during a run that it needs to follow up later, such as to check back on a long-running task or to prompt the user for a status update.
When the agent calls the reminder tool, it specifies a delay in minutes. After that delay, Foundry re-invokes the same agent on the same conversation. The agent can then continue its work, check on external systems, or prompt the user.
The reminder tool is available only for hosted agents. You can’t use the reminder tool with prompt agents. To use the reminder tool, create a toolbox that includes the
reminder_preview tool, then attach the toolbox to a hosted agent.Prerequisites
- A Foundry project with a deployed model.
- A hosted agent. See Create your first hosted agent.
- Azure Developer CLI (
azd) installed and authenticated. See Install the Azure Developer CLI.
How the reminder tool works
The reminder tool takes the following arguments:
When the agent calls the tool, it decides how long to delay based on its reasoning. Foundry then creates a scheduled routine that fires after the specified delay and re-invokes the same hosted agent on the same conversation. This approach preserves context across invocations, unlike regular routines that start new conversations.
Add the reminder tool to a toolbox
The reminder tool is connectionless. You don’t need to configure any external service or authentication.Configure the hosted agent
After you create the toolbox, configure your hosted agent to use it. In the agent manifest, add the toolbox endpoint underresources:
Example scenario: Polling for task completion
A common scenario is polling an external system for task completion. In this pattern, the agent:- Receives a user request to start a long-running task.
- Calls an external API to start the task and receives a task ID.
- Uses the reminder tool to schedule a follow-up in 15 minutes.
- When the reminder fires, the agent checks the task status.
- If the task is still running, the agent schedules another reminder.
- When the task completes, the agent notifies the user.
Limitations
- Hosted agents only. The reminder tool is available only for hosted agents. You can’t use it with prompt agents.
- Same conversation. Reminders re-invoke the agent on the same conversation. They don’t start new conversations.
- Minimum delay. The minimum delay is 1 minute.
- Maximum delay. The maximum delay is 43,200 minutes (30 days).