Skip to main content
Paste in a messy bug description and get a clean, machine-readable report back. The schema guardrail rejects the agent’s output if it doesn’t conform to the declared JSON Schema — so every report has the same shape, every time.

What it demonstrates

  • schema guardrail with a required config block
  • Enforcing output contracts without post-processing
  • enum and maxLength constraints inside the JSON Schema declaration
  • Combining injection and schema guardrails on a single workflow

Run it

Override with your own bug description:

Workflow

docs/cookbook/structured-bug-reporter/workflow.yaml
The schema guardrail is the only guardrail in SirenSpec that requires a config block. Zero-config guardrails like injection and length can be declared as bare strings. Any guardrail that needs configuration uses the name: + config: object form.

How data flows

  1. The user’s freeform bug description is sent to reporter as the user message.
  2. reporter produces a JSON object conforming to the declared schema.
  3. The schema guardrail validates the output before it is written to output.bug_report. If the output is missing a required field or violates a constraint (e.g. severity is not one of the four allowed values), the guardrail raises a GuardrailViolation and the workflow fails.

Graph

Next steps

Guardrails

Full reference for injection, length, PII, schema, and cost-cap guardrails.

Content Moderation Pipeline

Nested workflows with injection and PII guardrails applied in layers.