Skip to main content

Why TEE?

Your agent handles API keys, user data, maybe crypto wallets. How do users know you’re not logging their secrets? TEE (Trusted Execution Environment) provides cryptographic proof that your code runs exactly as published - no modifications, no backdoors. Users can verify your agent’s integrity before trusting it.
TEE is optional. Most agents don’t need it. Use TEE when you need to prove trustworthiness to users who can’t just take your word for it.

What TEE Gives You

TEE integration allows your ElizaOS agents to run in secure enclaves with:
  • Remote attestation: Cryptographic proof of code integrity
  • Secure key derivation: Keys derived within the enclave
  • Verifiable execution: Third parties can verify agent behavior

TEE Modes

Quick Start

1. Use the TEE Starter Project

2. Configure TEE Settings

.env

3. Start in TEE Mode

Configuration

Environment Variables

Character Configuration

TEE Types

TeeAgent

Represents an agent registered in the TEE:

Remote Attestation

TEE Providers

ElizaOS supports multiple TEE providers. See the TEE CLI Reference for complete deployment commands.

Phala Network

Primary TEE provider using Intel TDX:

Eigen Infrastructure

API Endpoints

Get TEE Status

Response:

Get TEE Agents

Response:

Key Derivation

TEE enables secure key derivation within the enclave:
Keys derived in TEE:
  • Cannot be extracted from the enclave
  • Are tied to the specific enclave instance
  • Can be verified through attestation

Security Considerations

  • Secret salt: Use a strong, unique salt for each deployment
  • Attestation verification: Always verify attestation quotes in production
  • Key rotation: Plan for key rotation when updating enclave code

Best Practices

  1. Development: Use TEE_MODE=LOCAL for testing
  2. Staging: Use TEE_MODE=DOCKER for integration tests
  3. Production: Use TEE_MODE=PRODUCTION with real hardware
  4. Secrets: Never commit WALLET_SECRET_SALT to version control

See Also

TEE CLI Reference

Complete TEE deployment commands

Deploy a Project

General deployment guide

Services

Background services and integrations

Phala Documentation

Official Phala Cloud docs