Home/Tools/@tpmjs/tools-unsandbox

runAsync

@tpmjs/tools-unsandbox

Execute code asynchronously with automatic language detection via shebang. Returns job_id for polling.

Official
sandbox
v0.1.4
MIT
⚠️

This tool is currently broken

Execution Failed
Runtime error with test parameters
Authentication failed: Invalid API keys. Ensure UNSANDBOX_PUBLIC_KEY and UNSANDBOX_SECRET_KEY are correct.

Last checked: 3/1/2026, 4:25:25 AM

Interactive Playground

Test @tpmjs/tools-unsandbox (runAsync) with AI-powered execution

0/2000 characters

Installation & Usage

Install this tool and use it with the AI SDK

1. Install the package

npm install @tpmjs/tools-unsandbox
pnpm add @tpmjs/tools-unsandbox
yarn add @tpmjs/tools-unsandbox
bun add @tpmjs/tools-unsandbox
deno add npm:@tpmjs/tools-unsandbox

2. Import the tool

import { runAsync } from '@tpmjs/tools-unsandbox';

3. Use with AI SDK

import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { runAsync } from '@tpmjs/tools-unsandbox';

const result = await generateText({
  model: openai('gpt-4o'),
  tools: { runAsync },
  prompt: 'Your prompt here...',
});

console.log(result.text);

Signature

(code: string, ttl?: number, network_mode?: string) => Promise<unknown>

Tags

ai
async
asynchronously
automatic
code
code-execution
detection
execute
job_id
language
polling
run
sandbox
shebang
tpmjs
unsandbox
via

Parameters

Available configuration options

Auto-extracted
code
Required
Type: string

The source code to execute. Can include shebang line (e.g., #!/usr/bin/env python) for explicit language hint.

network_mode
Optional
Type: string

Network isolation mode. Default: 'zerotrust'

ttl
Optional
Type: number

Execution timeout in seconds (1-900). Default: 60.

Schema extracted: 3/1/2026, 4:25:24 AM

README

ERROR: No README data found!

Statistics

Downloads/month

560

GitHub Stars

0

Quality Score

82%

Bundle Size

NPM Keywords

tpmjs
code-execution
sandbox
unsandbox
ai

Maintainers

thomasdavis(thomasalwyndavis@gmail.com)

Frameworks

vercel-ai
runAsync | TPMJS | TPMJS