Interactive Playground
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 |
| 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 code-execute and scratchpad-write — tools that run inside the WebContainer sandbox. No extra API keys needed.
Set TASK in Secrets to give the agent a custom challenge.
Two strategies, same task. See how reactive and plan-execute-reflect differ in steps, tokens, and style. Set STRATEGY_B to try tree-of-thought, reflexion, or adaptive.
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.