Kunal Pai commited on
Commit
adfd14d
·
1 Parent(s): 7040aa5

Make paper more concise

Browse files
Files changed (2) hide show
  1. paper/conference_101719.tex +97 -100
  2. paper/references.bib +10 -0
paper/conference_101719.tex CHANGED
@@ -35,58 +35,58 @@ spshetty@ucdavis.edu}
35
 
36
  \section{Introduction}\label{sec:introduction}
37
 
38
- The landscape of Artificial Intelligence (AI) is being reshaped by the rapid advancements in Large Language Models (LLMs), which exhibit profound capabilities in language understanding, generation, reasoning, and planning \cite{brown2020language, devlin2019bert, raffel2020exploring}. This progress has catalyzed the development of sophisticated AI agents capable of autonomous task execution. Increasingly, the focus is shifting from single-agent systems to Multi-Agent Systems (MAS), where collaborative teams of specialized agents address complex problems beyond the scope of individual agents \cite{dorri2018multi, wooldridge2009introduction}. Such collaborative approaches hold significant potential in diverse domains like scientific discovery \cite{boiko2023emergent}, software engineering \cite{qian2023communicative}, data analysis, and strategic decision-making \cite{wang2023decision}. The growing complexity of tasks, highlighted by benchmarks demanding advanced mathematical reasoning (e.g., GSM8K \cite{cobbe2021gsm8k}, SVAMP \cite{patel2021svamp}), coding (e.g., HumanEval \cite{chen2021codex}, CoDocBench \cite{pai2024codocbench}), and graduate-level technical knowledge and reasoning \cite{phan2025humanitysexam}, further underscores the need for agentic systems capable of effectively coordinating diverse cognitive resources \cite{wen2024benchmarkingcomplexinstructionfollowingmultiple}.
39
 
40
- Despite this promise, contemporary agentic frameworks often encounter significant limitations. Many suffer from \textbf{rigidity}, relying on predefined agent roles and static team structures that hinder adaptation to dynamic task requirements \cite{zhang2023building}. Furthermore, \textbf{resource obliviousness} is prevalent; systems frequently lack mechanisms to monitor and optimize computational resources like API costs, memory usage, and CPU load, leading to inefficiency, particularly when scaling or deploying in resource-constrained environments \cite{park2023generative}. This is often exacerbated by a reliance on powerful, proprietary cloud-based LLMs, incurring substantial operational expenses. \textbf{Model homogeneity}, the default use of a single powerful LLM for all sub-tasks, neglects the potential efficiency gains from employing a diverse ecosystem of models, including smaller, specialized, or locally-run alternatives \cite{zhou2023agents}. Lastly, while \textbf{tool use} is fundamental \cite{yao2022react, parisi2022talm}, the ability for agents to autonomously \textbf{create and integrate new tools} during operation remains limited, restricting dynamic functional extension and long-term self-improvement without human intervention \cite{wang2023voyager}.
41
 
42
- To address these challenges, we introduce \textbf{HASHIRU (Hierarchical Agent System for Hybrid Intelligent Resource Utilization)}, a novel MAS framework designed for enhanced flexibility, resource efficiency, and adaptability. HASHIRU employs a hierarchical structure led by a central ``CEO'' agent that dynamically manages a team of specialized ``employee'' agents, instantiated on demand for specific sub-tasks. A core tenet of HASHIRU is its \textbf{hybrid intelligence} approach, strategically prioritizing smaller (e.g., 3B--7B parameter), locally-run LLMs, often accessed via frameworks like Ollama \cite{ollama}, to promote cost-effectiveness and computational efficiency. While prioritizing local resources, the system retains the flexibility to integrate external APIs and potentially more powerful models when justified by task complexity and resource availability, under the CEO's management.
43
 
44
- The primary contributions of this work are:
45
  \begin{enumerate}
46
- \item A novel MAS architecture combining a \textbf{hierarchical control structure} with \textbf{dynamic, resource-aware agent lifecycle management} (hiring/firing). This management is explicitly governed by computational budget constraints (cost, memory usage, concurrency) and incorporates an economic model with hiring/firing costs to discourage excessive churn.
47
- \item A \textbf{hybrid intelligence model} that prioritizes cost-effective, local LLMs while adaptively incorporating external APIs and potentially larger models, optimizing the efficiency-capability trade-off.
48
- \item An integrated mechanism enabling the \textbf{autonomous creation of API tools}, allowing the system to dynamically extend its functional repertoire in response to task demands.
49
- \item The application of an \textbf{economic model} (hiring/firing fees) to agent management, promoting efficient resource allocation and team stability.
50
  \end{enumerate}
51
 
52
- This paper details the design and rationale behind HASHIRU. Section \ref{sec:background} discusses related work in agent architectures, dynamic management, resource allocation, model heterogeneity, and tool use. Section 3 elaborates on the HASHIRU architecture and its core mechanisms. Section 4 presents experimental results (or outlines planned experiments), followed by discussion and conclusion in Sections 5 and 6.
53
 
54
  \section{Background and Related Work} \label{sec:background}
55
 
56
- The concept of intelligent agents has evolved significantly from early work in symbolic AI and distributed problem-solving \cite{russell2010artificial, shoham1994agent} to the current era dominated by LLMs. Modern agentic frameworks leverage LLMs as their cognitive core, enabling sophisticated reasoning, planning, and interaction capabilities \cite{wang2023survey, xi2023rise}. HASHIRU builds upon this foundation while addressing specific limitations observed in the current state-of-the-art.
57
 
58
  \subsection{Agent Architectures: Hierarchy and Dynamics}
59
- MAS architectures vary widely, including flat, federated, and hierarchical structures \cite{dorri2018multi, horling2004survey}. Hierarchical models offer clear control flow and efficient task decomposition but risk bottlenecks and rigidity \cite{gaston2005agenta,gaston2005agentb}. HASHIRU utilizes a \textbf{CEO-Employee hierarchy} for centralized coordination but distinguishes itself through \textbf{dynamic team composition}. Unlike systems with static hierarchies or predefined roles (e.g., CrewAI \cite{crewai}, ChatDev \cite{qian2023communicative}), HASHIRU's CEO actively manages the employee pool based on runtime needs and resource constraints.
60
 
