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.
What a routine contains
A routine has one trigger and one action.| Component | Description |
|---|---|
| Trigger | Defines when the routine starts. A trigger can be a one-time timer or a recurring schedule. |
| Action | Defines what happens after the trigger fires. In the preview, the action invokes one prompt agent or hosted agent through the existing agent endpoint. |
| Input | Provides the user input sent to the agent. Input can be text or JSON. |
| Lifecycle state | Determines whether the routine is enabled or disabled. You can update, enable, disable, or delete a routine without recreating the agent. |
| Run history | Records each trigger run, including inputs, outputs, status, and a link to the related agent response and trace details. |
Trigger types
Routines support two trigger types in the preview: timer and recurring. The recurring trigger is also referred to as a recursive trigger.| Trigger type | When to use it | Example |
|---|---|---|
| Timer | Run an agent once at a specific date and time. After the timer fires, the routine becomes inactive. | Run a migration-readiness agent at 2026-06-01T09:00:00Z. |
| Recurring | Run an agent repeatedly on a cron-style schedule. | Run a support-summary agent every weekday at 7 AM. |
How routines run
When a routine is enabled, Foundry manages the trigger and dispatch path for you.- The trigger fires from a timer or a recurring schedule.
- Foundry creates a routine run record in the project.
- Foundry invokes the configured agent endpoint with the routine input.
- The agent processes the request by using its configured model, instructions, tools, and identity.
- Foundry stores the routine run status and links the run to the agent response and trace details.
Connections, identity, and governance
Routines are scoped to a Foundry project. You manage routines with the same project governance model you use for agents, tools, and connections. For more information, see Azure role-based access control in Foundry. This project-scoped design provides the following benefits:- No separate scheduler resource to manage: Create and operate routines from Foundry instead of provisioning separate automation infrastructure.
- Shared governance: Apply project-level access control to routine management and agent invocation.
- Observable runs: Review routine runs alongside the agent responses and traces that they create.
Monitor and operate routines
After you create a routine, use the run history to understand what happened each time the trigger fired. Run history helps you answer operational questions such as:- Did the trigger fire?
- What input was sent to the agent?
- Did the agent invocation complete or fail?
- What response did the agent produce?
- Which trace contains the detailed model, tool, and latency information for that invocation?
Routines and workflows
Routines and workflows both help automate agent scenarios, but they solve different problems.| Dimension | Routines | Workflows |
|---|---|---|
| Question answered | When should my agent run? | How should multiple steps, decisions, or agents connect? |
| Mental model | Trigger to agent. | Graph of nodes, edges, branching, and state. |
| Agent relationship | Extends an existing agent with an automatic trigger. | Orchestrates agents and business logic in a separate workflow. |
| Multi-agent support | No. A routine invokes one agent. | Yes. Use workflows for multi-agent orchestration. |
| Best for | Timers, schedules, and lightweight automation. | Branching, approvals, multi-step processes, and complex stateful automation. |
Preview limitations
The preview has the following limitations:- A routine has exactly one trigger and one action.
- The only action type is invoking one Foundry agent.
- Supported trigger types are timer and recurring triggers.