Pre-release
This release is a pre-release and may not be stable for production use.
elizaos-plugin-tee (Python)
Python implementation of the elizaOS TEE Plugin for Trusted Execution Environment integration.
Features
- 🔐 Remote Attestation - Prove agent execution in TEE
- 🔑 Key Derivation - Secure Ed25519 and ECDSA key derivation
- 🛡️ Vendor Support - Extensible vendor system (Phala Network)
- ⚡ Async - Full async/await support
- 🔒 Type Safe - Pydantic models with strict validation
Installation
pip install elizaos-plugin-tee
Quick Start
from elizaos_plugin_tee import TEEService, TeeMode
# Start the service
service = await TEEService.start(tee_mode="LOCAL")
# Derive Ed25519 keypair (for Solana)
solana_result = await service.derive_ed25519_keypair(
path="my-secret-salt",
subject="solana",
agent_id="agent-123"
)
print(f"Solana Public Key: {solana_result.public_key}")
# Derive ECDSA keypair (for EVM)
evm_result = await service.derive_ecdsa_keypair(
path="my-secret-salt",
subject="evm",
agent_id="agent-123"
)
print(f"EVM Address: {evm_result.address}")
# Stop the service
await service.stop()
Configuration
| Variable | Description | Required |
|---|---|---|
TEE_MODE |
Operation mode: LOCAL, DOCKER, PRODUCTION |
Yes |
WALLET_SECRET_SALT |
Secret for key derivation | Yes |
TEE_VENDOR |
Vendor name (default: phala) |
No |
API Reference
TEEService
Main service for TEE operations.
# Initialize
service = await TEEService.start(tee_mode="LOCAL")
# Derive keys
await service.derive_ed25519_keypair(path, subject, agent_id)
await service.derive_ecdsa_keypair(path, subject, agent_id)
await service.raw_derive_key(path, subject)
# Cleanup
await service.stop()
Remote Attestation
from elizaos_plugin_tee import (
PhalaRemoteAttestationProvider,
handle_remote_attestation,
)
# Using provider directly
provider = PhalaRemoteAttestationProvider("LOCAL")
quote = await provider.generate_attestation(report_data)
await provider.close()
# Using action handler
result = await handle_remote_attestation(
tee_mode="LOCAL",
agent_id="agent-123",
entity_id="entity-456",
room_id="room-789",
content="Message content"
)
Types
from elizaos_plugin_tee import (
TeeMode,
TeeVendor,
RemoteAttestationQuote,
Ed25519KeypairResult,
EcdsaKeypairResult,
)
Development
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Type checking
mypy elizaos_plugin_tee
# Linting
ruff check .
ruff format .
License
MIT
Metadata
Release files for elizaos-plugin-tee 2.0.0a5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| elizaos_plugin_tee-2.0.0a5.tar.gz | 12.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| elizaos_plugin_tee-2.0.0a5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.9 kB
Release files / elizaos_plugin_tee-2.0.0a5.tar.gz
| Download URL | elizaos_plugin_tee-2.0.0a5.tar.gz |
|---|---|
| Size | 12.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4786b27cc84e397b4f09b14ac928a227541c48e8741ac910e9adbd4f68adbd34
|
|
BLAKE2b-256 checksum How to use checksums |
3bc213d42740ece66b60f0207fc21152e6b799a533ed965fefb4bc5bc09b5976
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / elizaos_plugin_tee-2.0.0a5-py3-none-any.whl
| Download URL | elizaos_plugin_tee-2.0.0a5-py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
753282f5fe4ff86a5e392d60b6f42e3168ea9fd37e9b10663f15ea8b8b0dca82
|
|
BLAKE2b-256 checksum How to use checksums |
eb01ada84204053d2794a4b436aa58d0462017bf03cc45905758975ea137ba1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|