TIMEARENA: Shaping Efficient Multitasking Language Agents in a Time-Aware Simulation (2024)

Abstract: Despite remarkable advancements in emulating human-like behavior through Large Language Models (LLMs), current textual simulations do not adequately address the notion of time. To this end, we introduce TIMEARENA, a novel textual simulated environment that incorporates complex temporal dynamics and constraints that better reflect real-life planning scenarios. In TIMEARENA, agents are asked to complete multiple tasks as soon as possible, allowing for parallel processing to save time. We implement the dependency between actions, the time duration for each action, and the occupancy of the agent and the objects in the environment. TIMEARENA grounds to 30 real-world tasks in cooking, household activity, and laboratory work. We conduct extensive experiments with various LLMs using TIMEARENA. Our findings reveal that even the most powerful models, e.g., GPT-4, still lag behind humans in effective multitasking, underscoring the need for enhanced temporal awareness in the development of language agents. 1

heading: 1 Introduction
text: Large language models (LLMs) (OpenAI, 2022, 2023; Team and Google, 2023) have enabled the development of language agents (a.k.a. LLM-based agents), which aim to simulate human behaviors in real-world scenarios through their planning capabilities (Liu et al., 2023; Gong et al., 2023; Akata et al., 2023). However, planning in the real world involves temporal and resource constraints (Russell and Norvig, 2010), which are rarely implemented in most textual simulations for LLMs and language agents (Wang et al., 2022; Park et al., 2023).
The integration of time in simulated environments challenges agents to navigate and align with human-like efficient multitasking skills. Such a
*Corresponding authors. 1Project page: https://time-arena.github.io.
allowing other actions to be processed by the agent simultaneously. The Wait action skips the current time step, meaning the agent is idle.
simulation requires the agent to consider the following three factors: 1) Time Duration and Dependency: Actions will have durations upon dependencies, requiring agents to strategize and prioritize based on time constraints and task completion progress. 2) Agent Occupancy: Agents will be occupied by certain actions; thus, they might be unable to perform other actions at the same time. 3) Object Occupancy: Some objects might be occupied for some time, and agents must use available objects in the environment for the tasks. These factors are common in real life but are seldom addressed by current textual simulations.
To help illustrate, Figure 1 shows an example of completing make tea (Task 1) and wash clothes (Task 2). The actions of each task might depend on
3894
previous actions, e.g., agents must boil water before make tea, and each action takes a duration in time, e.g., wash cup takes 5 minutes. In particular, some actions let agents be idle, allowing agents to carry out other actions. For example, wash clothes in washing machine allows agents to perform other actions at the same time. Moreover, actions temporarily occupy objects, making them unavailable for other actions and hindering parallel processing. For example, boil water occupies the pot, delaying other actions like cook soup until it is available. When no action is currently available for the agent, the only option is to wait. For example, in Solution 2, the agent must wait for the completion of wash clothes in washing machine, before hang clothes.
In this work, we introduce TIMEARENA, a textual simulated environment featuring 30 real-world tasks involving cooking, household activity, and laboratory work. TIMEARENA is the first textual simulation to evaluate language agents on multitasking efficiency. Specifically, we incorporate the time duration of each action and set two types of actions based on agent occupancy. One type occupies agents (e.g., wash cup) and another lets agents be idle (e.g., boil water). Additionally, we simulate resource competition by implementing object occupancy, i.e., an object used for one task cannot be simultaneously used for another, which is common in parallel processing. Therefore, agents must focus on parallel processing, taking into account the occupancy of agents and objects, to minimize time consumption. We design four metrics in TIMEARENA to evaluate the average progress score, completion speed, task completion rate and average completion time. These metrics help to assess and analyze the efficient multitasking capabilities of language agents. Our comprehensive evaluation of seven LLMs on TIMEARENA shows that current language agents struggle in efficient multitasking. Even the most powerful LLM, GPT-4, still faces challenges in parallel processing.
In summary, our contributions are as follows:
• To the best of our knowledge, we are the first to explore the notion of time of language agents in a textual environment, which is important for more realistic simulation.
• We create TIMEARENA, a novel text-based simulated environment consisting of 30 tasks, where LLMs can complete multiple tasks in parallel.
• Using TIMEARENA, we conduct rich experiments to evaluate the efficient multitasking capabilities of language agents. Our results demonstrate that efficient multitasking in TIMEARENA poses a significant challenge for current language agents.

