Skip to main content

Automating Multi-Agent Workflows: Triggering Squad on ACA via GitHub Actions and Microsoft Agent Framework

Brian Swiger
Author
Brian Swiger
Passionate Geek • Proud Father • Devoted Husband

Building autonomous agent workflows is one thing; connecting them seamlessly to your actual software development lifecycle is where the magic happens.

In this post, we will look at a powerful update to Squad on ACA: triggering serverless, multi-agent teams on Azure Container Apps directly from GitHub events using GitHub Actions as a lightweight transport mechanism, powered by the GitHub Copilot SDK and the Microsoft Agent Framework (MAF).


The Architecture Overview
#

The goal of this pattern is simple: allow developers to initiate agentic workloads through everyday developer actions (such as adding a label like run-squad to a GitHub issue) without needing complex, always-on orchestrators sitting on the web.

The goal of this pattern is simple: allow developers to initiate agentic workloads through everyday developer actions (such as adding a label like run-squad to a GitHub issue) without needing complex, always-on orchestrators sitting on the web.

+-----------------------+
| GitHub Issue Labeled  |
+-----------------------+
            |
            v
+-----------------------+
| GitHub Action Trigger |  (Actions as Transport)
+-----------------------+
            |
            v
+-----------------------+       +-------------------+
| Azure Container Apps  | ----> |   ACA Sandboxes   |
+-----------------------+       +-------------------+
            |                             |
            v                             v
+-----------------------+       +-------------------+
|  Agent Framework      | ----> | Multi-Agent Exec  |
+-----------------------+       +-------------------+

Key Components
#

  1. GitHub Actions as Transport: When a specific event occurs on GitHub (like labeling an issue), a GitHub Workflow fires up and dispatches a lightweight payload containing context about the issue or pull request.
  2. Azure Container Apps (ACA) Sandboxes: Provides isolated, dynamic execution micro-runtimes where agents can run generated code, interact with tools, and run commands safely.
  3. Microsoft Agent Framework (MAF): The foundational AI abstraction layer used to define agent capabilities, handle multi-agent dialogue, structure tool invocation, and maintain task context.
  4. GitHub Copilot SDK: Provides direct integration back into GitHub services, enabling agents to comment, update statuses, edit files, and create PRs autonomously.

How It Works Under the Hood
#

1. Event Dispatch via GitHub Actions
#

Instead of building a long-running web-hook server that waits for GitHub events, GitHub Actions handles event ingestion natively. A simple workflow file watches for issue label modifications:

name: Squad Dispatcher

on:
  issues:
    types: [labeled]

jobs:
  dispatch-to-aca:
    if: github.event.label.name == 'run-squad'
    runs-on: ubuntu-latest
    steps:
      - name: Trigger Squad on ACA
        env:
          AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
          AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
          AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
        run: |
          echo "Dispatching issue #${{ github.event.issue.number }} to ACA..."
          # Authentication & job execution invocation logic

2. Isolated Execution in ACA Sandboxes
#

When ACA receives the execution request, it provisions an isolated container sandbox instance. ACA Sandboxes are ideal for agentic workloads because they execute within fast-starting, secure boundaries. If an agent executes generated Python or PowerShell code as part of problem solving, it happens inside a sandbox away from your control plane.

3. Agent Coordination via Microsoft Agent Framework
#

Inside the ACA job/sandbox execution context, the Microsoft Agent Framework takes over. MAF orchestrates individual agents (e.g., a triage agent, a code developer agent, and a reviewer agent).

// Example conceptual MAF Agent setup inside the ACA container
var triageAgent = new ChatCompletionAgent(
    name: "TriageAgent",
    instructions: "Analyze incoming GitHub issues and assign execution plans."
);

var codeAgent = new ChatCompletionAgent(
    name: "CodeAgent",
    instructions: "Generate fixes inside the isolated workspace based on plan."
);

// MAF manages the conversation loop and state handoffs between agents

Using the GitHub Copilot SDK, these agents read issue details, write code to solve the issue inside the sandbox, run validation tests, and post their final conclusions or pull requests back onto GitHub.

Why This Pattern Matters
#

  • Zero Idle Costs: Compute only runs when triggered by a GitHub Action event, keeping cloud spending minimal.
  • Security First: ACA Sandboxes prevent rogue tool execution or unvalidated code generation from breaking external environments.
  • Native Developer Experience: Developers never leave GitHub. Slap a label on an issue, grab coffee ☕, and come back to review the solution proposed by your agent squad.

Getting Started & Resources
#

Ready to implement this pattern or inspect the code? Everything is open source in the project repository!

Recommended Reference Documentation#