DaytonaSandbox implements CloudSandbox; DaytonaSandboxToolkit exposes Agent tools. Import from @agentium/core/toolkits.
Run code
This example creates a real remote sandbox. Save asdaytona.ts, then use npx tsx daytona.ts.
daytona.ts
42. The adapter imports the SDK and creates its sandbox lazily. language is fixed at creation; use separate instances for Python and Node. baseURL maps to the SDK’s apiUrl. Optional workspace is a sandbox name, not an existing local directory.
Borrow a client, own the sandbox
You may supply aDaytonaSandboxClient through client. Your host retains responsibility for that client, while the adapter still owns and deletes sandboxes it creates. Without a supplied client, it manages the client it constructed.
For a model-controlled workflow, use DaytonaSandboxToolkit.getTools() and close the toolkit after the Agent stops. A temporary remote session is not a durable workflow checkpoint.