Policy Engine
The Loyd Policy Engine provides governance verification that goes beyond per-action authorization. While Agent Authorization checks whether an agent can use a tool, the Policy Engine verifies that a sequence of actions complies with your organization's policies.
The Policy Engine is available on Growth and Enterprise plans.
Why Cross-Step Verification Matters
Traditional per-action authorization sees one tool call at a time. It cannot detect:
- Budget overruns: Five individually-cheap actions that together exceed the session budget
- Separation of duties: The same agent both approving and executing a payment across different steps
- PII + data residency: An agent accessing personal data in one step and sending it to an external endpoint in another
The Policy Engine tracks the full session state and evaluates constraints across all actions.
How It Works
Policy Packs
Policies are written in a simple declarative language and compiled into a constraint graph. Each policy pack contains one or more rules, and packs can be assigned at the tenant, app, or team level.
| Constraint | What It Enforces |
|---|---|
| Budget | Maximum cost per session, minute, hour, or day |
| Tool allowlist | Only specified tools can be used (supports wildcards) |
| Tool denylist | Specific tools are blocked |
| Rate limit | Maximum calls per time window, with optional cooldown between calls |
| Separation of duties | Different roles must be performed by different actors |
| PII guard | Detect and block/warn on personal data in tool parameters |
| Pattern match | Block or flag specific patterns in tool inputs |
Enforcement Modes
Each policy can run in one of three modes:
| Mode | Behavior |
|---|---|
| Enforce | Violations block execution. The agent receives a governance error and must adjust. |
| Warn | Violations are flagged but execution continues. Visible in audit logs. |
| Audit | Silent observation. Records what would have happened without any impact. |
Start with audit to understand the impact, then move to warn, then enforce when ready.
Execution Certificates
Every agent session that runs through the Policy Engine produces a signed Execution Certificate -- a tamper-proof record of which policies were checked, how many steps executed, whether all constraints passed, any violations or warnings, and total session cost.
Certificates can be independently verified and are stored for compliance auditing.
Smart Execution
MeetLoyd can automatically optimize how tasks are executed based on their nature.
Adaptive Execution Modes
| Mode | How It Works | When It's Used |
|---|---|---|
| Standard | Agent reasons step by step, calling tools as needed | Debugging, research, open-ended exploration |
| Plan-first | Agent creates a complete plan upfront, platform verifies it, then executes mechanically | Structured tasks: processing claims, generating reports, sending notifications |
For plan-first execution:
- The agent generates a structured plan describing all tool calls needed
- The Policy Engine verifies the entire plan before any execution begins
- If the plan violates a policy, the agent receives all violations at once and can fix everything in one revision
- Once certified, steps execute mechanically -- no additional reasoning needed
Plan-first mode can significantly reduce execution time and cost for structured, repeatable tasks. The platform selects the best mode automatically -- no configuration needed.
Graceful Fallback
If plan-first execution encounters an unexpected failure (a tool returns an error, external service is down), the platform automatically falls back to standard step-by-step execution. Your task always completes -- the mode is an optimization, not a gate.
Agent Self-Correction
The platform maintains a feedback loop that helps agents learn from past mistakes.
Lessons Learned
When agents receive corrections, encounter recurring failures, or trigger monitoring alerts, the platform records these as learning signals. On the next execution, relevant lessons are injected into the agent's context so it avoids repeating the same mistakes.
Recalibration
Agents can signal when their objectives seem outdated. Using the recalibration tool, an agent creates a review task for the team lead without pausing its own execution. The team lead reviews and updates the intent state if needed.
Structured Error Recovery
When a tool fails, the agent receives targeted guidance specific to that tool and error type, rather than a generic retry message. This includes what went wrong, what to try instead, and when to stop retrying and escalate.
Next: Learn about Compliance Verification for automated compliance checks across your organization.