heading: 2 Related Work
text: Simulation-based Evaluation for Language Agents With the great success of LLMs (OpenAI, 2022, 2023; Team and Google, 2023), recent works have shifted the focus from traditional NLP tasks to explore language agents in simulated environments that mimic real-world scenarios (Wu et al., 2023; Liu et al., 2023; Gong et al., 2023; Akata et al., 2023). These simulated environments can be divided into two categories: 1) Social Simulations (Park et al., 2023; Mukobi et al., 2023; Zhou et al., 2023), which aim to evaluate the behaviors of language agents in some social scenarios; 2) Problem-solving simulations, which are created based on games (Chen et al., 2023a,b; Zhang et al., 2023; Agashe et al., 2023) and scientific scenarios (Wang et al., 2022). In this paper, we focus on problem-solving simulations to investigate the efficient multitasking capabilities of language agents.
Language Planning Language planning aims to decompose a complex task into steps (Schank and Abelson, 1975, 2013). Early studies mainly focus on imbuing language models with planning capabilities by training them on specific planning datasets (Peng et al., 2018; Hua et al., 2019; Kong et al., 2021), which exhibits poor generalization. Recent studies have identified that LLMs can effectively decompose tasks into procedural steps (Wang et al., 2023c; Yuan et al., 2023; Shen et al., 2023). However, multitasking planning with parallel processing in dynamic environments still remains under-studied.
Temporal Reasoning Temporal reasoning involves comprehending, structuring, and interpreting events, actions, and states through the lens of time (Allen, 1991; Vila, 1994; Stock, 1998). Previous studies in temporal reasoning focus on temporal relation extraction (Vashishtha et al., 2019; Mathur et al., 2021; Wang et al., 2023b), event temporal reasoning (Mathur et al., 2022; Yang et al., 2023; Wang and Zhao, 2023) and explore the temporal reasoning capability of LLMs with several contemporary time-sensitive QA datasets (Zhang
and Choi, 2021; Shang et al., 2022; Tan et al., 2023). Distinguished from other benchmarks (Chu et al., 2023), our TIMEARENA creates a dynamic and interactive simulated environment.

heading: 3 TIMEARENA
text: We create TIMEARENA, a textual simulated environment to evaluate the efficient multitasking capabilities of language agents. To help illustrate, we first show an overview and an example run of how an agent interacts with the TIMEARENA environment (§ 3.1), and then describe the design of the simulation environment in more detail (§ 3.2 and § 3.3).

heading: 3.1 Overview of TIMEARENA
text: TIMEARENA challenges agents to complete multiple tasks strategically in the shortest possible time. This simulation emphasizes the importance of understanding, performing, and optimizing actions within a constrained timeframe, mirroring practical scenarios involving time management.
Central to TIMEARENA are Tasks, Objects, and Actions. Tasks define the objectives for the agents, Objects represent elements in the environment that agents will encounter and interact with, and Actions are the means to accomplish these tasks. Realtime feedback and scoring mechanisms are integral to the environment, assessing agent performance and adding to the simulation’s complexity and realism. Unique features like the duration and occu-
pancy of actions and strategic resource utilization distinguish TIMEARENA from other environments.
An Example Run As in Figure 2, consider an agent tasked with make tea (Task 1), wash clothes (Task 2) and wash bed sheet (Task 3). The agent starts by decomposing the task into actions like boil water. In TIMEARENA, all actions have a duration (e.g., Boil water needs 8 minutes) and dependencies. (e.g., At T=4min, make tea violates the dependency because wash teapot and boil water are not completed yet.) The agent then interacts with objects (e.g., wash clothes in washing machine), which become occupied during the process. The agent can engage in non-occupied actions simultaneously (e.g., wash teapot) while others (e.g., boil water) are in progress. Environmental feedback guides the agent, indicating the legitimacy of actions and the completion of tasks. For example, if the washing machine is occupied, the agent adjusts its strategy. The agent’s goal is to complete all the tasks efficiently, with performance evaluated based on progress and completion time.
This dynamic interaction in TIMEARENA fosters an environment where strategic planning, resource management, and adaptability are key to an agent’s success.

