From ba76575450c6adc4b23ca39f480314ed7086b748 Mon Sep 17 00:00:00 2001 From: Pavan Kumar <66913595+ascender1729@users.noreply.github.com> Date: Sun, 20 Apr 2025 09:33:20 +0000 Subject: [PATCH] fix(agent): update MATH_AGENT_PROMPT import path and ensure correct usage across project --- examples/mcp_example/mcp_client.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/examples/mcp_example/mcp_client.py b/examples/mcp_example/mcp_client.py index 05257cc3..debfb0da 100644 --- a/examples/mcp_example/mcp_client.py +++ b/examples/mcp_example/mcp_client.py @@ -2,6 +2,17 @@ from swarms import Agent from swarms.tools.mcp_integration import MCPServerSseParams from swarms.prompts.agent_prompts import MATH_AGENT_PROMPT +# Fallback in case the import fails +if 'MATH_AGENT_PROMPT' not in locals(): + 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.""" + def main(): # Configure MCP server connection math_server = MCPServerSseParams(