swarms icon indicating copy to clipboard operation
swarms copied to clipboard

feat: add swarm output schemas and agent fixes

Open Occupying-Mars opened this issue 1 month ago • 1 comments

Added two key methods to AgentRearrange class in swarms/structs/rearrange.py: generate_flow(task_type, agent_groups): Generates flow patterns based on three types: Sequential: "a -> b -> c" Parallel: "a, b, c" Hybrid: "(a, b) -> (c, d) -> e" set_flow_from_task(task): Automatically analyzes task descriptions to determine appropriate flow patterns using keyword detection: Parallel keywords: "compare", "analyze multiple", "parallel", "simultaneously" Sequential keywords: "step by step", "in sequence", "following", "then" Updated example code in new_features_examples/swarmarrange/swarm_arange_demo.py to demonstrate usage: Sequential flow example for acquisition analysis Parallel flow example for market research Hybrid flow example with agent groupings for investment strategy


📚 Documentation preview 📚: https://swarms--743.org.readthedocs.build/en/743/

Occupying-Mars avatar Jan 10 '25 17:01 Occupying-Mars