Agent permission infrastructure
Permission checks
before AI agents act.
AI agents are starting to buy, email, book, edit, browse, and access data. API keys identify the agent. BehalfID verifies what the agent is allowed to do before the tool runs. Denied actions fail closed.
Your AI assistant can now take real actions — send emails, make purchases, deploy code. BehalfID lets you decide exactly which ones are okay, and blocks everything else before it runs.
How BehalfID works
Every agent action passes through the permission layer — before it runs.
$ behalf verify
agent agent_claude_code
action deploy
vendor vercel.com
env production
checking passport_claude...
3 permissions active
DECISION denied
reason requires_approval
executed false
requestId req_K9mXp2qR
How it works
Verify first.
Execute second.
- 01
Action request
Before your agent runs a tool, it packages the action — who is acting, what action, which vendor, and any parameters like environment or resource path.
- 02
BehalfID verify
BehalfID evaluates the request against active permissions, blocked actions, allowed actions, resource or vendor constraints, approval requirements, and expiry before the executor is called.
- 03
Decision
A decision packet is returned:
allowed,denied, or approval required. The tool executes only whenallowedis true. - 04
Execute and audit
Allowed actions can continue to your tool. Denied actions stop before execution. Every verified decision is logged with a stable request ID and delivered via signed webhook.
Integration
Three lines between
request and execution.
Install the SDK, call behalf.verify() before your executor, and throw on denial. Works with any agent framework because the fail-closed check lives in your code, not in the model's memory.
No matter what tool your AI agent tries to use — browse, buy, deploy, email — it asks BehalfID first. You define the rules once. BehalfID enforces them automatically, every time.
const decision = await behalf.verify({
agentId: "agent_claude_code",
action: "deploy",
vendor: "vercel.com",
});
if (!decision.allowed) {
// Blocked — reason logged, webhook fired
throw new Error(decision.reason);
}
// Deploy only runs when decision.allowed === trueDeploy approvals
From zero to enforced
in five minutes.
The first thing most teams wire up: a coding agent that can deploy to staging freely, but must pause for human approval before touching production. BehalfID enforces this at the MCP boundary — where the tool call is made, not inside the model's memory.
The most common setup: your AI coding helper can update the test environment any time, but touching the live site requires your go-ahead first. Four steps, set up in under five minutes.
- 01
Set up two permissions
Staging allowed automatically. Production requires approval.
behalf permissions create agent_xxx \ --action deploy --resource vercel.com \ --blocked "deploy to production" behalf permissions create agent_xxx \ --action deploy_production --resource vercel.com \ --requires-approval
AStaging — always allowedYour agent can push to the test environment freely, any time.
BProduction — ask me firstProduction deploys pause until you approve them in the dashboard.
- 02
Wire up MCP enforcement
One command writes
.mcp.jsonand the agent context file.behalf mcp init && behalf claude
One terminal command connects BehalfID to your AI agent's tools. No code changes to your agent needed.
- 03
Agent attempts production deploy — blocked
verify_action. BehalfID BehalfID returns Approval Required. The agent pauses and reports back to you.APPROVAL REQUIRED — do not execute this action. Action: deploy_production on vercel.com Approval ID: apr_Def456uvw Approve at: https://behalfid.com/dashboard/approvals
- 04
You approve — agent retries and deploys
One click in the dashboard opens a 30-minute grant window. The agent calls
verify_actionagain — nowallowed: true. The deploy runs. Every step is in the audit log.Click Approve in your dashboard. The agent retries automatically and the deploy goes through. Every step — the block, the approval, the deploy — is recorded in the audit log.
Interactive demo
See the boundary decide.
Switch scenarios and run a trace. No real actions execute here.
agent_olliepurchasecoachella.com$742No active purchase permission.falseThe full sandbox has more scenarios. Open sandbox →
Ready
Add the permission check.
Enforcement is fail-closed where you integrate it — via SDK or MCP. Manual passport mode is best-effort for testing with existing agents before you build the integration.