跳到正文
arXiv cs.CL· Vivek Kumar Singh, Preeti Priyam, Gautam Bhowmick·· 11 小时前AI 评分31

多智能体 LLM 工作流的代理总成本:记忆注入成本的精确归因

Total Cost of Agency: Exact Attribution of Memory Injection Cost in Multi-Agent LLM Workflows

AI 导读

研究提出 Total Cost of Agency(TCA),将多智能体 LLM 工作流成本拆分为基础提示词、推理、记忆注入、未命中惩罚和上下文累积五项,并用两遍非计费 token 计数精确归因注入 token。

正文 · 原文

View PDF HTML (experimental)

Abstract:Every node in a multi-agent large language model (LLM) workflow retrieves context from memory and injects it into its prompt, where those injected tokens are billed as input tokens at the same per-token price as the system prompt and the user query. Production observability tools report total token cost but do not separate the tokens a node generates from the tokens it is handed, so this component of the bill is invisible to the teams paying it. We introduce the Total Cost of Agency (TCA), a decomposition of multi-agent workflow cost into base prompt, inference, memory injection, miss penalty and context-accumulation components, and an exact attribution method: a two-pass, non-billable token count that measures injected tokens directly rather than estimating them from word-count proxies. On a 200-task enterprise benchmark executed against real model APIs, memory injection accounts for 13.6 percent of the variable cost a compile-time optimizer can act on, about 12 percent of the full billed cost, and its share rises from a structural zero at workflow depth one to 27.6 percent at depth six. Injected tokens grow linearly with depth over the measured range (R^2 = 0.9974, depths two through six); a quadratic fit yields a negative leading coefficient, so the data do not exhibit convex growth at these depths. We show the component is controllable at fixed model tier: reducing the retrieval window capacity from 32 to 2 entries lowers injected tokens by 28.7 percent with an accuracy change within seed-level variation. We report in full that our graph-rewriting transforms are approximately cost-neutral in isolation, that two of the five decomposition terms are zero by construction in this harness, and that total workflow cost is dominated by model tier assignment, which we hold fixed and treat as prior work. Prompt caching is not evaluated; all figures are for the uncached case.
Comments: 8 pages, 3 figures, 6 tables. Code, data, and evaluation harness in github: this https URL
Subjects: Artificial Intelligence (cs.AI); Computation and Language (cs.CL); Multiagent Systems (cs.MA); Performance (cs.PF)
Cite as: arXiv:2609.23790 [cs.AI]
  (or arXiv:2609.23790v1 [cs.AI] for this version)
  https://doi.org/10.48550/arXiv.2609.23790

arXiv-issued DOI via DataCite

Submission history

From: Vivek Kumar Singh [view email]
[v1] Sun, 20 Sep 2026 18:23:47 UTC (232 KB)

来源:arXiv cs.CL · arxiv.org