Swarm Shield - TGSC
Project description
SwarmShield 🛡️
SwarmShield is an enterprise-grade security system for swarm-based multi-agent communications, providing military-grade encryption, secure conversation management, and comprehensive audit capabilities.
Features 🚀
-
Multi-Layer Encryption
- AES-256-GCM encryption
- SHA-512 hashing
- HMAC authentication
- Automatic key rotation
-
Secure Conversation Management
- Encrypted persistent storage
- Thread-safe operations
- Conversation history tracking
- Comprehensive audit logs
-
Enterprise Features
- Role-based access control
- Automated backups
- Detailed analytics
- Secure exports
Installation 📦
pip install swarms
Quick Start 🏃♂️
from swarms.security import SwarmShield, EncryptionStrength
# Initialize SwarmShield
shield = SwarmShield(
encryption_strength=EncryptionStrength.MAXIMUM,
key_rotation_interval=3600 # 1 hour
)
# Create a secure conversation
conversation_id = shield.create_conversation("Strategic Planning")
# Add encrypted messages
shield.add_message(conversation_id, "Agent1", "Mission parameters received")
shield.add_message(conversation_id, "Agent2", "Confirming execution plan")
# Retrieve conversation history
history = shield.get_messages(conversation_id)
for agent, message, timestamp in history:
print(f"{timestamp} - {agent}: {message}")
Security Features 🔒
Encryption Levels
# Standard: AES-256
shield = SwarmShield(encryption_strength=EncryptionStrength.STANDARD)
# Enhanced: AES-256 + SHA-512
shield = SwarmShield(encryption_strength=EncryptionStrength.ENHANCED)
# Maximum: AES-256 + SHA-512 + HMAC
shield = SwarmShield(encryption_strength=EncryptionStrength.MAXIMUM)
Key Management
- Automatic key rotation
- Secure key storage
- Key versioning
- Cryptographic separation
Message Security
- End-to-end encryption
- Message integrity verification
- Replay attack prevention
- Forward secrecy
Enterprise Features 🏢
Conversation Management
# Search conversations
results = shield.query_conversations(
agent_name="Agent1",
text="mission",
start_date=datetime(2025, 1, 1),
limit=10
)
# Export conversations
shield.export_conversation(
conversation_id,
format="json",
path="mission_logs.json"
)
# Create backups
backup_path = shield.backup_conversations()
Analytics
# Get agent statistics
stats = shield.get_agent_stats("Agent1")
print(f"Total messages: {stats['total_messages']}")
print(f"Active in {stats['conversations']} conversations")
# Get conversation summary
summary = shield.get_conversation_summary(conversation_id)
print(f"Participants: {summary['agents']}")
print(f"Message count: {summary['message_count']}")
Production Best Practices 🛠️
-
Key Rotation
- Set appropriate rotation intervals
- Implement backup procedures
- Monitor rotation events
-
Storage
- Use secure storage paths
- Implement backup strategy
- Monitor storage usage
-
Logging
- Configure appropriate log levels
- Secure log storage
- Regular log analysis
-
Error Handling
- Implement proper error recovery
- Monitor error rates
- Set up alerts
Contributing 🤝
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create your feature branch
- Submit a pull request
Security 🔐
For security issues, please email security@swarms.ai rather than using issues.
Testing ✅
Run the comprehensive test suite:
python swarm_shield_tests.py
Support 💬
- Documentation: https://swarms.ai/docs
- Issues: GitHub Issues
- Discord: Join our community
- Email: support@swarms.ai
License 📄
MIT License - see LICENSE for details.
Creator 👨💻
SwarmShield is created and maintained by Kye Gomez and the team at Swarms.AI.
Made with ❤️ by Swarms.AI
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swarm_shield-6.8.8.tar.gz.
File metadata
- Download URL: swarm_shield-6.8.8.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.6 Darwin/23.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01d633ef348888c1b5046a14f4f7b9248d968696c8799d11c8e172c3a8d035bc
|
|
| MD5 |
6c4fbfb24bac4d4cde2995b562da7c7c
|
|
| BLAKE2b-256 |
e433342c0d8e6b62e4f283fedadf806a21aa5c8271dce4fde967f7392d01964c
|
File details
Details for the file swarm_shield-6.8.8-py3-none-any.whl.
File metadata
- Download URL: swarm_shield-6.8.8-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.6 Darwin/23.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e24626e307d2bb45e90f5ed965188212c6646169ec7ff792e9751747c4f9488
|
|
| MD5 |
3b519826c79bbaba608b1fdbcd80aadb
|
|
| BLAKE2b-256 |
907b64b134d5a12666a3c0c178e9980923cfc4e483b846c37daebcdde8afe2a9
|