Skip to main content

Gateway Proxy

Agents send requests to the Sentrail gateway instead of directly to GitHub or Linear. Sentrail evaluates the action, then either forwards it, blocks it, or defers it for approval. Tool credentials are stored server-side and never exposed to agents.

Policy Engine

Policies are ordered rules that match on tool, action pattern, resource type, and risk level. The engine walks policies in priority order and returns the first match. If no policy matches, the action is allowed by default.

Approval Flow

When a policy returns require_approval, the action is queued. The original request — method, URL, headers, body — is stored in a deferred_actions row. After a reviewer approves, Sentrail replays the exact request to the tool API.

Kill Switch

A global kill switch blocks all write actions in a workspace immediately. Individual tools can also be paused without affecting others. Both states are checked at evaluation time and again before deferred execution.

Audit Logs

Every evaluated action produces an immutable audit log entry with: agent identity, tool, action, decision, matched policy ID, risk level, correlation ID, and a payload preview. Audit logs are append-only and RLS-protected.

Agent Identities

Agents are identified by the X-Agent-Id header. You can pre-register agent identities in the dashboard to enforce that unknown agents cannot call the gateway. Identities are linked to audit logs and approval requests.

Decision values

Every evaluated action produces one of three decisions:
DecisionHTTP statusBehavior
allowForwards with 200 from toolRequest is proxied immediately
block403Request is rejected; reason returned
require_approval202Action is queued; poll URL returned

Workspace environments

Each workspace has an environment of either test or live. Test workspaces run full policy evaluation — nothing is bypassed — but are labeled separately in audit logs and billing. Switch to live before deploying to production agents.

Role hierarchy

RoleCan do
memberView audit logs, policies, approvals
reviewerAll above + approve or deny approval requests
adminAll above + manage policies, API keys, kill switch
ownerAll above + manage workspace members and billing