Playground
Run the interactive demo to see Rdakt AI in action
The Rdakt AI playground is a full-stack chat application that demonstrates anonymization in real-time. It includes a React frontend with a live anonymization inspector.
Prerequisites
- Docker and Docker Compose installed
- At least one LLM API key (
OPENAI_API_KEY,ANTHROPIC_API_KEY, orGOOGLE_API_KEY)
Start the Playground
docker compose -f playground/docker-compose.yml up --build -dThis starts:
- Frontend — React app at
http://localhost:5173 - Backend — FastAPI server at
http://localhost:8000
Using the Playground
-
Open
http://localhost:5173in your browser -
Select a model from the dropdown (GPT-4o, Claude Sonnet, Gemini Flash)
-
Send a message containing PII, for example:
"My name is John Smith, my email is john@example.com and my SSN is 123-45-6789. Can you summarize my profile?"
-
Watch the Rdakt Inspector panel — it shows:
- Entities detected in your message
- The anonymized text sent to the LLM
- The entity mapping (token → original value)
- The deanonymized response
Test via cURL
curl -s -N http://localhost:8000/api/chat \
-H 'Content-Type: application/json' \
-d '{
"messages": [{"role": "user", "content": "My email is john@example.com"}],
"model": "gpt-4o-mini"
}'Architecture
Browser (React + useChat)
↓ Vercel AI Data Stream Protocol
FastAPI Backend
↓ RdaktMiddleware wrapping httpx transport
LLM API (OpenAI / Anthropic / Gemini)The backend creates a RdaktMiddleware instance per conversation, with SQLite-backed session persistence. The frontend uses @ai-sdk/react's useChat hook for streaming.
Stop the Playground
docker compose -f playground/docker-compose.yml down