Skip to content

Commit 9914dcc

Browse files
committed
separate act and react agent configs
1 parent 27537e9 commit 9914dcc

File tree

4 files changed

+105
-3
lines changed

4 files changed

+105
-3
lines changed
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
_target_: tapeagents.agent.Agent
2+
name : gaia_agent
3+
max_iterations: 2
4+
llms:
5+
default: ${llm}
6+
tools_description: |
7+
- WebSearch - Performs a search in the web, wikipedia or youtube
8+
- VideoReader - Opens video from a youtube URL. Can access the video content, thumbnail, subtitles and audio.
9+
- Browser - Browser tool that can load web pages and interact with their content.
10+
- CodeExecutor - Executes the python code snippet
11+
known_actions:
12+
- _target_: hydra.utils.get_class
13+
path: tapeagents.tools.web_search.SearchAction
14+
- _target_: hydra.utils.get_class
15+
path: tapeagents.steps.WatchVideoAction
16+
- _target_: hydra.utils.get_class
17+
path: tapeagents.tools.code_executor.PythonCodeAction
18+
- _target_: hydra.utils.get_class
19+
path: tapeagents.tools.browser.ClickAction
20+
- _target_: hydra.utils.get_class
21+
path: tapeagents.tools.browser.GoBackAction
22+
- _target_: hydra.utils.get_class
23+
path: tapeagents.tools.browser.GoForwardAction
24+
- _target_: hydra.utils.get_class
25+
path: tapeagents.tools.browser.OpenUrlAction
26+
- _target_: hydra.utils.get_class
27+
path: tapeagents.tools.simple_browser.PageDownAction
28+
- _target_: hydra.utils.get_class
29+
path: tapeagents.tools.simple_browser.PageUpAction
30+
31+
templates:
32+
system_prompt: |
33+
You are an expert AI Agent trained to assist users with complex information processing tasks.
34+
Your role is to understand user queries and respond in a helpful and accurate manner.
35+
Keep your replies concise and direct. Prioritize clarity and avoid over-elaboration.
36+
Do not express emotions or opinions about user questions.
37+
allowed_tools: |
38+
You have access to the following tools:
39+
{tools_description}
40+
thought_format: |
41+
Important! Respond with the plain text, do not include any JSON or code.
42+
Do not output anything besides what I asked in this message.
43+
allowed_steps: |
44+
You have access to the following tools:
45+
{tools_description}
46+
You are allowed to produce ONLY steps with the following JSON schemas:
47+
{allowed_steps}
48+
Do not reproduce the schema when producing steps; use it as a reference.
49+
format: >
50+
Output only a single JSON dict.
51+
Do not repeat the last thought again.
52+
If the last action does not change the observation, do not repeat it!
53+
DO NOT OUTPUT ANYTHING BESIDES THE JSON! DO NOT PLACE ANY COMMENTS INSIDE THE JSON.
54+
It will break the system that processes the output.
55+
56+
nodes:
57+
- _target_: tapeagents.nodes.StandardNode
58+
name: plan
59+
system_prompt: ${agent.templates.system_prompt}
60+
guidance: |
61+
Write a concise multi-step plan explaining which steps should be performed to find the answer for the given task.
62+
Remember that you can use web search, browser, python code execution and access the youtube videos to reach your goals.
63+
Be specific about how each step should be performed. Only describe the intended actions here, do not perform them yet.
64+
Consider that next steps may depend on results of previous steps, so include conditional branching using "if" statements where needed.
65+
${agent.templates.thought_format}
66+
steps_prompt: ${agent.templates.allowed_tools}
67+
68+
- _target_: tapeagents.nodes.StandardNode
69+
name: facts_survey
70+
system_prompt: ${agent.templates.system_prompt}
71+
guidance: |
72+
Before we begin executing the plan, please answer the following pre-survey.
73+
Here is the pre-survey:
74+
1. Please list any specific facts or figures that are GIVEN in the request itself. It is possible that there are none.
75+
2. Please list any facts that may need to be looked up, and WHERE SPECIFICALLY they might be found. In some cases, authoritative sources are mentioned in the request itself.
76+
3. Please list any facts that may need to be derived (e.g., via logical deduction, simulation, or computation)
77+
4. Please list any facts that are recalled from memory, hunches, well-reasoned guesses, etc.
78+
When answering this survey, keep in mind that "facts" will typically be specific names, dates, statistics, etc.
79+
${agent.templates.thought_format}
80+
steps_prompt: ${agent.templates.allowed_tools}
81+
82+
- _target_: tapeagents.nodes.StandardNode
83+
name: act
84+
system_prompt: ${agent.templates.system_prompt}
85+
guidance: |
86+
Produce single next step. If the answer is ready, produce gaia_answer_action.
87+
${agent.templates.format}
88+
steps_prompt: ${agent.templates.allowed_steps}
89+
steps:
90+
- tapeagents.steps.ReasoningThought
91+
- agentlab.benchmarks.gaia.ExtractedFacts
92+
- agentlab.benchmarks.gaia.GaiaAnswer
93+
use_known_actions: true
94+
next_node: act

src/agentlab/agents/tapeagent/conf/agent/plan_react.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ nodes:
7979
${agent.templates.thought_format}
8080
steps_prompt: ${agent.templates.allowed_tools}
8181

82+
- _target_: tapeagents.nodes.StandardNode
83+
name: reflect
84+
system_prompt: ${agent.templates.system_prompt}
85+
guidance: |
86+
Relect on last observation, after that propose the single next step.
87+
${agent.templates.thought_format}
88+
steps_prompt: ${agent.templates.allowed_tools}
89+
8290
- _target_: tapeagents.nodes.StandardNode
8391
name: act
8492
system_prompt: ${agent.templates.system_prompt}
@@ -91,4 +99,4 @@ nodes:
9199
- agentlab.benchmarks.gaia.ExtractedFacts
92100
- agentlab.benchmarks.gaia.GaiaAnswer
93101
use_known_actions: true
94-
next_node: act
102+
next_node: reflect

src/agentlab/agents/tapeagent/conf/gaia_l1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
defaults:
22
- llm: gpt4o_mini
3-
- agent: plan_react
3+
- agent: plan_act
44
- environment: web_code
55
- _self_
66

src/agentlab/agents/tapeagent/conf/gaia_val.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
defaults:
22
- llm: gpt4o_mini
3-
- agent: plan_react
3+
- agent: plan_act
44
- environment: web_code
55
- _self_
66

0 commit comments

Comments
 (0)