Guardrails

Guardrails check what goes into and comes out of your AI agents, and act on what they find. They run on work.studio's servers, so they apply whatever app or device the conversation comes from.

Where a guardrail checks

Point What is checked
User messages Before the message is searched, routed or sent to the model
AI answers Before the answer is shown or saved in the conversation history
Tool calls The tool and its arguments, before the tool runs
Tool results What a tool returned, before the model reads it
Retrieved knowledge Knowledge base and code search results, before they join the prompt

What a guardrail can do

Action Result
Block Stops the message or answer and shows the guardrail's message
Mask Replaces what matched, for example [EMAIL_REDACTED], and continues
Tokenize Hides the value from the AI model. You still see the original
Warn Lets it through and records a warning
Log only Lets it through and records it
Escalate Stops it and creates a review task. A tool call waits for approval

What a guardrail can check

  • Personal information: emails, phone numbers, card numbers, SSNs, IBANs, passport numbers, addresses and more
  • Secrets: API keys, tokens, private keys and database credentials
  • Prompt injection: attempts to override an agent's instructions
  • Content: blocked words, restricted topics and patterns. Moderation categories such as hate, harassment and violence, judged by a model
  • Format: length, language, JSON that matches a schema, required keys, links that resolve
  • Policy: which tools and models may be used, and request metadata
  • Your own logic: a webhook, a workflow, or an AWS Bedrock guardrail

Attach or enforce

  • Attach a guardrail to an agent on the agent's Safety tab. It then applies to that agent's conversations.

  • Enforce a guardrail for an environment to apply it to every AI call there. This covers every agent, workflow AI step and generator. If it also checks retrieved knowledge, documents are checked as they are indexed into a knowledge base. Users can't turn an enforced guardrail off. Enforcing needs the guardrail:manage permission.

Try a guardrail before you rely on it

  • Monitor mode records what each rule would have done, and changes nothing.
  • The Test tab runs the guardrail on sample text and shows each rule's verdict and timing.
  • Test cases are run when the guardrail is approved. Approval is refused if one fails.
  • Guardrail Activity, under Governance, lists every finding: what the rule asked for, what happened, and whether it took effect. The matched text itself is never recorded.