https://github.com/the-swarm-corporation/phala-deployment-template
Welcome! This guide will walk you through running your Swarms Agent in a Trusted Execution Environment (TEE) using Phala Cloud. This setup ensures your agent runs in a secure, isolated environment.
https://github.com/the-swarm-corporation/phala-deployment-template
agent-deployment agents ai ml multi-agent swarms-cloud tee
Last synced: 3 months ago
JSON representation
Welcome! This guide will walk you through running your Swarms Agent in a Trusted Execution Environment (TEE) using Phala Cloud. This setup ensures your agent runs in a secure, isolated environment.
- Host: GitHub
- URL: https://github.com/the-swarm-corporation/phala-deployment-template
- Owner: The-Swarm-Corporation
- License: mit
- Created: 2025-04-24T00:15:59.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-06-16T04:38:06.000Z (4 months ago)
- Last Synced: 2025-06-18T14:09:14.618Z (4 months ago)
- Topics: agent-deployment, agents, ai, ml, multi-agent, swarms-cloud, tee
- Language: Python
- Homepage: https://discord.gg/jM3Z6M9uMq
- Size: 5.3 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Swarms 1-Click Template on Phala Cloud
[](https://cloud.phala.network/templates/mcp-swarms-agent)
## 🚀 Quick Start
```bash
# Clone the repository
git clone https://github.com/The-Swarm-Corporation/Phala-Deployment-Template# Install requirements
pip3 install -r requirements.txt# Set your task in the .env file or pass it in the yaml file on the bottom `task:`
export WORKSPACE_DIR="agent_workspace"
export OPENAI_API_KEY=""
export OPENAI_API_BASE=""
export MODEL_NAME=""# Run the swarm
python3 main.py
```## 🛡️ Running Swarms Agent in Phala TEE
Welcome! This guide will walk you through running your Swarms Agent in a Trusted Execution Environment (TEE) using Phala Cloud. This setup ensures your agent runs in a secure, isolated environment.
### 📋 Prerequisites
- A Swarms Agent code repository (or docker image)
- A Phala Cloud account
- An OpenAI API key### 📝 Step-by-Step Guide
Firstly, you need to register a [Phala Cloud](https://cloud.phala.network/) account before you can create a new Swarms agent application.
#### 1. ⚙️ Configure Your Environment
First, prepare your `docker-compose.yaml` file. You can find an example in [docker-compose.yaml](./docker-compose.yaml). Make sure to have your OpenAI API key ready.
```yaml
services:
swarms-agent-server:
image: 0xii/swarms-template:0.0.1
volumes:
- swarms:/app
restart: always
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
- OPENAI_API_BASE=${OPENAI_API_BASE}
- MODEL_NAME=${MODEL_NAME}volumes:
swarms:
```#### 2. 🚀 Deploy Your Agent
1. Navigate to the [Phala Cloud dashboard](https://cloud.phala.network/dashboard)
2. Click `Deploy` button on the Phala Cloud dashboard.
3. Choose `docker-compose.yaml` and then click `Advanced` tab to paste the content of your docker-compose.yaml file.
4. Importantly, make sure to add the `OPENAI_API_KEY` in the `Encrypted Secrets` section with your own OpenAI API key.
5. Click `Create` button to create a new Swarms agent application.
![]()
#### 3. 📊 Monitor Your Deployment
1. Check the initialization logs of your agent
![]()
![]()
2. Verify your container is running
![]()
3. Monitor your agent's output
![]()
#### 4. ✅ Verify TEE Attestation
Ensure your agent is running in a secure TEE environment by checking the attestation proof on the [TEE Attestation Explorer](https://proof.t16z.com/).
![]()
### 🎉 Success!
You've successfully deployed your Swarms Agent in a secure TEE environment using Phala Cloud. Your agent is now running in an isolated, trusted execution environment, ensuring enhanced security for your AI operations.
If you have any questions, please reach out to Phala on [Phala Cloud](https://cloud.phala.network/).
## 📬 Contact
Questions? Reach out:
- Phala Cloud:
- Community: https://github.com/Phala-Network/phala-cloud-community
- Twitter: [@PhalaNetwork](https://twitter.com/PhalaNetwork)
- Discord: [Phala Network](https://discord.gg/phala-network)
- Telegram: [Phala Cloud Tech Discussion](https://t.me/+nbhjx1ADG9EyYmI9)
- Swarms:
- Twitter: [@kyegomez](https://twitter.com/kyegomez)
- Email: kye@swarms.world