
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
@agentuity/sandbox
Advanced tools
Standalone package for the Agentuity Sandbox service. Provides a simple, ergonomic client for creating and managing sandbox environments for code execution.
npm install @agentuity/sandbox
import { SandboxClient } from '@agentuity/sandbox';
const client = new SandboxClient();
// Create a sandbox
const sandbox = await client.create();
console.log(`Created sandbox: ${sandbox.id}`);
// Execute a command
const execution = await sandbox.execute({
command: ['node', '-e', 'console.log("Hello from sandbox!")']
});
console.log(`Execution status: ${execution.status}`);
// Write files to the sandbox
await sandbox.writeFiles([
{ path: '/app/index.js', content: 'console.log("Hello!")' }
]);
// Read a file
const stream = await sandbox.readFile('/app/index.js');
// Clean up
await sandbox.destroy();
Use the run() method for a create-execute-destroy lifecycle in one call:
const result = await client.run({
runtime: 'node',
code: 'console.log("Hello!")'
});
console.log(result.stdout);
SandboxClientMain client for interacting with the sandbox service.
new SandboxClient(options?: SandboxClientOptions)
Options:
apiKey - API key (defaults to AGENTUITY_SDK_KEY env var)url - Sandbox API URL (defaults to AGENTUITY_SANDBOX_URL env var)orgId - Organization IDlogger - Custom logger instancecreate(options?) - Create a new sandbox, returns SandboxInstanceconnect(sandboxId) - Connect to an existing sandbox, returns SandboxInstanceget(sandboxId) - Get sandbox infodestroy(sandboxId) - Destroy a sandboxrun(options, io?) - One-shot create-execute-destroypause(sandboxId) - Pause a sandboxresume(sandboxId) - Resume a paused sandboxSandboxInstanceRepresents a specific sandbox. Returned by create() and connect().
id - Sandbox IDstatus - Current statusexecute(options) - Execute a commandwriteFiles(files) - Write files to the sandboxreadFile(path) - Read a file from the sandboxlistFiles(path?) - List files in the sandboxmkDir(path, recursive?) - Create a directoryrmFile(path) - Remove a filermDir(path, recursive?) - Remove a directorysetEnv(env) - Set environment variablesget() - Get sandbox infopause() - Pause the sandboxresume() - Resume the sandboxdestroy() - Destroy the sandboxApache-2.0
FAQs
Unknown package
The npm package @agentuity/sandbox receives a total of 429 weekly downloads. As such, @agentuity/sandbox popularity was classified as not popular.
We found that @agentuity/sandbox demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.