From 4fe662eb1928f26a6fd27d252c5d49cf9da6900e Mon Sep 17 00:00:00 2001 From: Shawn TIAN Date: Wed, 9 Apr 2025 16:27:57 +0800 Subject: [PATCH] Add TEE support for swarms agent --- README.md | 4 ++++ tee/README.md | 7 +++++++ tee/docker-compose.yaml | 19 +++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 tee/README.md create mode 100644 tee/docker-compose.yaml diff --git a/README.md b/README.md index da6819c3..cc1cbb08 100644 --- a/README.md +++ b/README.md @@ -163,6 +163,10 @@ For more documentation on the CLI [CLICK HERE](https://docs.swarms.world/en/late --- +## TEE + +Head to the [TEE README](./tee/README.md) for more detailed instructions. + # Usage Examples 🤖 Here are some example scripts to get you started. For more comprehensive documentation, visit our [docs](https://docs.swarms.world/en/latest/). diff --git a/tee/README.md b/tee/README.md new file mode 100644 index 00000000..6b3ebe13 --- /dev/null +++ b/tee/README.md @@ -0,0 +1,7 @@ +## To run project in Phala TEE + +1. Build the docker image and publish it to the docker hub + `docker compose build -t /swarm-agent-node:latest` + `docker push /swarm-agent-node:latest` +2. Deploy to Phala cloud using [tee-cloud-cli](https://github.com/Phala-Network/tee-cloud-cli) or manually with the [Cloud dashboard](https://cloud.phala.network/). +3. Check your agent's TEE proof and verify it on the [TEE Attestation Explorer](https://proof.t16z.com/). diff --git a/tee/docker-compose.yaml b/tee/docker-compose.yaml new file mode 100644 index 00000000..7fd3207f --- /dev/null +++ b/tee/docker-compose.yaml @@ -0,0 +1,19 @@ +services: + swarms-agent-server: + image: swarms-agent-node:latest + platform: linux/amd64 + volumes: + - /var/run/tappd.sock:/var/run/tappd.sock + - swarms:/app + restart: always + ports: + - 8000:8000 + command: # Sample MCP Server + - /bin/sh + - -c + - | + cd /app/mcp_example + python mcp_test.py + +volumes: + swarms: