Every migration to Guild follows the same four steps, whatever the source platform: inventory what the agent uses, map each piece to a Guild primitive, scaffold the Guild agent with the CLI, and prove it runs with guild agent test. The guides below give the concept map and CLI commands for each platform. They also list what does not map 1:1, so nothing gets lost.
1source repo -> detect platform -> inventory (tools, models, triggers, secrets by name)2 -> pick Guild agent type -> guild agent init -> port -> guild agent test3 -> MIGRATION.md -> (you decide) guild agent save --publish
Choose the Guild agent type
| You have | Guild agent type | Why |
|---|---|---|
| Instructions plus tools, text in and out | Native | No container, ready right after init |
| Typed input/output or deterministic steps | TypeScript | agent.ts with @guildai/agents-sdk |
| A Python LangGraph v1 graph | LangGraph | langgraph.json + graph.py, models and tools through Guild |
| Shell, files, git, or a repository | OpenClaw | AGENTS.md + skills/, built-in coding toolchain |
| A portable recipe with parameters | Goose | recipe.yaml with a response schema |
See Agent types for the full comparison.
Three ways to migrate
- The guild-migrate skillLoad it into Claude Code, Codex, or Cursor and ask it to migrate a directory. It detects the platform, scaffolds with the Guild CLI, ports, tests, writes
MIGRATION.md, and stops before publishing. - The Publish Agent to Guild ActionOnce the port is in your repository, publish it from GitHub Actions with an account API key. Guild never needs access to the repository.
- The migration agentMigrate to Guild, a TypeScript agent on Guild. Point it at a repository and it opens a draft pull request with the ported agent and its
MIGRATION.md.
Before you start
1npm install -g @guildai/cli2guild auth login3guild workspace list4guild workspace select
Publish from GitHub Actions
Once the migrated agent is in your repository and guild agent test passes, publish it with the Publish Agent to Guild Action. The Action uploads the agent directory, validates it, and publishes a version. Your repository can be private: the workflow sends the files to Guild, so Guild never needs access to it. Publish from GitHub Actions covers automatic releases, multiple agents, and troubleshooting.
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.
You need permission to add workflows and configure Actions secrets in the repository. Your GitHub organization must also allow the Action to run. If these controls are restricted, ask your repository owner. You don't need to install a GitHub App or authorize Guild to read the repository.
Add a release workflow
Save this as .github/workflows/publish-agent.yml:
1name: Publish agent2on:3 workflow_dispatch:4 inputs:5 version:6 description: New agent version7 required: true8 default: '1.0.0'9 type: string10 11permissions:12 contents: read13 14concurrency:15 group: guild-publish-myorg-hello16 cancel-in-progress: false17 18jobs:19 publish:20 if: github.ref == 'refs/heads/main'21 runs-on: ubuntu-latest22 steps:23 - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v624 with:25 persist-credentials: false26 - name: Publish to Guild27 id: publish28 uses: guildaidev/publish-agent-action@v1.0.029 with:30 path: agents/hello31 agent: myorg~hello32 version: ${{ inputs.version }}33 create-if-missing: 'true'34 agent-type: GOOSE35 overwrite: 'true'36 env:37 GUILD_API_KEY: ${{ secrets.GUILD_API_KEY }}
Then adjust it for your repository:
- 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.
For a migrated agent, also:
- Set
pathto the folderguild agent initcreated, andagent-typeto the type you scaffolded:GUILD_TYPESCRIPT,GUILD_NATIVE,LANGGRAPH, orOPENCLAW. - Read what
create-if-missingandoverwritedo before the first run, then follow Release and verify.
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.
1Help me publish agents from this repository to Guild using the official Action:2https://github.com/marketplace/actions/publish-agent-to-guild3Read the setup guide: https://docs.guild.ai/cli/github-actions4 51. Inspect the repository and propose agent directories, types, and dependencies.6 Check Guild's supported package format. Report incompatibilities; do not7 silently remove unsupported recipe fields or change agent behavior.82. Ask me to confirm the Guild owner~name target for each directory, whether9 missing targets may be created privately, and whether repository source may10 replace Guild editor changes. Ask whether releases should be manual or on merge.113. Add a workflow using guildaidev/publish-agent-action@v1.0.0 with contents: read,12 checkout with persist-credentials: false, and the confirmed directory mapping.13 Use per-target concurrency with cancel-in-progress: false. Keep publishing off14 pull_request and pull_request_target; pass GUILD_API_KEY only to the publish step.154. Tell me how to create an account key with Agents: Read & write and store it as16 the GUILD_API_KEY Actions secret. Never ask me to paste it here, read it back,17 print it, or commit it. Explain any extra dependency-read permissions needed.185. Use an explicit version per target: 1.0.0 for a new agent, otherwise higher19 than the latest published version. Do not assume the Action reads VERSION files.20 For automatic releases, keep versions in source and explain where to bump them.216. Validate the YAML and workflow, then show me the diff for approval. Do not22 merge, trigger a release, change visibility, or create a workspace without asking.23 After I authorize a test release, verify the resulting agent/version and report24 any validation errors. Publishing success does not prove runtime behavior.
