AI agents built on Vercel's agent stack

India · UAE · US

Running code your agent wrote? What a Vercel Sandbox task really costs

By Shivanath DevinarayananPublished 7 min read
Written forCTO, CXO, or VP or director of engineering who owns the agent stack and the model bill“Which model should run which step, and what does each step cost?”

The short answer

What does Vercel Sandbox cost to run code an agent wrote, and when does a throwaway microVM per task pay off?

On Pro you pay $0.128 per Active CPU hour and $0.0212 per GB-hour of memory at iad1 rates, plus $0.60 per million creations. CPU waiting on a model is free; memory is not, so it is most of the bill in Vercel's own examples. At Mindcat, we stop each sandbox when its task ends.

A glowing glass cube with a chip and code inside, a two-dial brass meter beside it, the larger dial lit

Takeaways

  1. 01Active CPU skips time spent waiting on I/O and model calls. Provisioned memory is billed the whole time the sandbox runs.
  2. 02In Vercel's own five-minute example, memory is $0.0071 of a $0.0092 task, about three quarters.
  3. 03A session can last 24 hours on Pro and 45 minutes on Hobby, which is for non-commercial use only.
  4. 04Sandbox runs in 19 regions, Mumbai the nearest to the Gulf. Snapshots and drives stay in the region they were made.

If your agent writes code, or your customers upload scripts, and something has to run them away from production, this is for you. Vercel Sandbox gives each task its own throwaway microVM. Whether that is cheap depends less on the CPU price than on how long you leave the box open. It is not for an agent that only reads and writes records: with no code to run, you need no sandbox.

What are you paying for when an agent runs code?

Five meters, of which two matter for most agents. Vercel describes the product as "an on-demand, isolated Linux microVM", each one a Firecracker microVM with its own kernel. On Pro and Enterprise these are the rates on 16 October 2026, at the default iad1 region:

MeterRateHobby includes
Active CPU$0.128 per hour5 hours a month
Provisioned memory$0.0212 per GB-hour420 GB-hours a month
Sandbox creations$0.60 per million5,000 a month
Snapshot storage$0.08 per GB-month15 GB, lifetime
Outbound network and exposed portsPro: in the Flat Rate CDN tier. Enterprise: $0.15 per GB. Downloads are free20 GB a month

Rates for CPU, memory, transfer and drives vary by region, so price the region you will use, not iad1. Memory is billed in one-minute minimum increments, so even a ten-second check pays for a minute of memory. Creations and snapshot storage cost the same everywhere. All Pro usage first draws on the plan's $20 monthly credit.

This post is about the bill. What a sandbox stops, and what it leaves to policy, is in our post on agent sandbox policy.

We set Sandbox up with the network policy, the secrets outside the box and the stop rules in place: see the Sandbox page.

Why is memory most of the bill?

Because CPU stops counting while your code waits, and memory does not. Vercel's docs say time spent waiting on I/O, "network requests, database queries, or AI model calls", does not count toward Active CPU. Memory is the RAM you provisioned, 2 GB per vCPU, multiplied by the time the sandbox runs, in one-minute minimum increments.

Vercel's own example shows the effect. An "AI code validation" task of 5 minutes on 2 vCPUs and 4 GB, at 10 percent CPU use, costs $0.0021 in CPU and $0.0071 in memory: $0.0092 in total. Memory is about three quarters of it, at that 10 percent CPU use. The split moves with your workload: our arithmetic on the same box kept 60 percent busy gives about $0.0128 in CPU against the same $0.0071 in memory. Measure your own task before you pick which knob to turn.

Vercel's five-minute example: CPU $0.0021, memory $0.0071, total $0.0092. Memory is most of the bill
Vercel's own example at iad1 Pro rates, assuming 10 percent CPU use.

The product page claims "up to 95% lower cost for workloads with bursty or I/O-bound patterns". That saving is on CPU. For an agent that thinks for a minute between commands, the lever you control is the clock. Our stop rules: provision the smallest box that runs the task, set a timeout per task shorter than the default, stop the box on the task's own done signal, and kill it when it sits idle. A hung agent then costs minutes, not the five-minute default per call or a 24-hour session.

What does a month of checks cost?

About $28 a month at agency scale, before the Pro plan's credit. Here is our arithmetic on Vercel's example, for a sample digital agency where an agent drafts landing pages and every draft is built and tested before anyone looks at it. It is a sample volume, not a client's bill.

  1. 013,000 drafts a month, each checked in one sandbox for 5 minutes on 2 vCPUs and 4 GB (our assumption).
  2. 023,000 × $0.0092 is $27.60 in CPU and memory, at iad1 Pro rates.
  3. 033,000 creations at $0.60 per million add less than one cent.
  4. 04The Pro plan's $20 monthly usage credit is drawn on first.
  5. 05Model tokens for writing the drafts, and outbound traffic on a preview port, are separate lines.
Sample: agent writes a landing page, a sandbox builds and tests it, a preview URL opens, a person approves
A sample plan for an agency, not a client deployment.

Pro costs $20 a month with one deploying seat, and that fee comes with $20 of usage credit, so most of this sample's sandbox use sits inside the plan. The model tokens for writing each draft can easily be the larger line, so we price both per task in shadow mode before go-live, from your own drafts, not from Vercel's example. Count cost per passed draft, not per run: a failed check costs the same as a passed one. We price the sandbox, the model and the retries together, as one cost per task.

The number that moves this is time open, not volume. The same 3,000 checks left open for 30 minutes each, on Vercel's "build and test" shape of 4 vCPUs and 8 GB, is $0.1104 a task in its example, or about $331 a month. For the agency side of this work, see Mindcat for digital agencies.

