WitnessAI Documentation
List
Start Here
Start Here
Analytics
Analytics
Conversations
Conversations
Users
Users
Alerts
Alerts
Policy
Policy
Administration
Administration
Apps & Resources
Apps & Resources
Release Notes
Release Notes
Administrator Guide
Administrator Guide
Guardrail Studio: Save, Share & Export
Save a guardrail to keep it and share it with your team. Export it as JSON to keep a copy or move it elsewhere, and import JSON to bring a guardrail in.
Save as Template
Save as Template in the header keeps your guardrail.
- Click Save as Template.
- Enter a Template Name. It defaults to the guardrail's name.
- Choose an Industry Category.
- Click Save Template.
The name decides what gets saved:
- Same name as the guardrail: saves your changes to that guardrail.
- Different name: saves a new copy under that name, and leaves the one you're editing as it was.
Saved guardrails appear in the sidebar every time you open the Studio, and in the template library under Custom.
What is kept, and where
Item | Kept |
Guardrails created with Guided Setup | Saved automatically |
Guardrails created from a template, blank, by import, or by Ask AI, and later edits to any guardrail | Only after Save as Template |
Renaming or deleting a saved guardrail | Saved immediately |
Live Testing history, test cases, version history | In your browser only (on this computer and browser) |
Note: Saved guardrails and custom templates are shared with everyone who uses Guardrail Studio in your organization, and they're identified by name. Saving under a name that already exists replaces that guardrail for everyone, and renaming or deleting one affects everyone. Agree on names with your team.
To keep test cases and results beyond this browser, download them. See Guardrail Studio: Evaluate & Refine.
Export a guardrail
Download config JSON saves
{guardrail_name}.json with the name, the Context (purpose) and the rules:{ "name": "Airline Support", "purpose": "Customer-facing chatbot for an airline's passengers…", "rules": [ { "name": "Customer Queries", "action": "allow", "behaviors": [ { "name": "Flight Status", "definition": "User asking about departure times, delays or gates" } ] }, { "name": "Restricted", "action": "block", "behaviors": [ { "name": "Refund Requests", "definition": "User requesting a refund or compensation" } ], "blockMessage": "Please contact our refunds team." } ] }
About the exported file:
- A Warn rule's message is written to both
warnMessageandblockMessage. - Intention names are simplified on export:
&becomesand, and other punctuation becomes a space. "Health & Legal" is exported as "Health and Legal". - The built-in protection settings aren't included in this file.
View Payload (
</>) shows the same JSON. You can copy it, or edit it and click Save to replace the guardrail's Context, rules and settings. The name is kept.From the template library, Download saves a single template with all its settings, and Download all saves every built-in template in one file for reference.
Import a guardrail
There are two import routes, and they treat files differently.
Route | Accepts | Keeps the file's name and settings |
Upload JSON / Paste JSON on the welcome screen | One guardrail: an object with a rules array, plus optional name, purpose and settings (input, output, jailbreakProtection, riskAnalysis, precedence) | Yes |
+ → Upload / Paste JSON in the sidebar, and Upload in the template library | { "purpose": …, "rules": [ … ] }, or several guardrails as { "instances": [ … ] } | Only in the instances form. A single guardrail is named Imported Instance with default settings. |
Each rule needs an
action of allow, block, warn or route, and intentions as behaviors: [{ name, definition }]. The format Guardrail Studio uses elsewhere (intentions with a single message) is also accepted. Rules with an invalid action are skipped.Message | Meaning |
This is not valid JSON. / Invalid JSON — check syntax and try again | The text isn't valid JSON. |
This doesn't match the guardrail payload format. / Invalid config format | No rules array (or instances list) was found. |
No valid rules found in this payload. | Every rule was skipped. |
Note: A file from Download all can't be imported back as it is. Import templates one file at a time. Imported guardrails aren't saved until you use Save as Template.