Skip to content
Playground

Interactive Playground

Last updated today · db4cf2c

↑ Updated today

"fix(playground): single StackBlitz install + document WebContainer EIO cache corruption" · db4cf2c · 2026-10-11

  • ## Quick setup
  • ## Troubleshooting
  • ### `npm error code EIO: '<package>' not found in cache`
  • ### Other issues

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.

Get a free Gemini API key at ai.google.dev — no credit card required.

ProviderFree tier?.env variable
Google Gemini ← recommended✅ Yes — generous free tierGOOGLE_API_KEY
Anthropic Claude❌ Pay-as-you-goANTHROPIC_API_KEY
OpenAI❌ Pay-as-you-goOPENAI_API_KEY
Groq✅ Yes — generous free tierGROQ_API_KEY
xAI (Grok)❌ Pay-as-you-goXAI_API_KEY
Local Ollama✅ FreePROVIDER=ollama + OLLAMA_ENDPOINT (HTTPS tunnel — see below)

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.


  1. Start Ollama with CORS open (it must accept the tunnel origin):

    Mac/Linux:

    Terminal window
    OLLAMA_ORIGINS=* ollama serve

    Windows:

    Terminal window
    set OLLAMA_ORIGINS=* && ollama serve
  2. Pull a model if you haven’t already:

    Terminal window
    ollama pull llama3.2
  3. Expose Ollama over HTTPS with a tunnel:

    Terminal window
    cloudflared tunnel --url http://localhost:11434
    # or: ngrok http 11434

    Copy the https://… URL it prints.

  4. In the .env tab, set:

    PROVIDER = ollama
    OLLAMA_ENDPOINT = https://YOUR-TUNNEL.trycloudflare.com
    MODEL = llama3.2
  5. Click the terminal restart button (↺) to re-run with the new env vars.


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 EIO
npm error EIO: '@reactive-agents/<pkg>@<version>' not found in cache, try running install again

This 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:

  1. Open the playground in a different browser profile (or a private/ guest window, or a different browser). This is the fix that reliably works.
  2. If you are on the embed’s own tab, use StackBlitz’s fork to get a fresh container.
  3. As a last resort, clear site data for stackblitz.com in 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.

  • No API key message — expected; paste a key into the .env tab (see Quick setup above) and click the terminal restart (↺) button.
  • Model returns no tool calls — set MODEL in .env to a tool-calling model for your provider (for example MODEL=gemini-2.5-flash), or clear it to fall back to the provider default.