Guardrails, limits and the envelope
Everything on this page attaches to a resource group, and two rules decide how the layers combine (Resource groups):
- Limits and policies compose restrictively, downward. The organisation’s budget and guardrails apply to every AI System under it, and nothing set on a system can loosen them. A system can only add tighter rules.
- Resources compose additively, gated by
inherit_resources, as on Create the AI System.
So the company-wide floor goes on Borealis Consumer Finance AB, and only what is
specific to the screening agent goes on the Brutor Demo System. All of it is
setup.py steps 3, 11 and 12.
Guardrails
Section titled “Guardrails”Two configs. The baseline, on the organisation, reaches both AI Systems by inheritance:
| Config | Bound to | Check | Action | Surfaces |
|---|---|---|---|---|
| Borealis Baseline Guardrails | the organisation | prompt injection | block | chat_input, mcp_output, a2a_inbound |
| secrets | block | chat_input, mcp_input |
||
| Brutor Demo Screening Guardrails | both AI Systems | banned words: “guaranteed approval”, “pre-approved”, “no credit check” | block | chat_output |
curl -X POST http://localhost:5050/v1/admin/guardrails/configs \ -H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \ -d '{ "name": "Brutor Demo Screening Guardrails", "description": "Marketing claims banned on model output. PII detection is off: letters carry the applicant'\''s name.", "enabled": true, "group_ids": ["group-01M61N376V2RR6J2TV7Q7EVRET", "group-01M61N37B05BXZ6H95P9NSAXXB"], "surfaces": {"chat_input": false, "chat_output": true, "mcp_input": false, "mcp_output": false, "skill_input": false, "skill_output": false, "a2a_inbound": false, "a2a_outbound": false, "...": false}, "builtin": { "prompt_injection_enabled": false, "jailbreak_enabled": false, "pii_enabled": false, "toxic_content_enabled": false, "secrets_enabled": false, "banned_words": ["guaranteed approval", "pre-approved", "no credit check"], "banned_words_surfaces": ["chat_output"], "banned_words_per_surface": {"chat_output": {"enabled": true, "action": "block", "words": ["guaranteed approval", "pre-approved", "no credit check"]}} } }'Two choices are worth explaining:
- Prompt injection is blocked on
mcp_output, not only on model input. The applications are third-party text; one demo sample carries an injection in its loan purpose, and the guardrail stops it asintakereads it, before any model sees it. - PII detection is off. The customer letter must carry the applicant’s name. Redacting
it would break the product, and blocking it would block every run. The decision is
documented on the config, and the system is flagged
sensitive_datainstead, so the bureau reads are sealed as evidence.
A blocked call returns 403 guardrail_blocked; the agent treats it as the application’s
failure (Failures). Reference: Guardrails.
Admin UI: Governance → Guardrails.
Budgets and rate limits
Section titled “Budgets and rate limits”| Limit | Organisation | Demo System | Fraud Screener |
|---|---|---|---|
| LLM budget | 50 USD/day, 1,000 USD/month | 15 USD/day, 300 USD/month, warning at 80% | 2 USD/day, 40 USD/month |
| Requests per minute | 120 | 60 | |
| Concurrency | 4 | 2 | |
| MCP calls per hour | 2,000 | 600 | |
| Skill executions per day | 500 |
curl -X PATCH http://localhost:5050/v1/admin/resource-groups/$G/llm-global-limits \ -H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \ -d '{"llm_global_limits": { "budget": {"daily_limit_usd": 15.0, "monthly_limit_usd": 300.0, "daily_warning_percent": 80, "monthly_warning_percent": 80}, "throughput": {"max_requests_per_minute": 60}, "concurrency": {"max_concurrent": 2}}}'
curl -X PATCH http://localhost:5050/v1/admin/resource-groups/$G/mcp-global-limits \ -H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \ -d '{"mcp_global_limits": {"frequency": {"max_calls_per_hour": 600}}}'
curl -X PATCH http://localhost:5050/v1/admin/resource-groups/$G/skill-global-limits \ -H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \ -d '{"skill_global_limits": {"execution": {"daily_limit": 500}}}'The effective limit is the minimum along the chain, so the system’s tighter numbers win.
An exceeded limit returns 429 with Retry-After, which the agent treats as the system’s
failure and backs off; approaching a threshold adds an X-Usage-Warning response header.
Size budgets from real runs: the demo’s first live day hit an earlier 5 USD cap at 21:48.
Reference: Budgets, quotas & rate limits. Admin UI:
Resource Groups → Brutor Demo System → Governance → Limits.
The operating envelope
Section titled “The operating envelope”Limits are per group and per time window. The operating envelope is per run, and is part of the AI System’s contract:
curl -X PUT http://localhost:5050/v1/admin/ai-systems/$G/envelope \ -H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \ -d '{"operating_envelope": { "max_cost_per_run_usd": 0.50, "max_llm_calls_per_run": 6, "max_tokens_per_run": 60000, "max_delegation_depth_per_run": 2, "max_duration_seconds_per_run": 300, "max_avg_cost_per_completed_task_usd": 0.15, "min_completion_rate": 0.9, "max_error_rate": 0.1, "max_approval_escalation_rate": 0.5}}'The terms are of two kinds:
| Kind | Terms | What happens |
|---|---|---|
| Enforced per-run caps | max_cost_per_run_usd, max_llm_calls_per_run, max_tokens_per_run, max_delegation_depth_per_run, max_duration_seconds_per_run |
The gateway stops the run mid-flight: the next call answers 429 run_cap_reached |
| Graded bounds | max_avg_cost_per_completed_task_usd, min_completion_rate, max_error_rate, max_approval_escalation_rate |
Never block traffic; the Assurance Report marks each met, breached or insufficient evidence |
The per-run caps are the only controls that stop a runaway loop during the run: a rate
limit only slows a loop down, and a budget stops it only after it has spent the day’s
allowance. The screening agent has no loop and makes two model calls per run, so a cap of
six is generous, and hitting it would mean the code changed. GET .../envelope returns the
terms the gateway knows (known_terms); setup.py drops any it does not.
Admin UI: AI Systems → Brutor Demo System → Contract → Operating envelope.

