The ADK repo template is a GitHub repository set up for ADK projects. Pull requests are linted, tested and pushed to an Agent Studio branch. Merging deploys them to Agent Studio. Changes published in Agent Studio come back into git.
Use the template · Template repositoryHow a change moves
Each git branch maps to an Agent Studio branch with the same name. The workflows keep the two in step.What’s in a repo
Working on a project
Set up once per machine, from the repo:-
Create a git branch. From the project directory, switch the ADK to the Agent Studio branch with the same name. This creates the branch from
mainif it doesn’t exist yet, and keeps your files:The ADK tracks its Agent Studio branch separately from git, so run this again after everygit switch. See branches. - Make your changes and commit them. The git hooks format each project the way a sync from Agent Studio would, so CI and the merge queue accept it. If a hook reformats files, add them and commit again.
- Open a pull request. CI runs lint and tests, then pushes your changes to the Agent Studio branch.
-
Merge through the merge queue, or comment
/poly-mergeif the repo uses it.
Keeping Agent Studio and git in step
Before a merge, Deploy checks that Agent Studio’smain matches git’s main for each project. If Agent Studio has changes the repo doesn’t, the PR fails with AS branch main is not in sync with git main: run Sync Projects for that project, then add the PR to the queue again or comment /poly-merge again. To merge anyway and overwrite the Agent Studio changes, add the skip-as-sync-check label to the PR first.
After a change in Agent Studio, the Sync Projects workflow pulls it into the repo and pushes it to main. It runs:
- when a project’s webhook reports a publish or rollback;
- nightly;
- when the
polyai-adkversion inpyproject.tomlchanges, to re-sync every project; - manually, from the repo’s Actions tab.
Setting up a repo
The template’s SETUP.md covers each step. In outline:- Create a repo from the template.
- Create a GitHub App, which Sync Projects uses to push to
main. - Add your ADK API keys as repo secrets.
- Protect
mainwith a ruleset that requires the CI check, and either the merge queue or/poly-merge’s check. - Add a webhook to each project, so publishes and rollbacks start Sync Projects.
Merging with /poly-merge
GitHub offers merge queues on public repos, and on private repos only in organisations on GitHub Enterprise Cloud. Without one, or instead of one, a repo can merge with a comment. Comment /poly-merge on a pull request that is approved and passing its checks. It then:
- checks the PR’s approvals, required checks and conflicts with
main; - waits for any earlier
/poly-mergeon the same projects, while PRs on other projects go ahead at the same time; - lints and tests the PR merged into
main; - pushes each changed project to its Agent Studio branch, then merges each into Agent Studio’s
main; - squash-merges the PR, and posts the result on it.
poly/deploy check, which passes once its projects are deployed, so a PR that changes a project can only merge through /poly-merge. To turn it on, see the template’s SETUP.md.
Keeping a repo up to date
- The ADK version: change the
polyai-adkpin inpyproject.tomland merge it. Sync Projects then re-syncs every project with the new version. Check the release notes first. - The workflows: pull changes from the template with
.github/scripts/sync-from-template.sh, which previews by default; add--applyto commit them.
Next steps
Branches, push, and pull
How Agent Studio branches work with the ADK.
Environments and deployment
Promote merged changes from sandbox to pre-release and live.
Webhooks
Send deployment events from Agent Studio to your repo.

