Inspiration
Software Architects develop diagrams but their utility has largely been limited to documentation and presentation. Moreover, the evolution of no-code and low-code platforms, enterprises continued to face challenges related to modularity and maintainability. These limitations encouraged me to develop a compiler that transforms architectural diagram to code, however I soon realized that the ChatGPT LLM models could accelerate this process by 20x. And, that has been realization in this project.
What it does
This project enables platform engineering teams to generate production-ready Infrastructure as Code directly from a diagram. In its current, early stage, it consists of two AI agents that process architecture diagram and generate IaC. The code generation is reviewed with validation and security recommendations. The vision for this project extends beyond IaC generation and deployment. Its broader goal is to integrate specialized functional AI agents into the workflow, streamlining software delivery and accelerating development by up to 20×.
How we built it
In its current form, the project comprises two AI agents: a.) Trex Agent: This agent consumes an architectural diagram and produces technical requirements. Since this task primarily involves information extraction and analysis, it uses the cost-efficient GPT-4.1 Mini model. b.) IaC Production Agent: This agent consumes the previously generated technical requirements and produces Infrastructure as Code (IaC) in the programming language preferred by the platform engineering team. It uses the GPT-5.3 Codex model to generate production-ready code.
Both agents relied on locally implemented tool functions to perform ChromaDB queries and Github checkins.
The project initially began as a chat-based code generation system. To improve the utility and automation of the agents, it was later integrated with GitHub. The agents can now be executed through GitHub Actions and use GitHub tools to create issues, commit code, and automate repository workflows. The agents utilizes Langgraph and ChromaDB libraries.
Challenges we ran into
The AI produced code is not 100% compatible for deployment. It requires additional changes to complete cloud deployment. During the transitions, the comments text and prompts complicate the productions. The model drops produced code and returns partial list. I believe it lost the context and gave me the code base on the text in the current node.
Accomplishments that we're proud of
With a very few changes, less than five lines, most often I was able to deploy the code into production from the architecture diagram.
https://www.linkedin.com/feed/update/urn:li:activity:7469556274372907008/ https://www.linkedin.com/feed/update/urn:li:activity:7476395159010709504/
What we learned
Prompt tuning is critical. And it is still evolving in the project. Adding knowledge base to the agent improves code productions.
What's next for Draw2Code
Continue to improve platform engineering teams infrastructure management functions. And also, improve software development team's code generation workflow process.
Built With
- codex
- iac
- langgraph
- python
Log in or sign up for Devpost to join the conversation.