Skip to main content

Agent Security Architecture

What is Agent Security?

Agent Security delivers permissions-as-a-service for any Model Context Protocol (MCP) server. It acts as a proxy/gateway between AI agents and the resources they invoke, providing:

  • Fine-grained ReBAC (relationship-based access control) powered by Permit.io, OPA, and OPAL
  • Authentication & authorization that binds user, agent, MCP server, and downstream service identities
  • Comprehensive auditing covering every call, scope, and actor
  • Flexible delivery models that share identical policy semantics

A single URL switch yields consistent enforcement, instant visibility, and human-in-the-loop (HITL) approvals — no code changes to agents or servers.

Core Components

Key components:

  • Gateway: Managed proxy at *.agent.security
  • Permit.io PDP: Policy decision point for real-time authorization
  • Audit Store: Records every authorization decision
  • HITL service (coming soon): Issues approval links and manages step-up auth

Integration Patterns

Agent Security currently offers a hosted gateway deployment. Additional patterns are planned:

PatternWhen to UseHow It WorksStatus
Hosted GatewayFastest rollout; SaaS workloadsPoint agents/servers to https://<host>.agent.securityAvailable
Side-car / MiddlewareLow-latency, on-prem AIDrop a lightweight proxy library in front of the MCP serverComing soon
Hosting PlatformBuilding a multi-tenant MCP SaaSAgent Security baked into ingress; tenants consume via hosted endpointsComing soon

All patterns will share one control plane, policy model, and log format.

Policy Model

Trust-Level Access Control

Agent Security provides trust-level-based policy control where each tool is classified by risk:

  1. Low trust — read-only operations (get_*, list_*, read_*)
  2. Medium trust — write operations (create_*, update_*, send_*)
  3. High trust — destructive operations (delete_*, remove_*, destroy_*)

Trust levels are hierarchical: higher levels inherit all permissions from lower levels.

Planned Policy Enhancements (coming soon)

  • Organization Policy — control agent-type ↔ server-type pairings
  • Operation Approval — per-call HITL step-up
  • Org-Wide Constraints — DLP masks, region pinning, rate limits

Policy Architecture

Agent Security automatically generates Google-Zanzibar-inspired ReBAC (Relationship based Access Control) policies based on:

  • Defined roles for users and agents
  • MCP server resource instances
  • Role derivation from user consent to agent permissions

Authentication & Authorization

How it Works

When a user connects an MCP client through the gateway for the first time:

  1. The MCP client discovers the gateway's OAuth endpoints
  2. The user authenticates and completes the consent flow
  3. The user selects a trust level for the MCP server
  4. The gateway issues a JWT access token to the MCP client

On subsequent tool calls:

  1. The gateway verifies the JWT and identifies the agent
  2. The gateway checks Permit: "Can this agent call this tool on this MCP server?"
  3. Allowed calls are proxied; denied calls return an error

Sequence: First-Time Connection

Sequence: Authorized Tool Call

Deployment

Agent Security is currently available as a hosted gateway at *.agent.security. Each host (tenant) gets a unique subdomain with isolated policies, users, and sessions.

Planned Deployment Options (coming soon)

DeploymentLatency (P95)IsolationUpdates
Embedded WASM< 10 msPer-gatewayRego/Data via OPAL
Remote PDP10-30 ms RTTCentralizedHorizontal scale

Key Advantages

  • Single control point for authZ, audit, and anomaly detection
  • Drop-in — no code changes, SDK optional
  • Fine-grained ReBAC — captures true user-agent-resource relationships
  • Policy-as-code — Rego, GitOps, unit tests
  • Short-lived creds — minimize blast radius
  • HITL safety net (coming soon) — step-up approvals for risky ops
  • DLP hooks (coming soon) — mask/redact before LLM exposure

Roadmap

AreaNext Step
HITL ApprovalsConfigurable step-up approvals for sensitive operations
Enterprise SSOOIDC, SAML, LDAP integration
DLPClient-side classifiers, inline redaction
Secrets-on-DemandVault-backed token minting
Policy AnalyticsGraph-diff to flag over-permissioned agents
Chain-of-Trust MapReal-time visualization of user → agent → resource

Agent Configuration Examples

Below is an example of how different agents can be configured with various roles and permissions:

AgentAgent RolesOn behalf of (user ids)Agent TypeMCP Servers
Personal Assistantuser_assistant, task_manageruser_123chatgmail_mcp, figma_mcp
Team Botteam_assistant, meeting_schedulerteam_456_usersproactiveteam_mcp_1, team_mcp_2
Security Monitorsecurity_analyst, alert_managersecurity_team_789ambientsecurity_mcp_1, security_mcp_2
Code Review Botcode_reviewer, pr_assistantdev_team_101proactivedev_mcp_1
Data Analystdata_processor, report_generatoranalytics_team_202chatanalytics_mcp_1, analytics_mcp_2

Glossary

TermMeaning
MCPModel Context Protocol (tool/agent interoperability)
OriginatorHuman delegating authority
AgentAutonomous MCP client acting on behalf of the user
HITLHuman-in-the-loop
ReBACRelationship-based access control
OPALOpen Policy Administration Layer
OPAOpen Policy Agent