DEV Community

Cover image for Beyond Cloud Migration: Building an Agentic AI Advisor for Enterprise Modernisation
Samir Sahoo
Samir Sahoo

Posted on

Beyond Cloud Migration: Building an Agentic AI Advisor for Enterprise Modernisation


Enter fullscreen mode Exit fullscreen mode

Building an Agentic AI-Powered Cloud Migration Advisor with LangGraph

How to orchestrate specialised AI agents for enterprise modernisation, migration assessment, risk analysis, and human-in-the-loop governance.

Cloud migration is not simply about moving workloads from on-premises infrastructure to AWS, Azure, or Google Cloud.

For enterprise applications, migration involves much more:

  • Understanding legacy application architecture.
  • Evaluating migration readiness.
  • Identifying database and integration dependencies.
  • Assessing regulatory and security risks.
  • Estimating migration costs and business value.
  • Designing a target cloud architecture.
  • Creating a realistic migration roadmap.

These decisions require collaboration between enterprise architects, cloud architects, developers, security engineers, operations teams, and business stakeholders.

Can Agentic AI help simplify this process?

I started exploring this question by building an open-source project called Wayfinder Migration Advisor.

GitHub: https://github.com/samirsahoo/wayfinder-migration-advisor

In this article, I'll explain the problem, architecture, multi-agent orchestration approach, governance model, and some engineering decisions behind the implementation.

1. The problem: Cloud migration needs architectural intelligence

Imagine a legacy banking application with:

  • Java-based monolithic architecture.
  • Oracle database.
  • Multiple downstream integrations.
  • PCI DSS requirements.
  • Regional data residency constraints.
  • Complex batch processing.
  • Limited technical documentation.

A conventional cloud assessment might recommend moving the application to AWS or Azure.

But that recommendation doesn't answer the important questions:

  1. Should we rehost, replatform, refactor, or rebuild?
  2. What happens to the existing database?
  3. Which application dependencies need to be migrated first?
  4. How do we maintain regulatory compliance?
  5. What is the expected migration effort?
  6. How will the new architecture impact operational costs?
  7. Who validates and approves the proposed migration strategy?

This is where a coordinated multi-agent approach becomes interesting.

2. Introducing Wayfinder Migration Advisor

Wayfinder is an Agentic AI-powered advisory framework designed to assess existing enterprise applications and generate structured cloud migration and modernisation roadmaps.

Instead of sending the entire problem to a single LLM prompt, the solution uses specialised agents orchestrated through LangGraph.

The objective is to generate a structured advisory report covering:

  • Migration readiness assessment.
  • Cloud architecture recommendations.
  • Database and data migration considerations.
  • Business value and KPI alignment.
  • Operating model recommendations.
  • Regulatory and operational risk assessment.
  • Cost and effort estimation.
  • Phased migration roadmap.

The key architectural principle:

Agents analyse and recommend. Humans validate and approve.

3. Architecture: Specialised agents with clearly defined responsibilities

The application uses LangGraph to coordinate specialised agents through a state-driven workflow.

Each agent has a specific responsibility and produces structured findings that are consumed by subsequent stages.

Agent responsibilities

1. Discovery Agent

Evaluates the existing system profile, technical complexity, and migration readiness.

2. Cloud Architecture Agent

Evaluates cloud platforms, migration patterns, service decomposition opportunities, and target architecture recommendations.

3. Data Migration Agent

Assesses database versions, end-of-support information, data volume, and migration mechanisms.

4. Business Value Agent

Evaluates whether the proposed migration strategy aligns with business objectives and expected KPIs.

5. Operating Model Agent

Examines team structure, operational topology, skills gaps, and on-call requirements.

6. Risk and Compliance Agent

Identifies regulatory and operational risks, including critical compliance findings.

7. Cost and ROI Agent

Provides migration effort sizing, cost considerations, and total cost of ownership narratives.

8. Governance Agent

Coordinates the approval process and generates the final migration advisory report.

Workflow orchestration

The overall execution flow looks like this:

This is not simply a collection of independent AI agents.

It is a coordinated decision-support workflow where downstream decisions depend on upstream findings.

4. Why LangGraph?

For this use case, I wanted an orchestration framework that supports:

  • Stateful workflows.
  • Conditional routing.
  • Structured state management.
  • Human-in-the-loop execution.
  • Workflow interruption and resumption.