Which limits decide the design?

Session length, concurrency and box size, and each one differs by plan.

LimitHobbyProEnterprise
Longest session45 minutes24 hours
Sandboxes at once1010,000
Largest box4 vCPU, 8 GB8 vCPU, 16 GB
Disk and ports64 GB, 15 ports64 GB, 15 ports
Hobby 45 minutes, 10 at once, 4 vCPU; Pro 24 hours, 10,000 at once, 8 vCPU; Enterprise 32 vCPU
Session, concurrency and size limits by plan, from Vercel's docs.

Two of these catch teams out. Hobby is for non-commercial, personal use only, so a client pilot on Hobby is on the wrong plan before any limit applies. And 24 hours is a ceiling per session, not "unlimited": a job that runs longer needs a snapshot or a persistent sandbox that stops and resumes, which Vercel says resets the clock.

Where does the code run?

In one of Vercel's 19 regions, and none of them is in the UAE or Saudi Arabia. Mumbai (bom1) is the nearest; the default is iad1 in Washington, D.C. You can set the region per sandbox or as a project default on any plan, and failover regions on Pro and Enterprise.

Pick the region before you save anything. Snapshots and drives are stored in the region they were created in. An India team can keep code, files and snapshots in Mumbai. A Gulf team whose code reads customer records cannot keep them in-country on this product today, so we confirm the data path per project, in writing, before you sign.

When does a sandbox per task pay off?

When the code is untrusted and the work comes in bursts. That covers code an agent wrote, scripts a customer uploaded, and builds of a draft nobody has read yet. Each task gets a fresh box with its own kernel and network policy, and the box is gone when the task is. Vercel's page also says credentials are "injected on egress" and "never enter the sandbox", which is the property you want when the code is someone else's.

Build or buy is a real choice here. Our reading, not a benchmark:

OptionYou getYou give up
Vercel SandboxA microVM per task in milliseconds, priced per active use, no servers to runNo Gulf region; 24-hour sessions; rates differ by region
Another hosted sandboxDifferent regions, limits and billing; 14 compared in our policy postAnother vendor contract and data path to check
Your own microVMs or containersAny region you choose, including your Gulf cloudYou build the isolation, the network policy and the patching

It is the wrong tool in three cases:

  1. The code is yours and reviewed. Run it where you already run code. A microVM per call is overhead.
  2. The box would sit open all day. Memory bills by the hour while it runs. A steady worker belongs on compute you size once.
  3. The data must stay in the Gulf. No region there today.

How do we start?

We call the method Spec, shadow, gate. We write down what the agent may run, which hosts the sandbox may reach and when each box stops, run it beside your team with nothing written to production, then put a person on the step that ships. The written assessment is free. The first build week is a fixed AED/SAR 14,900, credited in full if you sign the build within 60 days, and our Run plans are on one page. See how we build on Vercel for the rest.

We are not a Vercel partner; we use the product's own names, and mindcat.ai itself runs on Netlify. If your agent never runs code it wrote or code a customer sent, you do not need a sandbox yet: keep the agent to reads and approved writes, and come back when it starts writing scripts.

Filed under

AI agents built on Vercel's agent stackvercel sandbox pricingsandbox active cpu billingrun ai generated code safelyfirecracker microvm sandbox
Useful to someone on your team?

FAQ

Questions teams ask next

How is Vercel Sandbox billed?
On Pro and Enterprise, by Active CPU hours, provisioned memory in GB-hours, the number of creations, outbound network and storage for snapshots and drives. At iad1 rates on 16 October 2026 that is $0.128 per Active CPU hour, $0.0212 per GB-hour and $0.60 per million creations. Rates for CPU, memory, transfer and drives vary by region.
Does waiting for a model response cost money in a sandbox?
Not in CPU. Vercel's docs say time spent waiting for I/O, such as network requests, database queries or AI model calls, does not count toward Active CPU. Provisioned memory keeps billing while the sandbox runs, in one-minute minimum increments, so a sandbox left open while an agent thinks still costs memory.
Can a Vercel sandbox run in the UAE or Saudi Arabia?
No. Sandbox is available in Vercel's 19 regions and none is in the Gulf. Mumbai (bom1) is the nearest, and the default is iad1 in Washington, D.C. Snapshots and drives are stored in the region where they were created, so pick the region before you save state.
How is this different from your post on agent sandbox policy?
That post covers what a sandbox stops and what it leaves to policy. This one is about cost and limits: what a task costs on Vercel Sandbox, which settings move the bill, and when a sandbox per task is worth it over running the code somewhere you already pay for.

Sources

  1. 01Vercel docs: Sandbox pricing and limitsAccessed 16 Oct 2026
  2. 02Vercel docs: Sandbox overviewAccessed 16 Oct 2026
  3. 03Vercel docs: Sandbox regionsAccessed 16 Oct 2026
  4. 04Vercel: Sandbox product page and FAQAccessed 16 Oct 2026
  5. 05Vercel docs: Pro planAccessed 16 Oct 2026
  6. 06Vercel docs: Hobby planAccessed 16 Oct 2026
Shivanath Devinarayanan, founder of Mindcat

Written by

Shivanath Devinarayanan

Founder, Mindcat Consulting · Salesforce MVP Hall of Fame

Runs 200+ agents in production. Reads every brief that comes in and signs the work that goes out.

About Shivanath

First Agent in Production · the written assessment

We work in real estate and right now, the AI pilot never left the sandbox.

Industry
Problem

Brief: Real estate. Leads from portals and WhatsApp. Follow-up has no owner. Stalled AI or Salesforce pilot. Need a finish, cut, or rebuild call. From: /blog/vercel-sandbox-cost-per-task.