Spaces:
Sleeping
Sleeping
Create researcher_agent.py
Browse files- agents/researcher_agent.py +16 -0
agents/researcher_agent.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from crewai import Agent
|
| 2 |
+
from tools.code_search_tool import CodeSearchTool
|
| 3 |
+
from tools.web_search_tool import WebSearchTool
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
def create_researcher_agent(vector_db):
|
| 7 |
+
return Agent(
|
| 8 |
+
role="Researcher",
|
| 9 |
+
goal="Retrieve relevant code and documentation",
|
| 10 |
+
backstory="Specialist in semantic code retrieval and research.",
|
| 11 |
+
tools=[
|
| 12 |
+
CodeSearchTool(vector_db),
|
| 13 |
+
WebSearchTool(),
|
| 14 |
+
],
|
| 15 |
+
verbose=True,
|
| 16 |
+
)
|