Skip to main content
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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

elizaos_plugin_tee-2.0.0a5.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

elizaos_plugin_tee-2.0.0a5-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file elizaos_plugin_tee-2.0.0a5.tar.gz.

File metadata

  • Download URL: elizaos_plugin_tee-2.0.0a5.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for elizaos_plugin_tee-2.0.0a5.tar.gz
Algorithm Hash digest
SHA256 4786b27cc84e397b4f09b14ac928a227541c48e8741ac910e9adbd4f68adbd34
MD5 dfcda46276d74d07d752d004860637ce
BLAKE2b-256 3bc213d42740ece66b60f0207fc21152e6b799a533ed965fefb4bc5bc09b5976

See more details on using hashes here.

File details

Details for the file elizaos_plugin_tee-2.0.0a5-py3-none-any.whl.

File metadata

File hashes

Hashes for elizaos_plugin_tee-2.0.0a5-py3-none-any.whl
Algorithm Hash digest
SHA256 753282f5fe4ff86a5e392d60b6f42e3168ea9fd37e9b10663f15ea8b8b0dca82
MD5 d41c1aeea55eba710fc2e717bb7cdb40
BLAKE2b-256 eb01ada84204053d2794a4b436aa58d0462017bf03cc45905758975ea137ba1c

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.0.0a5 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page