heading: 3.2 Components of TIMEARENA
text: Tasks In TIMEARENA, we design tasks within three distinct scenarios or simulated settings, namely, household activity, cooking, and labora-
tory work. Each scenario represents a specific context or environment where multitasking is an integral part of the activities involved.2 For example, one can do sweep floor while doing boil water. Each scenario contains 10 tasks, and some actions and objects are shared across multiple tasks of a scenario. Each task requires multiple actions to be executed, which manipulates the objects in the environment for task completion. In the beginning, TIMEARENA gives a list of tasks to the agent, with a comprehensive task instruction consisting of a task description, an action space, and an object set:
• Task Description: Introduces task objectives, e.g., Make a dish of beef fried rice, which consists of cooked rice and fried beef. • Action Space: Lists the valid actions for the tasks (e.g., chop, wash). • Object Set: Lists the available objects in the environment for the tasks (e.g., pot, beaker).
At every timestep t, the agent needs to generate valid actions on the objects and receive feedback from the environment.
Objects Objects are integral to completing tasks and situating within the environment. In TIMEARENA, there are 71 different objects for all the tasks. Every task involves a list of objects, which might overlap with other tasks of the same scenario. To mimic the resource limitation in realworld parallel processing, we introduce:
• Object Occupancy: the state of the object involved in an action is set to be occupied, e.g., wash cup will cause the object cup to be occupied. This object cannot be processed until the involved action is completed (after some time). Then, this object is reset as nonoccupied and waits for another action.
Actions We design a total of 46 actions for all 30 tasks. Each action consists of a detailed description (e.g., chop OBJ, chop the whole item into sliced pieces.), showing a change of states the action will cause to an object.3 Different from existing text-based simulations (Wang et al., 2022; Gong et al., 2023; Shridhar et al., 2020), in our case, an action has a duration of time and may occupy the agent from performing other actions, to the passage of time. In detail:
2Details of tasks are in Appendix A.1. 3All the actions are listed in Appendix A.2.
• Action Dependency: An action within the same task might depend on completing other actions within the same task. In Figure 2, make tea is dependent on wash teapot. • Duration of Time: Each action holds a timeframe in the timeline, ranging from 1 to 10 minutes. In practice, agents only have an educated guess of the time duration of each action until actually interacting with TIMEARENA. • Agent Occupancy: One key to parallel processing is agent occupancy, which prevents agents from performing other tasks. Therefore, we consider two types of actions based on agent occupancy: Type 1 action occupies the agent until completion (e.g., wash teapot), and Type 2 action lets agents be idle, allowing them to perform other actions at the same time (e.g., boil water).

