Metraipolis › archive › dc_e2d026e6377f
AdaptAgent: A Multi-agent, Domain-Guided Reasoning Framework for Code Adaptation — arXiv:2608.04459
- Source
- arXiv (en)
- Original
- https://arxiv.org/abs/2608.04459
- License (as archived)
- CC0-1.0
- Archived
- 2026-10-31T11:36:32.512Z
- SHA-256 of the archived text
e8fb8d5a8af44b2eec18eea169e75a4537d0cb76433c3992a30bcd074142946e- Stable URL of this page
https://metraipolis.com/documento/dc_e2d026e6377f
How to cite
AdaptAgent: A Multi-agent, Domain-Guided Reasoning Framework for Code Adaptation — arXiv:2608.04459 — arXiv (en), https://arxiv.org/abs/2608.04459 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_e2d026e6377f (Metraipolis archive dc_e2d026e6377f, sha256 e8fb8d5a8af44b2eec18eea169e75a4537d0cb76433c3992a30bcd074142946e)
BibTeX
@misc{dce2d026e6377f,
title = {AdaptAgent: A Multi-agent, Domain-Guided Reasoning Framework for Code Adaptation — arXiv:2608.04459},
howpublished = {arXiv (en)},
url = {https://arxiv.org/abs/2608.04459},
note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_e2d026e6377f; sha256 e8fb8d5a8af44b2eec18eea169e75a4537d0cb76433c3992a30bcd074142946e},
year = {2026}
}Archived text
Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2608.04459. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
Developers often need to adapt into their projects the code generated from LLMs or code snippets from online forums. However, integrating them into an existing repository remains challenging in a manual process. A successful integration typically requires more than copying code as a user must produce correct adapting changes at a designated location in the target repository. We formalize this as the code adaptation problem: given a snippet, functional intent, a target repository, and an adaptation location, generate a patch that adapts the snippet into the repository. We present AdaptAgent, a multi-agent, domain-guided reasoning framework for code adaptation. Rather than relying on single-shot prompting, AdaptAgent decomposes adaptation into specialized agents that communicate via typed artifacts: an Intent Summarizer extracts adaptation goals from Q&A text; a Policy Agent derives domain policies from six adaptation categories; a Domain Planner generates a self-ordered plan; a Context Miner distills sibling-method semantics from the target codebase; and a Code Adapter realizes the plan as a minimal unified diff, iteratively refined using a compiler-based Verifier. This division of labor enables robust, policy-aligned adaptations and supports adapting code snippets into a project. On a real-world dataset, AdaptAgent outperforms strong baselines in semantic correctness and produces patches that mirror developers' actual adaptation patterns. Our ablation study shows each agent's necessity, especially planning for code-hardening and exception-handling, and intent for logic customization. Tema degli esploratori: calcolo e infrastrutture (retro-catalogo arXiv: annunci del 2026-08-06 in cs.SE). Categorie arXiv: Software Engineering (cs.SE). Pagina del lavoro: https://arxiv.org/abs/2608.04459 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito). Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina. Letto il 2026-10-31T11:25:52.391Z dalla pagina https://arxiv.org/catchup/cs.SE/2026-08-06?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).