Skip to content

Commit 8d81f3c

Browse files
amanjaiswal73892ollmerhnekoeiqrecursixpatricebechard
authored
Hint use agent (#316)
* fixes * add new deps * use external embedding service in task hints retrieval * gpt5 fixes * first cut * update * add event listeners and launcher * Add codegen step-wise recoder agent * adding task hints to generic agent * fix repeated llm configs * load env vars in codegen agent * same hints retrieval for both generic and tooluse agents * filter out current task hints if needed * fix llm config, add gpt-5 * fix * pass new flag and fix db path passing issue * fix goal text * fix current task hints exclusion * remove old reqs * remove recorder from that brach * log task errors * expore agentlabxray * remove commented old chunk * share xray only when env flag present * Add StepWiseQueriesPrompt for enhanced query handling in GenericAgent * update hinting agent retrieval * stepwise hint retrieval * added shrink method * (wip) refactor hinting index * (wip) clean up prompt file * add scripts to run generic and hinter agents, update tmlr config for hinter * move HintsSource to separate hinting file * update hinter agent and prompt * fix prompt for task hint * undo changes to tmlr config * update hinter agent * formatting * bug fix hint retrieval * improve launch script * get queries only for step level hint * Add webarenalite to agentlab loop.py * update stepwise hint queries prompt * fix exc logging * non empty instruction * allow less then max hint queries * add generic agent gpt5-nano config * make ray available on toolkit * check that hints db exists * Fix assignment of queries_for_hints variable * Improve generic agent hinter (#309) * Make LLM retreival topic index selection more robust * add new flag to skip hints with the current goal in the hint source t… (#310) * add new flag to skip hints with the current goal in the hint source traces * Rename generic agent hinter to hint_use_agent (#311) * rename generic_agent_hinter to hint_use_agent for clarity * Add deprecation warning and module alias for generic_agent_hinter * improve module aliasing for submodules * Add todo rename agent name * black * bugfix: check for hint_db only when use_task_hint is true. * fix: address missing initialization and correct args reference in choose_hints method * black * bugfix: skip HintSource init if use_task_hint is false * Fix incorrect references for docs retrieval hinter agent (#313) * address comments * format * Add Environment Variable for Ray port (#315) * add env variable for ray port * document env variables * undo removed llm_config * undo unnessary change * add missing default values for hint prompt flags * black * update names in scripts * use default prompt in hintSource for Tool Use agent * remove experiment scripts --------- Co-authored-by: Oleh Shliazhko <[email protected]> Co-authored-by: Hadi Nekoei <[email protected]> Co-authored-by: Oleh Shliazhko <[email protected]> Co-authored-by: recursix <[email protected]> Co-authored-by: Patrice Bechard <[email protected]> Co-authored-by: Hadi Nekoei <[email protected]> Co-authored-by: Patrice Bechard <[email protected]>
1 parent 0da2063 commit 8d81f3c

File tree

15 files changed

+1672
-156
lines changed

15 files changed

+1672
-156
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,13 +278,15 @@ dynamic benchmarks.
278278

279279
## Variables
280280
Here's a list of relevant env. variables that are used by AgentLab:
281-
- `OPEAI_API_KEY` which is used by default for OpenAI LLMs.
281+
- `OPENAI_API_KEY` which is used by default for OpenAI LLMs.
282282
- `AZURE_OPENAI_API_KEY`, used by default for AzureOpenAI LLMs.
283283
- `AZURE_OPENAI_ENDPOINT` to specify your Azure endpoint.
284284
- `OPENAI_API_VERSION` for the Azure API.
285285
- `OPENROUTER_API_KEY` for the Openrouter API
286286
- `AGENTLAB_EXP_ROOT`, desired path for your experiments to be stored, defaults to `~/agentlab-results`.
287287
- `AGENTXRAY_SHARE_GRADIO`, which prompts AgentXRay to open a public tunnel on launch.
288+
- `RAY_PUBLIC_DASHBOARD` (true / false), used to specify whether the ray dashboard should be made publicly accessible (`0.0.0.0`) or not (`127.0.0.1`).
289+
- `RAY_DASHBOARD_PORT` (int), used to specify the port on which the ray dashboard should be accessible.
288290

289291
## Misc
290292

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import importlib, sys, warnings
2+
3+
OLD = __name__
4+
NEW = "agentlab.agents.hint_use_agent"
5+
SUBS = ("agent_configs", "generic_agent_prompt", "generic_agent", "tmlr_config")
6+
7+
warnings.warn(
8+
f"{OLD} is renamed to {NEW}. {OLD} will be removed in future",
9+
DeprecationWarning,
10+
stacklevel=2,
11+
)
12+
13+
# Alias the top-level
14+
new_mod = importlib.import_module(NEW)
15+
sys.modules[OLD] = new_mod
16+
17+
# Alias known submodules
18+
for sub in SUBS:
19+
sys.modules[f"{OLD}.{sub}"] = importlib.import_module(f"{NEW}.{sub}")
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
"""
2+
Baseline agent for all ServiceNow papers
3+
4+
This module contains the GenericAgent class, which is the baseline agent for all ServiceNow papers. \
5+
It is a simple agent that can be ran OOB on all BrowserGym environments. It is also shipped with \
6+
a few configurations that can be used to run it on different environments.
7+
"""
8+
9+
from .agent_configs import (
10+
AGENT_3_5,
11+
AGENT_8B,
12+
AGENT_37_SONNET,
13+
AGENT_CLAUDE_SONNET_35,
14+
AGENT_CLAUDE_SONNET_35_VISION,
15+
AGENT_CUSTOM,
16+
AGENT_GPT5_MINI,
17+
AGENT_GPT5_NANO,
18+
AGENT_LLAMA3_70B,
19+
AGENT_LLAMA4_17B_INSTRUCT,
20+
AGENT_LLAMA31_70B,
21+
CHAT_MODEL_ARGS_DICT,
22+
RANDOM_SEARCH_AGENT,
23+
AGENT_4o,
24+
AGENT_4o_MINI,
25+
AGENT_4o_MINI_VISION,
26+
AGENT_4o_VISION,
27+
AGENT_o1_MINI,
28+
AGENT_o3_MINI,
29+
FLAGS_GPT_4o,
30+
GenericAgentArgs,
31+
)
32+
from .generic_agent import GenericAgent, GenericAgentArgs
33+
34+
__all__ = [
35+
"AGENT_3_5",
36+
"AGENT_4o",
37+
"AGENT_4o_MINI",
38+
"AGENT_4o_VISION",
39+
"AGENT_o3_MINI",
40+
"AGENT_o1_MINI",
41+
"AGENT_LLAMA4_17B_INSTRUCT",
42+
"AGENT_LLAMA3_70B",
43+
"AGENT_LLAMA31_70B",
44+
"AGENT_8B",
45+
"RANDOM_SEARCH_AGENT",
46+
"AGENT_CUSTOM",
47+
"AGENT_CLAUDE_SONNET_35",
48+
"AGENT_37_SONNET",
49+
"AGENT_4o_VISION",
50+
"AGENT_4o_MINI_VISION",
51+
"AGENT_CLAUDE_SONNET_35_VISION",
52+
"AGENT_GPT5_MINI",
53+
"AGENT_GPT5_NANO",
54+
]

0 commit comments

Comments
 (0)