What it demonstrates
piighost-chat is a demo chatbot that shows a privacy-preserving conversation end to end. User messages are anonymized before they reach the LLM, and responses are deanonymized before they reach the user. Tools receive the real values.
The stack
- A React frontend and a Litestar backend running a LangChain agent.
- PIIAnonymizationMiddleware wrapping the agent: anonymize before the LLM, deanonymize after.
- piighost-api for detection and highlighting, with thread-scoped memory for consistent placeholders.
- keyshield for API-key authentication.
The user flow
- The user types a message.
- The backend calls piighost-api to detect PII; the frontend highlights the entities.
- The user confirms, and the message goes to the agent.
- The middleware anonymizes it before the model sees it, and deanonymizes the reply.
Run it
git clone https://github.com/Athroniaeth/piighost-chat
cd piighost-chat
docker compose up