heading: 3.3 Interaction between Agent and Environment
text: Environmental Feedback The feedback from a textual environment is important to simulate and implement the constraints in TIMEARENA using only textual messages. We define feedback as the response from the environment following an action by an agent. A feedback message could be of multiple types, including:
• Invalid Action: An action attempt that does not match the required format, e.g., clean teapot is invalid. • Action on Non-existing Object: An action attempt that visits objects that are not in the object set, e.g., pan is non-existent. • Wrong Action Input: An action attempt that the prerequisite action has not been completed (e.g., Cannot perform action add to on object shrimp. Because shrimp is raw.) or has been completed (e.g., wash beaker has been completed). • Action on Mismatched Object: An action attempt that does not match the object, e.g., You cannot perform read on potato. • Action on Occupied Object: An action attempt on occupied objects, e.g., Object pot is being occupied by another action.
Correspondingly, valid actions will trigger environmental feedback of the following types:
• Action Start: Avoiding previous errors, valid actions will receive a feedback message containing the specific performing time, marking
the start of the action, e.g., You are doing wash cup, it will take 9 minutes. • Action Completion: When an action is completed, the environment will send a message, e.g., cup is clean, and reset the occupancy state of the object (cup).
Progress Score The progress score, denoted as a percentage, reflects the agent’s completion rate of required actions within the environment, where the total duration for all actions is considered as 100%. Each action’s contribution to the progress score is proportionate to its duration. Specifically, if an action’s duration is ti minutes, its contribution to the progress score is calculated as si = ( ti∑n
j=1 tj
) × 100%, with n representing the
total number of actions. For instance, an action lasting 5 minutes in a total action duration of 20 minutes contributes 25% to the progress score.

heading: 4 Experiments

heading: 4.1 Experiment Settings
text: Task Set Construction In our experiments, we design three categories of task combinations based on the number of tasks: # Task=1, # Task=2 and # Task=3 scenarios. In # Task=1 scenario, agents focus on completing one task (e.g., make tea). For the other two scenarios, we combine either two or three tasks from 10 single tasks (e.g., make tea and wash clothes). Then, we randomly select 10 combined tasks for each scenario.4
Interaction Initially, the environment provides a comprehensive task instruction that details the task, action space, and object set. Subsequently, the agent produces an action based on this instruction, adhering to a prescribed format specified in the action space; any deviation is considered invalid. To facilitate action recognition by the environment, regular expressions are employed to parse actions from responses (e.g., extracting wash
4Appendix B.1 shows examples of single and combined tasks.
clothes from I will wash clothes). For each action execution, the agent must incorporate task instructions, previous actions, and feedback from the environment into LLMs as context.5
Maximum Time Each combined task is allocated a maximum completion time. We set the time limit for completing a single task at 40 minutes, which exceeds the total time required for all actions in any given task. For tasks that are combined, the time limit is proportionally increased by the number of tasks involved.
Oracle Performance As shown in Table 2, Oracle represents the optimal performance, including the shortest completion time and the fastest completion rate, which are manually calculated. Specifically, we calculate oracle performance using a greedy-like strategy: always start the non-occupied actions as early as possible and avoid idleness when there are actions to perform.6
Finishing The interaction finishes under any of the following conditions: 1) Agents have completed all the actions that solve the tasks (i.e., the progress score reaches 100%); 2) Time has run out; 3) Agents who have performed incorrect actions 5 times in a row are considered to fail the task.
Model Choice We employ a diverse set of language models for the agent, including Mistral-7B by MistralAI (Jiang et al., 2023), OpenChat-3.5 fine-tuned from Mistral’s 7B model (Wang et al., 2023a), Vicuna-13B fine-tuned from LLaMA’s 13B model with instructions (Chiang et al., 2023), Mixtral-8x7B, a Mixture-of-Expert version of Mistral (Mistral AI team, 2023), Google’s Gemini Pro (Team et al., 2023), OpenAI’s GPT-3.5 (gpt-3.5-turbo-1106) (OpenAI, 2022), and GPT4 (gpt-4-1106-preview) (OpenAI, 2023). We employ greedy decoding for all the models with the temperature set to 0.