Liveness
Section titled “Liveness”An agent that silently stops is the failure nobody notices. The screening agent runs every ten minutes, so it declares a continuous expectation:
curl -X PUT http://localhost:5050/v1/admin/ai-systems/$G/liveness \ -H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \ -d '{"mode": "continuous", "window_seconds": 1800, "grace_seconds": 600, "expected_min_runs": 1, "enabled": true}'At least one run every 30 minutes, with 10 minutes’ grace, or a liveness finding is raised.
The fraud screener only runs when called, so it is on_demand. The liveness decision is a
gate requirement for going active. Details: Liveness.
Response policy
Section titled “Response policy”Detection can act. A response policy lowers the system’s autonomy when it drifts:
curl -X POST http://localhost:5050/v1/admin/ai-systems/$G/response-policies \ -H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \ -d '{ "name": "Drift downgrades autonomy to approval_required", "description": "Art 9 risk management: high or critical drift moves the system to approval_required until a human restores it.", "enabled": true, "signal_kind": "drift", "severity_at_least": "high", "actions": [{"kind": "set_autonomy", "level": "approval_required"}], "allow_suspend": false, "require_human_to_restore": true, "response_cooldown_seconds": 3600 }'After a high drift, every governed action the agent attempts is held for a human until
someone restores autonomy. The agent needs no code for this: the holds arrive as 202 (or,
for a skill run, skill_error_202: approval_required), and the agent classifies them as a
system condition and backs off rather than counting them against applications. Policies
never loosen, suspension is opt-in, and restore is always human.
Details: Autonomy & response.
Continuous checks
Section titled “Continuous checks”Deterministic checks run against every run and route to the Inbox:
| Check | Expression | Severity |
|---|---|---|
| A guardrail fired inside a screening run | run.guardrail_block_count > 0 |
critical |
| Delegation deeper than the envelope | run.max_delegation_depth > 2 |
critical |
| An argument policy denied a tool call | run.policy_denial_count > 0 |
warning |
curl -X POST http://localhost:5050/v1/admin/assurance-checks/compile \ -H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \ -d '{"expression": "run.guardrail_block_count > 0", "output": "boolean"}'
curl -X POST http://localhost:5050/v1/admin/assurance-checks \ -H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \ -d '{ "name": "Screening run: guardrail fired", "description_nl": "A guardrail fired inside a screening run.", "scope": {"ai_system_ids": ["group-01M61N376V2RR6J2TV7Q7EVRET"]}, "tier": "deterministic", "evaluator": {"expression": "run.guardrail_block_count > 0"}, "output": "boolean", "threshold": {"kind": "value", "op": "eq", "value": true, "severity": "critical"}, "route_to_inbox": true }'Compile the expression first: the compiler rejects an expression it cannot evaluate before the check exists. More in Mission Control → Continuous checks.


