COLAB INSTANCE · DEV

Instance uptime

Checking…
Checking instance…

Measured by running uptime inside the instance.

One runtime. A persistent development home.

Your development
environment, explained.

Colab Dev connects an MCP client and a browser terminal to one Google Colab runtime named dev. The gateway manages its lifecycle; WebTerm runs your commands; completed backups preserve your development home.

Runtime scopedev onlyOther sessions are not managed
Default allocationHigh-RAM CPUL4 and TPU are optional
Backup cadence30 minutesExplicit backup is separate from stop
Live call historyEvery 5 seconds100 newest entries initially

Current interface: three tools, literal payloads

Use colab(cmd) for dev lifecycle management, webterm(cmd,text) for commands and terminal input, and get_image for native images. Example: {"cmd":"webterm run /home/dev/project/app","text":"cargo test"}. Omit text for a pipeline such as webterm read ID | grep error. Native IDs come from webterm ls terminals; old gateway aliases are different.

The password page loads locally without starting or waiting for dev. Sign in using the password saved in this browser, or explicitly start dev when ready. The older tool names documented below are compatibility interfaces, not the advertised tool catalog.

Compact status and focused terminal reads

status now returns only runtime identity, kind, phase, running state, readiness, active-operation state and a short error. Use runtime_details with timing, backup, graphics or errors for curated details.

terminal_read and terminal_capture accept filter_cmd, such as grep -i error or tail -c 500. The full retained snapshot is piped into a separate Bash filter in the workspace; the original command is untouched. A five-second deadline and output limits apply. Filters have shell permissions. Keep full_output: false to preview long results.

The log sort menu supports date (default), input size and output size across retained history. Every tool now advertises a typed output schema.

Build, test and debug in workspace terminals

Use bash and python with a folder path such as workspace_id: "/home/dev/project/app". Each canonical folder has one workspace and appears in WebTerm automatically; the browser checks for new workspaces every five seconds.

Commands wait up to 20 seconds. Completed commands return output and an exit code. Longer commands keep running and return their workspace and terminal IDs. Use terminal_read or terminal_capture to follow them; do not launch a duplicate command.

Keep full_output: false by default. Output longer than 2,000 characters returns the first 500 plus last 1,500. omitted_chars records the missing middle. full_output: true returns full retained output, subject to the command's 262,144-character retention or the selected screen-capture limit.

For requested dev previews, run cloudflared tunnel --url http://127.0.0.1:PORT in a second terminal. This creates a public URL: never expose secrets or unauthenticated admin services. Connecting a client does not automatically publish anything.

Private port previews and task manager

Proxy a Colab development port

Sign in to WebTerm, then open /proxy/3000/. The gateway forwards to port 3000 inside dev, preserving the remaining path, URL parameters, streaming responses and WebSockets. HTTP/2 and HTTP/3 terminate at the HTTPS edge; internal forwarding is HTTP/1.1.

Configure the app for the /proxy/PORT/ base path. Only proxy trusted apps on this shared origin. For a separate public preview, use cloudflared in another workspace terminal. Port previews never allocate a runtime.

Inspect running processes

Click CPU or RAM at the bottom of WebTerm. Sort by process name, CPU, RAM, disk I/O, GPU, port or user. Hover a process name to see its executable path, or click for details and protected priority/terminate/kill controls.

Samples refresh every five seconds; pointer or keyboard interaction pauses refresh for ten seconds. Port buttons offer a copyable URL and an HTTP preview. NVIDIA, Intel and AMD metrics are shown only when their drivers expose the relevant counters; unavailable values are never reported as zero.

Query-selected previews and task logs

Application paths stay unchanged

Open /app/index.html?proxyport=3000&x=1 to reach the Colab application's original path on port 3000. Only proxyport is removed; all other query parameters are forwarded. Root-relative assets and WebSockets inherit the selected browser port. Explicit routing parameters always take priority.

Use /?proxyport=0 to return to the control page. Selection follows an explicit parameter or same-origin Referer; no routing cookie is used. Only trusted apps should share this origin. Use separate cloudflared origins or explicit WebSocket parameters for concurrent previews.

Task progress and complete payloads

Bash, Python, terminal write/read/capture require task and summary, for example 35/100 Testing routes (fewer than 50 words total). Workspace IDs are folder paths only.

