feat(agent): run tasks in parallel to prevent duplication across agents

pull/819/head
DP37 3 months ago committed by ascender1729
parent 28186aaa85
commit 868f09616c

@ -44,7 +44,7 @@ args = "python examples/mcp_example/test_integration.py"
[[workflows.workflow]]
name = "Run Mock MCP System"
author = 13983571
mode = "sequential"
mode = "parallel"
[[workflows.workflow.tasks]]
task = "shell.exec"

@ -0,0 +1,73 @@
Multi-Agent Math System
Enter 'exit' to quit
Enter a math problem: show the agetns available
==================================================
Results:
==================================================
[Calculator]
--------------------------------------------------
I can perform basic mathematical operations: addition (use '+' or 'plus'), multiplication (use '*' or 'times'), and division (use '/' or 'divide by'). For example: '5 plus 3' or '10 divide by 2'
[StockAnalyst]
--------------------------------------------------
I can analyze stock data using moving averages and calculate percentage changes. For example: 'calculate moving average of [10,20,30,40,50] over 3 periods'
==================================================
Enter a math problem: add 3243 and 55
╭───────────────────────── Agent Name StockAnalyst [Max Loops: 1 ] ─────────────────────────╮
│ StockAnalyst: To add 3243 and 55, you can perform the calculation: │
│ │
│ 3243 + 55 = 3298. │
╰───────────────────────────────────────────────────────────────────────────────────────────╯
╭────────────────────────── Agent Name Calculator [Max Loops: 1 ] ──────────────────────────╮
│ Calculator: To add 3243 and 55, you can perform the calculation: │
│ │
│ 3243 + 55 = 3298. │
╰───────────────────────────────────────────────────────────────────────────────────────────╯
==================================================
Results:
==================================================
[Calculator]
--------------------------------------------------
System: : Your Name: Calculator
Your Description: Calculator agent specializing in mathematical calculations. For Calculator: use add, multiply, divide operations. For Stock Analyst: use moving averages and percentage change calculations.
You are Calculator, a math processing agent. You have access to these mathematical operations ONLY: addition, multiplication, and division. Only suggest calculations using these available tools. Do not attempt to solve problems requiring other operations like percentages, square roots, or advanced math. When users ask about capabilities, list only the basic operations you can perform.
Human:: add 3243 and 55
Calculator: To add 3243 and 55, you can perform the calculation:
3243 + 55 = 3298.
[StockAnalyst]
--------------------------------------------------
System: : Your Name: StockAnalyst
Your Description: Stock Analyst agent specializing in stock market analysis. For Calculator: use add, multiply, divide operations. For Stock Analyst: use moving averages and percentage change calculations.
You are StockAnalyst, a math processing agent. You have access to these mathematical operations ONLY: addition, multiplication, and division. Only suggest calculations using these available tools. Do not attempt to solve problems requiring other operations like percentages, square roots, or advanced math. When users ask about capabilities, list only the basic operations you can perform.
Human:: add 3243 and 55
StockAnalyst: To add 3243 and 55, you can perform the calculation:
3243 + 55 = 3298.
==================================================
Loading…
Cancel
Save