Skip to content

Guardrails & Safety

Squad is designed for high-stakes sectors where AI actions need oversight. Guardrails are layered throughout the system: from query classification to tool execution to response delivery.

Defence in Depth

Security isn’t a single checkpoint; it’s woven into every stage of the processing pipeline:

LayerWhat It Does
Risk-Aware RoutingHigh-risk queries without a strong similarity match to a proven template are declined automatically
Security ReviewDeterministic detection of dangerous operations: applied to every generated query regardless of user role
Role-Based Access ControlPermission checks before every tool call: write operations require admin privileges
Quality ReviewDetects empty results, low scores, missing entities, and tool errors before a response is delivered
Human-in-the-LoopManual approval and rejection of queries and workflows before they become reusable templates
AuthenticationAll API endpoints require authentication unless explicitly whitelisted
Audit TrailEvery interaction is logged with a correlation ID for full traceability

Risk-Aware Routing

Users or administrators can assign a risk level to queries. This affects how Squad handles uncertainty:

Risk LevelSimilarity MatchAction
Low/MediumAnyProceed normally
HighStrong matchUse approved template
HighNo strong matchDecline: no execution

Security Review

The reviewer performs deterministic security checks on every generated query. Dangerous patterns are blocked regardless of user role: this is not LLM-based and cannot be bypassed.

Role-Based Access Control

Squad enforces granular permissions at two levels:

API-Level Permissions

Each endpoint declares its required permissions. Standard users can execute queries and view results; elevated roles can manage the knowledge base, approve queries, and access administrative functions.

Tool-Level Access

Tools have risk-based access controls. Read-only tools are available to all authenticated users. Write operations require administrator privileges.

Human-in-the-Loop

Two surfaces provide manual oversight:

Tune Page

The admin control plane for managing the system’s learned knowledge:

  • Pending: queries awaiting approval; approve to make them reusable templates
  • Approved: active templates with reuse statistics
  • Declined/Rejected: queries that were blocked or rejected
  • Workflows: saved workflow templates that can be revoked or restored

Review Panel

Available in the artifact panel during chat sessions:

  • View pending review items for the current session
  • Approve, reject, or amend query results
  • Amendments are saved with corrections for future use

Audit Trail

Every query execution generates a unique correlation ID that flows through all logging and event emission:

  • Structured logs with session, user, and event type metadata
  • Real-time event stream includes correlation IDs for client-side tracing
  • Persistent records track every interaction for compliance and investigation

Next Steps