feat(agent): add MCP test agent prompts and update client with server connections

pull/819/head
Pavan Kumar 3 months ago committed by ascender1729
parent fe7faf9c81
commit 77324e6ace

@ -26,8 +26,7 @@ def main():
system_prompt=MATH_AGENT_PROMPT,
max_loops=1,
mcp_servers=[math_server],
streaming_on=True,
model_name="gpt-4o-mini"
streaming_on=True
)
# Initialize stock agent
@ -37,8 +36,7 @@ def main():
system_prompt=FINANCE_AGENT_PROMPT,
max_loops=1,
mcp_servers=[stock_server],
streaming_on=True,
model_name="gpt-4o-mini"
streaming_on=True
)
print("\nMulti-Agent System Initialized")

@ -1,3 +1,24 @@
# 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."""
FINANCE_AGENT_PROMPT = """You are a financial analysis agent with access to stock market data services.
Key responsibilities:
1. Interpret financial queries and determine required data
2. Use available stock tools to fetch market data
3. Analyze trends and provide insights
4. Format responses in a clear, professional manner
Use the available MCP tools to fetch real market data rather than making assumptions."""
def generate_agent_role_prompt(agent):
"""Generates the agent role prompt.
Args: agent (str): The type of the agent.

Loading…
Cancel
Save