Skip to main content
A runtime is a secure sandbox for code, commands, files, a terminal, a browser, and a desktop. Your app or agent uses it to run work you do not fully trust. A sandbox is ready in ~25 ms. In the API and SDK the resource is called runtime. Architecture is the map of how a request reaches that sandbox. How a runtime works covers what is inside and how long it stays up.

Quick start

Set GRAVIXLAYER_API_KEY, then create a client. Cloud, region, and template all have defaults — you only pass what you want to change.
Install with pip install gravixlayer or npm install gravixlayer. See Use the SDK for authentication and client options.

What you can do

Run code

Python and JavaScript inside the sandbox

Run a command

Install packages, run scripts, inspect the OS

Read a file

Read, write, and list files

Use Git

Clone, commit, and push

Open a browser

Click, type, and fill on a real page. Use the browser-small template.

Use the desktop

See the screen, click, and open apps. Use the desktop-small template.

Store a credential

Pass a key into a run

Limit outbound traffic

Allow the hosts a sandbox can reach

Expose a web service

An HTTPS URL for an app inside a runtime

Snapshots

Save a runtime and start new ones from it

Use the SDK

Python and TypeScript

Use the CLI

The same calls from a shell

Pick a size

System base templates (Ubuntu 24.04, Python 3.14.6 via uv, Node 24). See Templates for the toolchain and custom builds.

Multi-Cloud Support

The SDK and CLI default to AWS / us-east-1. Set cloud and region on the client (or GRAVIXLAYER_CLOUD / GRAVIXLAYER_REGION) to choose another available region.

Security best practices

A sandbox keeps the code it runs away from your application and from other customers. It does not stop a compromised or prompt-injected agent from misusing whatever it can reach inside the sandbox — files, shell, network, and any credentials present there.
Treat sandbox isolation as a containment boundary, not a trust boundary for agent inputs. Anything the agent can read or call inside the runtime is also available to an attacker who influences that agent.

Credentials and the sandbox

Avoid placing long-lived API keys, tokens, or database passwords into the sandbox whenever you can. Env vars, mounted files, and Identity provider injection all make secrets readable to code that runs inside the sandbox — including code steered by a malicious prompt. Prefer architectures where authentication stays outside the sandbox:
  • Host-side tools — your application holds credentials and exposes narrow tools (for example “fetch models” or “create issue”). The agent invokes the tool by name and never sees the secret.
  • Scoped, short-lived credentials — if something must enter the sandbox, use the least privilege and shortest lifetime you can, then revoke or rotate promptly.
If you do inject secrets (including via Identity providers), reduce blast radius: require human approval for sensitive tool use, constrain outbound traffic with Network Policies, and watch for unexpected egress. These controls help; they do not eliminate context-injection risk.

General hardening

  • Review sandbox outputs before your product acts on them (commands, URLs, file paths, tool arguments).
  • Disable or tightly restrict network when the workload does not need it — see Network Policies.
  • Redact sensitive patterns from tool and execution outputs before logging or returning them to users.
  • Assume everything produced inside the runtime is untrusted input to the rest of your system.
See Identity Providers and Network Policies for detailed guidance.

Next

Create your first sandbox

Quickstart with code, files, and secrets

How a runtime works

Lifecycle, defaults, and what is inside a sandbox