@tpmjs/tools-sprites-create
Create a new isolated Linux sandbox environment (sprite) with persistent filesystem using the Sprites API. Sprites are lightweight VMs for running code securely.
Test @tpmjs/tools-sprites-create (spritesCreateTool) with AI-powered execution
0/2000 characters
Install this tool and use it with the AI SDK
npm install @tpmjs/tools-sprites-createpnpm add @tpmjs/tools-sprites-createyarn add @tpmjs/tools-sprites-createbun add @tpmjs/tools-sprites-createdeno add npm:@tpmjs/tools-sprites-createimport { spritesCreateTool } from '@tpmjs/tools-sprites-create';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { spritesCreateTool } from '@tpmjs/tools-sprites-create';
const result = await generateText({
model: openai('gpt-4o'),
tools: { spritesCreateTool },
prompt: 'Your prompt here...',
});
console.log(result.text);Available configuration options
namestringUnique name for the sprite (must be lowercase alphanumeric with hyphens, 3-63 characters)
Schema extracted: 1/16/2026, 3:45:29 AM
Create a new isolated Linux sandbox environment (sprite) with persistent filesystem.
npm install @tpmjs/sprites-create
SPRITES_TOKEN environment variable - Get your token from https://sprites.devimport { spritesCreateTool } from '@tpmjs/sprites-create'; const result = await spritesCreateTool.execute({ name: 'my-new-sandbox' }); console.log(result); // { // name: 'my-new-sandbox', // status: 'creating', // createdAt: '2024-01-15T10:30:00Z' // }
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Unique name for the sprite (lowercase alphanumeric with hyphens, 3-63 characters) |
| Field | Type | Description |
|---|---|---|
name | string | Name of the created sprite |
status | 'creating' | 'running' | 'stopped' | 'error' | Current status |
createdAt | string | ISO 8601 timestamp of creation |
runtime | string? | Optional runtime configuration |
metadata | object? | Optional custom metadata |
Sprite names must:
The tool throws errors in these cases:
SPRITES_TOKEN environment variable is not setMIT
Downloads/month
0
Quality Score