61
  \subsection{Dynamic Agent Lifecycle Management}
62
- The ability of an MAS to adapt its composition dynamically is crucial for complex environments \cite{valckenaers2005trends}. Various triggers for agent creation or deletion have been explored, often tied to task structure or environmental changes. HASHIRU introduces a specific mechanism where the CEO agent makes \textbf{hiring and firing decisions} based on a cost-benefit analysis considering agent performance, operational costs (API fees, inferred compute), memory footprint (tracked explicitly as a percentage of available resources), and agent concurrency limits. Furthermore, HASHIRU incorporates an \textbf{economic model} with explicit ``starting bonus'' (hiring) and ``invocation'' (usage) costs. This introduces economic friction, aiming to prevent excessive agent initialization or usage for marginal gains and promote team stability, a nuance often missing in simpler dynamic composition strategies.
63
 
64
  \subsection{Resource Management and Agent Economies}
65
- Resource awareness is critical for scalable and deployable MAS. Research areas in economics explore mechanisms like market-based auctions or contract nets for resource allocation \cite{clearwater1996market}. HASHIRU implements a more \textbf{centralized, budget-constrained resource management model}. The CEO operates within defined limits for financial cost, memory usage (as a percentage of total available memory), and concurrent agent count. This direct management, particularly the focus on memory percentage, suggests an orientation towards practical deployment, potentially on local hardware or edge devices with finite resources, contrasting with cloud-centric systems assuming elastic resources \cite{park2023generative}. Frameworks like AutoGen \cite{wu2023autogen} and LangGraph \cite{langgraph} typically rely on implicit cost tracking via API keys without such explicit multi-dimensional resource budgeting and control.
66
 
67
  \subsection{Hybrid Intelligence and Heterogeneous Models}
68
- Leveraging diverse LLMs with varying capabilities, costs, and latencies is an emerging trend \cite{zhou2023agents}. Techniques like model routing aim to select the optimal model for specific sub-tasks. HASHIRU embraces \textbf{model heterogeneity} with a specific strategic focus: \textbf{prioritizing smaller (3B--7B), locally-run models via Ollama integration} \cite{ollama}. This emphasizes cost-efficiency, low latency for simpler tasks, and potential privacy advantages over systems defaulting to large, proprietary cloud APIs (e.g., GPT-4 \cite{openai2023gpt4}, Claude 3 \cite{anthropic2024claude}). While capable of integrating external APIs (potentially invoking larger models), HASHIRU's default operational stance represents a distinct balance point in the capability vs. efficiency trade-off.
69
 
70
  \subsection{Tool Use and Autonomous Tool Creation}
71
- The ability to use external tools (APIs, functions, databases) is a cornerstone of modern agents, enabled by frameworks like ReAct \cite{yao2022react} and built-in function calling \cite{openai_func_calling}. Most systems rely on a predefined tool suite. HASHIRU advances this by incorporating a mechanism for \textbf{autonomous API tool creation}. When a required functionality is missing, the CEO can commission the generation (potentially via a specialized agent or code generation process) and deployment of a new API tool within the HASHIRU ecosystem. This capability for self-extension differentiates HASHIRU from systems limited to static toolsets and moves towards greater operational autonomy and adaptability \cite{wang2023voyager, park2023generative}.
72
 
73
- In summary, HASHIRU integrates concepts from hierarchical control, dynamic MAS, resource management, and tool use, but its novelty lies in the synergistic combination of: (1) dynamic, resource-aware hierarchical management with (2) an economic model for stability, (3) a local-first hybrid intelligence strategy, and (4) integrated autonomous tool creation capabilities. This combination targets key limitations in current agentic systems concerning efficiency, adaptability, cost, and autonomy.
74
 
75
  \section{HASHIRU System Architecture}
76
  \label{sec:architecture}
77
 
78
- The architecture of HASHIRU is designed to directly address the challenges of rigidity, resource obliviousness, and limited adaptability outlined in Section~\ref{sec:introduction}. It implements a hierarchical, dynamically managed multi-agent system optimized for hybrid resource utilization. This section details the core components and mechanisms underpinning HASHIRU's operation.
79
 
80
  \subsection{Overview}
81
- HASHIRU operates on a hierarchical model conceptually similar to a business organization, featuring a central coordinating agent (``CEO'') and specialized task-executing agents (``Employees''). Key architectural tenets include:
82
  \begin{itemize}
83
- \item \textbf{Centralized Coordination within a Dynamic Hierarchy:} A CEO agent manages overall strategy, task allocation, and team composition.
84
- \item \textbf{Dynamic Lifecycle Management:} Employee agents are instantiated (hired) and terminated (fired) based on runtime requirements and resource constraints, governed by an economic model.
85
- \item \textbf{Hybrid Intelligence:} Strategic preference for local, computationally cheaper LLMs, while retaining access to external APIs and potentially more powerful models.
86
- \item \textbf{Explicit Resource Management:} Continuous monitoring and control of costs, memory usage, and agent concurrency against defined budgets.
87
- \item \textbf{Adaptive Tooling:} Utilization of predefined tools alongside the capability for autonomous creation of new API tools.
88
  \end{itemize}
89
- Figure \ref{fig:arch} illustrates the overall structure and interaction flow.
90
 
91
  \begin{figure}[ht]
92
  \centering
@@ -96,153 +96,150 @@ Figure \ref{fig:arch} illustrates the overall structure and interaction flow.
96
  \end{figure}
97
 
98
  \subsection{Hierarchical Structure: CEO and Employee Agents}
99
- The system employs a two-tiered hierarchy:
100
 
101
  \begin{itemize}
102
- \item \textbf{CEO Agent:} This singleton agent serves as the central coordinator and entry point. Its primary responsibilities include:
103
  \begin{itemize}
