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.
When to Use
Section titled “When to Use”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.
How It Works
Section titled “How It Works”The create-agentic-agent migrates workflows through these steps:
- Analyze source - Read and understand the source workflow’s purpose and logic
- Identify dependencies - Detect repository-specific configuration, secrets, tools, and permissions
- Adapt configuration - Modify frontmatter, imports, and instructions for target repository
- Create workflow - Generate or update the workflow file in the target repository
- Validate - Compile and suggest fixes for any issues
Example Migration
Section titled “Example Migration”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 compatibleThe agent automatically handles repository names, paths, permissions, and tool configurations.
Initialize workflow creation agents:
gh aw initAgenticImport vs Traditional Import
Section titled “AgenticImport vs Traditional Import”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
Advanced Patterns
Section titled “Advanced Patterns”Merging Workflows
Section titled “Merging Workflows”Merge issue-triage from org/repo1 and label-management from org/repo2into a unified workflow handling both responsibilities.Splitting Workflows
Section titled “Splitting Workflows”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.Cross-Organization
Section titled “Cross-Organization”Migrate ci-doctor from public-org/workflows to our private enterpriserepository, adapting for internal MCP servers and security policies.Real-World Example
Section titled “Real-World Example”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.
Best Practices
Section titled “Best Practices”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
Authoring with AI
Section titled “Authoring with AI”In GitHub Copilot Chat, you can use custom agents to help create and debug workflows:
- Type
/agentand select create-agentic-workflow for interactive workflow creation/migration - Type
/agentand select debug-agentic-workflow for compilation debugging
Limitations
Section titled “Limitations”- 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
Related
Section titled “Related”- Packaging & Distribution - Shared workflows with version management
- Custom Agents - Specialized workflow authoring
- TrialOps - Safe workflow testing
- Workflow Structure - Format reference