The native WebTerm log has task/workspace filters, wall-clock task spans, and folded full input/output. Model responses still default to compact output. Commands and outputs can contain sensitive data; do not share logs publicly.

Private previews on separate origins

Open https://3000-proxy-colabdev.alima.freeddns.org/ to reach port 3000 inside Colab. Paths, root assets, queries and WebSockets remain unchanged; each port has its own origin. Task-manager port links use this form.

Sign-in stays on the main gateway. A port-specific preview session never authorizes another app or MCP. The first visit may wait for a per-host HTTPS certificate; only observed user-owned app ports are admitted. Opening a preview never starts a VM.

Use get_image with a folder-path workspace and image path to return native image content. PNG/JPEG/GIF/WebP files are validated and bounded to 16 MiB. Image metadata is logged; binary payloads are not copied into text logs.

What runs where

MCP client → host gateway → Colab WebTerm

The host is the control plane

The HTTPS gateway exposes /mcp, this guide, /log, and /webterm/. It authenticates MCP requests, validates tool arguments, and coordinates Colab allocation, restore, backup, and stop operations.

The controller uses a lifecycle file lock and the fixed session name dev. It reconnects to an existing runtime rather than intentionally creating a second instance. Tool-call metadata stays on the host, independent of the disposable VM.

Colab is the execution environment

WebTerm and command processes run as the native Linux user dev in Colab. The remote terminal service reaches the host through a restricted reverse SSH tunnel; the gateway proxies browser HTTP and WebSocket traffic.

The browser saves the WebTerm password in localStorage. API and terminal connections use explicit in-memory session credentials, not cookies. Sign out removes the saved password. The gateway's private MCP bearer token is not injected into browser requests. Opening this guide or the log does not start a Colab runtime.

From connection to shutdown

Authenticate

Connect to /mcp with a bearer token, or the supported password query parameter. Initialization supplies the runtime and storage rules. Discover available tools with tools/list.

Start or reconnect

Call start with kind: "highram" or omit the kind. Opening /webterm/ displays the local password page immediately. Use Start dev to request start/reconnection; sign-in and passive page views never allocate a runtime. Allocation depends on Colab availability and account entitlement.

Restore and prepare

Startup validates and restores the Drive archive, recreates the user, refreshes installed tooling, and connects WebTerm. Only the bootstrap is uploaded by the host. In-instance rclone downloads the canonical gdrive:devhome.tar.zstd into /build/devhome.restore.tar.zstd. Missing archives, rclone errors, and integrity failures abort startup with an error; there is no host-file, previous-snapshot, or empty-home fallback.

Wait for readiness

Long lifecycle operations return a phase before they finish. Poll status for ready, connectivity, boot timings, archive bytes, and restore throughput. A successful MCP response does not by itself mean provisioning is complete.

Work in terminals

Use bash or python to open a persistent terminal. Keep its workspace_id and compact terminal_id, such as 01, to capture output, send input, resize, or stop that terminal.

Stop without an automatic backup

stop stops only dev and never runs a backup. Changes since the last completed archive are lost. To save changes, call backup explicitly, wait for success, then call stop. The legacy force option no longer changes this behavior.

Connect and run your first command

MCP endpoint

Use this site's HTTPS origin followed by /mcp. Configure your client to send:

Authorization: Bearer <your-token>
Accept: application/json, text/event-stream
Content-Type: application/json

The compatibility endpoint /mcp?passwd=<your-password> remains available. Prefer the bearer header because URLs can be retained in browser history and intermediaries. Do not paste credentials into command examples or logs.

Development instructions are also available through the MCP resource colab-de://instructions.

Tool calls, in order

start({"kind": "highram"})
status({})  // repeat until ready
bash({"workspace_id": "/home/dev/project/app", "task": "Explore workspace", "summary": "10/100 Inspecting workspace", "command": "pwd"})
terminal_capture({
  "workspace_id": "/home/dev/project/app",
  "terminal_id": "<returned terminal ID>",
  "task": "Explore workspace",
  "summary": "20/100 Reading command output",
  "lines": 100
})

These examples show tool names and arguments, not shell commands. wait_s ranges from 0 to 20 seconds and defaults to 20. A command may continue after its MCP call returns; read running and exit_code in the response, then capture output as needed.

Automatic graphics for each runtime

L4: NVIDIA WebGL and WebGPU

Restore regenerates the NVIDIA library paths and Vulkan/EGL discovery files from the current VM. The Chromium wrappers select headless Vulkan with surface presentation disabled. CUDA paths are configured for fresh terminals automatically.

CPU and TPU: software rendering

The same wrappers select SwiftShader for WebGL and WebGPU and clear stale NVIDIA discovery settings. Before readiness, a real browser must pass shader pixel checks and a WebGPU compute test. Results appear in runtime_details({section: "graphics"}); an L4 software fallback fails the check.

Two directories. Different lifetimes.

/home/dev — saved in completed backups

Keep source, installed tools, and package state here. Home-backed apt/apt-get wrappers resolve dependencies and extract package files into /home/dev/.local/sysroot; they do not perform a normal base-image dpkg installation or run package maintainer scripts.

Node, Rust, Python tooling, and browser installations are home-backed. The native user has passwordless sudo; changes outside the saved home should not be treated as persistent.

/build — deliberately temporary

Put build packages, compiled outputs, scratch files, and compiler caches here. The environment points build and cache paths into this directory to keep the home archive manageable.

This directory is excluded from backup. A replacement VM needs to rebuild outputs and recreate running processes. Saving source to home does not automatically mean it has already reached Drive.

Persistence is checkpoint-based, not a live disk. A worker checks every 30 minutes at reduced CPU/I/O priority with a 50% CPU cap. Unchanged homes are skipped. Changed homes are validated and uploaded through a temporary object; the previous canonical archive enters a five-file history that preserves one yesterday snapshot when available before gdrive:devhome.tar.zstd is promoted. Unexpected VM termination can lose everything changed since the last successful backup. Running terminals and processes do not survive VM replacement.

The tool surface

ToolPurpose and important behavior
startProvision or reconnect dev. Kinds: highram (default), l4, tpu-v5e1, tpu-v6e1. An active runtime's kind cannot be switched in place.
statusRead lifecycle phase, readiness, operation activity, allocation and restore metrics. Use this to track asynchronous work.
backupStart a serialized home backup and poll status for progress.
stopStop only dev without a backup. Call backup separately when needed; unsaved changes are lost.
bash / pythonExecute source in a new persistent WebTerm terminal, returning identifiers and bounded output. Completion of the RPC and completion of the process are separate.
webterm_statusRead the terminal service's own status, separate from the Colab controller's status.
workspace_listList configured remote workspaces and any exposed terminal metadata.
terminal_listList terminals inside a required workspace_id.
workspace_ensureRegister the absolute workspace folder once. Canonical aliases reuse the same workspace.
terminal_createCreate a persistent terminal in the workspace folder, registering the folder when needed.
terminal_captureRead retained command output or up to 1,000 screen lines; prefer full_output=false for the first-500/last-1500 preview.
terminal_readRead command progress or completion using its workspace folder and compact terminal ID. Supports full_output.
terminal_writeSend literal input and optionally press Enter. Input may execute commands with the runtime user's permissions.
terminal_resizeUpdate the terminal's columns and rows.
terminal_stopStop the selected terminal, not the entire Colab runtime.

One WebTerm log, two routes

Native WebTerm activity

/log and /webterm/log proxy the same WebTerm log inside dev, with the same sign-in, filters and expandable inputs and outputs. No separate gateway log table is rendered on these pages.

The shared status panel runs uptime inside the instance. Failed probes show unavailable instead of a saved estimate.

Stopped or disconnected?

The overview and log show a Start dev control. Enter the WebTerm password to explicitly start or reconnect the same named instance. Viewing these pages never starts a runtime. The native log opens when ready.

Historical gateway data remains available through the legacy /log/api compatibility API; it is not merged into native WebTerm history.

When something is not ready

Start with status, not another runtime

/health reports gateway health and a saved phase; it is not a full remote-readiness check. Use the authenticated status tool for that. During startup the password form remains available; retry sign-in after the runtime becomes ready. Reuse the named runtime rather than creating another session.

For allocation, restore, or backup failures, inspect the MCP response and the host service journal. Expand the WebTerm log output for tool error details. Avoid sharing logs that may contain sensitive input or output.

Know the host endpoints

/ — this guide
/mcp — authenticated MCP gateway
/webterm/ — browser terminal, with a locally served password page
/log — native WebTerm log proxy
/log/api — public read-only paginated log data
/health — public gateway health

The host service is colab-de. Existing host WebTerm services and unrelated Colab sessions remain separate.