104
- \item Receiving and interpreting the primary user query or task.
105
- \item Decomposing the main task into smaller, manageable sub-tasks.
106
- \item Identifying the capabilities required for each sub-task.
107
- \item Managing the pool of Employee agents (see Section \ref{subsec:dynamic_mgmt}).
108
- \item Assigning sub-tasks to suitable, active Employee agents.
109
- \item Monitoring the progress and performance of Employee agents.
110
- \item Synthesizing the results from Employee agents into a coherent final output or response.
111
- \item Managing the system's overall resource budget (see Section \ref{subsec:resource_mgmt}).
112
- \item Initiating the creation of new tools when required (see Section \ref{subsec:tooling}).
113
  \end{itemize}
114
- \item \textbf{Employee Agents:} These are specialized agents instantiated by the CEO to perform specific sub-tasks. Each Employee agent typically wraps an LLM (local via Ollama \cite{ollama} or external via API) or provides access to a specific tool/API. Key characteristics include:
 
115
  \begin{itemize}
116
- \item Specialization: Possessing capabilities tailored to certain types of sub-tasks (e.g., code generation, data analysis, information retrieval).
117
- \item Dynamic Existence: Created and destroyed by the CEO based on need and performance.
118
- \item Task Execution: Receives a sub-task description and context from the CEO, executes it, and returns the result.
119
- \item Resource Consumption: Associated with specific resource costs (e.g., API call costs, memory footprint) tracked by the system.
120
  \end{itemize}
121
  \end{itemize}
122
- This hierarchical structure facilitates organized task decomposition and result aggregation under centralized control, while the dynamic nature of the Employee pool provides flexibility.
123
 
124
  \subsection{Dynamic Agent Lifecycle Management}
125
  \label{subsec:dynamic_mgmt}
126
- A core innovation in HASHIRU is the CEO's ability to dynamically manage the Employee agent team through ``hiring'' (instantiation) and ``firing'' (termination). This process is driven by a cost-benefit analysis aimed at optimizing task performance within resource constraints.
127
 
128
- When a new sub-task requires capabilities not readily available or efficiently provided by the current pool of active Employee agents, the CEO may decide to hire a new agent. Conversely, if an agent is underperforming, consistently idle, excessively costly, or if resource limits are approached, the CEO may decide to fire it. This decision considers multiple factors:
129
  \begin{itemize}
130
- \item \textbf{Task Requirements:} The specific capabilities needed for pending sub-tasks.
131
- \item \textbf{Agent Performance Metrics:} Historical success rate, quality of output, or efficiency of existing agents relevant to the task type.
132
- \item \textbf{Operational Costs:} API costs, estimated computational load, or other costs associated with using the agent's underlying model or tools.
133
- \item \textbf{Memory Footprint:} The amount of system memory the agent consumes, tracked as a percentage of the total available memory allocated to HASHIRU.
134
- \item \textbf{Agent Concurrency:} The current number of active Employee agents relative to a predefined limit.
135
  \end{itemize}
136
 
137
- Crucially, HASHIRU incorporates an \textbf{economic model} for agent lifecycle events:
138
  \begin{itemize}
139
- \item \textbf{Hiring Cost (``Starting Bonus''):} A one-time cost incurred when a new agent is instantiated, representing setup overhead.
140
- \item \textbf{Invocation Cost (``Salary''):} A multi-time cost incurred when an agent is used, representing load on the system, or on payment methods, for using an agent.
141
  \end{itemize}
142
- These explicit transaction costs discourage excessive agent churn, promoting stability. The CEO must evaluate if the anticipated long-term benefit of replacing an agent outweighs the immediate hiring and firing costs plus any difference in ongoing operational costs. This mechanism directly combats system rigidity and allows adaptation while actively managing computational budgets and preventing wasteful high-frequency agent turnover.
143
 
144
  \subsection{Hybrid Intelligence and Model Management}
145
- HASHIRU is designed for \textbf{hybrid intelligence}, leveraging a diverse set of cognitive resources. It strategically prioritizes the use of smaller (e.g., 3B--7B parameter), cost-effective LLMs that can be run locally via frameworks like Ollama \cite{ollama}. This approach enhances efficiency, reduces reliance on expensive external APIs, and potentially improves privacy and latency for certain tasks.
146
 
147
- However, the system is not restricted to local models. The CEO agent can integrate and utilize:
148
  \begin{itemize}
149
- \item \textbf{External LLM APIs:} Access to powerful proprietary models (e.g., GPT-4 \cite{openai2023gpt4}, Claude 3 \cite{anthropic2024claude}) when deemed necessary for complex reasoning or specialized knowledge, subject to cost-benefit analysis.
150
- \item \textbf{External Tool APIs:} Integration with third-party software or data sources.
151
- \item \textbf{Self-Created APIs:} Tools generated by HASHIRU itself (see Section \ref{subsec:tooling}).
152
  \end{itemize}
153
- The CEO manages this heterogeneous pool, selecting the most appropriate resource (local model, external API, tool) for a given sub-task based on perceived difficulty, required capabilities, and the current resource budget status. This allows HASHIRU to balance cost-effectiveness and computational efficiency with the need for high capability when required.
154
 
155
  \subsection{Resource Monitoring and Control}
156
  \label{subsec:resource_mgmt}
157
- Explicit resource management is central to HASHIRU's design, moving beyond simple API key cost tracking. The system, coordinated by the CEO, actively monitors:
158
  \begin{itemize}
159
- \item \textbf{Financial Costs:} Accumulating costs from external API calls.
160
- \item \textbf{Memory Usage:} Tracking the memory footprint of active Employee agents, specifically as a percentage of a predefined total available memory resource.
161
- \item \textbf{Agent Concurrency:} Maintaining a count of concurrently active Employee agents.
162
  \end{itemize}
