Skip to content

Step 8: Test Multi-Agent Orchestration with Durable Task Scheduler

Now you'll test the generate_comprehensive_documentation tool, which orchestrates multiple AI agents working together in sequence. This demonstrates how the Durable Task Scheduler manages complex, stateful workflows.

  1. Open the Durable Task Scheduler UI:

    • In your browser, navigate to http://localhost:8082/
    • This is the Durable Task Scheduler's web interface running in the Docker container
    • You'll see the orchestration dashboard where you can monitor workflows in real-time
  2. Trigger the Multi-Agent Orchestration:

    • In GitHub Copilot Chat (with the local-snippy MCP server active), enter the following prompt:
    #local-snippy Generate comprehensive documentation with emphasis on the MCP tools, vector search capabilities and code style. Save in a new file called comprehensive-documentation.md
    
    • Select Allow when Copilot asks to use the generate_comprehensive_documentation tool
  3. Monitor the Orchestration:

    • Switch to your browser at http://localhost:8082/
    • You should see a new orchestration instance appear in the dashboard
    • Watch as the orchestration progresses through multiple stages:
      • DeepWiki Agent generates initial documentation
      • DeepWiki Agent refines the documentation with additional details
      • CodeStyle Agent generates a complementary style guide
    • Each step shows the agent calls, tool invocations, and intermediate results
  4. Check the Function Logs:

    • In the terminal where func start is running, observe the detailed logs showing:
      • Orchestration startup
      • Agent invocations (DeepWikiAgent, CodeStyleAgent)
      • Vector search tool calls
      • State persistence operations
  5. Review the Generated Documentation:

    • Once the orchestration completes (this may take 1-2 minutes), check your workspace
    • Open comprehensive-documentation.md in the project root
    • The file should contain:
      • Comprehensive wiki-style documentation generated by DeepWikiAgent
      • Code style guide generated by CodeStyleAgent
      • All focused on MCP tools and vector search capabilities as requested
  6. Review the Completed Orchestration in the Dashboard:

    • Return to the Durable Task Scheduler UI at http://localhost:8082/
    • Find your completed orchestration instance in the list (it should show Completed status)
    • Click on the orchestration to view its detailed execution history:
      • Timeline view: See the sequence of all agent calls and their durations
      • Agent outputs: Review the intermediate results from each agent (DeepWiki and CodeStyle)
      • Tool invocations: Examine which vector searches were performed and what snippets were retrieved
      • State transitions: Understand how the orchestration moved through each stage
    • This detailed view helps you understand how Durable Functions orchestrated the multi-agent workflow and managed state persistence throughout the entire process
    • Notice how each agent call is tracked as a separate activity, allowing you to debug and optimize complex workflows

What Just Happened:

You triggered a complex multi-agent workflow that:

  1. Used an MCP tool (generate_comprehensive_documentation) to start a Durable Functions orchestration
  2. The orchestration coordinated two AI agents (DeepWiki and CodeStyle) in sequence
  3. Each agent used the vector_search tool to find relevant code snippets
  4. The Durable Task Scheduler managed the entire workflow, persisting state between each step
  5. Results were combined and saved to a file via Copilot

This demonstrates the power of combining:

  • MCP protocol for AI assistant integration
  • Durable Functions for workflow orchestration
  • AI Agents for specialized tasks
  • Durable Task Scheduler for local state management