Skip to content

Commit 369287b

Browse files
committed
feat: optimized configuration case
1 parent 5519a2f commit 369287b

5 files changed

Lines changed: 27 additions & 19 deletions

File tree

agentmesh/protocal/agent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ def _build_react_prompt(self) -> str:
8686
<final_answer> The final answer should be as detailed and rich as possible. If there is no final answer, do not show this label </final_answer>
8787
8888
## Attention
89-
The content of thought and final_answer needs to be consistent with the language used by the user original task.
89+
1. The content of thought and final_answer needs to be consistent with the language used by the user original task.
90+
2. Make only one decision at a time. Do not generate multiple tool calls in a single response.
9091
"""
9192

9293
current_task_prompt = f"""

agentmesh/protocal/task.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ class TaskType(Enum):
1717

1818
class TaskStatus(Enum):
1919
"""Enum representing the status of a task."""
20-
INIT = "init" # 初始状态
21-
PROCESSING = "processing" # 处理中
22-
COMPLETED = "completed" # 已完成
23-
FAILED = "failed" # 失败
20+
INIT = "init" # Initial state
21+
PROCESSING = "processing" # In progress
22+
COMPLETED = "completed" # Completed
23+
FAILED = "failed" # Failed
2424

2525

2626
@dataclass

agentmesh/protocal/team.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def output(message, end="\n"):
8181
self.context.model = self.model # Set the model in the context
8282

8383
# Print user task and team information
84-
output(f"User Task: {task.get_text()}")
84+
output("")
8585
output(f"Team {self.name} received the task and started processing")
8686
output("")
8787

agentmesh/tools/tool_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def load_tools(self, tools_dir: str = "agentmesh/tools"):
3838
# Then, configure tools from config file
3939
self._configure_tools_from_config()
4040

41-
print(f"Loaded {len(self.tools)} tools: {', '.join(self.tools.keys())}")
41+
# print(f"Loaded {len(self.tools)} tools: {', '.join(self.tools.keys())}")
4242

4343
def _load_tools_from_directory(self, tools_dir: str):
4444
"""Dynamically load tools from directory using file loading"""

config-template.yaml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ models:
88
models: [ "gpt-4.1", "gpt-4o", "gpt-4.1-mini" ]
99

1010
claude:
11+
api_base: "https://api.anthropic.com/v1"
1112
api_key: "YOUR_API_KEY"
1213
models: [ "claude-3-7-sonnet-latest" ]
1314

@@ -21,15 +22,24 @@ tools:
2122

2223
# Team config
2324
teams:
24-
search_team:
25-
model: "gpt-4.1-mini"
26-
description: "A Search Assistant Team"
25+
general_team:
26+
model: "gpt-4.1"
27+
description: "A versatile research and information agent team"
28+
max_steps: 10
2729
agents:
28-
- name: "Search Assistant"
29-
description: "Searching by operating the browser"
30-
system_prompt: "You are a browser operation assistant, completing user tasks by operating the browser"
30+
- name: "General Agent"
31+
description: "Universal assistant specializing in research and information synthesis"
32+
system_prompt: |
33+
You are a versatile assistant who answers questions and completes tasks using available tools. Specialize in researching topics, organizing information, and presenting findings in clear, well-structured, informative Markdown reports. Your reports should include:
34+
1. Clear introduction and context
35+
2. Detailed main content with relevant facts, data, and examples
36+
3. Multiple perspectives when appropriate
37+
4. Visual elements (tables, lists) to organize complex information
38+
5. Proper citations and references to sources
39+
6. Concise yet comprehensive summaries and conclusions
3140
tools:
3241
- time
42+
- calculator
3343
- google_search
3444
- browser
3545
- file_save
@@ -41,22 +51,19 @@ teams:
4151
max_steps: 20
4252
agents:
4353
- name: "Product Manager"
44-
max_steps: 5
4554
description: "Responsible for product requirements and documentation"
46-
system_prompt: "You are an experienced product manager who creates concise PRD. Focus on user needs and feature specifications. Always format your response in Markdown."
55+
system_prompt: "You are an experienced product manager who creates concise PRDs, focusing on user needs and feature specifications. You always format your responses in Markdown."
4756
tools:
4857
- time
4958
- file_save
5059
- name: "Developer"
5160
description: "Implements code based on PRD"
52-
system_prompt: "You are a proficient developer who writes clean, efficient, and maintainable code."
61+
system_prompt: "You are a skilled web developer who creates single-page website based on user needs. You deliver HTML files with embedded JavaScript and CSS that are visually appealing, responsive, and user-friendly, featuring a grand layout and beautiful background. The HTML, CSS, and JavaScript code should be well-structured and effectively organized."
5362
tools:
54-
- time
55-
- calculator
5663
- file_save
5764
- name: "Tester"
5865
description: "Tests code and verifies functionality"
59-
system_prompt: "You are a QA tester who validates code against requirements. For HTML code, you can use browser to test functionality. You only need to test a few core cases, the final output is the markdown test report"
66+
system_prompt: "You are a tester who validates code against requirements. For HTML applications, use browser tools to test functionality. You only need to test a few core cases."
6067
tools:
6168
- browser
6269
- file_save

0 commit comments

Comments
 (0)