How to create an Unreal Engine Installed Build using Unreal Horde

Using a clean set of Unreal Engine 5.8.2 source code from GitHub, how do I create an Installed Build for Windows using Unreal Horde?

If a working Horde stream json file could be provided as example please, that would be most helpful.

The issue I am facing is, AutomationTool and UBT are required for running BuildGraphs, however this requires that Setup.bat and maybe GenerateProjectFiles.bat needed to be executed first to install and build these dependencies, however, there is no way (that I know of at least) to run shell commands in a Horde job, since everything needs to be BuildGraph.

I know I can get around this by creating the Installed Build separately and copying it manually to the build agents. I would however like to use Horde for building the Engine as well, creating a more streamlined workflow where Unreal DevOps and CI/CD tasks are done mostly using Horde.

Does anyone have any ideas? Maybe I am just missing something.

This is my stream json so far:

{
	"name": "//Unreal/Engine/5.8.2",

	"tabs":
	[
		{
			"title": "Installed Build",
			"style": "Normal",
			"templates":
			[
				"installed-build"
			],
			"columns":
			[
				{
					"heading": "Installed Engine",
					"category": "Engine",
					"relativeWidth": 4
				}
			]
		}
	],

	"agentTypes":
	{
		"Win64":
		{
			"pool": "clean-pool",
			"workspace": "Full"
		}
	},

	"workspaceTypes":
	{
		"Full":
		{
			"identifier": "UnrealEngine-5.8.2",
			"method": "name=managedWorkspace&preferNativeClient=true"
		}
	},

	"templates":
	[
		{
			"id": "installed-build",
			"name": "Create",
			"initialAgentType": "Win64",
			"arguments": [
				"-Script=Engine/Build/InstalledEngineBuild.xml",
				"-Target=Make Installed Build Win64",
				"-set:HostPlatformOnly=true",
				"-set:WithDDC=false",
				"-clean"
			]
		}
	]
}

References:

Create an Installed Build of Unreal Engine | Unreal Engine 5.8 Documentation | Epic Developer Community

Installed Build Reference Guide for Unreal Engine | Unreal Engine 5.8 Documentation | Epic Developer Community

Horde Schema for Unreal Engine | Unreal Engine 5.8 Documentation | Epic Developer Community