Agentegrity (agent + integrity) is an open framework, discipline, and reference implementation for measuring and verifying the structural integrity of autonomous AI agents. Created by Cogensec and released under Apache 2.0, it instruments an existing agent loop with four cooperating evaluation layers (adversarial, cortical, governance, recovery) and emits a tamper-evident, hash-chained record of every reasoning step.
Three integrity properties — Adversarial Coherence (AC, 40%), Verifiable Assurance (VA, 35%), Environmental Portability (EP, 25%) — produce a weighted composite score, assessed against four conformance levels: Level 1 Aware, Level 2 Managed, Level 3 Verified, Level 4 Autonomous.
- Agentegrity
- Open framework and discipline (agent + integrity) for measuring the structural integrity of autonomous AI agents. Created by Cogensec, released under Apache 2.0. Complements exogenous guardrails with endogenous, measurable security properties.
- Adversarial Coherence (AC)
- Agentegrity property. An agent has adversarial coherence if, for a defined set of adversarial perturbations applied across all input channels, its decision function produces outputs within tolerance of its baseline behavior. Covers prompt injection, jailbreaks, intent drift, and exfiltration framings arriving via tool responses, peer messages, or retrieved documents.
- Environmental Portability (EP)
- Agentegrity property. An agent has environmental portability if its integrity score is equivalent, within tolerance, across a defined set of deployment environments — including moves between digital and physical domains.
- Verifiable Assurance (VA)
- Agentegrity property. An agent has verifiable assurance if its integrity state is represented by an attestation record satisfying completeness, tamper-evidence, non-repudiation, and chain integrity.
- Cortical Layer
- One of Agentegrity's four evaluation layers. Scores whether the agent's own output stays inside the capabilities, scope, and constraints declared in its AgentProfile.
- Adversarial Layer
- Agentegrity layer that inspects incoming inputs (tool responses, peer messages, retrieved documents, user prompts) for prompt injection, jailbreak prefixes, exfiltration framings, and sociolinguistic intent drift.
- Governance Layer
- Agentegrity layer that applies operator-defined policy: rate limits, denylists, required approvals, structured deviations from a BaselineStore baseline. Policy rules are testable code rather than free-form prompts.
- Recovery Layer
- Agentegrity layer that watches for unrecoverable agent states and triggers checkpoint rollback, session termination, or operator handoff via FileCheckpoint or KMSCheckpoint.
- Attestation Chain
- Tamper-evident, hash-chained record produced by Agentegrity. Each evaluation record sets prev_hash = sha256(prior record), allowing end-to-end verification at session close. Records can be optionally signed via Ed25519 + JWS.
- Canonical Event Stream
- The five normalized event types every Agentegrity adapter emits: session_start, tool_call, tool_response, peer_message, session_end. Decouples the layer pipeline from any specific agent framework.
- PDA Loop
- Perception-Decision-Action loop. The attack-surface model Agentegrity uses to map where adversarial influence can enter an agent's reasoning process.
- Measure-only Mode
- Default Agentegrity operating mode. Layers score and record events but never block tool calls. Used for baseline calibration before enforcement.
- Enforce Mode
- Agentegrity operating mode enabled by setting enforce=True (Python) or enforce: true (TypeScript) on the adapter. Upgrades detected violations from recorded events to active refusals.
- AgentProfile
- Agentegrity declaration of an agent's allowed capabilities, scope, and safety constraints. Used by the cortical layer to score whether each step conforms.
- Conformance Levels
- The four Agentegrity conformance levels: Level 1 Aware, Level 2 Managed, Level 3 Verified, Level 4 Autonomous. An ascending maturity ladder rather than a pass/fail grade, assessed against the three properties (AC, EP, VA) and the four evaluation layers.