Skip to content

Commit 46d16b2

Browse files
committed
Simplify
1 parent 1bf014d commit 46d16b2

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

examples/research/src/agent/agent.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Imports
32
from contextlib import asynccontextmanager
43

@@ -31,11 +30,6 @@
3130
async def make_graph():
3231
async with MultiServerMCPClient(
3332
{
34-
"research-server": {
35-
"command": "npx",
36-
"args": ["@playwright/mcp"],
37-
"transport": "stdio",
38-
},
3933
"planning-server": {
4034
"command": "uvx",
4135
"args": [
@@ -66,13 +60,9 @@ async def make_graph():
6660
# Researcher agent
6761
researcher_agent = create_react_agent(model,
6862
prompt=researcher_prompt,
69-
tools=client.server_name_to_tools["research-server"].append(transfer_to_planner_agent),
63+
tools=client.server_name_to_tools["planning-server"].append(transfer_to_planner_agent),
7064
name="researcher_agent")
7165

7266
# Swarm
73-
agent_swarm = create_swarm([planner_agent, researcher_agent], default_active_agent="planner_agent")
74-
75-
# app = agent_swarm.compile(config_schema=Configuration)
76-
agent = agent_swarm.compile()
77-
78-
yield agent
67+
agent_swarm = create_swarm([planner_agent, researcher_agent], default_active_agent="planner_agent")
68+
yield agent_swarm

examples/research/src/agent/prompts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
77
<Instructions>
88
1. Reflect on the user's request.
9-
2. Use the list_doc_sources tool to fetch and read the llms.txt file.
9+
2. Use the list_doc_sources tool to fetch and the fetch_docs tool to read the llms.txt file.
1010
3. Identify documents that are relevant to the user's request.
1111
4. Ask follow-up questions to help refine the project scope and narrow the set of documents to be used for the project.
1212
5. When the project scope is clear produce a short description of the project with relevant URLs.
@@ -21,7 +21,7 @@
2121
2222
<Instructions>
2323
1. Reflect on the project scope and provided URLs from the planner.
24-
2. Use the browser_navigate tool to fetch and read each URL.
24+
2. Use the fetch_docs tool to fetch and read each URL.
2525
3. Use the information in these URLs to implement the solution to the user's request.
2626
4. If you need further clarification or additional sources to implement the solution, transfer to transfer_to_planner_agent.
2727
</Instructions>

0 commit comments

Comments
 (0)