Inspiration
AI agents are increasingly capable of taking autonomous actions, but their ability to act has evolved faster than our ability to verify and control those actions.
Through my security research on AI agents, particularly authorization mechanisms and execution boundaries, I identified a fundamental problem: permission to perform an action does not necessarily mean that the action aligns with the user's intent.
Similarly, an agent reporting success does not prove that the intended outcome actually occurred.
IntentDiff was inspired by the gap between what an agent intends, what it executes, and what actually changes.
What it does
IntentDiff is a state-aware execution integrity layer designed to make autonomous AI agents accountable, verifiable, and recoverable.
Instead of relying solely on prompt-based guardrails or individual tool permissions, IntentDiff introduces an independent verification mechanism across the entire execution lifecycle.
It compares three fundamental elements:
- Intent: What the user wants to achieve.
- Predicted effects: What the proposed execution plan is expected to change.
- Observed effects: What actually changes in the underlying system.
IntentDiff is designed to detect discrepancies between these elements, enforce constraints, prevent unauthorized state changes, and provide structured evidence of execution outcomes.
How it works
The architecture is built around seven core components:
- Intent Contract: Translates natural language requests into structured, verifiable objectives and constraints.
- State Projection: Calculates the expected effects of an execution plan before any mutation occurs.
- Invariant Engine: Evaluates proposed changes against security policies and protected system properties.
- Approval Gate: Binds human approval to a specific execution plan and relevant system state.
- Execution Coordinator: Controls and records permitted state-changing operations.
- Independent Verifier: Validates actual outcomes using system state rather than trusting agent-generated success messages.
- Compensation Engine: Handles partial failures and safely reverses eligible changes when possible.
The initial use case is an AI-powered repository maintenance agent that operates on a persistent issue-management environment.
However, the underlying approach is designed to extend beyond repository management.
CrashLab: Testing accountability
An agent should be evaluated not only by how often it succeeds, but also by how it behaves when something goes wrong.
CrashLab is our controlled evaluation environment for testing execution integrity under adverse conditions, including:
- Prompt injection
- Intent misinterpretation
- Unauthorized state changes
- Stale approvals
- Approval replay
- Partial execution failures
- Unexpected system state changes
- False success reporting
- Recovery conflicts
The evaluation compares direct agent execution, permission-based execution, and IntentDiff-protected execution under equivalent conditions.
The objective is to measure whether accountability mechanisms can prevent unintended effects, detect execution failures, and provide reliable evidence of what occurred.
Technical approach
IntentDiff separates probabilistic reasoning from deterministic execution enforcement.
The language model proposes structured intentions and actions, while an independent runtime evaluates, authorizes, executes, and verifies those proposals.
The architecture uses Python, FastAPI, Pydantic, SQLite, and a web-based inspection interface. A dedicated testing framework supports controlled failure injection and reproducible runtime evaluation.
The language model is treated as a proposal generator, not as the ultimate authority on execution or system state.
Challenges
One of the fundamental challenges is translating ambiguous human intent into constraints that can be evaluated deterministically.
Other challenges include maintaining approval validity as system state changes, distinguishing execution failure from unknown execution outcomes, and implementing recovery without introducing additional unintended effects.
Rather than assuming that every operation can be safely reversed, IntentDiff treats compensation as a conditional operation that requires its own verification.
What we learned
Accountability cannot be achieved through logging alone.
An audit trail explains what happened, but a trustworthy execution system must also determine whether an action should happen, whether its expected effects match the user's intent, and whether its actual effects satisfy the original objectives.
Agent reliability is therefore not exclusively a model-level problem. It is also a systems engineering and security problem.
What's next for IntentDiff
Our longer-term vision is to develop IntentDiff into an extensible execution integrity layer for autonomous agents across different environments.
Potential extensions include:
- GitHub and external API integrations
- MCP-compatible execution adapters
- Multi-agent execution verification
- Custom policy and invariant definitions
- Agent accountability benchmarks
- Enterprise audit and compliance integrations
We believe autonomous agents should not simply be capable of acting. They should be capable of demonstrating that their actions were authorized, intended, and correctly executed.
AI agents propose. Reality decides.
Built With
- css3
- fastapi
- html5
- javascript
- pydantic
- python
- sqlite