Playground
Type a message and see exactly what leaves the device. The assistant echoes back what it received, then it's rehydrated locally.
Everything below runs in your browser — no server, no API key, nothing sent. Type a note, and the “assistant” replies with exactly what it received, so the middle panel is literally all a real LLM would ever see. Then it's rehydrated on device, back to your original.
Send a message. The assistant replies with exactly what it received — so the amber panel is everything a real model would ever see.
Turn on On-device AI(top-right) to catch names & addresses live via the 14.7 MB model. Medications and dates still need a dictionary entry — anything not highlighted was sent as-is. See Limitations.
Try this
- Leave the sample as-is: the email and phone become placeholders, but the child's name (Tomás), the doctor (Dra. Beatriz) and the medication (Amoxicilina) still leak — the deterministic layer only protects structured data. That gap is real; see Limitations.
- Now add
TomásandAmoxicilinaunder Protect extra terms and send again — they're redacted too. That's the custom dictionary closing the gap for the “what”, not just the “who”. - Add a made-up IBAN or card number and watch the checksum-validated detectors catch them.
In a real app the on-device Rampart model adds names and addresses automatically; this playground uses the deterministic layer only so it stays instant and offline.
Testing your own chat UI
shadcn's @shadcn/helpers
createChat() lets you drive a real useChat lifecycle with no model or network —
perfect for testing a chat UI wrapped with the
AI SDK adapter:
import { createChat } from '@shadcn/helpers/ai-sdk';
const chat = createChat().user('email ana@acme.com').assistant('Done!');
// drive useChat({ messages: chat.get(0), transport: chat.transport() })