मुख्य सामग्री पर जाएँ
Skillpedia
डिप्लॉय और क्लाउड (DevOps)45k · #6362

vercel-sandbox

यह क्या करती है

यह स्किल दिखाती है कि अस्थायी Vercel क्लाउड मशीनों में agent-browser और Chrome कैसे चलाएँ। यह उन डेवलपर्स के लिए है जो Vercel पर चलने वाले ऐप में ब्राउज़र फ़ीचर जोड़ रहे हैं।

कब इस्तेमाल करें

  • ✓जब आपके Vercel ऐप को वेब पेज के स्क्रीनशॉट लेने हों।
  • ✓जब आपको एक अलग-थलग, अस्थायी माहौल में चलने वाला ब्राउज़र चाहिए।
  • ✓जब ब्राउज़र सेशन कई कमांड के बीच चालू रहने चाहिए।

Skill का लिंक

https://github.com/vercel-labs/agent-browser/blob/main/skill-data/vercel-sandbox/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/vercel-labs/agent-browser/blob/main/skill-data/vercel-sandbox/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरे Next.js ऐप में ऐसा फ़ीचर जोड़िए जो उपयोगकर्ता द्वारा डाले गए किसी भी URL का स्क्रीनशॉट ले।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

ऐप एक छोटी सैंडबॉक्स मशीन शुरू करता है, Chromium के लिए ज़रूरी चीज़ें इंस्टॉल करता है, वहीं ब्राउज़र कमांड चलाता है, और बाद में मशीन बंद कर देता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Browser Automation with Vercel Sandbox

Run agent-browser + headless Chrome inside ephemeral Vercel Sandbox microVMs. A Linux VM spins up on demand, executes browser commands, and shuts down. Works with any Vercel-deployed framework (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.).

Dependencies

pnpm add @agent-browser/sandbox @vercel/sandbox

The sandbox VM needs system dependencies for Chromium plus agent-browser itself. The @agent-browser/sandbox helpers install them by default for fresh sandboxes and use sandbox snapshots (below) for sub-second startup. Pass installSystemDependencies: false only when the sandbox image already provides Chromium's required libraries.

Core Pattern

import {
  createAgentBrowserSnapshot,
  runAgentBrowserCommand,
  withAgentBrowserSandbox,
  type VercelSandboxSession,
} from "@agent-browser/sandbox/vercel";

async function withBrowser<T>(
  fn: (sandbox: VercelSandboxSession) => Promise<T>,
): Promise<T> {
  return withAgentBrowserSandbox(fn);
}

Screenshot

The screenshot --json command saves to a file and returns the path. Read the file back as base64:

export async function screenshotUrl(url: string) {
  return withBrowser(async (sandbox) => {
    await runAgentBrowserCommand(sandbox, ["open", url]);

    const titleResult = await runAgentBrowserCommand<{ data?: { title?: string } }>(sandbox, [
      "get", "title",
    ]);
    const title = titleResult.json?.data?.title || url;

    const ssResult = await runAgentBrowserCommand<{ data?: { path?: string } }>(sandbox, [
      "screenshot",
    ]);
    const ssPath = ssResult.json?.data?.path;
    if (!ssPath) throw new Error("Screenshot did not return a file path.");
    const b64Result = await sandbox.runCommand("base64", ["-w", "0", ssPath]);
    const screenshot = (await b64Result.stdout()).trim();

    await runAgentBrowserCommand(sandbox, ["close"], { json: false });

    return { title, screenshot };
  });
}

Accessibility Snapshot

export async function snapshotUrl(url: string) {
  return withBrowser(async (sandbox) => {
    await runAgentBrowserCommand(sandbox, ["open", url]);

    const titleResult = await runAgentBrowserCommand<{ data?: { title?: string } }>(sandbox, [
      "get", "title",
    ]);
    const title = titleResult.json?.data?.title || url;

    const snapResult = await runAgentBrowserCommand(sandbox, ["snapshot", "-i", "-c"], {
      json: false,
    });

    await runAgentBrowserCommand(sandbox, ["close"], { json: false });

    return { title, snapshot: snapResult.stdout };
  });
}

Multi-Step Workflows

The sandbox persists between commands, so you can run full automation sequences:

