Why a valid login is not the same as permission to act, and how PTERI checks identity, scope, and policy at the moment an agent tries to do something.

In this article, you will understand the difference between authenticating an AI agent and authorizing one of its specific actions, and how PTERI evaluates identity, delegated authority, and policy at the moment an action is requested — not just when a session begins.
Most systems check who an agent is once, at login, and then trust everything that agent does afterward. That works for a person reading a dashboard. It breaks down for an AI agent that can call tools, move data, or trigger workflows on its own, because a single valid session can be reused for actions nobody explicitly approved. An agent may have access without any proof that a specific action was authorized by a user or organization.
Prerequisites
Pseudocode — illustrative only. See docs.kakr.ai for real SDK and endpoints.
// Step 1: Identify the agent making the request
const identity = pteri.identify({ type: 'agent', credential: agentKey })
// Step 2: Define the action the agent is requesting
const request = { action: 'crm.export_records', resource: 'customer_data', count: 500 }
// Step 3: Authorize — PTERI evaluates identity, delegation, scope, and policy
const decision = await pteri.authorize({ identity, request, policy: 'data_export_policy' })
// Step 4: Act on the decision, not on the session alone
if (!decision.allowed) {
throw new Error('Insufficient authority: ' + decision.reason)
}
executeExport(request, decision.evidence)
Allowed
An agent with delegated authority scoped to "export up to 100 records per request" asks to export 80 records. Identity, delegation, and policy all check out, so the action is allowed and evidence is recorded.
Denied
The same agent later asks to export 5,000 records — outside its permitted scope. Runtime authorization denies the request before it executes, even though the agent authenticated successfully.