Home/Tools/@tpmjs/tools-unsandbox

createService

@tpmjs/tools-unsandbox

Create a long-running service with persistent state, networking, and auto-restart capabilities.

Official
sandbox
v0.1.4
MIT

Interactive Playground

Test @tpmjs/tools-unsandbox (createService) 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 { createService } from '@tpmjs/tools-unsandbox';

3. Use with AI SDK

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

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

console.log(result.text);

Signature

(name: string, ports?: number[], bootstrap?: string, input_files?: { content: string; filename: string }[], network_mode?: string, custom_domains?: string[], bootstrap_content?: string) => Promise<unknown>

Tags

ai
auto
capabilities
code-execution
create
long
networking
persistent
restart
running
sandbox
service
state
tpmjs
unsandbox

Parameters

Available configuration options

Auto-extracted
name
Required
Type: string

Service name (becomes NAME.on.unsandbox.com)

bootstrap
Optional
Type: string

Bootstrap script content or URL

bootstrap_content
Optional
Type: string

Bootstrap script content (alternative to bootstrap)

ports
Optional
Type: array

Ports to expose

network_mode
Optional
Type: string

Network isolation mode. Default: 'semitrusted'

custom_domains
Optional
Type: array

Custom domain names

input_files
Optional
Type: array

Input files to make available

Schema extracted: 3/3/2026, 4:21:05 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