swarms
swarms copied to clipboard
feat: add swarm output schemas and agent fixes
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/