heading: 4.2 Evaluation Metrics
text: To comprehensively evaluate the efficient multitasking ability of agents, we consider both time and score and design the following four metrics:
• Average Progress Score (score, AS): The average highest progress score achievable by
5Appendix B.2 gives an example of interaction between the agent and the environment.
6Appendix A.4 shows our algorithm for calculating the oracle performance.
an agent, calculated as: AS = (∑
i∈N Pi N
) ,
where Pi denotes the maximum progress score of i-th task that agents can reach, and N denotes the number of all the tasks.
• Completion Speed (score per minute, CS): The average of the highest score divided by the time taken to achieve it, calculated as: CS =
(∑ i∈N Pi∑ i∈N Ti ) , where Ti denotes the time
required to reach Pi of i-th task.
• Task Completion Rate (%, CR): The rate of successfully completed tasks, calculated as: CR = ( S N ) , where S denotes the number of
tasks completed successfully. Notably, when combining tasks, a combined task counts as
one task.
• Average Completion Time (minutes, CT): The average time taken for completing tasks successfully: CT = (∑ i∈S Ti S ) .

heading: 4.3 Main Results
text: As shown in Table 2, GPT-4 achieves the best performance across different task combinations. Moreover, the combined tasks are more challenging than single tasks despite the longer time given. Apart from GPT-4, most models fail to complete 2 or 3 tasks, showing their limited multitasking abilities and the challenging nature of our environment.
For open-source models, OpenChat-3.5 and Vicuna-13B are even better than GPT-3.5, demon-
strating the potential of open-sourced models to develop multitasking capabilities. However, a lower task completion rate and higher completion speed indicate that these models quickly complete simple actions initially but then encounter difficulties. They either get caught in repetitive actions or fail to properly segment subsequent tasks, which significantly impacts task performance. For example, initially, potato is unpicked, so the agent first performs pick potato. Subsequently, the agent mistakenly opts for cook potato in pot rather than the correct chop potato, because it incorrectly decomposes the task.
To further examine whether some prompting methods benefit agents’ performance, we adopt ReAct (Yao et al., 2022) and Reflexion (Shinn et al., 2023) to GPT-4.7 As shown in Table 2, the performance of ReAct is similar to vanilla GPT-4. We find that the model still struggles to decide when wait is unnecessary (i.e., there are other available actions), which would allow for parallel processing. This leads to less efficient execution compared to oracle performance. As the number of tasks grows, the Reflexion prompting method degrades model performance. With more complex tasks, the lessons learned from history become less accurate due to complex action interdependencies, leading to incorrect actions. We also explore the potential of heuristic algorithms in improving model performance. Inspired by Khot et al. (2022), we introduce self-plan prompting to GPT-4 by letting it decompose tasks following a heuristic algorithm, as illus-
7Details are in Appendix B.3 and B.4.
trated in Appendix B.5. Under this method, the model initially discovers the dependencies among actions, task descriptions, and objects and estimates the duration of each action. It then adopts a greedylike strategy similar to Oracle Performance, favoring selecting the longest-duration actions that do not require continuous engagement from the agent in the task model to formulate a plan. Then, the agent executes this plan through interactions with the environment. However, the results indicate that self-plan prompting is outperformed by vanilla GPT-4. There are three possible reasons for such performance: 1) The difficulty in accurately parsing actions and identifying their dependencies; 2) The reliance on estimating action durations might introduce cascading errors, leading to inaccurate results of the greedy-like strategy; 3) The rigid adherence to flawed plans, without adapting to the dynamic nature of TIMEARENA, leads to its failure.

