Agentic LLM Architecture for Scalable UML Diagram Generation from Code
A recent study presents an agentic architecture featuring context engineering aimed at automating UML diagram creation from source code repositories. This innovative system utilizes five distinct agents—PlannerAgent, AnalyzerAgent, DiagramAgent, CorrectorAgent, and DependencyAnalyzerAgent—developed on the Claude Agent SDK, each responsible for a specific cognitive task. An intermediate representation (IR) compaction layer, which is deterministic and importance-weighted, converts complete project IRs into diagram-specific formats that comply with token limitations, eliminating the need for LLM calls and achieving results in milliseconds. The research assessed the system across 12 open-source repositories in four programming languages: Java, JavaScript, PHP, and Python. This paper, available on arXiv, tackles the scalability issues faced by LLM-based code analysis tools when dealing with real codebases that exceed context limits.
Key facts
- Paper introduces agentic architecture with context engineering for automated UML diagram generation.
- Five specialized agents: PlannerAgent, AnalyzerAgent, DiagramAgent, CorrectorAgent, DependencyAnalyzerAgent.
- Agents built on Claude Agent SDK.
- Deterministic importance-weighted IR compaction layer transforms full project IRs into diagram-specific views.
- Compaction requires no LLM calls and completes in milliseconds.
- System evaluated on 12 open-source repositories.
- Repositories in Java, JavaScript, PHP, and Python.
- Paper published on arXiv with ID 2605.24453.
Entities
Institutions
- arXiv
- Claude Agent SDK