LangGraph provides these capabilities.

The workflow can be modelled as a graph where each node represents an agent or processing stage.

Conceptually:

from langgraph.graph import StateGraph, START, END

builder = StateGraph(MigrationState)

builder.add_node("discovery", discovery_agent)
builder.add_node("architecture", architecture_agent)
builder.add_node("risk", risk_agent)
builder.add_node("cost_roi", cost_roi_agent)
builder.add_node("governance", governance_agent)

builder.add_edge(START, "discovery")
builder.add_edge("discovery", "architecture")
builder.add_edge("architecture", "risk")
builder.add_edge("risk", "cost_roi")
builder.add_edge("cost_roi", "governance")
builder.add_edge("governance", END)
Enter fullscreen mode Exit fullscreen mode

This illustrates the basic graph structure. The actual project includes additional nodes, routing, and approval handling.

The benefit is that orchestration logic remains explicit rather than being hidden inside a large prompt.

5. Human-in-the-loop: Governance must be part of the workflow

One of the biggest concerns with enterprise Agentic AI is excessive autonomy.

An AI agent may generate a convincing recommendation, but that doesn't automatically make it correct.

For cloud migration, incorrect decisions can introduce financial, operational, security, and regulatory risks.

Wayfinder implements a human approval gate using LangGraph's:

  • interrupt()
  • Command(resume=...)

The workflow pauses when governance approval is required.

The reviewer can approve or request changes.

from langgraph.types import interrupt, Command

def governance_agent(state):

    decision = interrupt({
        "message": "Migration approval required",
        "risk_summary": state["risk_summary"],
        "migration_strategy": state["migration_strategy"]
    })

    if decision["action"] == "approve":
        return {
            "approval_status": "APPROVED"
        }

    return {
        "approval_status": "CHANGES_REQUESTED",
        "reviewer_notes": decision.get("notes")
    }
Enter fullscreen mode Exit fullscreen mode

This is a simplified illustration of the approval interaction; the repository implements additional validation and safeguards.

The governance mechanism includes:

  • Explicit approval or rejection.
  • Mandatory reviewer notes for critical-risk approvals.
  • Rejection of invalid or pending decisions.
  • An audit-oriented record of review decisions.
  • No automatic infrastructure changes.

For example, a migration involving PCI DSS critical risks cannot be approved without a reviewer note.

Human-in-the-loop should be an actual execution control, not merely an AI-generated message asking someone to approve a decision.

6. Explainable AI: Don't let the LLM decide everything

Another important engineering decision was separating deterministic analysis from LLM-generated narratives.

I deliberately avoided making the LLM responsible for every analytical decision.

Wayfinder uses deterministic Python heuristics for:

  • Migration readiness scoring.
  • Regulatory risk classification.
  • Database end-of-support checks.
  • Migration effort classification.
  • Architecture recommendations.

The LLM is optional and is used for generating readable narrative summaries.

The current implementation supports:

  • MockNarrator: deterministic output without an external model.
  • AnthropicNarrator: optional LLM-generated summaries.

This means the application can run without an API key or external model dependency.

Why is this important?

Consider a migration readiness score.

If an LLM simply returns a score of 35/100, how do we validate that number?

A deterministic scoring mechanism makes the calculation inspectable and easier to test.

Similarly, regulatory risk classifications should have identifiable reasons behind them.

I believe this separation between deterministic decision-making and probabilistic language generation is an important architectural pattern for enterprise AI systems.

7. Example: Assessing a legacy banking platform

The repository includes three example system profiles representing different migration scenarios.

One example is a legacy trading platform called Core Trading Ledger.

Its illustrative assessment produces:

Assessment Result
Migration readiness 5/100
Recommended approach Refactor
Programme size XL
Indicative duration 14 months
Identified risks 4
Critical risks 1

The proposed architecture includes AWS and IBM Cloud for data-residency-constrained regions.

These are illustrative outputs from the current heuristic model, not validated migration estimates or a production business case.

The important point is that the system attempts to connect technical architecture decisions with business value, regulatory requirements, data migration, operational readiness, and governance.

8. Technology stack

The project uses a relatively lightweight Python-based architecture.

