From 0654a297a2a388625aaaecd44cbf6e491da83381 Mon Sep 17 00:00:00 2001 From: DP37 <13983571-DP37@users.noreply.replit.com> Date: Sun, 20 Apr 2025 09:24:45 +0000 Subject: [PATCH] fix(math-agent): refine calculations by removing max_loops limit and update prompts --- examples/mcp_example/mcp_client.py | 2 +- swarms/prompts/agent_prompts.py | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/examples/mcp_example/mcp_client.py b/examples/mcp_example/mcp_client.py index 49d3c651..05257cc3 100644 --- a/examples/mcp_example/mcp_client.py +++ b/examples/mcp_example/mcp_client.py @@ -16,7 +16,7 @@ def main(): agent_name="Math Agent", agent_description="Specialized agent for mathematical computations", system_prompt=MATH_AGENT_PROMPT, - max_loops=1, + max_loops=auto, mcp_servers=[math_server], streaming_on=True ) diff --git a/swarms/prompts/agent_prompts.py b/swarms/prompts/agent_prompts.py index 8040ef37..1453fb93 100644 --- a/swarms/prompts/agent_prompts.py +++ b/swarms/prompts/agent_prompts.py @@ -1,16 +1,4 @@ -# Agent prompts for MCP testing and interactions - -MATH_AGENT_PROMPT = """You are a specialized math agent that can perform calculations by calling external math service APIs. -Key responsibilities: -1. Understand mathematical queries and break them down into basic operations -2. Use available math tools (add, multiply, divide) appropriately -3. Provide clear explanations of calculations -4. Handle errors gracefully if operations fail - -Remember to use the available MCP tools for calculations rather than doing them directly.""" - - # Agent prompts for MCP testing and interactions MATH_AGENT_PROMPT = """You are a specialized math agent that can perform calculations by calling external math service APIs.