bstraehle commited on
Commit
c0f1279
·
verified ·
1 Parent(s): c924269

Update crew.py

Browse files
Files changed (1) hide show
  1. crew.py +31 -31
crew.py CHANGED
@@ -27,34 +27,34 @@ def get_crew():
27
 
28
  research_agent = Agent(
29
  role="Web Research Agent",
30
- goal="Search the web for question \"{topic}\" and scrape the most relevant web page.",
31
- backstory="As an expert web research assistant, you are searching the web for question \"{topic}\" and scraping the most relevant web page.",
32
  allow_delegation=False,
33
- tools=[search_tool, web_rag_tool],
34
  verbose=True
35
  )
36
 
37
- answer_agent = Agent(
38
- role="Final Answer Agent",
39
- goal="Provide the final answer to question \"{topic}\".",
40
- backstory="As an expert question/answer assistant, you are providing the final answer to question \"{topic}\".",
41
- allow_delegation=False,
42
- tools=[final_answer_tool],
43
- verbose=True
44
- )
45
 
46
- manager_agent = Agent(
47
- role="Project Manager",
48
- goal="Use the Web Research Agent to help answer question \"{topic}\". Always delegate to the Final Answer Agent at the end.",
49
- backstory="You're an experienced project manager, skilled in overseeing complex projects and guiding teams to success.",
50
- allow_delegation=True
51
- )
52
-
53
- #research = Task(
54
- # agent=research_agent,
55
- # description="Search the web for topic \"{topic}\" and scrape the most relevant web page.",
56
- # expected_output="Content on topic \"{topic}\"."
57
  #)
 
 
 
 
 
 
58
 
59
  #answer = Task(
60
  # agent=answer_agent,
@@ -62,18 +62,18 @@ def get_crew():
62
  # expected_output="The final answer to topic \"{topic}\"."
63
  #)
64
 
65
- task = Task(
66
- description="Find the final answer to question \"{topic}\".",
67
- expected_output="The final answer to question \"{topic}\"."
68
- )
69
 
70
  return Crew(
71
- agents=[research_agent, answer_agent],
72
- manager_agent=manager_agent,
73
  planning=True,
74
- process=Process.hierarchical,
75
- #tasks=[research, answer],
76
- tasks=[task],
77
  verbose=True
78
  )
79
 
 
27
 
28
  research_agent = Agent(
29
  role="Web Research Agent",
30
+ goal="Search the web for question \"{topic}\" and scrape the most relevant web page. Then provide the final answer.",
31
+ backstory="As an expert web research assistant, you are searching the web for question \"{topic}\" and scraping the most relevant web page. Then you are providing the final answer.",
32
  allow_delegation=False,
33
+ tools=[search_tool, web_rag_tool, final_answer_tool],
34
  verbose=True
35
  )
36
 
37
+ #answer_agent = Agent(
38
+ # role="Final Answer Agent",
39
+ # goal="Provide the final answer to question \"{topic}\".",
40
+ # backstory="As an expert question/answer assistant, you are providing the final answer to question \"{topic}\".",
41
+ # allow_delegation=False,
42
+ # tools=[final_answer_tool],
43
+ # verbose=True
44
+ #)
45
 
46
+ #manager_agent = Agent(
47
+ # role="Project Manager",
48
+ # goal="Use the Web Research Agent to help answer question \"{topic}\". Always delegate to the Final Answer Agent at the end.",
49
+ # backstory="You're an experienced project manager, skilled in overseeing complex projects and guiding teams to success.",
50
+ # allow_delegation=True
 
 
 
 
 
 
51
  #)
52
+
53
+ research = Task(
54
+ agent=research_agent,
55
+ description="Search the web for question \"{topic}\" and scrape the most relevant web page. Then provide the final answer.",
56
+ expected_output="The final answer to question \"{topic}\"."
57
+ )
58
 
59
  #answer = Task(
60
  # agent=answer_agent,
 
62
  # expected_output="The final answer to topic \"{topic}\"."
63
  #)
64
 
65
+ #task = Task(
66
+ # description="Find the final answer to question \"{topic}\".",
67
+ # expected_output="The final answer to question \"{topic}\"."
68
+ #)
69
 
70
  return Crew(
71
+ agents=[research_agent],
72
+ #manager_agent=manager_agent,
73
  planning=True,
74
+ process=Process.sequential,
75
+ tasks=[research],
76
+ #tasks=[task],
77
  verbose=True
78
  )
79