Run a real agent in your browser — no local install, no cloning, no CLI setup. Powered by StackBlitz WebContainers, which runs Node.js entirely in-browser.
Quick setup
Section titled “Quick setup”Get a free Gemini API key at ai.google.dev — no credit card required.
| Provider | Free tier? | .env variable |
|---|---|---|
| Google Gemini ← recommended | ✅ Yes — generous free tier | GOOGLE_API_KEY |
| Anthropic Claude | ❌ Pay-as-you-go | ANTHROPIC_API_KEY |
| OpenAI | ❌ Pay-as-you-go | OPENAI_API_KEY |
| Groq | ✅ Yes — generous free tier | GROQ_API_KEY |
| xAI (Grok) | ❌ Pay-as-you-go | XAI_API_KEY |
| Local Ollama | ✅ Free | PROVIDER=ollama + OLLAMA_ENDPOINT (HTTPS tunnel — see below) |
Scenarios
Section titled “Scenarios”The simplest possible agent. One question, one answer. Start here to see the core API in action.
Set QUESTION in Secrets to ask anything you like.
Agent with built-in tools. The agent uses crypto-price and code-execute — a live crypto quote plus sandboxed math — then saves the result with the recall meta-tool. No extra API keys needed.
Set TASK in Secrets to give the agent a custom challenge.
Three strategies, same task. See how reactive, plan-execute-reflect, and adaptive differ in steps, tokens, and style. Set STRATEGIES=reactive,tree-of-thought to try any other combination.
Using local Ollama
Section titled “Using local Ollama”-
Start Ollama with CORS open (it must accept the tunnel origin):
Mac/Linux:
Terminal window OLLAMA_ORIGINS=* ollama serveWindows:
Terminal window set OLLAMA_ORIGINS=* && ollama serve -
Pull a model if you haven’t already:
Terminal window ollama pull llama3.2 -
Expose Ollama over HTTPS with a tunnel:
Terminal window cloudflared tunnel --url http://localhost:11434# or: ngrok http 11434Copy the
https://…URL it prints. -
In the
.envtab, set:PROVIDER = ollamaOLLAMA_ENDPOINT = https://YOUR-TUNNEL.trycloudflare.comMODEL = llama3.2 -
Click the terminal restart button (↺) to re-run with the new env vars.
Troubleshooting
Section titled “Troubleshooting”npm error code EIO: '<package>' not found in cache
Section titled “npm error code EIO: '<package>' not found in cache”A WebContainer install can fail with:
npm error code EIOnpm error EIO: '@reactive-agents/<pkg>@<version>' not found in cache, try running install againThis is a StackBlitz WebContainer cache-corruption issue in the browser profile, not a problem with the package named in the message. The named package is simply whichever one the corrupted cache trips over; it exists on npm and installs cleanly in a fresh environment.
It is often profile-wide: the same embed works in a different browser, a
different Chrome profile, or a private window while failing in the original
one. npm cache clean --force and deleting node_modules frequently do not
clear it, because the stale state lives in the persisted WebContainer
snapshot, not just npm’s cache directory.
Recovery, in order of reliability:
- Open the playground in a different browser profile (or a private/ guest window, or a different browser). This is the fix that reliably works.
- If you are on the embed’s own tab, use StackBlitz’s fork to get a fresh container.
- As a last resort, clear site data for
stackblitz.comin your browser settings, then reload.
There is nothing to change in the demo project to fix this, it is a StackBlitz-side cache state. See facebook/docusaurus#11615 for the same failure and confirmation that a fresh profile resolves it.
Other issues
Section titled “Other issues”- No API key message — expected; paste a key into the
.envtab (see Quick setup above) and click the terminal restart (↺) button. - Model returns no tool calls — set
MODELin.envto a tool-calling model for your provider (for exampleMODEL=gemini-2.5-flash), or clear it to fall back to the provider default.