Technology Responsibility
Python Core implementation
LangGraph Agent orchestration
Pydantic Typed models and structured outputs
YAML Enterprise system profiles
Anthropic API Optional narrative generation
Pytest Automated testing

Some notable engineering choices:

Typed agent communication

Agents exchange structured findings rather than unrestricted natural-language responses.

Conditional workflow routing

Critical risk findings can change the execution path.

Fail-closed governance

Invalid or incomplete approval decisions are rejected.

Pluggable LLM integration

The analytical workflow is independent of the selected language model.

Automated testing

The repository includes 686 offline tests across 15 test files covering agents, workflow execution, governance, reporting, and example scenarios.

9. Run the project locally

You can explore the implementation and run the example assessments locally.

Prerequisites

  • Python 3.12+
  • pip

Clone the repository

git clone https://github.com/samirsahoo/wayfinder-migration-advisor.git

cd wayfinder-migration-advisor
Enter fullscreen mode Exit fullscreen mode

Create a virtual environment

python -m venv .venv
Enter fullscreen mode Exit fullscreen mode

Activate it:

# Windows
.venv\Scripts\activate

# Linux / macOS
source .venv/bin/activate
Enter fullscreen mode Exit fullscreen mode

Install dependencies

pip install -e .
Enter fullscreen mode Exit fullscreen mode

Run an assessment

wayfinder run examples/legacy_trading_platform.yaml
Enter fullscreen mode Exit fullscreen mode

Explore the other scenarios:

wayfinder run examples/retail_order_platform.yaml

wayfinder run examples/internal_reporting_tool.yaml
Enter fullscreen mode Exit fullscreen mode

Generate a report with an explicit approval note:

wayfinder run examples/legacy_trading_platform.yaml \
  --approve-note "Architecture review completed" \
  --out report.md
Enter fullscreen mode Exit fullscreen mode

The repository also includes four Claude Code Agent Skills to help author system profiles, run assessments, review roadmaps, and extend regulatory coverage.

10. What's next?

Wayfinder is currently a portfolio-grade reference implementation rather than a production migration-planning platform.

Some areas I would like to explore further:

Enterprise application discovery

Integrate with source repositories, CMDBs, application inventories, and dependency analysis tools.

Knowledge-driven recommendations

Introduce curated architecture patterns, cloud service catalogues, vendor lifecycle information, and regulatory knowledge sources.

Persistent workflow state

Introduce persistent checkpoint storage to support long-running approval workflows and process restarts.

Improved cost modelling

Integrate cloud pricing, licensing, infrastructure utilisation, and operational expenditure data.

Enterprise governance

Extend the approval process with role-based access, reviewer delegation, evidence management, and audit integrations.

Architecture validation

Connect target architecture recommendations with architecture rules, security controls, and infrastructure-as-code validation.

These are potential evolution paths, not capabilities currently implemented.

11. Key engineering lessons

Building a multi-agent application is relatively straightforward compared with building one that enterprises can trust.

The real engineering challenges are:

  1. Defining clear agent responsibilities.
  2. Controlling how agents exchange information.
  3. Separating deterministic analysis from LLM-generated content.
  4. Managing dependencies between decisions.
  5. Handling critical risks and exceptions.
  6. Maintaining human accountability.
  7. Producing explainable and reviewable outputs.

For me, Wayfinder is an exploration of how Agentic AI can support enterprise architecture and technology modernisation.

I believe the next generation of enterprise AI systems will not be defined by how many agents they contain or how autonomously they operate.

They will be defined by how reliably they support business decisions, how transparently they explain their recommendations, and how effectively they operate within human governance boundaries.

AI should accelerate enterprise decision-making, not replace enterprise accountability.


Explore the project and contribute

GitHub Repository:

https://github.com/samirsahoo/wayfinder-migration-advisor

The project is open source under the MIT License.

I welcome feedback, architectural discussions, suggestions, and contributions from:

  • Solution Architects.
  • Cloud Architects.
  • Enterprise Architects.
  • AI Engineers.
  • Python Developers.
  • Technology Modernisation Practitioners.

If you are exploring Agentic AI for enterprise architecture, cloud transformation, or technology modernisation, I'd be interested in hearing about your experiences.

What would you add to an Agentic AI-powered enterprise migration advisor?

Let's build enterprise AI systems that are intelligent, explainable, governed, and trustworthy.

Top comments (0)