@agentforge/patterns 0.16.31 → 0.16.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +267 -170
- package/dist/index.d.cts +15 -32
- package/dist/index.d.ts +15 -32
- package/dist/index.js +267 -170
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -3387,46 +3387,29 @@ interface RoutingStrategyImpl {
|
|
|
3387
3387
|
route: (state: MultiAgentStateType, config: SupervisorConfig) => Promise<RoutingDecision>;
|
|
3388
3388
|
}
|
|
3389
3389
|
|
|
3390
|
+
declare const DEFAULT_SUPERVISOR_SYSTEM_PROMPT = "You are a supervisor agent responsible for routing tasks to specialized worker agents.\n\nYour job is to:\n1. Analyze the current task and context\n2. Review available worker capabilities\n3. Select the most appropriate worker(s) for the task\n4. Provide clear reasoning for your decision\n\n**IMPORTANT: You can route to MULTIPLE workers for parallel execution when:**\n- The task requires information from multiple domains (e.g., code + documentation)\n- Multiple workers have complementary expertise\n- Parallel execution would provide a more comprehensive answer\n\n**Response Format:**\n\nFor SINGLE worker routing:\n{\n \"targetAgent\": \"worker_id\",\n \"reasoning\": \"explanation of why this worker is best suited\",\n \"confidence\": 0.0-1.0,\n \"strategy\": \"llm-based\"\n}\n\nFor PARALLEL multi-worker routing:\n{\n \"targetAgents\": [\"worker_id_1\", \"worker_id_2\", ...],\n \"reasoning\": \"explanation of why these workers should work in parallel\",\n \"confidence\": 0.0-1.0,\n \"strategy\": \"llm-based\"\n}\n\nChoose parallel routing when the task benefits from multiple perspectives or data sources.";
|
|
3391
|
+
declare const llmBasedRouting: RoutingStrategyImpl;
|
|
3392
|
+
|
|
3393
|
+
declare const loadBalancedRouting: RoutingStrategyImpl;
|
|
3394
|
+
|
|
3395
|
+
declare const roundRobinRouting: RoutingStrategyImpl;
|
|
3396
|
+
|
|
3397
|
+
declare const ruleBasedRouting: RoutingStrategyImpl;
|
|
3398
|
+
|
|
3399
|
+
declare const skillBasedRouting: RoutingStrategyImpl;
|
|
3400
|
+
|
|
3390
3401
|
/**
|
|
3391
3402
|
* Routing Strategy Implementations for Multi-Agent Pattern
|
|
3392
3403
|
*
|
|
3393
|
-
* This module
|
|
3394
|
-
*
|
|
3404
|
+
* This module is the thin public facade for multi-agent routing strategies.
|
|
3405
|
+
* Concrete strategy logic lives in focused internal modules so behavior can be
|
|
3406
|
+
* reviewed and extended without one oversized implementation file.
|
|
3395
3407
|
*
|
|
3396
3408
|
* @module patterns/multi-agent/routing
|
|
3397
3409
|
*/
|
|
3398
3410
|
|
|
3399
3411
|
/**
|
|
3400
|
-
*
|
|
3401
|
-
*/
|
|
3402
|
-
declare const DEFAULT_SUPERVISOR_SYSTEM_PROMPT = "You are a supervisor agent responsible for routing tasks to specialized worker agents.\n\nYour job is to:\n1. Analyze the current task and context\n2. Review available worker capabilities\n3. Select the most appropriate worker(s) for the task\n4. Provide clear reasoning for your decision\n\n**IMPORTANT: You can route to MULTIPLE workers for parallel execution when:**\n- The task requires information from multiple domains (e.g., code + documentation)\n- Multiple workers have complementary expertise\n- Parallel execution would provide a more comprehensive answer\n\n**Response Format:**\n\nFor SINGLE worker routing:\n{\n \"targetAgent\": \"worker_id\",\n \"reasoning\": \"explanation of why this worker is best suited\",\n \"confidence\": 0.0-1.0,\n \"strategy\": \"llm-based\"\n}\n\nFor PARALLEL multi-worker routing:\n{\n \"targetAgents\": [\"worker_id_1\", \"worker_id_2\", ...],\n \"reasoning\": \"explanation of why these workers should work in parallel\",\n \"confidence\": 0.0-1.0,\n \"strategy\": \"llm-based\"\n}\n\nChoose parallel routing when the task benefits from multiple perspectives or data sources.";
|
|
3403
|
-
/**
|
|
3404
|
-
* LLM-based routing strategy
|
|
3405
|
-
* Uses an LLM to intelligently route tasks based on worker capabilities
|
|
3406
|
-
*/
|
|
3407
|
-
declare const llmBasedRouting: RoutingStrategyImpl;
|
|
3408
|
-
/**
|
|
3409
|
-
* Round-robin routing strategy
|
|
3410
|
-
* Distributes tasks evenly across all available workers
|
|
3411
|
-
*/
|
|
3412
|
-
declare const roundRobinRouting: RoutingStrategyImpl;
|
|
3413
|
-
/**
|
|
3414
|
-
* Skill-based routing strategy
|
|
3415
|
-
* Routes tasks to workers based on matching skills
|
|
3416
|
-
*/
|
|
3417
|
-
declare const skillBasedRouting: RoutingStrategyImpl;
|
|
3418
|
-
/**
|
|
3419
|
-
* Load-balanced routing strategy
|
|
3420
|
-
* Routes tasks to workers with the lowest current workload
|
|
3421
|
-
*/
|
|
3422
|
-
declare const loadBalancedRouting: RoutingStrategyImpl;
|
|
3423
|
-
/**
|
|
3424
|
-
* Rule-based routing strategy
|
|
3425
|
-
* Uses custom routing function provided in config
|
|
3426
|
-
*/
|
|
3427
|
-
declare const ruleBasedRouting: RoutingStrategyImpl;
|
|
3428
|
-
/**
|
|
3429
|
-
* Get routing strategy implementation by name
|
|
3412
|
+
* Get routing strategy implementation by name.
|
|
3430
3413
|
*/
|
|
3431
3414
|
declare function getRoutingStrategy(name: string): RoutingStrategyImpl;
|
|
3432
3415
|
|
package/dist/index.d.ts
CHANGED
|
@@ -3387,46 +3387,29 @@ interface RoutingStrategyImpl {
|
|
|
3387
3387
|
route: (state: MultiAgentStateType, config: SupervisorConfig) => Promise<RoutingDecision>;
|
|
3388
3388
|
}
|
|
3389
3389
|
|
|
3390
|
+
declare const DEFAULT_SUPERVISOR_SYSTEM_PROMPT = "You are a supervisor agent responsible for routing tasks to specialized worker agents.\n\nYour job is to:\n1. Analyze the current task and context\n2. Review available worker capabilities\n3. Select the most appropriate worker(s) for the task\n4. Provide clear reasoning for your decision\n\n**IMPORTANT: You can route to MULTIPLE workers for parallel execution when:**\n- The task requires information from multiple domains (e.g., code + documentation)\n- Multiple workers have complementary expertise\n- Parallel execution would provide a more comprehensive answer\n\n**Response Format:**\n\nFor SINGLE worker routing:\n{\n \"targetAgent\": \"worker_id\",\n \"reasoning\": \"explanation of why this worker is best suited\",\n \"confidence\": 0.0-1.0,\n \"strategy\": \"llm-based\"\n}\n\nFor PARALLEL multi-worker routing:\n{\n \"targetAgents\": [\"worker_id_1\", \"worker_id_2\", ...],\n \"reasoning\": \"explanation of why these workers should work in parallel\",\n \"confidence\": 0.0-1.0,\n \"strategy\": \"llm-based\"\n}\n\nChoose parallel routing when the task benefits from multiple perspectives or data sources.";
|
|
3391
|
+
declare const llmBasedRouting: RoutingStrategyImpl;
|
|
3392
|
+
|
|
3393
|
+
declare const loadBalancedRouting: RoutingStrategyImpl;
|
|
3394
|
+
|
|
3395
|
+
declare const roundRobinRouting: RoutingStrategyImpl;
|
|
3396
|
+
|
|
3397
|
+
declare const ruleBasedRouting: RoutingStrategyImpl;
|
|
3398
|
+
|
|
3399
|
+
declare const skillBasedRouting: RoutingStrategyImpl;
|
|
3400
|
+
|
|
3390
3401
|
/**
|
|
3391
3402
|
* Routing Strategy Implementations for Multi-Agent Pattern
|
|
3392
3403
|
*
|
|
3393
|
-
* This module
|
|
3394
|
-
*
|
|
3404
|
+
* This module is the thin public facade for multi-agent routing strategies.
|
|
3405
|
+
* Concrete strategy logic lives in focused internal modules so behavior can be
|
|
3406
|
+
* reviewed and extended without one oversized implementation file.
|
|
3395
3407
|
*
|
|
3396
3408
|
* @module patterns/multi-agent/routing
|
|
3397
3409
|
*/
|
|
3398
3410
|
|
|
3399
3411
|
/**
|
|
3400
|
-
*
|
|
3401
|
-
*/
|
|
3402
|
-
declare const DEFAULT_SUPERVISOR_SYSTEM_PROMPT = "You are a supervisor agent responsible for routing tasks to specialized worker agents.\n\nYour job is to:\n1. Analyze the current task and context\n2. Review available worker capabilities\n3. Select the most appropriate worker(s) for the task\n4. Provide clear reasoning for your decision\n\n**IMPORTANT: You can route to MULTIPLE workers for parallel execution when:**\n- The task requires information from multiple domains (e.g., code + documentation)\n- Multiple workers have complementary expertise\n- Parallel execution would provide a more comprehensive answer\n\n**Response Format:**\n\nFor SINGLE worker routing:\n{\n \"targetAgent\": \"worker_id\",\n \"reasoning\": \"explanation of why this worker is best suited\",\n \"confidence\": 0.0-1.0,\n \"strategy\": \"llm-based\"\n}\n\nFor PARALLEL multi-worker routing:\n{\n \"targetAgents\": [\"worker_id_1\", \"worker_id_2\", ...],\n \"reasoning\": \"explanation of why these workers should work in parallel\",\n \"confidence\": 0.0-1.0,\n \"strategy\": \"llm-based\"\n}\n\nChoose parallel routing when the task benefits from multiple perspectives or data sources.";
|
|
3403
|
-
/**
|
|
3404
|
-
* LLM-based routing strategy
|
|
3405
|
-
* Uses an LLM to intelligently route tasks based on worker capabilities
|
|
3406
|
-
*/
|
|
3407
|
-
declare const llmBasedRouting: RoutingStrategyImpl;
|
|
3408
|
-
/**
|
|
3409
|
-
* Round-robin routing strategy
|
|
3410
|
-
* Distributes tasks evenly across all available workers
|
|
3411
|
-
*/
|
|
3412
|
-
declare const roundRobinRouting: RoutingStrategyImpl;
|
|
3413
|
-
/**
|
|
3414
|
-
* Skill-based routing strategy
|
|
3415
|
-
* Routes tasks to workers based on matching skills
|
|
3416
|
-
*/
|
|
3417
|
-
declare const skillBasedRouting: RoutingStrategyImpl;
|
|
3418
|
-
/**
|
|
3419
|
-
* Load-balanced routing strategy
|
|
3420
|
-
* Routes tasks to workers with the lowest current workload
|
|
3421
|
-
*/
|
|
3422
|
-
declare const loadBalancedRouting: RoutingStrategyImpl;
|
|
3423
|
-
/**
|
|
3424
|
-
* Rule-based routing strategy
|
|
3425
|
-
* Uses custom routing function provided in config
|
|
3426
|
-
*/
|
|
3427
|
-
declare const ruleBasedRouting: RoutingStrategyImpl;
|
|
3428
|
-
/**
|
|
3429
|
-
* Get routing strategy implementation by name
|
|
3412
|
+
* Get routing strategy implementation by name.
|
|
3430
3413
|
*/
|
|
3431
3414
|
declare function getRoutingStrategy(name: string): RoutingStrategyImpl;
|
|
3432
3415
|
|