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:| Decision | HTTP status | Behavior |
|---|---|---|
allow | Forwards with 200 from tool | Request is proxied immediately |
block | 403 | Request is rejected; reason returned |
require_approval | 202 | Action is queued; poll URL returned |
Workspace environments
Each workspace has anenvironment 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
| Role | Can do |
|---|---|
member | View audit logs, policies, approvals |
reviewer | All above + approve or deny approval requests |
admin | All above + manage policies, API keys, kill switch |
owner | All above + manage workspace members and billing |