About 7 months ago, I started designing a WebGPU library to ship performant shaders at Vercel.
Today, we are announcing vgpu: a minimal WebGPU library designed for agents.
But what does "designed for agents" mean? 🧵
Vercel
Aug 27, 2026 · 4:27 PM UTC
71
163
1,921
141,405
My first attempt at this library was to design a minimal API that let me ship shaders with a few lines of code.
It was the "dream api" that I always wanted, super minimal, abstracting all the verbosity away, but it came with a cost: It was hard for agents to use
It had too many magical abstractions that you have to learn. That is fine for humans (you just learn it once), but my agents kept forgetting them as soon as their context got compacted
It also made performance optimizations harder, since I had to "fight the library"
3
1
51
8,877
I started going back and forth between abstraction levels to find the right utilities. Keeping low-level control while making it easier for agents to understand.
After shipping many shaders on vercel.com, we found that allowed us to improve on performance a lot
2
1
33
6,996
Agents usually just open a browser to check their work; waiting ~10 seconds to check for a syntax error is too slow.
This is where the CLI helps:
- `vpgu docs` and `vgpu examples` to quickly learn
- `vgpu check` to validate shader code syntax
1
29
6,156
If your agent is shipping in a cloud sandbox, it probably won't have a GPU.
Usually they go, "oh I cannot render this", and give up.
vgpu solves this by shipping a CPU renderer that they can install to test their code.
This also makes `agent-browser --webgpu` work anywhere
1
35
5,791
The headless renderer also lets us write tests that run on CI.
...or render our shaders as high-resolution videos locally.
On Mac, rendering runs natively on Metal, so it's real GPU speed
1
31
4,982
And finally, my favorite feature: WGSL modules.
This allows us to write shaders in the WebGPU Shader Language
We can now create shader libraries and registries.
The WGSL code gets minified and validated at build time.
1
1
58
5,355
Docs and examples are available at vgpu.sh
All feedback is welcome!
3
3
123
5,372




























