Engineering Sustainable Agents: A Systematic Comparison of Agentic LLMs for Developer Workflows
Organizations: SINTEF, Oslo, Norway · Singapore Management University, Singapore, Singapore · Ozyegin University, Istanbul, Turkiye
Abstract
Large language models (LLMs) are increasingly used in software engineering, including agentic systems that coordinate multiple agents, but impose higher computational and environmental costs. In this paper, we present a comprehensive empirical study of agentic LLM systems across five software engineering tasks: code generation, technical debt identification, code vulnerability detection, log parsing, and log analysis. For each task, we compare LLM configurations that range from a non-agentic single-query baseline to multi-agent workflows, using six open-weight LLMs, two prompt strategies, and three hardware platforms. We assess each configuration in terms of accuracy, inference latency, and energy consumption. Our results reveal substantial trade-offs between agentic complexity and energy efficiency: multi-agent designs consume on average 6.36 as much energy and run 6.07 as long as the non-agentic baseline, with worst-case slowdowns of up to 160 for individual task--hardware pairs. Accuracy gains from additional agents are limited and task-specific: multi-agent improves average vulnerability-detection accuracy, but lightweight non-agentic and single-agent configurations still dominate the Pareto front, accounting for 59 of 66 Pareto-optimal configurations. Model and prompt choice act as task-specific levers whose effective direction varies between tasks rather than as global defaults. We translate these findings into design guidelines for sustainable, task-aware LLM-based development tools.
Figures & tables
| Dimension | Experimental Setup |
|---|---|
| Software engineering tasks | Code generation, technical debt identification, code vulnerability detection, log parsing, and log analysis. |
| Datasets | HumanEval (code generation), MLCQ (technical debt detection), PrimeVul (code vulnerability detection), and LogHub’s HDFS (log parsing and log analysis). |
| System configurations | Non-agentic single-query models, single-agent setups, dual-agent configurations, and multi-agent workflows. |
| Hardware platforms | Server-SMU (8× NVIDIA H100), Workstation-SMU (RTX A2000), and Server-STF (2× RTX 6000 Ada). |
| Models | gemma3:4b, codegemma:7b-instruct, qwen3:4b-instruct, qwen2.5-coder:7b-instruct, deepseek-coder:6.7b-instruct, and gpt-oss:20b (Server-SMU only). |
| Prompting strategies | Zero-shot and few-shot prompting (3 task-specific examples per prompt). |
| Smell Type | Function Level | Class Level | Total |
|---|---|---|---|
| None | 67 | 67 | 134 |
| Blob | - | 51 | 51 |
| Data Class | - | 67 | 67 |
| Long Method | 67 | - | 67 |
| Feature Envy | 66 | - | 66 |
| Total | 385 |
| Task | Dataset | Samples | Source |
|---|---|---|---|
| Code Generation | HumanEval | 164 | ( Chen et al., 2021 ) |
| Technical Debt | MLCQ | 385 | ( Madeyski and Lewowski, 2020 ) |
| Vulnerability Detection | PrimeVul Pair | 386 | ( Ding et al., 2025 ) |
| Log Parsing | HDFS-v1 | 385 | ( Zhu et al., 2023 ) |
| Log Analysis | HDFS-v1 | 385 | ( Zhu et al., 2023 ) |
| Configuration | # Agents | Agentic | Key Characteristics |
|---|---|---|---|
| Non-Agentic (NA) | 0 | No | Direct LLM query, no state |
| Single Agent (SA) | 1 | Yes | Autonomous task completion |
| Dual Agent (DA) | 2 | Yes | Task-specific two-agent collaboration |
| Multi-Agent (MA) | 4 | Yes | Task-specific coordinated workflow |
| Machine | CPU | Memory (GB) | GPU | GPU memory (GB) |
|---|---|---|---|---|
| Server-SMU | Intel Xeon Platinum 8480C | 2048 | 8 NVIDIA H100 | 80 (HBM3) |
| Workstation-SMU | Intel Xeon W-2223 8-core @ 3.60 GHz | 128 | NVIDIA RTX A2000 | 12 |
| Server-STF | Intel Xeon w9-3475X 36-core @ 4.8GHz | 503 | 2 NVIDIA RTX 6000 Ada | 48 |
| Measurement Level | Data Source / Tool | What It Captures | Reporting Unit |
|---|---|---|---|
| CPU Energy | CodeCarbon (Intel RAPL) | Power draw of CPU package(s) during execution | kWh (aggregated per run) |
| GPU Energy | CodeCarbon (NVML interface) | Power draw of GPU(s) at 1-second intervals | kWh (aggregated per run) |
| Total Pipeline Energy | CodeCarbon (combined metrics) | Sum of CPU, GPU, and memory energy consumption over the run | kWh |
| Task | Dataset | Accuracy Metric(s) |
|---|---|---|
| Code Generation | HumanEval ( Chen et al., 2021 ) | Pass@k |
| Technical Debt Identification | MLCQ Dataset ( Madeyski and Lewowski, 2020 ) | Accuracy, Macro F1, Per-Class F1 |
| Code Vulnerability Detection | PrimeVul ( Ding et al., 2025 ) | Accuracy, Precision, Recall, F1-score |
| Log Parsing | LogHub ( Zhu et al., 2023 ) | Parsing Accuracy (Exact Match), Edit Similarity, Longest Common Subsequence Similarity |
| Log Analysis | LogHub ( Zhu et al., 2023 ) | Accuracy, Precision, Recall, F1-score |
| Configuration 1 | Configuration 2 | -value | Significant | Rank-biserial |
|---|---|---|---|---|
| DA | MA | 0.0122 | Yes | -0.795 |
| DA | NA | 0.0122 | Yes | -0.795 |
| DA | SA | 0.0161 | Yes | -0.769 |
| MA | NA | 0.339 | No | +0.333 |
| MA | SA | 0.339 | No | +0.333 |
| NA | SA | 0.677 | No | +0.154 |
| Configuration 1 | Configuration 2 | -value | Significant | Rank-biserial |
|---|---|---|---|---|
| DA | MA | 0.0049 | Yes | -0.872 |
| DA | NA | 0.850 | No | +0.077 |
| DA | SA | 0.910 | No | +0.051 |
| MA | NA | 0.0210 | Yes | +0.744 |
| MA | SA | 0.0771 | No | +0.590 |
| NA | SA | 0.424 | No | +0.282 |
| Task | Metric | Factor | Test | -value |
|---|---|---|---|---|
| Code Generation | Pass@1 | Agent Design | Friedman | 0.830 |
| Pass@1 | Model | Friedman | 0.0018 | |
| Pass@1 | Prompt Type | Wilcoxon | ||
| Pass@1 | Hardware | Friedman | 0.0387 | |
| Energy | Agent Design | Friedman | ||
| Energy | Model | Friedman | 0.0077 |
| Task | Server-SMU | Server-STF | Workstation-SMU | |||
|---|---|---|---|---|---|---|
| mean | std | mean | std | mean | std | |
| Code Generation (Pass@1) | 96.4 | 4.7 | 94.1 | 15.9 | 93.9 | 10.9 |
| Technical Debt Detection (Macro F1) | 38.4 | 11.7 | 38.0 | 11.6 | 38.1 | 11.5 |
| Vulnerability Detection (F1-score) | 46.5 | 17.1 | 44.5 | 18.8 | 45.9 | 17.2 |
| Log Parsing (Parsing Accuracy) | 27.9 | 31.2 | 28.6 | 31.9 | 28.2 | 31.6 |
| Log Analysis (F1-score) | 6.8 | 3.1 | 6.6 | 3.0 | 6.1 | 2.5 |
| Task | Zero-shot | Few-shot | ||
|---|---|---|---|---|
| mean | std | mean | std | |
| Code Generation (Pass@1) | 97.3 | 6.4 | 92.7 | 14.0 |
| Technical Debt Detection (Macro F1) | 40.2 | 12.2 | 38.7 | 12.4 |
| Vulnerability Detection (F1-score) | 45.8 | 18.0 | 46.8 | 16.7 |
| Log Parsing (Parsing Accuracy) | 3.4 | 6.9 | 54.3 | 24.1 |
| Log Analysis (F1-score) | 7.2 | 3.2 | 5.7 | 2.2 |
| Task | CG-7B | DS-6.7B | G3-4B | GPT-OSS | Q2.5C-7B | Q3-4B | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| mean | std | mean | std | mean | std | mean | std | mean | std | mean | std | |
| Code Generation (Pass@1) | 95.6 | 4.7 | 88.8 | 19.8 | 99.8 | 0.5 | 97.9 | 1.9 | 98.0 | 3.0 | 91.8 | 12.8 |
| Technical Debt Detection (Macro F1) | 29.7 | 2.9 | 23.3 | 3.2 | 52.6 | 2.6 | 58.6 | 3.7 | 47.2 | 3.8 | 37.9 | 6.2 |
| Vulnerability Detection (F1-score) | 35.1 | 19.9 | 40.4 | 18.2 | 51.1 | 9.2 | 56.5 | 5.4 | 43.9 | 19.1 | 57.8 | 9.8 |
| Log Parsing (Parsing Accuracy) | 24.9 | 30.8 | 15.1 | 28.1 | 28.0 | 29.1 | 38.1 | 27.5 | 42.2 | 37.3 | 30.9 | 26.4 |
| Log Analysis (F1-score) | 7.0 | 3.7 | 5.2 | 1.3 | 5.6 | 0.6 | 5.1 | 1.5 | 8.5 | 3.4 | 6.4 | 3.0 |
| Smell Class | Mean F1 | Std | Best Agent | Best Model | Best Prompt |
|---|---|---|---|---|---|
| No Smell | 55.8 | 14.7 | NA (57.4) | G3-4B (69.6) | Zero-shot (56.9) |
| Blob | 30.0 | 20.8 | NA (32.8) | GPT-OSS (61.2) | Zero-shot (32.2) |
| Data Class | 40.6 | 26.5 | MA (41.7) | GPT-OSS (75.3) | Few-shot (41.3) |
| Feature Envy | 8.1 | 7.2 | DA (10.1) | CG-7B (13.1) | Zero-shot (10.1) |
| Long Method | 62.7 | 22.1 | SA (66.1) | GPT-OSS (88.7) | Few-shot (63.8) |
| Metric | NA | SA | DA | MA | Zero-shot | Few-shot | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| mean | std | mean | std | mean | std | mean | std | mean | std | mean | std | |
| Parsing Accuracy | 34.5 | 36.6 | 31.2 | 34.1 | 27.6 | 28.6 | 26.1 | 26.6 | 3.4 | 6.9 | 54.3 | 24.1 |
| Edit Similarity | 69.6 | 25.4 | 64.0 | 27.1 | 63.3 | 28.7 | 65.0 | 25.5 | 46.7 | 16.1 | 80.8 | 22.4 |
| LCS Similarity | 90.4 | 9.3 | 89.2 | 10.0 | 90.5 | 7.3 | 90.6 | 7.9 | 84.8 | 9.7 | 94.7 | 3.8 |
| Hardware | NA | SA | DA | MA | Avg. | |||||
|---|---|---|---|---|---|---|---|---|---|---|
| mean | std | mean | std | mean | std | mean | std | mean | std | |
| Server-SMU | 0.162 | 0.006 | 0.166 | 0.012 | 0.315 | 0.031 | 0.588 | 0.090 | 0.308 | 0.048 |
| Server-STF | 0.132 | 0.010 | 0.173 | 0.007 | 0.499 | 0.021 | 1.210 | 1.714 | 0.504 | 0.857 |
| Workstation-SMU | 0.082 | 0.014 | 0.120 | 0.022 | 0.380 | 0.020 | 0.686 | 0.114 | 0.317 | 0.059 |
| Overall | 0.128 | 0.011 | 0.154 | 0.015 | 0.392 | 0.025 | 0.813 | 0.993 | 0.372 | 0.497 |
| Task | Hardware | Zero-shot | Few-shot | ||
|---|---|---|---|---|---|
| mean | std | mean | std | ||
| Code Generation | Server-SMU | 0.157 | 0.001 | 0.164 | 0.002 |
| Server-STF | 0.149 | 0.003 | 0.485 | 1.691 | |
| Workstation-SMU | 0.089 | 0.044 | 0.196 | 0.047 | |
| Technical Debt Detection | Server-SMU | 0.071 | 0.007 | 0.046 | 0.007 |
| Server-STF | 0.141 | 0.008 | 0.094 | 0.011 | |
| Task | Hardware | CG-7B | DS-6.7B | G3-4B | GPT-OSS | Q2.5C-7B | Q3-4B | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| mean | std | mean | std | mean | std | mean | std | mean | std | mean | std | ||
| CodeGen | Server-SMU | 0.045 | 0.001 | 0.230 | 0.001 | 0.062 | 0.001 | 0.438 | 0.000 | 0.061 | 0.000 | 0.127 | 0.002 |
| Server-STF | 0.090 | 0.002 | 0.449 | 0.002 | 0.129 | 0.008 | — | — | 0.126 | 0.006 | 0.792 | 2.673 | |
| Workstation-SMU | 0.071 | 0.000 | 0.420 | 0.002 | 0.018 | 0.005 | — | — | 0.100 | 0.000 | 0.104 | 0.102 | |
| TechDebt | Server-SMU | 0.016 | 0.000 | 0.210 | 0.001 | 0.018 | 0.010 | 0.070 | 0.000 | 0.020 | 0.000 | 0.017 | 0.011 |
| Server-STF | 0.034 | 0.000 | 0.443 | 0.013 | 0.047 | 0.015 | — | — | 0.032 | 0.001 | 0.032 | 0.007 | |
| Task | Hardware | NA | SA | DA | MA | ||||
|---|---|---|---|---|---|---|---|---|---|
| mean | std | mean | std | mean | std | mean | std | ||
| Code Generation | Server-SMU | 726.7 | 15.8 | 712.0 | 9.8 | 1403.3 | 19.9 | 3935.5 | 36.5 |
| Server-STF | 955.6 | 6.5 | 1023.7 | 3.2 | 1655.8 | 55.3 | 2220.4 | 570.4 | |
| Workstation-SMU | 2672.6 | 142.8 | 2307.0 | 1519.3 | 4978.8 | 561.3 | 7538.7 | 2300.5 | |
| Technical Debt Detection | Server-SMU | 199.6 | 2.1 | 289.5 | 9.0 | 713.6 | 6.7 | 1175.9 | 11.1 |
| Server-STF | 222.2 | 2.4 | 367.9 | 1.8 | 951.4 | 94.5 | 1785.8 | 72.9 | |
| Hardware | NA | SA | DA | MA | Avg. | |||||
|---|---|---|---|---|---|---|---|---|---|---|
| mean | std | mean | std | mean | std | mean | std | mean | std | |
| Server-SMU | 1826.1 | 27.2 | 1821.8 | 110.5 | 3354.3 | 211.7 | 6289.3 | 1581.7 | 3322.9 | 799.9 |
| Server-STF | 949.9 | 69.6 | 1182.3 | 32.6 | 3288.5 | 70.9 | 6220.0 | 487.9 | 2910.2 | 249.5 |
| Workstation-SMU | 2585.0 | 707.6 | 3690.4 | 690.4 | 11694.3 | 547.5 | 21002.2 | 3977.7 | 9743.0 | 2067.6 |
| Overall | 1789.5 | 410.8 | 2205.9 | 404.1 | 5940.0 | 341.4 | 10865.5 | 2487.4 | 5200.2 | 1288.0 |
| Task | Hardware | Zero-shot | Few-shot | ||
|---|---|---|---|---|---|
| mean | std | mean | std | ||
| Code Generation | Server-SMU | 1736.2 | 18.5 | 1652.6 | 26.4 |
| Server-STF | 1056.2 | 16.3 | 1871.5 | 404.9 | |
| Workstation-SMU | 2730.7 | 1358.3 | 6017.9 | 1457.0 | |
| Technical Debt Detection | Server-SMU | 707.9 | 9.1 | 481.4 | 6.7 |
| Server-STF | 968.2 | 3.8 | 695.5 | 84.3 | |
| Task | Hardware | CG-7B | DS-6.7B | G3-4B | GPT-OSS | Q2.5C-7B | Q3-4B | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| mean | std | mean | std | mean | std | mean | std | mean | std | mean | std | ||
| CodeGen | Server-SMU | 407.3 | 10.0 | 1952.5 | 20.4 | 878.4 | 43.1 | 4982.7 | 0.0 | 574.3 | 11.5 | 1371.0 | 9.5 |
| Server-STF | 627.3 | 5.7 | 2760.9 | 1.6 | 1085.9 | 68.5 | — | — | 859.9 | 15.0 | 1985.3 | 636.9 | |
| Workstation-SMU | 2179.7 | 7.8 | 12862.7 | 66.7 | 545.6 | 159.3 | — | — | 3074.8 | 12.8 | 3208.5 | 3144.8 | |
| TechDebt | Server-SMU | 183.9 | 3.2 | 1889.6 | 10.6 | 282.5 | 10.9 | 824.4 | 0.0 | 225.2 | 2.9 | 162.4 | 8.3 |
| Server-STF | 318.0 | 1.4 | 2765.0 | 5.4 | 495.7 | 121.5 | — | — | 298.1 | 2.4 | 282.4 | 54.8 | |
| Task | Hardware | Agent | Model | Prompt | Accuracy | Energy (kWh) | Latency (s) | # Pareto Configs |
|---|---|---|---|---|---|---|---|---|
| CodeGen | Server-SMU | SA | DS-6.7B | Zero-shot | 100.0 | 0.0208 | 194.8 | 1 |
| Server-STF | SA | CG-7B | Zero-shot | 100.0 | 0.0448 | 333.2 | 4 | |
| Workstation-SMU | SA | G3-4B | Few-shot | 100.0 | 0.0020 | 63.6 | 1 | |
| LogAnal | Server-SMU | NA | Q3-4B | Few-shot | 14.9 | 0.0249 | 299.2 | 5 |
| Server-STF | NA | CG-7B | Zero-shot | 14.1 | 0.0222 | 201.2 | 6 | |
| Workstation-SMU | NA | G3-4B | Zero-shot | 4.9 | 0.0156 | 494.8 | 6 |
| Task | Best Accuracy | Lowest Energy | Lowest Latency | Best Overall |
|---|---|---|---|---|
| Code Generation | NA (96.8) | NA (0.0924) | SA (1307.8) | NA |
| Technical Debt Detection | NA (42.8) | NA (0.0181) | NA (252.3) | NA |
| Vulnerability Detection | MA (55.4) | NA (0.4271) | NA (5748.7) | NA |
| Log Parsing | NA (34.5) | NA (0.0266) | NA (359.3) | NA |
| Log Analysis | NA (7.5) | SA (0.0712) | SA (1063.9) | SA |
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
| Smell Class | NA | SA | DA | MA | ||||
|---|---|---|---|---|---|---|---|---|
| mean | std | mean | std | mean | std | mean | std | |
| No Smell | 57.4 | 10.6 | 57.3 | 13.2 | 57.1 | 15.0 | 51.3 | 18.7 |
| Blob | 32.8 | 24.6 | 31.3 | 21.3 | 28.6 | 18.7 | 27.4 | 18.7 |
| Data Class | 41.1 | 26.2 | 39.2 | 25.9 | 40.2 | 28.0 | 41.7 | 27.1 |
| Feature Envy | 4.9 | 5.8 | 7.5 | 6.1 | 10.1 | 7.1 | 9.8 | 8.7 |
| Long Method | 65.0 | 22.6 | 66.1 | 19.5 | 61.0 | 23.3 | 58.9 | 23.1 |
| Smell Class | CG-7B | DS-6.7B | G3-4B | GPT-OSS | Q2.5C-7B | Q3-4B | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| mean | std | mean | std | mean | std | mean | std | mean | std | mean | std | |
| No Smell | 63.7 | 11.7 | 55.8 | 2.2 | 69.6 | 6.6 | 67.7 | 2.1 | 47.5 | 9.7 | 38.3 | 14.6 |
| Blob | 2.7 | 3.9 | 17.3 | 6.8 | 53.7 | 10.3 | 61.2 | 12.1 | 38.5 | 7.0 | 27.7 | 13.2 |
| Data Class | 2.9 | 7.9 | 14.3 | 6.5 | 57.0 | 3.8 | 75.3 | 3.9 | 64.1 | 9.4 | 53.0 | 5.3 |
| Feature Envy | 13.1 | 9.2 | 8.0 | 4.8 | 2.5 | 1.7 | 0.0 | 0.0 | 10.7 | 6.0 | 8.8 | 7.4 |
| Long Method | 66.3 | 5.1 | 21.3 | 7.4 | 80.4 | 2.4 | 88.7 | 2.6 | 75.5 | 5.0 | 61.6 | 6.8 |
| Smell Class | Zero-shot | Few-shot | ||
|---|---|---|---|---|
| mean | std | mean | std | |
| No Smell | 56.9 | 13.8 | 54.6 | 15.6 |
| Blob | 32.2 | 21.7 | 27.9 | 19.8 |
| Data Class | 39.9 | 27.8 | 41.3 | 25.3 |
| Feature Envy | 10.1 | 8.3 | 6.0 | 5.3 |
| Long Method | 61.7 | 22.7 | 63.8 | 21.6 |
Software Engineering Agents
Software Engineering Agents are AI systems that use code, tools, and feedback to perform software development tasks.
See all 323 papers