an on-premise guardrail proxy between a practitioner's tools and a commercial model
Start with a scenario or type your own note below
More

Two flags apply only to a recipient outside the agency: I10 (tells the recipient something the client did not agree to share) and I14 (names a protected child or young person to someone outside the agency). For the client's care team, I10 is read within the recipient's role (a draft reading).

Use this from your own application

SoCareGuard is an OpenAI-compatible endpoint. Point any client at it and add one header naming the policy pack.

from openai import OpenAI
client = OpenAI(base_url="https://kwanhui-socareguard.hf.space/v1", api_key="not-required")
reply = client.chat.completions.create(
    model="openai/gpt-4.1-mini",
    messages=[{"role": "user", "content": "Summarise this note...\n\n<case note>"}],
    extra_headers={"X-SoCareGuard-Pack": "domestic-violence", "X-SoCareGuard-Actor": "sw-042"},
)

The same with curl, and two calls that the panel uses: the list of policy packs, and a replay of a shipped scenario's recorded reply (no model provider call; the guard and the screen run live).

curl https://kwanhui-socareguard.hf.space/v1/packs
curl https://kwanhui-socareguard.hf.space/v1/chat/completions -H "Content-Type: application/json" -H "X-SoCareGuard-Pack: disability" -d '{"replay_scenario": "uc4-over-caution-override", "replay_model": "openai/gpt-4.1-mini", "messages": [{"role": "user", "content": "<the scenario instruction and note>"}]}'

The reply carries a socareguard object with the decision, the flags (evidence and rewrite already restored), the event stream, every recipient of what left the premises, the session token that opens the session's identity map, and the row of the record. X-SoCareGuard-Audience: internal|external sets the recipient instead of reading it from the instruction. A request without X-SoCareGuard-Pack runs the deployment's default pack, and its response carries the header X-SoCareGuard-Pack-Defaulted: true. GET /v1/ledger?session=… lists the rows of the record. GET /v1/ledger/verify recomputes its chain. DELETE /v1/sessions/… purges a session's identity map and records that it did.