GuardrailAction

org.llm4s.agent.guardrails.GuardrailAction
See theGuardrailAction companion trait

Attributes

Companion
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

case object Block extends GuardrailAction

Block processing and return an error.

Block processing and return an error.

Use for security-critical violations where continuing would be dangerous (e.g., prompt injection, malicious content).

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
Block.type
case object Fix extends GuardrailAction

Attempt to fix the violation and continue.

Attempt to fix the violation and continue.

Use when automatic remediation is possible and safe (e.g., masking PII, truncating long text).

If the fix fails, falls back to Block behavior.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
Fix.type
case object Warn extends GuardrailAction

Log a warning and allow processing to continue.

Log a warning and allow processing to continue.

Use for monitoring or low-severity issues where blocking would be too disruptive (e.g., soft length limits, tone warnings).

The violation is recorded but does not stop execution.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
Warn.type

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete fields

Default action for security-sensitive guardrails.

Default action for security-sensitive guardrails.

Attributes