Skip to main content

Agent Authorization

Every AI agent in the Truthlocks platform operates under a strict authorization model. Agents must be registered, assigned scopes, and create time-bounded sessions before they can take any action.

Authorization Flow

All agent authorization endpoints — scopes, sessions, and tools — have an interactive API playground. Open any endpoint in the Agent Sessions & Tools API reference and click Send to try it against the Sandbox.

Scope model

Scopes follow a hierarchical resource:action pattern. When an agent requests a session, it can only request scopes that were assigned at registration.

Defining Custom Scopes

Built-in Scopes

Session Management

Sessions provide time-bounded execution contexts with automatic expiry and optional IP allowlisting.

Creating a Session

Response:

Session Lifecycle

Terminating a Session

Tool Registration & Invocation

Agents can register tools they expose and invoke tools registered by other agents (subject to scope checks).

Register a Tool

Invoke a Tool

Every tool invocation is:
  1. Scope-checked — the session must have the required scope
  2. Rate-limited — per your plan’s tool invocation quota
  3. Audit-logged — full input/output recorded in the audit trail
  4. Metered — counted against your billing entitlements

Security Best Practices

Never embed session tokens in client-side code. Session tokens grant the full scope of the session and should be treated as secrets.
  1. Principle of least privilege — Request only the scopes needed for the current task
  2. Short-lived sessions — Use the shortest practical TTL (default: 1 hour)
  3. IP allowlisting — Restrict sessions to known network ranges
  4. Rotate credentials — Regenerate agent signing keys on a regular schedule
  5. Monitor trust scores — Set alerts when trust scores drop below thresholds
  6. Use the kill switch — Immediately revoke compromised agents

Next steps

MAIP policies

Runtime enforcement rules based on trust scores, scopes, and delegation depth.

Trust Scores

Continuous behavioral trust evaluation for agents.

Cross-Tenant Delegation

Allow agents to act across organizational boundaries.