> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fastino.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use https://docs.fastino.ai/llms.txt to discover and navigate pages. Use https://docs.fastino.ai/llms-full.txt when you need the complete documentation corpus. Use https://docs.fastino.ai/openapi.json as the source of truth for customer-facing routes. For GLiDE decision inference, call POST https://api.fastino.ai/v1/systemone with model fastino/GLiDE. Do not infer undocumented routes. Read API keys from FASTINO_API_KEY and never embed credentials in code, logs, or reports.

# Build Policy and Safety Gates with GLiDE

> Evaluate proposed actions against supplied policy and route uncertain or high-risk cases to review.

Use GLiDE as a bounded decision layer before software performs an action. Supply the proposed action, relevant context, and policy together as state; define only outcomes your application can safely handle.

## Evaluate a proposed action

```python theme={null}
import os
import requests

state = {
    "proposed_action": {
        "tool": "send_email",
        "recipient": "customer@example.com",
        "content": "Your refund has been approved."
    },
    "context": {
        "refund_status": "pending_manager_approval",
        "customer_verified": True
    },
    "policy": {
        "rule": "Do not communicate approval until manager approval is recorded."
    }
}

response = requests.post(
    "https://api.fastino.ai/v1/systemone",
    headers={"X-API-Key": os.environ["FASTINO_API_KEY"]},
    json={
        "model": "fastino/GLiDE",
        "state": state,
        "questions": {
            "action": {
                "type": "choice",
                "instructions": "What should happen to the proposed action under the supplied policy?",
                "criteria": {
                    "execute": "The action is clearly allowed and can proceed",
                    "request_approval": "The action requires human approval before execution",
                    "revise": "The action can proceed only after its content or parameters change",
                    "block": "The action conflicts with policy and must not proceed"
                }
            }
        }
    },
    timeout=300,
)
response.raise_for_status()
answer = response.json()["answers"]["action"]
```

## Fail safely on uncertainty

```python theme={null}
if answer["choice"] == "execute" and answer["confidence"] >= 0.7:
    execute_action()
else:
    require_review(answer)
```

Treat the example threshold as a starting point only. Validate thresholds on representative cases, and default uncertain outcomes to the safer review path.

## Design the gate

* Include the exact policy text and all facts needed to apply it.
* Use an object for state so actions, context, permissions, and policy remain clearly labeled.
* Define outcomes that map directly to application behavior.
* Include approval or review as an explicit outcome.
* Keep irreversible execution outside the model call; application code enforces the result.
* Log the supplied state, selected outcome, probabilities, and final application action according to your data-handling policy.

<Warning>
  Use GLiDE as decision support, not as the sole authority for irreversible or high-impact decisions involving safety, legal rights, employment, credit, healthcare, or access control. Validate on representative data and preserve a qualified human-review path.
</Warning>

<Card title="Call GLiDE" icon="terminal" href="/inference/systemone">
  Review the complete request contract, limits, confidence behavior, and errors.
</Card>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.