update docs

pull/814/head
Shawn TIAN 3 months ago
parent 34dcc976a0
commit 5d4de9d6c0

Before

Width:  |  Height:  |  Size: 210 KiB

After

Width:  |  Height:  |  Size: 210 KiB

Before

Width:  |  Height:  |  Size: 131 KiB

After

Width:  |  Height:  |  Size: 131 KiB

Before

Width:  |  Height:  |  Size: 831 KiB

After

Width:  |  Height:  |  Size: 831 KiB

Before

Width:  |  Height:  |  Size: 352 KiB

After

Width:  |  Height:  |  Size: 352 KiB

Before

Width:  |  Height:  |  Size: 844 KiB

After

Width:  |  Height:  |  Size: 844 KiB

Before

Width:  |  Height:  |  Size: 346 KiB

After

Width:  |  Height:  |  Size: 346 KiB

@ -14,55 +14,68 @@ For detailed instructions about Trusted Execution Environment setup, please refe
## 🚀 Deployment Steps
### 1. Build and Publish Docker Image
### 1. Configure Your Environment
```bash
# Build the Docker image
docker compose build -t <your-dockerhub-username>/swarm-agent-node:latest
# Push to DockerHub
docker push <your-dockerhub-username>/swarm-agent-node:latest
```
### 2. Deploy to Phala Cloud
Choose one of these deployment methods:
- Use [tee-cloud-cli](https://github.com/Phala-Network/tee-cloud-cli) (Recommended)
- Deploy manually via the [Phala Cloud Dashboard](https://cloud.phala.network/)
### 3. Verify TEE Attestation
Visit the [TEE Attestation Explorer](https://proof.t16z.com/) to check and verify your agent's TEE proof.
## 📝 Docker Configuration
Below is a sample Docker Compose configuration for your Swarms agent:
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: swarms-agent-node:latest
platform: linux/amd64
image: python:3.12-slim
volumes:
- /var/run/tappd.sock:/var/run/tappd.sock
- swarms:/app
restart: always
ports:
- 8000:8000
command: # Sample MCP Server
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
command: # Run swarms agent example
- /bin/sh
- -c
- |
cd /app/mcp_example
python mcp_test.py
# install dependencies
apt update && apt install -y git python3-pip
mkdir -p /app && cd /app
git clone --depth 1 https://github.com/The-Swarm-Corporation/swarms-examples
cd swarms-examples/
pip install -r requirements.txt && pip install langchain-community langchain-core
cd examples/agents/
python o1_preview.py
# keep container running
sleep infinity
volumes:
swarms:
```
## 📚 Additional Resources
### 2. Deploy to Phala Cloud
For more comprehensive documentation and examples, visit our [Official Documentation](https://docs.swarms.world/en/latest/).
Choose one of these deployment methods:
- Use [tee-cloud-cli](https://github.com/Phala-Network/tee-cloud-cli) (Recommended)
- Deploy manually via the [Phala Cloud Dashboard](https://cloud.phala.network/)
1. Navigate to the [Phala Cloud dashboard](https://cloud.phala.network/dashboard)
2. Create a new Swarms agent application
![Creating a Swarms agent on Phala Cloud](./imgs/01_create_agent_on_phala_cloud.png)
### 3. Monitor Your Deployment
1. Check the initialization logs of your agent
![Agent initialization logs](./imgs/02_serial_logs.png)
![Detailed initialization logs](./imgs/03_serial_logs.png)
---
2. Verify your container is running
![Swarms Agent Container Status](./imgs/04_swarms_agent_containers.png)
> **Note**: Make sure to replace `<your-dockerhub-username>` with your actual DockerHub username when building and pushing the image.
3. Monitor your agent's output
![Swarms Agent Logs](./imgs/05_agent_output.png)
### 4. Verify TEE Attestation
Visit the [TEE Attestation Explorer](https://proof.t16z.com/) to check and verify your agent's TEE proof.
![TEE Attestation Verification](./imgs/06_attestation.png)
## 📚 Additional Resources
For more comprehensive documentation and examples, visit our [Official Documentation](https://docs.swarms.world/en/latest/).

@ -48,26 +48,28 @@ volumes:
1. Navigate to the [Phala Cloud dashboard](https://cloud.phala.network/dashboard)
2. Create a new Swarms agent application
![Creating a Swarms agent on Phala Cloud](./01_create_agent_on_phala_cloud.png)
![Creating a Swarms agent on Phala Cloud](../docs/swarms_cloud/imgs/01_create_agent_on_phala_cloud.png)
### 3. 📊 Monitor Your Deployment
1. Check the initialization logs of your agent
![Agent initialization logs](./02_serial_logs.png)
![Detailed initialization logs](./03_serial_logs.png)
![Agent initialization logs](../docs/swarms_cloud/imgs/02_serial_logs.png)
![Detailed initialization logs](../docs/swarms_cloud/imgs/03_serial_logs.png)
2. Verify your container is running
![Swarms Agent Container Status](./04_swarms_agent_containers.png)
![Swarms Agent Container Status](../docs/swarms_cloud/imgs/04_swarms_agent_containers.png)
3. Monitor your agent's output
![Swarms Agent Logs](./05_agent_output.png)
![Swarms Agent Logs](../docs/swarms_cloud/imgs/05_agent_output.png)
### 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/).
![TEE Attestation Verification](./06_attestation.png)
![TEE Attestation Verification](../docs/swarms_cloud/imgs/06_attestation.png)
## 🎉 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 us on [Phala Cloud](https://cloud.phala.network/).

Loading…
Cancel
Save