pull/643/head
Your Name 2 months ago
parent 81d12c40b6
commit 9d471c2188

@ -24,6 +24,25 @@ WORKSPACE_DIR=/path/to/your/workspace
- Keeps track of agent interactions
- Preserves conversation logs
#### `SWARMS_AUTOUPDATE_ON`
- **Purpose**: Controls automatic updates of the Swarms framework
- **Type**: Boolean
- **Default**: `false`
- **Example**:
```bash
SWARMS_AUTOUPDATE_ON=true
```
- **Features**:
- Automatically updates to the latest stable version
- Ensures you have the newest features
- Maintains compatibility with the latest improvements
- Handles dependency updates
- **Considerations**:
- Set to `false` if you need version stability
- Recommended `true` for development environments
- Consider system requirements for auto-updates
- May require restart after updates
### Telemetry Configuration
#### `USE_TELEMETRY`
@ -70,6 +89,9 @@ touch .env
# Basic configuration
WORKSPACE_DIR=./my_workspace
# Enable auto-updates
SWARMS_AUTOUPDATE_ON=true
# Enable telemetry
USE_TELEMETRY=true
@ -78,7 +100,7 @@ SWARMS_API_KEY=your_api_key_here
```
3. Obtain your API key:
- Visit [swarms.ai dashboard](https://swarms.ai)
- Visit [swarms.ai](https://swarms.ai)
- Create an account or log in
- Navigate to the API section
- Generate your unique API key
@ -100,11 +122,18 @@ SWARMS_API_KEY=your_api_key_here
- Consider privacy implications in production
- Review collected data periodically
4. **Auto-Update Management**:
- Test updates in development before enabling in production
- Keep backups before enabling auto-updates
- Monitor system resources during updates
- Schedule updates during low-traffic periods
## Examples
### Basic Development Setup
```bash
WORKSPACE_DIR=./dev_workspace
SWARMS_AUTOUPDATE_ON=true
USE_TELEMETRY=true
SWARMS_API_KEY=sk_test_xxxxxxxxxxxx
```
@ -112,10 +141,19 @@ SWARMS_API_KEY=sk_test_xxxxxxxxxxxx
### Production Setup
```bash
WORKSPACE_DIR=/var/log/swarms/prod_workspace
SWARMS_AUTOUPDATE_ON=false
USE_TELEMETRY=true
SWARMS_API_KEY=sk_prod_xxxxxxxxxxxx
```
### Testing Environment
```bash
WORKSPACE_DIR=./test_workspace
SWARMS_AUTOUPDATE_ON=true
USE_TELEMETRY=false
SWARMS_API_KEY=sk_test_xxxxxxxxxxxx
```
## Troubleshooting
Common issues and solutions:
@ -135,6 +173,12 @@ Common issues and solutions:
- Verify firewall settings
- Check for proper boolean values
4. **Auto-Update Issues**:
- Check internet connectivity
- Verify sufficient disk space
- Ensure proper permissions for updates
- Check system compatibility requirements
## Additional Resources
- [Swarms Framework Documentation](https://github.com/kyegomez/swarms)

@ -2286,9 +2286,9 @@ class Agent:
device_id = device_id or self.device_id
all_cores = all_cores or self.all_cores
all_gpus = all_gpus or self.all_gpus
do_not_use_cluster_ops = do_not_use_cluster_ops or self.do_not_use_cluster_ops
do_not_use_cluster_ops = (
do_not_use_cluster_ops or self.do_not_use_cluster_ops
)
if scheduled_run_date:
while datetime.now() < scheduled_run_date:

@ -1,3 +1,4 @@
import os
import subprocess
from swarms.utils.loguru_logger import initialize_logger
@ -9,6 +10,16 @@ logger = initialize_logger(log_folder="auto_upgrade_swarms")
def auto_update():
"""auto update swarms"""
try:
# Check if auto-update is disabled
auto_update_enabled = os.getenv(
"SWARMS_AUTOUPDATE_ON", "true"
).lower()
if auto_update_enabled == "false":
logger.info(
"Auto-update is disabled via SWARMS_AUTOUPDATE_ON"
)
return
outcome = check_for_update()
if outcome is True:
logger.info(

Loading…
Cancel
Save