GitHub has released a public preview of the dynamic workflows feature for controlling agents via code
The dynamic workflows feature is available in public preview in Copilot CLI, GitHub Copilot app, and GitHub Copilot SDK on all GitHub Copilot plans. It allows defining sequential and concurrent steps and agent involvement in code.
For recurring tasks, you can specify in code when the agent should step in and how its result is used in subsequent steps.