Intent Integrity — Intent Drift Prevention for Long-Running AI Agents
Intent Integrity — Keeping AI Agents Aligned With Their Original Goals
The Problem
Long-running AI agents can lose track of their original objectives, forget important constraints, act on stale information, or repeat external actions after ambiguous failures. Relying on an agent’s conversational memory alone is not sufficient to enforce critical restrictions.
Our Solution
Intent Integrity is an open-source Python framework designed to preserve authorized user intent and validate consequential actions throughout long-running AI tasks.
Instead of trusting an AI agent to remember every restriction, Intent Integrity introduces a deterministic validation layer between the agent and its registered tools. The agent proposes actions; trusted code determines whether those actions satisfy the configured authorization, evidence, and approval requirements.
Key Features
- Authorized Intent Contracts: Represent the original objective, constraints, allowed actions, required evidence, and approval conditions.
-
Deterministic Validation: Return
ALLOW,BLOCK, orREVALIDATION_REQUIREDbased on implemented policy checks. - Intent Drift Detection: Identify supported structural inconsistencies, unauthorized actions, invalidated assumptions, and plan errors.
- Persistent Context and Recovery: Use SQLite event history, checkpoints, and verified replay to reconstruct task state after interruptions.
- Guarded Tool Execution: Validate registered tool calls before invoking their underlying execution callbacks.
- Duplicate-Action Protection: Persist action claims and prevent duplicate execution attempts using the same action identity.
- External Outcome Reconciliation: Provide a framework for resolving uncertain operation outcomes before guarded retries.
- Evidence-Based Completion: Check task progress and acceptance criteria against host-supplied evidence.
-
Portable Integration: Include an Agent Skills-compatible
SKILL.mdand a minimal Model Context Protocol (MCP) stdio scaffold.
How It Works
- A trusted host authorizes the user’s objective and creates an intent contract.
- The AI agent proposes a plan and requests registered tools.
- Intent Integrity checks the proposed action against the authorized contract, current evidence, and approval requirements.
- Unauthorized actions are blocked; actions requiring refreshed evidence must be revalidated.
- Approved actions pass through the guarded execution boundary, with persistent state supporting recovery and reconciliation.
- Task completion is checked against recorded acceptance criteria and supplied evidence.
Technology Stack
Python, SQLite, JSON Schema, pytest, Ruff, mypy, GitHub Actions, and a minimal MCP stdio implementation.
Current Status and Limitations
The repository contains a working deterministic validation core, persistence and recovery mechanisms, guarded tool integration scaffolding, external outcome reconciliation, automated tests, and runnable examples.
This is an early-stage engineering project, not a production security certification. Universal natural-language drift detection, full MCP SDK conformance, independent agent-framework qualification, provider-specific production integrations, and comprehensive security evaluation require further development and verification.
Vision
Make long-running AI agents more reliable by separating model reasoning from trusted action authorization, preserving the user’s original intent, and requiring verifiable evidence before consequential actions and task completion.
Built with
AI tools
Prize Categories Entered
- Submitted

Best Open-Source AI Project