Overview
Run JavaScript projects, persist data in databases and object or KV storage, and use remote clients and cloud browsers.
Runtime provides an on-demand JavaScript execution environment. Create instances, submit projects, inspect results and logs, and stop or delete instances in the console. Scripts can use Web APIs, persistent storage, remote clients, and cloud browsers.
Available interfaces
| Goal | Interface | Examples and reference |
|---|---|---|
| Create, name, run, stop, and delete instances | Console instance management and code editor | Quick Start |
| Deploy local projects, follow logs, and manage instances, storage, and clients | runtime-cli | CLI guide |
| Inspect execution results, historical code, and output logs | Instance Overview and Execution history | Inspect results and run again |
| Upload multiple files, import binary assets, and restore projects | Code workspace with an 8 MiB project limit | Multiple files and images |
| Read configuration saved for each instance | lexmount:env | Environment variables |
| Share persistent records, files, and expiring key/value data across runs | IndexedDB, ObjectStorage, and KVStorage from lexmount:storage | Persistent storage |
| Request public HTTP services and process bytes and async work | Web APIs including fetch, Streams, WebCrypto, and timers | Execution environment |
| Read and write client files, inspect and execute processes | fs and process in lexmount:remote | Remote client capabilities |
| Access client-local or private HTTP services, connect TCP, and listen for requests | host.fetch, host.tcp, and host.http | Examples |
| Create cloud browsers, navigate, interact, capture screenshots, and export PDFs | lexmount:browser | Browser capabilities |
| Run a task as a public HTTP service | export default { fetch() {} } | Public HTTP example |
| Inspect client status, configure permissions, and debug operations | Console client management | Client permissions |
| Set breakpoints and inspect a running execution | Inspect / Copy CDP | Debug an instance |
Where to start
- Follow the Quick Start to run a task in the console. Prefer the terminal? Follow the CLI tools guide to deploy a local project.
- Check methods, parameters, and permissions in API Reference.
- Copy a standalone script from Examples, replacing client IDs, paths, or target addresses.
Runtime access is currently enabled per project. Once signed in, use Runtime Resources in the sidebar to open Instances, Storage management, or Clients. Availability depends on the current site and project.
Instances and executions
An instance has a stable instance ID and stores its name, latest code, and execution history. Each code submission produces a separate execution record and JavaScript environment. Creating an instance does not run code; compute resources start when you select Run for the first time.
When a task ends with no pending execution, its instance stops automatically and shows as ended after cleanup. You can run the same instance again. Active HTTP services and timers keep a task running; set a maximum runtime or select Stop to end a long-running task.
Instances, clients, and active-instance quotas are scoped to the user and shared across that user's API keys and projects. Cloud browser operations use the key and project from the current task submission. Instances and their latest code remain until manually deleted; older execution history and logs are retained for 30 days by default.
Storage resources are scoped to the project and associated explicitly with instances. Their data survives execution completion, instance stops, and instance deletion; deleting an instance only removes its associations. Create and manage resources separately in Storage management, then follow Keep data across runs.
