Skip to content
GitHub Agentic Workflows

AgenticImport

AgenticImport uses AI agents to migrate workflows between repositories with automatic adaptation. Unlike gh aw add or shared imports, it creates independent, customized copies without version tracking.

Use AgenticImport for one-time migrations requiring adaptation:

  • Repository forking - Adapt workflows for different projects
  • Context-specific changes - Substantial modifications for new environments
  • Cross-organization - Copy workflows where shared imports aren’t practical
  • Experimentation - Fork workflows as automation starting points

Don’t use for synchronized updates—use Packaging & Distribution with gh aw add instead.

The create-agentic-agent migrates workflows through these steps:

  1. Analyze source - Read and understand the source workflow’s purpose and logic
  2. Identify dependencies - Detect repository-specific configuration, secrets, tools, and permissions
  3. Adapt configuration - Modify frontmatter, imports, and instructions for target repository
  4. Create workflow - Generate or update the workflow file in the target repository
  5. Validate - Compile and suggest fixes for any issues

The release.md workflow migration from githubnext/gh-aw to githubnext/gh-aw-mcpg:

Migrate the release.md workflow from githubnext/gh-aw to this repository.
The workflow should:
- Keep the same release automation logic
- Adapt permissions and jobs for our repository structure
- Update any repository-specific references
- Ensure all imports and tools are compatible

The agent automatically handles repository names, paths, permissions, and tool configurations.

Initialize workflow creation agents:

gh aw init

Use AgenticImport for:

  • Complex adaptations (repository-specific config, tool changes)
  • One-time migration without ongoing synchronization
  • AI-assisted analysis and validation

Use gh aw add for:

  • Synchronized updates across repositories
  • Version management with semantic tags
  • Minimal customization

Use manual copy for:

  • Simple workflows without complex dependencies
Merge issue-triage from org/repo1 and label-management from org/repo2
into a unified workflow handling both responsibilities.
Split multi-responsibility workflow.md into:
- Issue triage (issue-triage.md)
- PR review (pr-review.md)
- Security scanning (security-scan.md)
Extract shared configuration into common imports.
Migrate ci-doctor from public-org/workflows to our private enterprise
repository, adapting for internal MCP servers and security policies.

The release.md migration from githubnext/gh-aw to githubnext/gh-aw-mcpg preserved release automation logic while adapting permissions, repository references, and structure for the target environment.

Before Migration:

  • Review source workflow purpose and dependencies
  • Identify required secrets, tools, and permissions
  • Understand shared imports
  • Plan necessary adaptations

During Migration:

  • Provide target repository context
  • Specify security policies and constraints
  • Use clear, specific instructions
  • Validate incrementally with gh aw compile

After Migration:

  • Test in safe environment (TrialOps)
  • Review and document changes
  • Remove source: frontmatter field

In GitHub Copilot Chat, you can use custom agents to help create and debug workflows:

  • Type /agent and select create-agentic-workflow for interactive workflow creation/migration
  • Type /agent and select debug-agentic-workflow for compilation debugging
  • Point-in-time copies - Not for continuous synchronization (use gh aw add)
  • Requires context - Agent needs clear target repository instructions
  • Manual validation - Review and test before production
  • Iteration needed - Complex workflows may need refinement