Official Python SDK for the Trytet Engine — sub-millisecond Wasm sandbox for AI agents
Project description
Trytet Python SDK
Official Python client for the Trytet Engine — a sub-millisecond, hyper-ephemeral Wasm execution substrate for AI agents.
Installation
pip install trytet-client
Quick Start
import asyncio
from trytet_client import TrytetClient, TetExecutionRequest
async def main():
async with TrytetClient(base_url="http://localhost:3000") as client:
# Execute a Wasm payload
with open("my_agent.wasm", "rb") as f:
payload = list(f.read())
result = await client.execute(TetExecutionRequest(
payload=payload,
allocated_fuel=1_000_000,
alias="my-agent",
))
print(f"Status: {result.status}")
print(f"Fuel consumed: {result.fuel_consumed}")
# List available MCP tools
tools = await client.list_tools()
for tool in tools:
print(f" {tool.name}: {tool.description}")
# Invoke a cartridge
from trytet_client import CartridgeInvocation
cart_result = await client.invoke_cartridge(CartridgeInvocation(
component_id="js-evaluator",
payload="2 + 2",
fuel=1_000_000,
))
print(cart_result.output)
asyncio.run(main())
Features
- Full async HTTP client with retry and backoff
- MCP (Model Context Protocol) support — tools, resources, prompts
- Cartridge management API
- WebSocket telemetry streaming
- Pydantic models for all API types
- Type-safe request/response handling
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
trytet_client-0.2.0.tar.gz
(4.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file trytet_client-0.2.0.tar.gz.
File metadata
- Download URL: trytet_client-0.2.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4aea4bf0419d5aff093373c1dfe1f7ef084814ff6f5a662d7535898a909d0e04
|
|
| MD5 |
74760a3970666ce126b4e0d62072d869
|
|
| BLAKE2b-256 |
da6680081aa72140643428373880c77c3c44e62c2b0c8fbab64725a953fd9a6f
|
File details
Details for the file trytet_client-0.2.0-py3-none-any.whl.
File metadata
- Download URL: trytet_client-0.2.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22b7c9de62527cbcae43e1f85d861c24a34a29196dfa2cecf75225ec28a06a47
|
|
| MD5 |
8cd0e83ce62b086e47f8a59414cf1c7d
|
|
| BLAKE2b-256 |
a35f8e6a5ee48644c3e5e433d1b0742f7aee0acb3d167389a198b0d8cacd3df4
|