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.

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

Layer What It Does
Risk-Aware Routing High-risk queries without a strong similarity match to a proven template are declined automatically
Security Review Deterministic detection of dangerous operations: applied to every generated query regardless of user role
Role-Based Access Control API permission checks on every request; agent tool-surface restrictions limit dangerous operations to administrators
Quality Review Detects empty results, low scores, missing entities, and tool errors before a response is delivered
Human-in-the-Loop Manual approval and rejection of queries and workflows before they become reusable templates
Authentication All API endpoints require authentication unless explicitly whitelisted
Audit Trail Every interaction is logged with a correlation ID for full traceability

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

Risk Level Similarity Match Action
Low/Medium Any Proceed normally
High Strong match Use approved template
High No strong match Decline: no execution

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.

Squad enforces access control at two levels:

Each endpoint declares its required permission. Both the user and admin roles carry full read and write API access (querying, reviewing, workflow execution). The admin role adds user management and system configuration. For the full permission reference, see Administration & Access Control.

Inside the AIM agent, a separate tool-configuration layer restricts which tools are available based on role. Standard users receive a safe tool preset that excludes graph-mutation and external-search tools; administrators receive the full set. This is independent of API permissions — a standard user can approve reviews through the API, but the agent will not execute destructive graph operations on their behalf.

Two surfaces provide manual oversight:

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

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

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