📈 GH Trending Explorer 🎲 Surprise me

← all repos

vercel-labs / fx0

git clone https://github.com/vercel-labs/fx0.git

A lightweight design agent built with libfx. Describe a page and an agent writes it as one HTML file.

+293
stars, 24h · #37
+293
stars, 7 days · #200
+293
stars, 30 days · #899
293
★ total · +293% this week
53
forks · 1 open issues

Star history starts 2026-10-20; the chart appears after the second daily snapshot.

LanguageTypeScript
LicenseApache-2.0
Created2026-10-19 (1d ago)
Last pushtoday
Watchers0
OwnerOrganization

Links

README excerpt
# fx0
fx0 is an open-source, lightweight design agent built with libfx. You describe a page and an agent writes it as one HTML file.
fx0 is also a working example of an app built on libfx. One `createFxAgent()` call gives it the agent loop, streaming, tool calls, retries and durable sessions, and `createFxEngine()` runs each subagent.
Try it at fx0.vercel.dev, or clone it and make it your own.
## Features
- Sign in with Vercel to bill model calls through AI Gateway to your own team.
- Optionally offer five free Opus 5.5 Fast prompts per IP without sign-in or a card. BotID protects the trial; a server-only Gateway key funds its admitted prompts.
- A chat survives the function dying mid-reply: the turn continues where it stopped. See Durability.
- Every turn keeps its version of the design. You can reopen any of them and copy or download the HTML.
- Pick each chat's model, with its reasoning effort and fast mode. New chats start on fast Claude Opus 5.5, or on `FX0_MODEL` when it's set.
- The agent can search the web and fetch pages for reference.
- Start from one of ten `design.md` styles, or upload your own. The ten styles, and the one-line descriptions in the picker, come from VoltAgent's awesome-design-md, which you can browse at getdesign.md. Thanks to VoltAgent for publishing them.
- Type a message before you sign in. The draft, images included, waits in the tab for 15 minutes while you sign in.
- A turn stops after 64 model steps, its subagents' included, which keeps an agent stuck in a loop from running up a bill.
- In paid-only chats, a text message sent while the agent works steers it, as in the fx CLI. Trial chats run each input as its own turn so free and paid funding stay separate.
## How fx0 uses libfx
fx0 is the app. libfx is the agent inside it. Vercel keeps the agent's work safe while it runs.
- **fx0** owns what you see and what's yours: the chat and live preview, sign-in, the design tools the agent calls, and the chat history in Redis and Neon.
- **libfx** runs every turn, meaning one message and everything the agent does to answer it: the model loop, tool calls, retries and steering. fx0 creates one agent with `createFxAgent()` and passes each chat's messages to it.
- **Workflow World**, the store behind Vercel Workflow, is where libfx saves each turn as it runs: the prompt before it's accepted, then every step.
- **Vercel Queues** keeps a backup of each prompt. When the function running a turn crashes or reaches its time limit, the queue wakes a new one at `/api/libfx`, and libfx continues from the last saved step.
- **AI Gateway** receives every model call. Paid turns use the sender's OAuth token and team; explicitly sponsored turns use the server's trial key.
## Durability
fx0 runs one durable libfx agent per server. libfx keeps each chat's conversation as a session and backs every turn with Vercel Queues, so a turn finishes even when the function running it dies. fx0 has no code of its own to recover a turn. Durability takes