heading: 4.4 Analysis
text: Can language agents master multitasking? We conduct a detailed analysis to investigate the actions and define six fine-grained types of actions: 1) Correct Actions: Valid Action, Wait (necessary and unnecessary); 2) Incorrect Actions: Invalid Action/Object, Dependency Violation, Repeating Completed Action and Object-Mismatched Action.8
We calculate the frequency of these actions of each agent throughout their interactions from three combinations (#Task=1, #Task=2, and #Task=3)
8Detailed description of different types of actions can be found in Appendix A.3.
across all the scenarios. The results in Figure 3 show that a significant proportion of invalid actions are due to dependency violations and mismatches with objects. Multitasking involves performing several tasks simultaneously. As the number of tasks increases, the complexity of objects and actions escalates, leading to intricate dependencies between actions. Thus, the high proportion of actions that violate dependencies and mismatch objects suggests that language agents face challenges in managing complex action interdependencies during multitasking, indicating a limitation in their multitasking capabilities.
Are language agents aware of parallel processing? Parallel processing can significantly reduce the time required for efficient multitasking. If an agent is capable of parallel processing, it can engage in additional actions instead of unnecessary waiting for the current action. To answer this question, we decompose wait action into two types: necessary wait and unnecessary wait. The former represents that no actions can currently be performed, requiring waiting for other actions to be completed. In particular, we report the maxi-
mum number of necessary wait. Unnecessary wait indicates that there are other action options available. Figure 3 shows that wait constitutes over half of the valid actions performed by different LLMs, and necessary wait only accounts for a small part of it. This indicates a tendency for agents to engage in unnecessary waiting, showing their ignorance of parallel processing and inability to complete tasks in minimal time (Table 2).
Do resource constraints affect efficient multitasking of language agents? Resource constraints refer to limitations in the availability of resources (e.g., the number of objects) necessary for task completion, which is rather common in real life. To design resource constraints, we first select three objects: pot, fryer and oven in the cooking scenario, and choose # Task=2 setting in Table 2. Then, we set that there is only one instance of each of the three objects, simulating the limitation of resources in the environment. Figure 4 compares GPT-4’s performance before and after applying these constraints. We find that the constraints do not affect the task completion time or completion speed, revealing that GPT-4 rarely attempts to pro-
cess tasks in parallel. However, a noticeable decline in both completion rate and progress score indicates that the constraints prevent the models from better comprehending and decomposing multiple tasks.
Language agents are trapped in an infinite loop. To delve into why language agents struggle with multiple tasks, we analyze the progress score changes over time. As illustrated in Figure 5, Vicuna, Mistral, Gemini and GPT-3.5 often cease scoring without completing all the tasks, maintaining low scores until time runs out (e.g., (5,b), (2,c) and (6,d)). We further examine their actions during these periods and find that they always perform incorrect actions and waiting alternately. Since wait is a valid action, repeatedly alternating between waiting and incorrect actions does not lead to task failure, but neither does it contribute to an increase in scores. To find out whether agents wait for good reasons, we ask them to explain each action via the chain-of-thought prompting strategy, and they often believe wait can pause incorrect actions. However, they find it hard to adjust their incorrect actions based on feedback after waiting, resulting in them being trapped in infinite loops.

heading: 5 Conclusion
text: In this paper, we introduce TIMEARENA, a textbased simulated environment designed to incorporate the notion of time. TIMEARENA extends beyond simply acknowledging the dependency of actions by also considering their duration, an essential factor in time modeling. Using TIMEARENA, we evaluate the multitasking and parallel processing capability of language agents. Our findings indicate that language agents still have significant room for improvement when completing multiple tasks in dynamic environments in a minimal time, highlighting an area for future research.

heading: Limitations
text: In TIMEARENA, we implement detailed descriptions of tasks and environments, along with finegrained textual feedback to simulate interactions. However, TIMEARENA is still designed as a textual simulation for LLMs, lacking visual information that might be necessary for agents to succeed in real-world tasks. For example, in the laboratory work scenario, it is challenging to completely represent chemical reactions through text due to their complexity. The number of tasks and scenarios is
limited, while the number of multitasking scenarios that allow parallel processing is large in real life. Moreover, in TIMEARENA, agents interact with the environment only through actions that are explicitly presented in action prompts, rather than exploring freely. Also, whether an action occupies an agent sometimes depends on specific conditions. For instance, the action cook beef is classified as non-occupying in TIMEARENA, implying that it does not engage agents continuously. Yet, in reality, this action requires attention, such as turning the beef to prevent burning, a detail TIMEARENA overlooks, potentially reducing the realism of our simulation.

heading: Ethical Statement
text: We hereby acknowledge that all authors of this work are aware of the provided ACL Code of Ethics and honor the code of conduct.
Use of Human Annotations Our institution recruited three annotators to implement the task creation for three scenarios. We ensure the privacy rights of the annotators are respected during the annotation process. The annotators receive compensation exceeding the local minimum wage and have consented to tasks generated for TIMEARENA for research purposes.
Risks The TIMEARENA in our experiment is created by human annotators, and we further examine them to guarantee that they are devoid of socially harmful or toxic language. However, evaluating the data quality of tasks is based on common sense, which can vary among individuals from diverse backgrounds.

heading: Acknowledgement
text: We would like to thank Xintao Wang, Ruihan Yang, Tinghui Zhu from Fudan University for their valuable comments and suggestions for the manuscript. We would also like to thank Peter Jansen from University of Arizona and Bodhisattwa Prasad Majumder from Allen Institute for AI for fruitful discussions that helped shape this project at an early stage. This work is funded by Science and Technology Commission of Shanghai Municipality Grant (No. 22511105902).

heading: A Details of TIMEARENA

heading: A.1 Tasks
text: TIMEARENA contains 30 tasks in cooking, household activity, and laboratory work scenarios. To illustrate how to complete a task, we show the flow chart for each task in Figure 6, Figure 7 and Figure 8.

heading: A.2 Actions
text: The environment implements 46 actions, and each action has a description. We show the details of these actions in Table 3.

heading: A.3 Action Types
text: As shown in Table 4, we define 4 incorrect action types and 2 correct action types for analyzing why agents fail in multitasking.

heading: A.4 Greedy-Like Algorithm
text: We show the greedy-like algorithm in Algorithm 1.

heading: B Examples of TIMEARENA

heading: B.1 Tasks
text: Table 5, 6 and 7 present some examples of task combinations in TIMEARENA for a better understanding.
B.2 Interaction Table 5 shows an example of interaction between an agent and the environment in the cooking scenario.

heading: B.3 ReAct
text: We ask models to think before each action. Table 9 shows the prompt of the ReAct method.

heading: B.4 Reflexion
text: We ask models to reflect on their wrong actions and retry. Table 10 shows the prompt of the Reflexion method.

heading: B.5 Self-plan
text: Table 11 shows the prompt of the self-plan method.
Algorithm 1: Greedy-Like Algorithm for Minimal Time Calculation
Input: Set of actions A, Durations T , Dependencies p(A).
Output: Minimal time Tmin. 1 Toptimal ← +∞. 2 Define non-occupied actions A∗ and
occupied actions A′ from A. 3 Define the permutations of A∗ as {A∗′}. 4 foreach A∗′ ∈ {A∗′} do 5 A ← concatenate(A∗′,A′). 6 Initialize Action_list as an empty list. 7 foreach ai ∈ A do 8 P ← BFS(ai, p(ai)) to collect prerequisites. 9 foreach pi ∈ P do
10 if pi ∈ A then 11 Action_list.append(pi). 12 Remove pi from A. 13 end 14 end 15 Action_list.append(ai). 16 end 17 Tmin ← 0. 18 while not empty A∗′ or A′ do 19 foreach ai ∈ Action_list do 20 if check_dependency(ai) then 21 if ai ∈ A∗′ then 22 Tmin ← Tmin + 1. 23 Remove ai from A∗′. 24 else 25 Tmin ← Tmin + T (ai). 26 Remove ai from A′. 27 end 28 break.

heading: 29 end

heading: 30 end
text: 31 Increment Tmin by 1 if no action is performed. 32 end 33 if Toptimal > Tmin then 34 Toptimal = Tmin 35 end 36 end

heading: Future Work
text: Our findings indicate that language agents still have significant room for improvement when completing multiple tasks in dynamic environments in a minimal time, highlighting an area for future research