Why teams choose it
A tighter privacy boundary with less operational drag.
YinShield gives teams a local masking layer they can install quickly, validate locally, and plug into existing AI workflows without standing up a full privacy platform first.
Why it feels practical
- Sensitive fields are replaced locally before inference, so the model sees placeholders instead of raw identifiers.
- You can start from a deterministic placeholder flow, then move to alias mode only when your workflow benefits from more natural text.
- Python package, local HTTP bridge, and OpenClaw integration cover the most common ways teams ship agent workflows today.
What teams can validate quickly
The current release already includes local tests across the core engine, HTTP API, installer, and OpenAI-compatible wrappers. On the bundled mini realistic benchmark, placeholder mode currently reaches 97.65% precision, 97.65% recall, and 100% recovery.
That gives teams a simple launch path: start with the clearest boundary, verify it locally, and expand only where the workflow asks for more.
Terminal demo
See the privacy boundary in one terminal window.
Run the local bridge, send one request, and inspect exactly what leaves the machine. This is the fastest way to understand what YinShield is doing for you.
terminal
$ pip install yinshield
$ yinshield serve --auth-token change-me
[yinshield] listening on http://127.0.0.1:27811
$ curl -X POST http://127.0.0.1:27811/mask \
-H "Authorization: Bearer change-me" \
-H "Content-Type: application/json" \
-d '{"text":"我叫张三,手机号13812345678,地址北京市朝阳区建国路88号。","mode":"placeholder"}'
{
"text": "我叫<PERSON_1>,手机号<PHONE_1>,地址<ADDRESS_1>。",
"mapping": {
"<PERSON_1>": "张三",
"<PHONE_1>": "13812345678",
"<ADDRESS_1>": "北京市朝阳区建国路88号"
}
}
What this shows
- Raw sensitive fields stay local while the outbound payload becomes deterministic placeholders.
- The mapping remains available on the local side so restored output can stay readable for the user.
- The same local bridge can then be reused by Python apps, HTTP clients, or the OpenClaw plugin.
Integrations
Designed for where agents actually run.
The homepage keeps the shape simple. Full config, auth, and API details live in Docs.
OpenClaw plugin
Use YinShield as a thin privacy tool layer inside OpenClaw. Keep the plugin small and the masking engine in Python.
{
"plugins": {
"entries": {
"openclaw-yinshield": {
"enabled": true,
"config": {
"baseUrl": "http://127.0.0.1:27811",
"mode": "placeholder",
"authToken": "change-me"
}
}
}
}
}
See the full OpenClaw integration guide →
HTTP bridge
Bridge any local runtime with a simple API. This is the cleanest path for agent frameworks that do not want a Python dependency inside the host process.
POST /health
POST /mask
POST /unmask
POST /messages/mask
OpenAI-compatible clients
Wrap chat and responses flows with automatic masking, unmasking, streaming support, and provider compatibility through base_url.
client = ShieldedOpenAI(
api_key="...",
base_url="https://api.openai.com/v1"
)