163
- These metrics are monitored against predefined \textbf{budget limits} or hard caps. If initiating an action (like hiring a new agent) would exceed a budget limit (e.g., push memory usage over 90\% of allocated, or exceed the maximum concurrent agent count), the action is prevented. This mechanism ensures the system operates within defined operational constraints, crucial for deployment on devices with limited resources or under strict financial budgets.
164
 
165
  \subsection{Tool Utilization and Autonomous Creation}
166
  \label{subsec:tooling}
167
- Like many modern agent systems, HASHIRU's agents can utilize predefined tools (functions, external APIs, databases) to interact with the environment and perform actions beyond pure text generation \cite{yao2022react, openai_func_calling}.
168
 
169
- A distinctive feature of HASHIRU is its capability for \textbf{integrated, autonomous tool creation}. If the CEO agent determines, through task analysis or failure analysis of existing agents, that a specific functional capability is required but not available through existing Employee agents or tools, it can initiate a process to create a new tool. This typically involves:
170
  \begin{enumerate}
171
- \item Defining the specification for the required tool (inputs, outputs, functionality).
172
- \item Commissioning the generation of the necessary logic (e.g., code implementing the functionality, potentially involving API calls to external services using provided credentials, possibly generated by a specialized code-generating Employee agent).
173
- \item Deploying this logic as a new, callable API endpoint accessible within the HASHIRU ecosystem.
174
- \item Potentially instantiating a new Employee agent dedicated to utilizing this newly created tool.
175
  \end{enumerate}
176
- This mechanism allows HASHIRU to dynamically extend its own functional repertoire over time, tailoring its capabilities to the tasks it encounters without requiring direct manual intervention for every new function, thereby enabling greater autonomy and long-term adaptation.
177
-
178
 
179
  \section{Experimental Setup}
180
  \label{sec:experiments}
181
 
182
- To evaluate the performance, efficiency, and adaptability of HASHIRU, we designed a set of experiments targeting its core architectural features. Our evaluation focuses on assessing the benefits of dynamic resource-aware management, the hybrid intelligence model, and the autonomous tool creation capability compared to relevant baselines. Specifically, we investigate:
183
  \begin{itemize}
184
- \item The impact of dynamic agent management with economic constraints on resource utilization (cost, memory) and task performance compared to static configurations.
185
- \item The effectiveness of the hybrid (local-first) model strategy versus homogeneous (cloud-only or local-only) approaches across tasks of varying complexity.
186
- \item The system's ability to autonomously create and utilize necessary tools when faced with novel functional requirements within a task.
187
  \end{itemize}
188
 
189
  \subsection{Evaluation Tasks}
190
  \label{subsec:tasks}
191
- We selected tasks demanding complex reasoning, multi-perspective analysis, and interaction, suitable for exercising HASHIRU's hierarchical coordination and dynamic capabilities. The tasks fall into two main categories:
192
 
193
  \subsubsection{Academic Paper Review}
194
- This task evaluates HASHIRU's capacity to critically assess academic work by simulating the peer-review process. Given one or more scientific papers (e.g., in PDF format), the system must generate a review summary and ultimately recommend acceptance or rejection. This probes HASHIRU's ability to decompose evaluation criteria, delegate tasks to specialized agents (e.g., novelty assessment, methodological rigor, clarity), and manage resources effectively across long and complex documents.
195
 
196
  \subsubsection{Reasoning and Problem-Solving Tasks}
197
- To evaluate broader reasoning, knowledge retrieval, and problem-solving capabilities under different constraints, we employ a set of challenging benchmarks and puzzle-like tasks:
198
  \begin{itemize}
