Vercel Labs · Experimental · Apache-2.0
One small binary.
A full coding agent.
fx is a tiny, open, embeddable coding agent harness and CLI — written in Zig, model-agnostic, and compiled to WebAssembly. Closer to a Unix shell than an IDE. And yes: it is running on this page.
curl -fsSL https://fx.sh/setup.sh | bash
- Binary
- 7.8 MiB
- Startup budget
- 2 ms
- Models
- 228 via Gateway
- Runtime deps
- 0
The centerpiece
Don't read about it.
Run it.
Below is fx-term.wasm — the real interactive fx terminal, compiled from the same
Zig source as the native CLI — booted inside your browser. No install, no server round-trip.
Or take the guided session to watch a full agent loop play out.
Boot the real fx
Downloads fx-term.wasm (5.0 MiB) once, then runs entirely on your machine.
Fetching fx-term.wasm…
This browser can't run the WASM terminal
fx's WebAssembly terminal uses JavaScript Promise Integration (JSPI), available in Chrome and Edge 137+. The guided session works everywhere.
The WebAssembly build omits native processes, OS sandboxing and MCP by design — the host provides transport, storage and terminal I/O. SDK docs ↗
How fx works
An agent is a loop.
No framework, no runtime, no mystery. fx keeps the whole architecture small enough to hold in your head: prompt in, tools out, repeat until done.
-
01
Prompt in
You type intent in a composer that behaves like a shell — history, editing, slash commands. The workspace is simply your current directory.
-
02
Model thinks
One streaming request through Vercel AI Gateway — or a local model. fx is model-agnostic:
FX_MODELswaps the brain, not the harness. -
03
Tools out
The model calls real tools — read, write, search, run. In
automode, unresolved sensitive actions pause for your review before they execute. -
04
Result returns
Tool output goes back into the context as plain data. The model sees what actually happened — exit codes, diffs, test failures.
-
05
Repeat until done
The loop turns until the task completes or hits the step limit. Every turn is recorded, resumable, and inspectable with
/trace.
src/checkout.zig"apply_discount"zig build test
auto review
7.8 MiB, all in
Smaller than the average photo.
The entire agent — parser, tools, permissions, terminal, MCP client, WASM target — ships as one dependency-free binary with a startup budget enforced in CI.
Approximate download/install sizes for illustration. fx is measured; others are rounded 2026 figures.
Native or WebAssembly
One artifact, every surface.
Because the agent core compiles to a single .wasm module, fx drops into
anything that can host WebAssembly or speak JSON-RPC. Hover a surface.
Form factor
A Unix citizen, not an IDE.
Inline output in your scrollback. Composable subcommands. Plain JSON when you ask for it. These are real outputs from the real binary — click one.
Get started
Three commands. Done.
-
1
Install
curl -fsSL https://fx.sh/setup.sh | bashmacOS and Linux, x86_64 and arm64. One static binary, no dependencies.
-
2
Sign in
fx loginSign in with Vercel, or run
fx setupto drop in an AI Gateway API key. -
3
Run
cd your_project && fxYour directory becomes the workspace. Type a prompt, browse
/help, or one-shot withfx ask "…".