How Siemens Modernized Legacy Code with Agentic Workflows

Siemens faced the tension between maintaining hundreds of millions of lines of legacy code and the imperative to modernize without breaking production systems. Standard coding assistants lacked the contextual depth to navigate industrial codebases where knowledge was scattered across code, Jira, Confluence, and scanned PDFs from decades ago. Any AI-generated change had to be traceable and verifiable for systems operating over 15–20 year lifecycles—hallucinated output was operationally unacceptable.

To solve this, Siemens and Google Cloud built Knowledge Fabric, an agentic system combining a knowledge graph on Spanner Graph with embeddings (using Approximate Nearest Neighbors) and full-text search. Agents built with the Google Agent Development Kit implement a design pattern called “slicing the elephant”: complex refactoring requests are decomposed into specialized sub-tasks handled by search, user story, architecture impact, task breakdown, and coding agents. A human stays in the loop at every stage, ensuring reliability and industrial quality standards.

The pilot migrating legacy control panels to modern web interfaces showed that generative AI can move beyond boilerplate when given structured context and careful orchestration. By modeling code as a graph and decomposing work into agent-led steps, the team reduced implementation effort and freed engineers from days of manual dependency analysis. The key takeaway for builders is that legacy modernization is feasible with the right infrastructure—knowledge graphs plus multi-agent orchestration with human validation.

How Siemens “sliced the elephant,” modernizing legacy code with agentic workflows

View Original