199
- \item \textbf{Humanity's Last Exam \cite{phan2025humanitysexam}:} A benchmark designed to test graduate-level technical knowledge and complex reasoning across multiple domains. Success requires deep understanding and sophisticated problem-solving, likely necessitating access to powerful external LLMs managed effectively within HASHIRU's hybrid framework.
200
- \item \textbf{NYT Connections \cite{lopez2024nyt}:} This popular puzzle requires identifying hidden semantic relationships or themes to categorize 16 words into four distinct groups. Solving this involves associative reasoning, broad world knowledge, and potentially hypothesis testing across different potential groupings, testing knowledge access and combinatorial reasoning coordination.
201
- \item \textbf{Wordle:} The daily word puzzle requires deductive reasoning to identify a five-letter word within six guesses, using feedback on correct letters and positions. This tests logical deduction, constraint satisfaction, and vocabulary knowledge. It serves as a good test case for comparing the efficiency (speed, cost, number of guesses) of local versus external models for iterative reasoning. We assume interaction via a simulated game environment.
202
- \item \textbf{Globle:} This geographic deduction game requires identifying a target country based on proximity feedback from guesses. It tests geographic knowledge retrieval, spatial reasoning, and iterative strategy refinement based on feedback (distance, direction). We assume interaction via a simulated game environment.
203
  \end{itemize}
204
- These diverse reasoning tasks challenge the system's ability to leverage appropriate cognitive resources (local vs. external models), potentially create simple tools, and coordinate problem-solving strategies effectively.
205
 
206
  \subsection{Baselines for Comparison}
207
  \label{subsec:baselines}
208
- To quantify the benefits of HASHIRU's features, we will compare its performance against several baseline configurations:
209
  \begin{itemize}
210
- \item \textbf{Static-HASHIRU:} A version with a fixed, predefined set of Employee agents (e.g., one generalist agent per potential role identified in paper analysis), disabling dynamic hiring/firing.
211
- \item \textbf{Cloud-Only HASHIRU:} HASHIRU operating exclusively with a powerful external LLM API and online function-calling for all agents, disabling the use of local models.
212
- \item \textbf{Local-Only HASHIRU:} HASHIRU operating exclusively with smaller, local LLMs (e.g., selected models via Ollama) for all agents.
213
- \item \textbf{HASHIRU (No-Economy):} HASHIRU with dynamic hiring/firing enabled but without the explicit costs, to isolate the impact of the economic model on agent churn and stability.
214
- % \item \textbf{[Optional] Other Frameworks:} If feasible, configure AutoGen \cite{wu2023autogen} or CrewAI \cite{crewai} with a similar hierarchical structure to solve a subset of the tasks for comparison.
215
  \end{itemize}
216
 
217
  \subsection{Evaluation Metrics}
218
  \label{subsec:metrics}
219
- We will evaluate performance using a combination of quantitative and qualitative metrics:
220
  \begin{itemize}
221
  \item \textbf{Task Success Rate / Quality:}
222
  \begin{itemize}
223
- \item Percentage of tasks successfully completed (binary for games, potentially graded for analysis based on rubrics).
224
- \item Quality of output for analysis tasks (human evaluation based on relevance, coherence, accuracy, completeness).
225
- \item Accuracy for information extraction tasks.
226
- \item Number of guesses/turns required for game tasks.
227
  \end{itemize}
228
  \item \textbf{Resource Consumption:}
229
  \begin{itemize}
230
- \item Total cost incurred from external API calls.
231
  \item Peak and average memory usage (\% of allocated budget).
232
  \item Wall-clock time per task.
233
  \item Number and type (local/external) of LLM calls.
234
  \end{itemize}
235
  \item \textbf{System Dynamics and Adaptability:}
236
  \begin{itemize}
237
- \item Number of Employee agents hired and fired during tasks.
238
- \item Frequency of agent churn (hires+fires / task duration or steps).
239
  \item Number and utility of autonomously created tools (if applicable).
240
  \end{itemize}
241
  \end{itemize}
242
 
243
-
244
-
245
  \bibliography{references}
246
  \bibliographystyle{plain}
247
 
248
- \end{document}
 
35
 
36
  \section{Introduction}\label{sec:introduction}
37
 
38
+ Rapid advancements in Large Language Models (LLMs) are reshaping Artificial Intelligence (AI) with profound capabilities in language understanding, generation, reasoning, and planning \cite{brown2020language, devlin2019bert, raffel2020exploring}. This progress drives the development of autonomous AI agents, shifting focus from single to Multi-Agent Systems (MAS) where collaborative teams tackle complex problems beyond individual scope \cite{dorri2018multi, wooldridge2009introduction}. Collaborative MAS show significant potential in diverse domains like scientific discovery \cite{boiko2023emergent}, software engineering \cite{qian2023communicative}, data analysis, and strategic decision-making \cite{wang2023decision}. The increasing complexity of tasks, demonstrated by benchmarks requiring advanced mathematical reasoning (e.g., GSM8K \cite{cobbe2021gsm8k}, SVAMP \cite{patel2021svamp}), coding (e.g., HumanEval \cite{chen2021codex}, CoDocBench \cite{pai2024codocbench}), and graduate-level technical knowledge \cite{phan2025humanitysexam}, highlights the need for agentic systems to effectively coordinate diverse cognitive resources \cite{wen2024benchmarkingcomplexinstructionfollowingmultiple}.
39
 
40
+ Despite this potential, contemporary agentic frameworks face significant limitations. Many are \textbf{rigid}, relying on predefined roles and static structures hindering adaptation to dynamic tasks \cite{zhang2023building}. \textbf{Resource obliviousness} is common; systems often lack mechanisms to monitor and optimize computational resources like API costs, memory, and CPU load, leading to inefficiency, especially when scaling or deploying in resource-constrained environments \cite{park2023generative}. This is often worsened by reliance on powerful, costly proprietary cloud LLMs. \textbf{Model homogeneity}, defaulting to a single powerful LLM for all sub-tasks, misses efficiency gains from a diverse ecosystem including smaller, specialized, or local models \cite{zhou2023agents}. While \textbf{tool use} is fundamental \cite{yao2022react, parisi2022talm}, agents' ability to autonomously \textbf{create and integrate new tools} remains limited, restricting dynamic extension and self-improvement without human intervention \cite{wang2023voyager}.
41
 
42
+ To address these challenges, we introduce \textbf{HASHIRU (Hierarchical Agent System for Hybrid Intelligent Resource Utilization)}, a novel MAS framework enhancing flexibility, resource efficiency, and adaptability. HASHIRU employs a hierarchical structure led by a central ``CEO'' agent dynamically managing specialized ``employee'' agents instantiated on demand. A core tenet is its \textbf{hybrid intelligence} approach, strategically prioritizing smaller (e.g., 3B--7B), locally-run LLMs (often via Ollama \cite{ollama}) for cost-effectiveness and efficiency. While prioritizing local resources, the system flexibly integrates external APIs and potentially more powerful models when justified by task complexity and resource availability, under the CEO's management.
43
 
44
+ The primary contributions are:
45
  \begin{enumerate}
46
+ \item A novel MAS architecture combining \textbf{hierarchical control} with \textbf{dynamic, resource-aware agent lifecycle management} (hiring/firing). This management is governed by computational budget constraints (cost, memory, concurrency) and includes an economic model with hiring/firing costs to discourage excessive churn.
47
+ \item A \textbf{hybrid intelligence model} prioritizing cost-effective, local LLMs while adaptively incorporating external APIs and larger models, optimizing the efficiency-capability trade-off.
48
+ \item An integrated mechanism for \textbf{autonomous API tool creation}, allowing dynamic functional repertoire extension.
49
+ \item An \textbf{economic model} (hiring/firing fees) for agent management, promoting efficient resource allocation and team stability.
50
  \end{enumerate}
51
 
52
+ This paper details HASHIRU's design and rationale. Section \ref{sec:background} discusses related work in agent architectures, dynamic management, resource allocation, model heterogeneity, and tool use. Section 3 elaborates on the architecture and core mechanisms. Section 4 presents experimental results (or outlines planned experiments), followed by discussion and conclusion in Sections 5 and 6.
53
 
54
  \section{Background and Related Work} \label{sec:background}
55
 
56
+ Intelligent agent concepts have evolved from early symbolic AI \cite{russell2010artificial, shoham1994agent} to LLM-dominated frameworks leveraging models for reasoning, planning, and interaction \cite{wang2023survey, xi2023rise}. HASHIRU builds on this, addressing current limitations.
57
 
58
  \subsection{Agent Architectures: Hierarchy and Dynamics}
59
+ MAS architectures vary, including flat, federated, and hierarchical \cite{dorri2018multi, horling2004survey}. Hierarchical models offer clear control and task decomposition but risk bottlenecks and rigidity \cite{gaston2005agenta,gaston2005agentb}. HASHIRU uses a \textbf{CEO-Employee hierarchy} for centralized coordination but distinguishes itself through \textbf{dynamic team composition}. Unlike systems with static hierarchies or predefined roles (e.g., CrewAI \cite{crewai}, ChatDev \cite{qian2023communicative}), HASHIRU's CEO dynamically manages the employee pool based on runtime needs and resource constraints.
60
 
61
  \subsection{Dynamic Agent Lifecycle Management}
62
+ Dynamic MAS composition is crucial for complex environments \cite{valckenaers2005trends}. Agent creation/deletion triggers often relate to task structure or environmental changes. HASHIRU introduces a specific mechanism where the CEO makes \textbf{hiring and firing decisions} based on a cost-benefit analysis considering agent performance, operational costs (API fees, inferred compute), memory footprint (tracked explicitly as a percentage of available resources), and concurrency limits. HASHIRU also incorporates an \textbf{economic model} with explicit ``starting bonus'' (hiring) and ``invocation'' (usage) costs. This economic friction aims to prevent excessive initialization or usage for marginal gains and promote team stability, a nuance often missing in simpler dynamic strategies.
63
 
64
  \subsection{Resource Management and Agent Economies}
65
+ Resource awareness is critical for scalable MAS. Economic research explores mechanisms like market-based auctions or contract nets for allocation \cite{clearwater1996market}. HASHIRU implements a more \textbf{centralized, budget-constrained resource management model}. The CEO operates within defined limits for financial cost, memory usage (as a percentage of total allocated), and concurrent agent count. This direct management, particularly focusing on memory percentage, suggests practicality for deployment on local or edge devices with finite resources, contrasting with cloud systems assuming elastic resources \cite{park2023generative}. Frameworks like AutoGen \cite{wu2023autogen} and LangGraph \cite{langgraph} typically rely on implicit cost tracking without explicit multi-dimensional budgeting and control.
66
 
67
  \subsection{Hybrid Intelligence and Heterogeneous Models}
68
+ Leveraging diverse LLMs with varying capabilities, costs, and latencies is an emerging trend \cite{zhou2023agents}. Techniques like model routing select optimal models for sub-tasks. HASHIRU embraces \textbf{model heterogeneity} with a strategic focus: \textbf{prioritizing smaller (3B--7B), locally-run models via Ollama integration} \cite{ollama}. This emphasizes cost-efficiency, low latency, and potential privacy over systems defaulting to large proprietary cloud APIs (e.g., GPT-4 \cite{openai2023gpt4}, Claude 3 \cite{anthropic2024claude}). While integrating external APIs (potentially larger models), HASHIRU's default stance represents a distinct capability vs. efficiency balance.
69
 
70
  \subsection{Tool Use and Autonomous Tool Creation}
71
+ Tool use (APIs, functions) is fundamental for modern agents \cite{yao2022react, openai_func_calling}. Most systems use predefined tools. HASHIRU advances this with \textbf{integrated, autonomous API tool creation}. When needed functionality is missing, the CEO can commission the generation (potentially via a specialized agent) and deployment of a new API tool within the HASHIRU ecosystem. This self-extension capability differentiates HASHIRU from systems limited to static toolsets, moving towards greater autonomy and adaptability \cite{wang2023voyager, park2023generative}.
72
 
73
+ In summary, HASHIRU integrates hierarchical control, dynamic MAS, resource management, and tool use. Its novelty lies in the synergistic combination of: (1) dynamic, resource-aware hierarchical management with (2) an economic model for stability, (3) a local-first hybrid intelligence strategy, and (4) integrated autonomous tool creation. This targets key limitations in current systems regarding efficiency, adaptability, cost, and autonomy.
74
 
75
  \section{HASHIRU System Architecture}
76
  \label{sec:architecture}
77
 
78
+ HASHIRU's architecture addresses rigidity, resource obliviousness, and limited adaptability through a hierarchical, dynamically managed MAS optimized for hybrid resource utilization.
79
 
80
  \subsection{Overview}
81
+ HASHIRU operates with a central ``CEO'' agent coordinating specialized ``Employees''. Key tenets:
82
  \begin{itemize}
83
+ \item \textbf{Dynamic Hierarchical Coordination:} CEO manages strategy, task allocation, and dynamic team composition.
84
+ \item \textbf{Dynamic Lifecycle Management:} Employees are hired/fired based on runtime needs and resource constraints, governed by an economic model.
85
+ \item \textbf{Hybrid Intelligence:} Strategic preference for local, cheaper LLMs, while accessing external APIs/models.
86
+ \item \textbf{Explicit Resource Management:} Continuous monitoring and control of costs, memory usage, and concurrency against budgets.
87
+ \item \textbf{Adaptive Tooling:} Using predefined tools alongside autonomous creation of new API tools.
88
  \end{itemize}
89
+ Figure \ref{fig:arch} illustrates the structure.
90
 
91
  \begin{figure}[ht]
92
  \centering
 
96
  \end{figure}
97
 
98
  \subsection{Hierarchical Structure: CEO and Employee Agents}
99
+ The system uses a two-tiered hierarchy:
100
 
101
  \begin{itemize}
102
+ \item \textbf{CEO Agent:} Singleton, central coordinator and entry point. Responsibilities:
103
  \begin{itemize}
104
+ \item Interpreting user query/task.
105
+ \item Decomposing main task into sub-tasks.
106
+ \item Identifying required capabilities.
107
+ \item Managing Employee pool (Section \ref{subsec:dynamic_mgmt}).
108
+ \item Assigning sub-tasks to active Employees.
109
+ \item Monitoring Employee progress/performance.
110
+ \item Synthesizing Employee results into final output.
111
+ \item Managing overall resource budget (Section \ref{subsec:resource_mgmt}).
112
+ \item Initiating new tool creation (Section \ref{subsec:tooling}).
113
  \end{itemize}
114
+ We use Gemini 2.5 Flash~\cite{gemini25flash} as the CEO agent due to its strong reasoning capabilities, support for tool usage, and cost efficiency, making it a practical and capable choice for our deployment.
115
+ \item \textbf{Employee Agents:} Specialized agents instantiated by the CEO for specific sub-tasks. Each typically wraps an LLM (local via Ollama \cite{ollama} or external API) or provides tool access. Characteristics:
116
  \begin{itemize}
117
+ \item Specialization: Capabilities tailored to task types (code, data analysis, info retrieval).
118
+ \item Dynamic Existence: Created/destroyed by CEO based on need/performance.
119
+ \item Task Execution: Receive task, execute, return result.
120
+ \item Resource Consumption: Associated costs (API, memory) tracked by system.
121
  \end{itemize}
122
  \end{itemize}
123
+ This hierarchy facilitates task decomposition and result aggregation; the dynamic pool provides flexibility.
124
 
125
  \subsection{Dynamic Agent Lifecycle Management}
126
  \label{subsec:dynamic_mgmt}
127
+ A core innovation is the CEO's dynamic management (hiring/firing) of Employee agents. Driven by cost-benefit analysis, this optimizes task performance within resource constraints.
128
 
129
+ When a sub-task needs unavailable or inefficiently provided capabilities, the CEO may hire a new agent. Conversely, if an agent underperforms, is idle, costly, or resource limits are neared, the CEO may fire it. Decision factors:
130
  \begin{itemize}
131
+ \item \textbf{Task Requirements:} Needed capabilities for pending sub-tasks.
132
+ \item \textbf{Agent Performance:} Historical success, output quality, efficiency.
133
+ \item \textbf{Operational Costs:} API, estimated compute, or other costs.
134
+ \item \textbf{Memory Footprint:} Agent memory usage (\% of total allocated).
135
+ \item \textbf{Agent Concurrency:} Active agents vs. predefined limit.
136
  \end{itemize}
137
 
138
+ HASHIRU includes an \textbf{economic model}:
139
  \begin{itemize}
140
+ \item \textbf{Hiring Cost (``Starting Bonus''):} One-time cost upon instantiation (setup overhead).
141
+ \item \textbf{Invocation Cost (``Salary''):} Multi-time cost upon use (system/payment load).
142
  \end{itemize}
143
+ These transaction costs discourage excessive churn, promoting stability. The CEO evaluates if replacing an agent benefits outweigh hiring/firing costs plus operational differences. This combats rigidity and allows adaptation while managing budgets and preventing wasteful turnover.
144
 
145
  \subsection{Hybrid Intelligence and Model Management}
146
+ HASHIRU is designed for \textbf{hybrid intelligence}, leveraging diverse cognitive resources. It strategically prioritizes smaller (3B--7B), cost-effective local LLMs via Ollama \cite{ollama}. This enhances efficiency, reduces external API reliance, and potentially improves privacy/latency.
147
 
148
+ The system also integrates:
149
  \begin{itemize}
150
+ \item \textbf{External LLM APIs:} Access to powerful proprietary models (GPT-4 \cite{openai2023gpt4}, Claude 3 \cite{anthropic2024claude}) when necessary, subject to cost-benefit.
151
+ \item \textbf{External Tool APIs:} Third-party software/data source integration.
152
+ \item \textbf{Self-Created APIs:} Tools generated by HASHIRU (Section \ref{subsec:tooling}).
153
  \end{itemize}
154
+ The CEO manages this heterogeneous pool, selecting the most appropriate resource based on difficulty, capabilities, and budget. This balances cost-effectiveness and efficiency with high capability needs.
155
 
156
  \subsection{Resource Monitoring and Control}
157
  \label{subsec:resource_mgmt}
158
+ Explicit resource management is central, moving beyond simple API cost tracking. The system, coordinated by the CEO, monitors:
159
  \begin{itemize}
160
+ \item \textbf{Financial Costs:} Accumulating external API costs.
161
+ \item \textbf{Memory Usage:} Footprint of active Employee agents (\% of allocated budget).
162
+ \item \textbf{Agent Concurrency:} Count of concurrently active agents.
163
  \end{itemize}
164
+ Metrics are monitored against predefined \textbf{budget limits}. Actions (like hiring) exceeding limits (e.g., >90\% memory, exceeding max concurrency) are prevented. This ensures operation within constraints, crucial for limited resources or strict budgets.
165
 
166
  \subsection{Tool Utilization and Autonomous Creation}
167
  \label{subsec:tooling}
168
+ HASHIRU agents use predefined tools (functions, APIs, databases) to interact and perform actions beyond text generation \cite{yao2022react, openai_func_calling}.
169
 
170
+ A distinctive feature is \textbf{integrated, autonomous tool creation}. If the CEO determines a required capability is missing, it can initiate new tool creation. This involves:
171
  \begin{enumerate}
172
+ \item Defining tool specification (inputs, outputs, functionality).
173
+ \item Commissioning logic generation (code, potentially using external APIs with provided credentials, possibly via a code-generating agent).
174
+ \item Deploying logic as a new, callable API endpoint within HASHIRU.
175
+ \item Potentially instantiating an Employee agent for the new tool.
176
  \end{enumerate}
177
+ This allows HASHIRU to dynamically extend its functional repertoire, tailoring capabilities to tasks without manual intervention, enabling greater autonomy and adaptation.
 
178
 
179
  \section{Experimental Setup}
180
  \label{sec:experiments}
181
 
182
+ We designed experiments to evaluate HASHIRU's performance, efficiency, and adaptability, targeting dynamic resource management, hybrid intelligence, and autonomous tool creation. Evaluation assesses benefits over baselines, focusing on:
183
  \begin{itemize}
184
+ \item Impact of dynamic management with economic constraints on resource utilization (cost, memory) and task performance vs. static configurations.
185
+ \item Effectiveness of the hybrid (local-first) strategy vs. homogeneous (cloud-only or local-only) approaches across task complexity.
186
+ \item System's ability to autonomously create/utilize tools for novel functional requirements.
187
  \end{itemize}
188
 
189
  \subsection{Evaluation Tasks}
190
  \label{subsec:tasks}
191
+ Tasks demand complex reasoning, multi-perspective analysis, and interaction, suitable for HASHIRU's coordination and dynamic capabilities. Tasks fall into two categories:
192
 
193
  \subsubsection{Academic Paper Review}
194
+ Evaluates HASHIRU's critical assessment by simulating peer review. Given papers (e.g., PDF), the system generates a review summary and recommends acceptance/rejection. Probes ability to decompose criteria, delegate to specialized agents (novelty, rigor, clarity), and manage resources across complex documents.
195
 
196
  \subsubsection{Reasoning and Problem-Solving Tasks}
197
+ Evaluates broader reasoning, knowledge retrieval, and problem-solving under constraints using challenging benchmarks and puzzles:
198
  \begin{itemize}
199
+ \item \textbf{Humanity's Last Exam \cite{phan2025humanitysexam}:} Tests graduate-level technical knowledge and complex reasoning across domains. Requires deep understanding and sophisticated problem-solving, likely needing powerful external LLMs managed within HASHIRU's hybrid framework.
200
+ \item \textbf{NYT Connections \cite{lopez2024nyt}:} Puzzle requiring identifying hidden semantic relationships/themes to categorize 16 words into four groups. Involves associative reasoning, broad knowledge, and hypothesis testing, testing knowledge access and combinatorial reasoning coordination.
201
+ \item \textbf{Wordle:} Daily word puzzle requiring deductive reasoning to identify a five-letter word within six guesses, using feedback. Tests logical deduction, constraint satisfaction, vocabulary. Good test for comparing efficiency (speed, cost, guesses) of local vs. external models for iterative reasoning. Assumes simulated game environment.
202
+ \item \textbf{Globle:} Geographic deduction game identifying a target country based on proximity feedback. Tests geographic knowledge, spatial reasoning, iterative strategy based on feedback. Assumes simulated game environment.
203
  \end{itemize}
204
+ These tasks challenge the system's ability to leverage appropriate resources (local vs. external), potentially create simple tools, and coordinate problem-solving.
205
 
206
  \subsection{Baselines for Comparison}
207
  \label{subsec:baselines}
208
+ To quantify HASHIRU's benefits, we compare its performance against baselines:
209
  \begin{itemize}
210
+ \item \textbf{Static-HASHIRU:} Fixed, predefined Employee agents (e.g., one per role), disabling dynamic hiring/firing.
211
+ \item \textbf{Cloud-Only HASHIRU:} Uses exclusively powerful external LLM API and online function-calling for all agents, disabling local models.
212
+ \item \textbf{Local-Only HASHIRU:} Uses exclusively smaller, local LLMs (via Ollama) for all agents.
213
+ \item \textbf{HASHIRU (No-Economy):} Dynamic hiring/firing enabled but without explicit costs, isolating economic model impact on churn/stability.
 
214
  \end{itemize}
215
 
216
  \subsection{Evaluation Metrics}
217
  \label{subsec:metrics}
218
+ We evaluate using quantitative and qualitative metrics:
219
  \begin{itemize}
220
  \item \textbf{Task Success Rate / Quality:}
221
  \begin{itemize}
222
+ \item Percentage of tasks completed (binary for games, graded for analysis).
223
+ \item Output quality for analysis (human evaluation: relevance, coherence, accuracy, completeness).
224
+ \item Accuracy for information extraction.
225
+ \item Guesses/turns for game tasks.
226
  \end{itemize}
227
  \item \textbf{Resource Consumption:}
228
  \begin{itemize}
229
+ \item Total external API costs.
230
  \item Peak and average memory usage (\% of allocated budget).
231
  \item Wall-clock time per task.
232
  \item Number and type (local/external) of LLM calls.
233
  \end{itemize}
234
  \item \textbf{System Dynamics and Adaptability:}
235
  \begin{itemize}
236
+ \item Employee agents hired/fired per task.
237
+ \item Agent churn frequency (hires+fires / duration or steps).
238
  \item Number and utility of autonomously created tools (if applicable).
239
  \end{itemize}
240
  \end{itemize}
241
 
 
 
242
  \bibliography{references}
243
  \bibliographystyle{plain}
244
 
245
+ \end{document}
paper/references.bib CHANGED
@@ -19,6 +19,16 @@
19
  year={2024}
20
  }
21
 
 
 
 
 
 
 
 
 
 
 
22
 
23
  @inproceedings{yao2022react,
24
  title = {{ReAct}: Synergizing Reasoning and Acting in Language Models},
 
19
  year={2024}
20
  }
21
 
22
+ @misc{gemini25flash,
23
+ title = {Gemini 2.5 Flash: Model Card, API, and Announcement},
24
+ author = {{Google DeepMind} and {Google AI}},
25
+ year = {2025},
26
+ howpublished = {\url{https://developers.googleblog.com/en/start-building-with-gemini-25-flash/}},
27
+ note = {See also:
28
+ \url{https://console.cloud.google.com/vertex-ai/publishers/google/model-garden/gemini-2.5-flash-preview-04-17?inv=1&invt=AbxICQ},
29
+ \url{https://ai.google.dev/gemini-api/docs/models}. Accessed: 2025-05-11}
30
+ }
31
+
32
 
33
  @inproceedings{yao2022react,
34
  title = {{ReAct}: Synergizing Reasoning and Acting in Language Models},