Expand description
§Coordination Patterns
Reusable multi-agent patterns for common coordination scenarios. These patterns abstract away the mechanics of distributing work, collecting results, and handling failures across multiple fighters.
Structs§
- Chain
Handler - A handler in the chain of responsibility.
- MapReduce
Config - Configuration for a MapReduce operation.
- MapReduce
Result - Result of a MapReduce operation.
- Scatter
Response - A response from a scatter-gather participant.
- Supervised
Worker - State of a supervised worker.
- Supervisor
Config - Configuration for the supervisor pattern.
Functions§
- auction_
filter_ bids - Filter bids to only include those that meet a minimum confidence threshold.
- auction_
select_ winner - Run an auction: collect bids from fighters and select the winner.
- chain_
find_ handler - Determine which handler in the chain should handle a task.
- chain_
walk - Walk the chain: each handler decides if it can handle, else passes along.
- execute_
auction - Execute the auction pattern: announce a task to all capable fighters, collect bids, and award the task to the best bidder.
- execute_
chain_ of_ responsibility - Execute the chain of responsibility pattern by sending the task through handlers until one processes it. Each handler is asked via messaging whether it can handle the task (based on capabilities). The first capable handler processes it.
- execute_
map_ reduce - Execute a MapReduce operation with provided results.
- execute_
map_ reduce_ distributed - Execute a MapReduce operation by actually distributing work via the message router. Splits the input, sends chunks to workers, and merges results.
- execute_
scatter_ gather - Execute the scatter-gather pattern: send a task to all capable fighters, wait for responses (with configurable timeout), and select the best result based on SelectionCriteria.
- map_
reduce_ merge - Reduce (merge) results from multiple map workers.
- map_
split - Split input into chunks for map workers.
- scatter_
select - Select the best response from scatter-gather results.
- supervisor_
handle_ failure - Handle a worker failure according to the supervisor strategy.
- supervisor_
monitor_ health - Monitor worker health and handle failures via the message router. Sends heartbeat checks and restarts workers that fail to respond.