Home/Tools/@tpmjs/tools-unsandbox

runAsync

@tpmjs/tools-unsandbox

Execute code asynchronously with automatic language detection from shebang. Returns a job_id immediately. Use getJob to check status and retrieve results.

Official
sandbox
v0.1.1
MIT

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);

Parameters

Available configuration options

Auto-extracted
code
Required
Type: string

The source code with shebang line (e.g., #!/usr/bin/env python)

network_mode
Optional
Type: string

Network isolation mode. Default: 'zerotrust'

ttl
Optional
Type: number

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

Schema extracted: 1/15/2026, 3:45:50 AM

README

ERROR: No README data found!

Statistics

Downloads/month

0

Quality Score

0%

Bundle Size

NPM Keywords

tpmjs
code-execution
sandbox
unsandbox
ai

Maintainers

thomasdavis(thomasalwyndavis@gmail.com)

Frameworks

vercel-ai
runAsync | TPMJS | TPMJS