export async function fillAndSubmitForm(
  url: string,
  data: Record<string, string>,
  postSubmitWaitArgs: string[],
) {
  return withBrowser(async (sandbox) => {
    await runAgentBrowserCommand(sandbox, ["open", url]);

    const snapResult = await runAgentBrowserCommand(sandbox, ["snapshot", "-i"], {
      json: false,
    });
    const snapshot = snapResult.stdout;
    // Parse snapshot to find element refs...

    for (const [ref, value] of Object.entries(data)) {
      await runAgentBrowserCommand(sandbox, ["fill", ref, value]);
    }

    await runAgentBrowserCommand(sandbox, ["click", "@e5"]);
    // Pass an app-specific wait, such as ["--url", "**/checkout/complete"],
    // ["--text", "Thanks"], or ["#confirmation"].
    await runAgentBrowserCommand(sandbox, ["wait", ...postSubmitWaitArgs]);

    const ssResult = await runAgentBrowserCommand<{ data?: { path?: string } }>(sandbox, [
      "screenshot",
    ]);
    const ssPath = ssResult.json?.data?.path;
    if (!ssPath) throw new Error("Screenshot did not return a file path.");
    const b64Result = await sandbox.runCommand("base64", ["-w", "0", ssPath]);
    const screenshot = (await b64Result.stdout()).trim();

    await runAgentBrowserCommand(sandbox, ["close"], { json: false });

    return { screenshot };
  });
}

MCP Server over stdin

For many MCP tool calls in one sandbox, startAgentBrowserMcp keeps one agent-browser mcp process running and sends requests over the sandbox command's stdin. It requires @vercel/sandbox 3.7 or later, and timeout (milliseconds) applies to each request and to close():

import { startAgentBrowserMcp, withAgentBrowserSandbox } from "@agent-browser/sandbox/vercel";

const snapshot = await withAgentBrowserSandbox(async (sandbox) => {
  co
अक्सर पूछे जाने वाले सवाल

कौन-से फ़्रेमवर्क इसके साथ चलते हैं?

स्किल के अनुसार यह Vercel पर डिप्लॉय होने वाले किसी भी फ़्रेमवर्क के साथ चलता है, जैसे Next.js, SvelteKit, Nuxt, Remix और Astro।

क्या इंस्टॉल करना पड़ता है?

स्किल प्रोजेक्ट में दो पैकेज जोड़ने को कहती है: agent-browser सैंडबॉक्स हेल्पर और Vercel Sandbox पैकेज।

क्या शुरू होना तेज़ हो सकता है?

हाँ। स्किल सैंडबॉक्स snapshots का ज़िक्र करती है, जो शुरू होने की गति बढ़ा सकते हैं।

जानकारी

लेखक का मूल विवरण

Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include "Vercel Sandbox browser", "microVM Chrome", "agent-browser in sandbox", "browser automation on Vercel", or any task requiring Chrome in a Vercel Sandbox.

repo: vercel-labs/agent-browser

लोकप्रियता

GitHub स्टार
45k
रैंकिंग में स्थान
#6362
लाइसेंस
Apache-2.0
अपडेट की गई
1/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

technical-writer

45k

आपके एजेंट को डेवलपर डॉक्स लिखना और सुधारना सिखाती है, जैसे गाइड, API रेफ़रेंस और समस्या-निवारण पेज, साफ़ ढाँचे और सही उदाहरणों के साथ।

लेखन और डॉक्यूमेंटलेखन

agentcore

45k

आपके एजेंट को AWS Bedrock AgentCore क्लाउड ब्राउज़र पर ब्राउज़र ऑटोमेशन चलाने देती है, आपके मौजूदा AWS साइन-इन से, लोकल Chrome जैसे ही कमांड के साथ।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

core

45k

आपके एजेंट को snapshot और एलिमेंट रेफ़रेंस से वेब ब्राउज़र चलाना सिखाती है, ताकि वह पेज खोल सके, क्लिक कर सके, फ़ॉर्म भर सके और सामग्री पढ़ सके।

डेटावेब स्क्रैपिंग

derive-client

45k

आपके एजेंट को एक बार वेबसाइट का नेटवर्क ट्रैफ़िक रिकॉर्ड करना सिखाती है, फिर एक स्वतंत्र क्लाइंट बनाती है जो बिना ब्राउज़र के उसकी इंटरनल API कॉल करता है।

डेटावेब स्क्रैपिंग

मिलती-जुलती skills