@tpmjs/tools-unsandbox
Execute code asynchronously in a secure sandbox. Returns a job_id immediately. Use getJob to check status and retrieve results. Supports 42+ languages including Python, JavaScript, TypeScript, Go, Rust, C, C++, Java, Ruby, and more.
Test @tpmjs/tools-unsandbox (executeCodeAsync) with AI-powered execution
0/2000 characters
Install this tool and use it with the AI SDK
npm install @tpmjs/tools-unsandboxpnpm add @tpmjs/tools-unsandboxyarn add @tpmjs/tools-unsandboxbun add @tpmjs/tools-unsandboxdeno add npm:@tpmjs/tools-unsandboximport { executeCodeAsync } from '@tpmjs/tools-unsandbox';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { executeCodeAsync } from '@tpmjs/tools-unsandbox';
const result = await generateText({
model: openai('gpt-4o'),
tools: { executeCodeAsync },
prompt: 'Your prompt here...',
});
console.log(result.text);Available configuration options
languagestringProgramming language to execute. Supported: python, javascript, typescript, ruby, perl, php, lua, bash, r, elixir, erlang, tcl, scheme, powershell, clojure, commonlisp, crystal, groovy, deno, awk, raku, c, cpp, go, rust, java, kotlin, cobol, fortran, d, zig, nim, v, objc, dart, julia, haskell, ocaml, fsharp, csharp, prolog, forth.
codestringThe source code to execute.
input_filesarrayOptional array of input files to make available in /tmp/input/.
network_modestringNetwork isolation mode. "zerotrust" (default) blocks all network. "semitrusted" allows outbound.
ttlnumberExecution timeout in seconds (1-900). Default: 60.
return_artifactbooleanFor compiled languages, return the compiled binary.
return_wasm_artifactbooleanCompile to WebAssembly. Supported for C, C++, Rust, Zig, Go.
Schema extracted: 1/15/2026, 3:45:48 AM
ERROR: No README data found!
Downloads/month
0
Quality Score