Overview
TheSpreadSheetSwarm processes tasks concurrently across multiple agents and automatically saves execution metadata to CSV files. It supports loading agent configurations from CSV files and running tasks either from configuration or on-demand.
Installation
Attributes
str
default:"Spreadsheet-Swarm"
The name of the swarm
str
default:"A swarm that processes tasks concurrently..."
The description of the swarm
List[Agent]
default:"None"
The agents participating in the swarm. If None, agents will be loaded from load_path
bool
default:"True"
Whether to enable autosave of swarm metadata
str
default:"None"
The file path to save the swarm metadata as a CSV file (auto-generated if None)
int
default:"1"
The number of times to repeat the swarm tasks
str
default:"None"
Path to CSV file containing agent configurations. Required if agents is None
bool
default:"False"
Enable verbose logging
Methods
run()
Run the swarm with the specified task.task(str): The task to be executed by the swarm. If None, uses tasks from config
run_from_config()
Run all agents with their configured tasks concurrently.load_from_csv()
Load agent configurations from a CSV file.export_to_json()
Export the swarm outputs to JSON.Usage Examples
Basic Usage with Agents
Load from CSV Configuration
Create a CSV file (agents_config.csv):
Multiple Loops
Custom Save Path
Export Results
Output Format
Therun() method returns a dictionary:
CSV Output Format
Results are automatically saved to CSV with these columns:Features
- Concurrent Execution: All agents run tasks in parallel for maximum performance
- Automatic CSV Logging: All executions are logged to CSV files automatically
- CSV Configuration: Load agent configurations from CSV files
- Multiple Loops: Run each agent multiple times with
max_loops - Workspace Integration: Automatically uses workspace directory from environment
- JSON Export: Export results to JSON format
- Metadata Tracking: Tracks timestamps, run IDs, and execution metadata