Schema validation
Checks the incoming JSON shape before the request reaches model, agent, retrieval, or tool execution.
Guardrails
Apply policy actions such as block, warn, redact, or approve before risky downstream work runs.
Budgets
Limit rate, compute time, and retry amplification so runaway traffic stops early.
Audit
Records decisions, violation codes, traces, and payload evidence for review.
Copyable examples
Strict chat boundary
Use this when your app sends a simple prompt and you want unknown fields blocked.
{
"pipeline_lock": {
"contract_version": "1.0",
"mode": "enforce",
"schema": {
"strict": true,
"input_schema": {
"type": "object",
"required": ["prompt"],
"properties": {
"prompt": { "type": "string" }
},
"additionalProperties": false
}
},
"policies": {
"actions": {
"on_violation": "block",
"http_status": 400,
"include_violation_context": true,
"emit_event": true
}
}
}
}Valid: { "prompt": "Summarize this contract." }
Blocked: { "prompt": "Summarize this contract.", "debug": true }
Guardrails and budgets together
Use this when schema, policy, and cost controls should all run before the model call.
{
"pipeline_lock": {
"contract_version": "1.0",
"mode": "enforce",
"schema": {
"strict": true,
"input_schema": {
"type": "object",
"required": ["prompt", "user_tier"],
"properties": {
"prompt": { "type": "string" },
"user_tier": { "type": "string", "enum": ["free", "pro", "enterprise"] }
},
"additionalProperties": false
}
},
"policies": {
"actions": { "on_violation": "block", "emit_event": true },
"budget": {
"request_rate_per_minute": 60,
"max_compute_per_request_seconds": 120,
"retry_cost_multiplier_ceiling": 2.0
}
}
}
}Valid: { "prompt": "Draft a reply.", "user_tier": "pro" }
Blocked: { "prompt": "Draft a reply.", "user_tier": "trial" }
Workflow privacy boundary
Use this when a workflow fetches external data and must redact it before provider inference.
{
"workflow": "input -> mcp_input -> redact_text -> model -> output",
"redact_text": {
"fields": ["raw_tickets.text"],
"patterns": ["email", "phone_se", "personnummer_se", "orgnumber_se"],
"extra_patterns": ["\\+\\d{1,3}[\\s-]?\\d(?:[\\d\\s()-]{6,}\\d)"],
"replacement": "[REDACTED]"
},
"model": {
"deployment_id": "dep_support_summary",
"prompt_field": "raw_tickets.text"
}
}Inspect the workflow run and confirm model_request.messages contains redacted ticket text.
Agent tool boundary
Use this when an agent can call tools, but only through configured functions with loop and budget limits.
{
"agent": {
"deployment_id": "dep_reasoning_model",
"prompt_field": "question",
"max_iterations": 4,
"tools": [
{
"name": "lookup_account",
"description": "Fetch account context",
"input_schema": {
"type": "object",
"properties": { "account_id": { "type": "string" } },
"required": ["account_id"]
},
"function": {
"execution_type": "http",
"method": "POST",
"endpoint": "https://crm.internal/account",
"body_template": { "account_id": "{account_id}" }
}
}
]
}
}Inspect agent_steps to see each model request, tool call, function result, and final agent_output.