GitHub Copilot Cloud Agent: Programmatic Task Triggers via REST API

GitHub Copilot

GitHub has launched a public preview of the Agent Tasks REST API, enabling Copilot Business and Enterprise subscribers to programmatically start Copilot cloud agent sessions without using the GitHub web interface. The API supports use cases such as fanning out refactors across multiple repositories from a script, spinning up new repositories from internal developer portals, and automating weekly release note generation. Developers can authenticate with personal access tokens or OAuth tokens, with GitHub App installation token support and Copilot Pro/Pro+ access coming soon.


Programmatic Agent Control: The Agent Tasks REST API

GitHub has introduced the Agent Tasks REST API in public preview, giving Copilot Business and Copilot Enterprise subscribers a way to trigger cloud agent coding sessions directly from scripts, pipelines, and internal developer tooling β€” no GitHub web UI required. The API is available at /agents/repos/{owner}/{repo}/tasks, and launching a task requires only a single required parameter: prompt, the natural-language instruction for the agent.

Once triggered, the cloud agent runs autonomously in a sandboxed development environment. It can make code changes across files, validate those changes by running tests and linters, and open a pull request once the work is ready for human review. Task progress is also trackable through the API, allowing callers to poll for status or integrate the results into custom dashboards and notification systems.

Real-World Automation Scenarios

The REST API unlocks a class of automation that was previously difficult to achieve with Copilot's interface-driven workflow. Three use cases stand out:

Repository-scale refactors and migrations. Teams maintaining many repositories β€” for example, those upgrading a shared dependency, renaming a module, or migrating to a new API β€” can fan out agent tasks in parallel across all affected repos from a single shell script. Rather than manually opening each repository and assigning Copilot an issue, the entire migration can be orchestrated programmatically.

Internal developer portals. Organizations with internal platforms for spinning up new projects can integrate cloud agent tasks directly into their onboarding flows. A new repository can be automatically bootstrapped with standard scaffolding, configuration files, and documentation by triggering a Copilot task immediately after the repo is created.

Automated release preparation. Teams can schedule a weekly pipeline that prompts the cloud agent to review merged pull requests, generate release notes, and draft a changelog entry β€” turning a manual authoring task into a recurring automated step.

Authentication and Access

The Agent Tasks API currently supports personal access tokens (both classic and fine-grained formats) and OAuth tokens. GitHub has announced that support for GitHub App installation tokens is coming soon, which will make it easier to integrate the API into automated workflows where user-scoped credentials are not appropriate. Support for Copilot Pro and Pro+ subscribers is also on the roadmap.

The API remains in public preview and subject to change. GitHub has published full endpoint documentation at the REST API endpoints for agent tasks reference page.