Agent runs as C# code.
Each in its own VM.
A run is a C# script: the VMs, the agent sessions in them and what each is asked, in a fluent API. distroid boots the VMs on KVM, starts Claude Code inside and journals every prompt, tool call and model call, so a run can be repeated, branched from a snapshot and scored.
ports-zero.cs · abridged, the script of the run replayed here
var model = new ClaudeModelConfig { Model = "opus[1m]", Effort = Effort.XHigh,
Tools = [ClaudeTool.Read, ClaudeTool.Glob, ClaudeTool.Grep] };
string[] readers = [.. arms.Keys.SelectMany(arm =>
Enumerable.Range(1, 5).Select(n => $"{arm}-{n}"))];
var definition = RunDefinitionBuilder.Create()
.WithEnvironment(e => e
.WithVm(v => v.Kernel("7.2.15").Disk("arch", Bytes.GiB(8))
.Cpus(4).Memory(Bytes.GiB(12)))
.WithDirectory("climb", d => d.FromHost(corpus)))
.WithSession(readers[0], s => s
.WithModelConfig(model).WithWorkingDirectory("climb"));
foreach (var reader in readers[1..])
definition = definition.WithSession(reader, s => s
.WithModelConfig(model).WithWorkingDirectory("climb"));
await using var engine = await EngineClient.Connect();
var run = await engine.BeginArm(definition.Build());
await run.Armed();
await Task.WhenAll(readers.Select(r => run.Session(r).Ask(Prompt(r))));
await run.End();
dotnet run ports-zero.cs