This guide explains how to add custom expert agents to the Container Migration Solution Accelerator to extend platform support or add specialized expertise.
The solution uses a multi-agent orchestration pattern where specialized expert agents collaborate through Agent Framework orchestrations (including group chat). You can add custom agents to support additional cloud platforms, specialized workloads, or domain-specific expertise.
The solution includes these expert agents:
- Technical Architect: Overall architecture analysis and design decisions
- Azure Architect / AKS Expert: Azure-specific optimizations and Well-Architected Framework compliance
- GKE Expert: Google Kubernetes Engine (GKE/Anthos) specific knowledge and migration patterns
- EKS Expert: Amazon Elastic Kubernetes Service expertise and AWS-to-Azure translations
- OpenShift Expert: Red Hat OpenShift specific knowledge and migration patterns
- Rancher Expert: Rancher/RKE/RKE2/K3s specific knowledge and migration patterns
- Tanzu Expert: VMware Tanzu/TKG specific knowledge and migration patterns
- OnPremK8s Expert: Self-managed/on-prem Kubernetes migration patterns
- QA Engineer: Validation, testing strategies, and quality assurance
- YAML Expert: Configuration transformation and syntax optimization
In the current processor implementation, “expert agents” are configured primarily through:
- Prompt files under each step’s
agents/folder - Registry/config (analysis only) to select platform experts dynamically
- Step orchestrators that construct
AgentInfoobjects and run group chat
Add your expert prompt file to the step(s) it should participate in:
- Analysis: src/processor/src/steps/analysis/agents/
- Design: src/processor/src/steps/design/agents/
- YAML conversion: src/processor/src/steps/convert/agents/
- Documentation: src/processor/src/steps/documentation/agents/
Use the existing prompt files in those folders as templates.
Analysis experts are loaded dynamically from:
Add your expert there to have it participate in the analysis phase.
For other phases, add an AgentInfo(...) entry in the relevant step orchestrator’s prepare_agent_infos() implementation.
Add your agent to the appropriate step orchestrator so it participates in the group-chat collaboration for that phase.
The processor uses step-level orchestrators under:
- src/processor/src/steps/analysis/orchestration/
- src/processor/src/steps/design/orchestration/
- src/processor/src/steps/convert/orchestration/
- src/processor/src/steps/documentation/orchestration/
Each orchestrator builds its agent set using AgentInfo objects and runs a GroupChatOrchestrator.
Analysis phase (platform experts) is registry-driven via:
To add a new analysis expert:
- Add a new prompt file under src/processor/src/steps/analysis/agents/
- Add an entry to
platform_registry.jsonpointing at the prompt file and desiredagent_name
For other phases, add a new AgentInfo(...) entry in the relevant orchestrator’s prepare_agent_infos() implementation.
Minimal example (pattern used in the codebase):
from libs.agent_framework.agent_info import AgentInfo
expert_info = AgentInfo(
agent_name="YourCustomExpert",
agent_instruction=instruction_text,
tools=self.mcp_tools,
)Your implementation uses phase-specific agent selection, meaning you can include your agent in specific phases only:
- Analysis Phase: Include if your agent helps with platform detection
- Design Phase: Include if your agent provides Azure architecture guidance
- YAML Phase: Include if your agent helps with configuration transformation
- Documentation Phase: Include if your agent contributes to documentation
Follow the same pattern for YAML and Documentation orchestrators as needed.
- Unit Testing: Create unit tests for your agent's functionality
- Integration Testing: Test the agent within the full orchestration flow
- Validation: Verify the agent produces expected outputs and collaborates effectively
- Single Responsibility: Each agent should have a clear, focused expertise area
- Collaboration: Design agents to work well with existing agents
- Consistency: Follow established patterns and naming conventions
- Documentation: Provide clear instructions and expected behaviors
- Specificity: Be specific about the agent's role and responsibilities
- Context: Provide sufficient context for the agent's expertise domain
- Examples: Include examples of expected inputs and outputs
- Collaboration: Define how the agent should interact with other agents
- Token Efficiency: Optimize prompts for token usage
- Response Quality: Balance prompt length with response quality
- Execution Time: Consider the impact on overall processing time
- Resource Usage: Monitor memory and CPU usage during orchestration
The actual implementation supports conditional agent inclusion. Study the existing orchestrator files to understand how agents are selectively included in different phases:
- Analysis phase focuses on platform detection experts
- Design phase emphasizes Azure architecture experts
- YAML phase includes transformation specialists
- Documentation phase involves technical writers
Refer to the actual orchestration implementations in src/processor/src/steps/**/orchestration/ for patterns (under src/processor/src/steps/).
- Agent Not Participating: Check agent registration in orchestrator
- Poor Response Quality: Review and refine agent prompts
- Token Limit Exceeded: Optimize prompt length and complexity
- Integration Conflicts: Ensure agent collaborates well with existing agents
- Enable Verbose Logging: Use detailed logging to trace agent interactions
- Test Individual Agents: Test agents in isolation before integration
- Monitor Token Usage: Track token consumption for optimization
- Validate Outputs: Ensure agent outputs meet expected formats
Study the existing expert prompts and orchestrators in your codebase for real patterns:
- Prompt files:
src/processor/src/steps/**/agents/(under src/processor/src/steps/) - Analysis expert registry: src/processor/src/steps/analysis/orchestration/platform_registry.json
- Orchestrators:
src/processor/src/steps/**/orchestration/(under src/processor/src/steps/)
These provide tested patterns for implementing custom expert agents in your migration solution.
- Review Existing Agents: Study the existing agent implementations for patterns
- Plan Your Agent: Define the specific expertise and responsibilities
- Implement Step by Step: Start with a prompt file, then add registry/orchestrator integration
- Test Thoroughly: Validate the agent works well in the full orchestration flow
- Document Your Agent: Create documentation for future maintenance and extension
For additional help with custom agent development, refer to: