guild.json file, or create the agent in advance.
Start with one manual release, then switch to automatic releases if you want them. You can also give the setup instructions to your coding agent.
Choose authentication
- GitHub Actions: use an account API key. The Action runs unattended, so it can’t use browser OAuth or your local login. Don’t copy a browser token into Actions secrets.
- Local CLI: use
guild auth loginto sign in through your browser. Commands run as your user, with your account permissions. See Publish locally with browser login.
Prepare your account
- Create an account API key in the Guild account that will own the agent. Give it Agents: Read & write (
agents:write). - In your GitHub repository, open Settings > Secrets and variables > Actions. Add the full
<api_key_id>:<api_key_secret>value as a repository secret namedGUILD_API_KEY. Don’t commit the key or paste it into a coding-agent conversation. - Choose a target in
owner~nameform, such asmyorg~hello. The owner must match the key’s Guild account.
Prepare one agent directory
Start with a package that matches its agent type. For a minimal Goose agent, save this asagents/hello/recipe.yaml:
path at the agent folder, not the whole monorepo. CLI 0.27.2 applies .gitignore rules from the repository root, parent folders, and nested folders. Local-only files such as .env*, .npmrc, .guild, node_modules, and dist are always excluded. Source files must be UTF-8. See which files are saved.
Add a release workflow
Save this as.github/workflows/publish-agent.yml:
- Replace
myorg~hellowith your target, andagents/hellowith your agent directory. - If your default branch isn’t
main, change the branch condition. - Merge the workflow onto your default branch. Run workflow appears only after the merge.
@v1.0.0 with @d5f1dc7abe6bab172653d1ab16f4d5f68ea54e0c. The Action doesn’t install newer CLI versions on its own. Review Action upgrades in a pull request.
create-if-missing lets the Action create the target as a private agent if it doesn’t exist. If the target exists, its type must match agent-type. Double-check the target name before you run the workflow.
Release and verify
- Open Actions > Publish agent > Run workflow. Select
mainand enter a version. Use1.0.0for a new target. For an existing target, use a version higher than its latest published one. - Wait for the job to succeed. In Guild, find your agent and confirm the published version. A new target is private. An existing target keeps its visibility.
- Change the greeting instruction in a pull request and merge it. Run the workflow again with the next version, such as
1.0.1. - Confirm that the agent now has the new published version.
agent-id, version-id, and version as step outputs. For example, a later step can read steps.publish.outputs.version-id.
If validation fails, the workflow fails and the previously published version stays in place. A failed first release can leave an unpublished private agent behind for you to inspect.
Publishing doesn’t create a workspace or start a session. To check how the agent behaves, add it to a test workspace and run it. Each workspace’s autoupdate setting decides whether its installation picks up the new version.
Choose automatic release timing
To release on every merge, replace the manual trigger with a push trigger on your default branch:- Explicit version (recommended): replace
version: ${{ inputs.version }}with a value in source, such asversion: '1.0.2'. Increase it in each release pull request. Never reuse a published version number. - Automatic version: omit the
versioninput. TypeScript agents use the version inpackage.json. Agents without apackage.json, such as Goose agents, get the next patch version, starting at1.0.0.
VERSION file. To use one, read it in an earlier step and pass its value as version.
Never pass the publishing key to untrusted pull-request code or a pull_request_target workflow. Validate pull requests in a separate workflow, and publish only after merge.
Publish multiple agents
Each step publishes one directory to one agent. To release several agents, repeat the step with a differentpath, agent, and version for each. Use sequential steps when one agent depends on another, and a matrix for independent agents. If you use separate jobs, give each target its own concurrency group.
Include only the agents you intend to release, each with a new version. Republishing an unchanged agent at an existing version fails.
The Action doesn’t discover packages or install dependencies between agents. Releases aren’t atomic: if a later step fails, earlier publications stay published.
Publish locally with browser login
You can publish the same directory from your terminal without GitHub Actions or an API key. Install the CLI, version 0.27.2 or later, and prepare the agent directory. Then run:myorg~hello with a target in an account where you can write agents. GUILD_API_KEY takes precedence over your browser login, so the first line clears it. If you’re already signed in, skip auth login. Check the identity that auth status reports before you publish.
The command creates a missing private agent and publishes 1.0.0. For an existing agent, use a version higher than its latest published one.
If the agent has edits from the Guild editor, the CLI asks before replacing them. Pass --force only when you want your local files to win. Local and Actions publishing use the same upload, validation, and publishing API.
Set up with a coding agent
Copy this prompt into Claude Code, Codex, or another coding agent that has access to your repository. The agent prepares a workflow for you to review. It never asks for your key or publishes without your confirmation.Troubleshoot a release
If you stop releasing from the repository, delete the GitHub secret and revoke the key.
For other CI systems, run
guild agent save with an API key. Publishing is one-way: changes made in Guild don’t sync back to your repository.
Related pages
guild agent savefor every save option, including--create-if-missingand--agent-type- Agent types for the package format each type expects
- Goose agents, OpenClaw agents, and LangGraph agents for bringing agents you’ve already built elsewhere into Guild
- Versions for how drafts, published versions, and workspace updates work
- API keys for creating, rotating, and revoking the publishing key
- GitHub integration for giving your agents access to GitHub at runtime