At a Glance
A single large language model can role‑play a set of identical agents in multi-step workflows, matching or slightly exceeding performance while reducing computational cost by reusing internal context.
ON THIS PAGE
Core Insights
When all agents use the same underlying model and only differ by instructions or tools, one model running a multi‑turn conversation can simulate the whole workflow with the same behavior. Reusing the model's internal cached state (the key‑value cache) avoids re-encoding repeated context, lowering token cost and improving consistency. An automatic workflow designer called OneFlow finds compact workflows that are especially suitable for single‑agent execution. True heterogeneity (agents using different base models) still has potential benefits but cannot share cache and remains an open design challenge. Tree-of-Thoughts Pattern
Data Highlights
1Evaluated across 7 benchmarks (code, math, QA, domain reasoning, planning), covering MBPP, HumanEval, GSM8K, MATH, HotpotQA, DROP, Shopping‑MMLU, and TravelPlanner.
2All experiments report averages over 3 independent trials to ensure stability (means ± standard deviations).
3Workflow search/optimization used 20 design rounds for OneFlow/AFlow; single‑agent execution reused KV cache to produce comparable performance at notably lower token cost (cost measured as USD token expenditure).
What This Means
Engineers building agent pipelines: use a single strong model to implement homogeneous agent workflows and cut API/token costs while keeping behavior consistent. Technical leaders evaluating architectures: consider single‑agent baselines and cost vs benefit of adding true model diversity before committing to complex multi‑model setups. Researchers: compare heterogeneous designs against this stronger single‑agent baseline when claiming gains from multi‑model diversity. Consensus-Based Decision Pattern
Test your agentsValidate against real scenarios
Key Figures

Fig 1: Figure 1: Sample question–answer pair from a session-based query recommendation task (left), an exemplar agentic workflow to solve it (middle), and its code representation (right). The workflow demonstrates how multiple LLM agents can collaborate to process complex shopping queries through sequential and conditional execution patterns.

Fig 2: Figure 2: An example to show how OneFlow framework works. The framework employs dual meta-LLMs (One creative workflow designer and one workflow critic) with Monte Carlo Tree Search to automatically design multi-agent workflows that suitable for single-agent execution for complex tasks. The left panel shows how the first five rounds of workflow design and selection process work. The right panel shows how workflow 6 is generated.

Fig 3: Figure 3: Pareto frontier: single agent executes multi-agent homogeneous workflow vs. original multi-agent workflows on TravelPlanner (Xie et al. , 2024 ) benchmark. All the workflows are searched by Claude 4 Sonnet. All the workflows are executed by GPT-4o mini.
Ready to evaluate your AI agents?
Learn how ReputAgent helps teams build trustworthy AI through systematic evaluation.
Learn MoreKeep in Mind
The single‑agent trick only applies when every agent shares the same base model; if agents must be different models for capability reasons, cache sharing and the cost benefits disappear. Cost savings reported include simulated KV cache for closed APIs (real-world speedups require open models or runtime support). Some routing or tool side‑effects must be deterministic for exact behavior parity; nondeterministic tools or stochastic decoding can break the equivalence. Guardrails Pattern
Deep Dive
A single large language model can often role‑play a homogeneous multi‑agent workflow by switching system instructions and running the conversation turn by turn. Under mild assumptions (deterministic tool outputs, routing based only on visible history, and deterministic or shared randomness decoding), a single instance produces the same distribution over transcripts as running separate agent instances. Because transformer models can cache attention states for previous tokens (the key‑value cache), a single model avoids repeatedly re‑encoding overlapping context across agent turns, yielding asymptotic and practical token and compute savings.
The team tested this idea across seven diverse benchmarks—code generation, mathematical reasoning, general QA, domain reasoning, and planning—and averaged results over three trials. They introduce OneFlow, an automated workflow search that biases toward fewer agents with richer per-agent prompts; OneFlow workflows run especially well when executed by one model. In a pilot, the single‑model implementation matched an automatically discovered heterogeneous workflow, though true heterogeneity (mixing different base models) remains a promising but costly avenue because models cannot share KV caches. Practical takeaway: try a single‑agent implementation and a OneFlow style search as a strong, cheaper baseline before investing in multi‑model orchestration. Tree-of-Thoughts Pattern Semantic Capability Matching Pattern
Not sure where to start?Get personalized recommendations
Credibility Assessment:
Many authors but no clear top-institution affiliations or high h-index signals; arXiv preprint.