Run AI-generated code
without crashing.

When an LLM writes an infinite loop, Trytet traps it in microseconds instead of your process hanging until a timeout fires. Every instruction is metered. Every memory allocation is capped. The sandbox dies — your agent doesn't.

Get started GitHub

Install

# macOS (Apple Silicon)
curl -sL https://github.com/bneb/trytet/releases/latest/download/tet-darwin-arm64.tar.gz | tar xz
./tet doctor
./tet mcp --list-tools

# Docker
docker pull ghcr.io/bneb/trytet:latest

# npm / PyPI
npm install trytet-client
pip install trytet-client

Add to claude_desktop_config.json to use with Claude Desktop or Cursor:

{
  "mcpServers": {
    "trytet": {
      "command": "tet",
      "args": ["mcp"]
    }
  }
}

How it works

An LLM generates code. Trytet executes it in a WebAssembly sandbox where every CPU instruction deducts from a fuel budget. When fuel hits zero, execution stops — deterministically, in microseconds. The agent receives a structured error it can reason about and try again.

<500µs
Cached cartridge call
~50ms
MCP server boot
5
MCP tools
0
Test failures

Cartridges

Single-purpose WebAssembly components. Each runs in its own sandbox with independent fuel and memory budgets.

trytet_js_evaluatorExecute JavaScript with fuel and memory limitsshipped
trytet_regex_evaluatorRun regex patterns (ReDoS-protected)shipped
trytet_jmespath_evaluatorQuery JSON with JMESPath expressionsshipped
trytet_scraperParse HTML with CSS selectorsexperimental
trytet_structured_dataSQLite queries over JSON arraysexperimental

SDKs

// TypeScript
import { TrytetClient } from 'trytet-client';
const client = new TrytetClient({ baseUrl: 'http://localhost:3000' });
const tools = await client.listTools();
# Python
from trytet_client import TrytetClient
async with TrytetClient("http://localhost:3000") as client:
    tools = await client.list_tools()