AAMAS Conference 2026 Conference Paper
DomAgent: Leveraging Knowledge Graphs and Case-Based Reasoning for Domain-Specific Code Generation
- Shuai Wang
- Dhasarathy Parthasarathy
- Robert Feldt
- Yinan Yu
Large language models (LLMs) perform well on general code generation but often struggle with domain-specific software tasks due to limitedspecializedknowledgeintheirtrainingdata. WeproposeDomAgent, an autonomous coding agent that enables domain-adapted code generation through structured reasoning and targeted retrieval. Its core module, DomRetriever, combines knowledge-graph reasoning with case-based reasoning to iteratively retrieve and synthesize relevant domain knowledge and examples. Experiments on the DS-1000 benchmark and real-world Volvo truck software development tasks show that DomAgent significantly improves domainspecific code generation, allowing small open-source models to approach the performance of large proprietary LLMs. The code is publicly available at: https: //github. com/Wangshuaiia/DomAgent.