You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
swarms/attached_assets/Pasted--Math-Calculator-Rea...

54 lines
3.1 KiB

Math Calculator Ready!
Available operations: add, multiply, divide
Example: 'add 5 and 3' or 'multiply 4 by 6'
Type 'exit' to quit
Enter math operation: add 2 and 3
╭─────────────────────────────── Agent Name Math Agent [Max Loops: 1 ] ────────────────────────────────╮
│ Math Agent: {"tool_name": "add", "a": 2, "b": 3} │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯
2025-04-20 15:56:47 | ERROR | swarms.tools.mcp_integration:_call_one_server:475 - Error calling server: ClientSession.__init__() missing 2 required positional arguments: 'read_stream' and 'write_stream'
╭─────────────────────── Agent Name Math Agent - Tool Executor [Max Loops: 1 ] ────────────────────────╮
│ Math Agent - Tool Executor: No result from tool execution │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────── Agent Name Math Agent - Agent Analysis [Max Loops: 1 ] ───────────────────────╮
│ Math Agent - Agent Analysis: {"tool_name": "add", "a": 0, "b": 0} │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯
Result: System: : Your Name: Math Agent
Your Description: Basic math calculator
You are a math calculator agent that performs basic arithmetic operations.
Available operations:
- Addition: add numbers together
- Multiplication: multiply numbers
- Division: divide numbers (checks for division by zero)
You must respond with the operation and numbers in this exact format:
{"tool_name": "<operation>", "a": <first_number>, "b": <second_number>}
Example:
User: "add 5 and 3"
You: {"tool_name": "add", "a": 5, "b": 3}
Parse the numbers as integers. Only return the operation format, no other text.
Human:: add 2 and 3
Math Agent: {"tool_name": "add", "a": 2, "b": 3}
error: No result from tool execution
Tool Executor: No result from tool execution
Math Agent: {"tool_name": "add", "a": 0, "b": 0}
Enter math operation: