Skip to main content
Operating System

Networking & Previews

Proxy HTTP requests into agentOS VMs and create shareable preview URLs.

  • vmFetch proxies HTTP requests to services running inside the VM
  • Preview URLs create time-limited, shareable public URLs to VM services
  • Token-based access with configurable expiration and revocation
  • CORS enabled for browser access to preview URLs

Fetch from a VM service

Use vmFetch to send HTTP requests to a service running inside the VM.

vmFetch with options

Send requests with custom methods, headers, and body.

Create a preview URL

Preview URLs are essentially port forwarding for VM services. They create a time-limited, publicly accessible URL that proxies HTTP requests to a specific port inside the VM. Use them to share web app previews with users, embed dev servers in iframes, or give external tools access to services running inside the agent’s VM.

Revoke a preview URL

Use expireSignedPreviewUrl to immediately revoke a preview token.

Recommendations

  • Preview tokens are stored in SQLite and survive sleep/wake cycles. Expired tokens are cleaned up automatically.
  • Default preview expiration is 1 hour. Configure preview.maxExpiresInSeconds to cap the maximum lifetime.
  • CORS is enabled on preview URLs, allowing browser access from any origin.
  • Use vmFetch for server-to-server access. Use preview URLs for browser or external access.
  • See Security for more on preview URL token security.