Skip to content

Commit ecff4d8

Browse files
updates to agent controller
1 parent c41b8ef commit ecff4d8

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

src/agentlab/agents/tool_use_agent/hint_db.csv

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,18 @@ July 16,workarena.servicenow.sort-asset-list,406,gpt-4-1,ToolUseAgent-gpt-4-1,wo
2828
2. **Sort by One or Multiple Columns**
2929

3030
* `click` on the ""show / hide filter"" button (funnel icon) at the top left of the page to open the filter row.
31-
* Repeat the following steps for each column you want to sort by:
31+
* Repeat the following steps for each column you want to sort by in this exact order:
3232
* `click` on the ""Add Sort"" button to add a new sort filter. This will create a new ordering filter row with two comboboxes under the heading ""Order results by the following fields"".
3333
* `fill` the first combobox with the appropriate field name you want to sort by. MAKE SURE to use the exact field name provided.
34-
* `press` Enter after typing the field name. It is VERY IMPORTANT that you do this before doing anything else. DO NOT click on the run filter button before having confirmed your choice by explicitly pressing ENTER.
34+
* `press` Enter after typing the field name to close the dropdown. It is VERY IMPORTANT that you do this before doing anything else otherwise the field will not be selected and the task will not be successful. DO NOT click on the run filter button before having confirmed your choice by explicitly pressing ENTER.
3535
* `select_option` for the appropriate ordering between ascending (a to z) or descending (z to a) in the second combobox.
3636
* Once all sort filters have been added, `click` the ""Run filter"" button to apply the sort.
3737

3838
Notes:
3939
* NEVER directly sort the columns using the table header.
4040
* NEVER add columns via the Personalize List menu.
41+
* ALWAYS sort the table using the EXACT NAMES of the provided fields. DO NOT use different but similar field names. For example, if the field you're asked to sort by is ""Opened by"", DO NOT filter by ""Created by"" even if they sound similar, but instead ALWAYS use the exact ""Opened by"" wording.
42+
* Some columns might not appear by default in the visible view of the table. This does not mean they do not exist. ALWAYS use the EXACT names provided to sort by otherwise the task will not be successful.
4143

4244
3. **Resetting or Clearing Sorting**
4345

src/agentlab/agents/tool_use_agent/tool_use_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ def get_action(self, obs: Any) -> float:
593593
general_hints=GeneralHints(use_hints=False),
594594
task_hint=TaskHint(use_task_hint=True),
595595
keep_last_n_obs=None,
596-
multiaction=True, # whether to use multi-action or not
596+
multiaction=False, # whether to use multi-action or not
597597
action_subsets=("bid",),
598598
# action_subsets=("coord"),
599599
# action_subsets=("coord", "bid"),

src/agentlab/analyze/agent_controller.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,12 @@ def reset_agent_history():
164164

165165
def reset_agent_state():
166166
logger.info("Resetting agent state")
167-
st.session_state.agent.reset()
167+
if isinstance(st.session_state.agent, GenericAgent):
168+
st.session_state.agent.reset()
169+
else:
170+
st.session_state.agent.discussion.groups = []
171+
st.session_state.agent.last_response = LLMOutput()
172+
st.session_state.agent._responses = []
168173

169174

170175
def step_env_history(obs, response_json):
@@ -243,9 +248,7 @@ def revert_agent_state():
243248
num_groups = len(st.session_state.agent.discussion.groups)
244249
if num_groups == 3:
245250
# start from blank state
246-
st.session_state.agent.discussion.groups = []
247-
st.session_state.agent.last_response = LLMOutput()
248-
st.session_state.agent._responses = []
251+
reset_agent_state()
249252
elif num_groups > 3:
250253
# get rid of the last group (last action), and remove everything from the other previous group except for the action
251254
st.session_state.agent.discussion.groups.pop()

0 commit comments

Comments
 (0)