Workflows are a UI-based tool in Foundry used to create predefined, declarative sequences of actions, including agents. This lets you build intelligent automation systems that visually blend AI agents with business processes.

Prerequisites

  • An Azure account with an active subscription
  • A project in Microsoft Foundry

Create a Sequential Workflow

Sequential workflows are used for step-by-step processes by passing the result from one agent to the next in a defined order.

  1. Sign in to Microsoft Foundry. Ensure the "New Foundry" toggle is activated.
  2. Select "Build" in the upper-right navigation.
  3. Select "Create new workflow" and choose the "Sequential" option.
  4. Assign an agent to the agent nodes. Select each node and choose an existing agent or create a new one.
  5. IMPORTANT: Select "Save" in the visualizer when you make changes - workflows are NOT saved automatically!
  6. Select "Run Workflow" to test.
  7. Interact with the workflow using the chat window.

Workflow Patterns

Sequential

Passes the result from one agent to the next in a defined order.

Use Case: Step-by-step workflows, pipelines, multi-stage processing
Group Chat

Dynamically passes control between agents based on context or rules.

Use Case: Dynamic workflows, escalation, fallback, or expert handoff scenarios
Human in the Loop

Asks the user a question and awaits user input to proceed.

Use Case: Approval requests during workflow execution, obtaining information from the user

Node Types

Agent (Invoke): Used to invoke an existing agent or create a new one
Logic: Provides conditional flow control (If/Else, Go To, For Each)
Data Transformation: Used for manipulating data (Set Variable, Parse Value)
Basic Chat: Used to send a message or ask a question

Configuring Structured Output

You can configure an Invoke agent node to output in a structured format like JSON Schema.

  1. Create an Invoke agent node
  2. In the configuration window, select "Details"
  3. Select the parameter icon and choose "JSON Schema" as the Text Format
  4. Paste your desired JSON Schema
  5. Save, then go to "Action settings" to save the output to a variable
{
  "name": "math_response",
  "schema": {
    "type": "object",
    "properties": {
      "steps": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "explanation": {"type": "string"},
            "output": {"type": "string"}
          }
        }
      },
      "final_answer": {"type": "string"}
    }
  },
  "strict": true
}

Creating Complex Logic with Power Fx

Power Fx is a low-code language that uses Excel-like formulas to create complex logic.

Variable Prefixes
ScopePrefixExamples
System variablesSystem.System.Conversation.Id, System.LastMessage.Text, System.User.Language
Local variablesLocal.Local.CustomerName, Local.Amount, Local.ApprovalStatus
Example: Output Customer Name in Capital Letters
  1. Create a workflow and add an "Ask a question" node
  2. Enter message: "What is your name?"
  3. Save response to variable Var01
  4. Add a "Send message" action
  5. Enter Power Fx expression: {Upper(Local.Var01)}
  6. Preview and test the workflow

Additional Features

Versioning: Each save creates a new, unchangeable version. View history or delete older versions using the Version dropdown.
YAML View: The workflow is stored in YAML. Toggle between visualizer and YAML view - changes sync automatically.
Add Notes: Add notes to the workflow visualizer to provide extra context for collaborators.