About Agentegrity

Agentegrity is the AI agent security framework developed by Cogensec for measuring the structural integrity of autonomous AI agents. It scores agent integrity on three properties — Adversarial Coherence (AC), Environmental Portability (EP), and Verifiable Assurance (VA) — evaluated across four layers (adversarial, cortical, governance, recovery) to quantify how safely an agent behaves under adversarial and out-of-distribution conditions.

Agentegrity Framework Glossary

Agentegrity
The structural integrity of an autonomous AI agent — its measurable ability to remain aligned, coherent, and safe under adversarial, ambiguous, or out-of-distribution conditions.
Adversarial Coherence (AC)
An agent possesses 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. Weighted 40% of the Agentegrity score.
Environmental Portability (EP)
An agent possesses environmental portability if its integrity score is equivalent, within tolerance, across a defined set of deployment environments. Weighted 25% of the Agentegrity score.
Verifiable Assurance (VA)
An agent possesses verifiable assurance if its integrity state is represented by an attestation record satisfying completeness, tamper-evidence, non-repudiation, and chain integrity. Weighted 35% of the Agentegrity score.
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.
Endogenous Security
Security properties that originate inside the AI system — in its weights, training, and policies — rather than being applied externally through filters or guardrails.

Frequently Asked Questions about Agentegrity

What is Agentegrity?

Agentegrity is an AI agent security framework developed by Cogensec that measures the structural integrity of autonomous AI agents. It scores agents on three properties: Adversarial Coherence (AC), Environmental Portability (EP), and Verifiable Assurance (VA), evaluated across four layers — adversarial, cortical, governance, and recovery.

What is an AI agent security framework?

An AI agent security framework is a structured methodology for measuring, verifying, and improving the security posture of autonomous AI agents. Agentegrity is the first framework to score agents on endogenous (built-in) integrity rather than relying solely on external guardrails.

How is agent integrity measured?

Agent integrity is measured using the Agentegrity score: a weighted composite of Adversarial Coherence (40%), Verifiable Assurance (35%), and Environmental Portability (25%). These are the specification default weights and are configurable per deployment context.

What is endogenous security for AI agents?

Endogenous security means safety and integrity properties live inside the agent itself — in its training, weights, and decision policies — rather than being bolted on as external filters or guardrails. Agentegrity is the discipline of building structurally sound agents from the inside out.

How is Agentegrity different from LLM guardrails?

Guardrails are external filters that wrap an AI system at runtime. Agentegrity measures and improves the agent's own structural integrity so it remains safe even when guardrails fail, are bypassed, or are removed entirely. The two approaches are complementary: guardrails are reactive, Agentegrity is foundational.

Who created Agentegrity?

Agentegrity was developed by the Cogensec Security Research Lab as a public framework for measuring and certifying the integrity of autonomous AI agents across digital and physical domains.

Related Resources

About the Agentegrity Framework

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.

Supported Frameworks

  • Anthropic Claude Agent SDK
  • LangChain and LangGraph
  • OpenAI Agents SDK
  • CrewAI
  • Google ADK
  • Vercel AI SDK (TypeScript)

Canonical Event Stream

  • session_start
  • tool_call
  • tool_response (with channel: tool_response | peer_messages | retrieved_documents)
  • peer_message
  • session_end

Integrity Properties and Conformance Levels

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.

Key Resources

  • Documentation: https://agentegrity.cogensec.com/docs
  • Source repository (Apache 2.0): https://github.com/Cogensec/agentegrity-framework
  • Research paper: https://cogensec.com/research/agentegrity-framework
  • Full-text LLM bundle: https://cogensec.com/llms-agentegrity-full.txt
  • Focused llms.txt: https://cogensec.com/llms-agentegrity.txt

Glossary

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.

Frequently Asked Questions

What is Agentegrity?

Agentegrity (agent + integrity) is an open framework and discipline for measuring 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.

How does Agentegrity differ from AI guardrails?

Guardrails are exogenous: they sit outside the agent and try to filter inputs and outputs. Agentegrity is endogenous: it measures the agent's own structural integrity — whether it stays inside its declared profile, resists adversarial inputs, recovers cleanly, and holds its score across deployment environments. The two are complementary; Agentegrity does not replace guardrails.

Which AI agent frameworks does Agentegrity support?

Agentegrity ships 14 first-party adapters. Python: Claude Agent SDK, LangChain / LangGraph, OpenAI Agents SDK, CrewAI, Google ADK, AutoGen, Agno, and AWS Bedrock Agents. TypeScript: Claude Agent SDK, LangChain JS, OpenAI Agents SDK, CrewAI JS, Google ADK, and the Vercel AI SDK. Each adapter translates framework-native events into Agentegrity's canonical event stream; the four evaluation layers downstream are shared.

What are the four Agentegrity layers?

Adversarial (detects prompt injection, jailbreaks, sociolinguistic intent drift, exfiltration framings in incoming inputs), Cortical (scores whether the agent's output stays inside its declared AgentProfile), Governance (applies operator policy and baseline deviation rules), and Recovery (handles checkpoint rollback, session termination, operator handoff).

What are the Agentegrity integrity properties?

Three: Adversarial Coherence (AC), weighted 40%; Verifiable Assurance (VA), weighted 35%; and Environmental Portability (EP), weighted 25%. The weighted composite is assessed against four conformance levels: Level 1 Aware, Level 2 Managed, Level 3 Verified, Level 4 Autonomous.

What is the Agentegrity attestation chain?

Every evaluation produces a record whose prev_hash field equals sha256 of the previous record. The chain is verifiable end-to-end at session close, providing non-repudiation of what the agent did and what each layer concluded. Records can be optionally signed using Ed25519 + JWS via the crypto extra.

What is the difference between measure-only and enforce mode?

Measure-only is the default: layers score and record events but never block tool calls. Setting enforce=True (Python) or enforce: true (TypeScript) on the adapter upgrades detected violations to active refusals. Most production deployments measure first, calibrate baselines, then enforce.

Is Agentegrity open source?

Yes. The full framework, specification, and reference adapters live at https://github.com/Cogensec/agentegrity-framework under the Apache 2.0 license. Cogensec maintains the project and ships an optional commercial agentegrity-pro receiver for enterprise deployments.

How do I install Agentegrity?

Python: pip install agentegrity (with optional extras like [crypto], [embedding], [adversarial_llm]). TypeScript: npm install @agentegrity/client plus the adapter for your framework, for example @agentegrity/langchain or @agentegrity/openai-agents. See the Quickstart at https://agentegrity.cogensec.com/docs/quickstart.

Who created Agentegrity?

Agentegrity was created by Cogensec, an AI security and research company and member of the NVIDIA Inception Program. The founding research paper, "Agentegrity: A Framework for Measuring Structural Integrity of Autonomous AI Agents Across Digital and Physical Domains" by Tarique Smith, is published at https://cogensec.com/research/agentegrity-framework.

Framework · Structural integrity for autonomous AI

Structural Integrity for Autonomous AI

Security that lives inside the agent — not around it. Measure, verify, and guarantee the integrity of AI systems across every domain.

4 architectural layers3 scored properties4 conformance levelsEd25519 attestation
0
Architectural layers
0
Scored properties
0
Conformance levels
PDA
Decision loop mapped
Ed25519
Signed attestations
24/7
Continuous evaluation
Adoption

Trusted by developers at these companies

OpenAI
Anthropic
ARM
Nvidia
Meta
Google
Watch

The Future of AI Trust Starts Within

Why structural integrity must live inside the agent — not around it.

Agentegrity — brand filmWatch

Open Source · Apache 2.0

Instrument your agent in 3 lines

Agentegrity is a measurement and verification library — not a guardrail. Drop it into your existing stack with zero config.

Or skip the adapter entirely: agentegrity.init() detects the frameworks you already have installed and attaches to them.

View on GitHub
Installpip install "agentegrity[claude]"
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions
from agentegrity.claude import hooks, report

async with ClaudeSDKClient(options=ClaudeAgentOptions(hooks=hooks())) as sdk:
    await sdk.query("Summarize the latest LLM safety papers")
print(report())
Measure-only by default — Agentegrity never blocks tool calls. Blocking only happens via explicit governance policy.Verify the install with python -m agentegrity doctor

Your data stays put

Prompts, model I/O, tool arguments, file paths and agent names never leave the process. Session export happens only when you configure a destination.

Measure, don't block

Produces evidence and Ed25519-signed, hash-chained decision records — tamper-evident and independently verifiable. Your governance policy decides what to do with them.

Bring your own framework

14 official adapters — eight for Python, six for TypeScript. Custom adapters via the SessionExporter interface.

Architecture

How Agentegrity Works

Four architectural layers that make security an endogenous property of the agent, not an external dependency.

01

Adversarial Layer

Continuous red-team testing embedded directly into the agent's reasoning pipeline, detecting prompt injection and manipulation in real time.

Learn more
02

Cortical Layer

Deep behavioral anchors that maintain agent identity and value alignment across context shifts, tool use, and multi-turn conversations.

Learn more
03

Governance Layer

Structural compliance verification and recovery mechanisms that operate without external monitoring dependencies.

Learn more
04

Recovery Layer

Baseline continuity and recovery capability: sustained degradation monitoring, checkpoint validation and chain integrity verification after a compromise.

Learn more
Core Thesis

Two approaches. One complete defense.

Exogenous Security

Monitor agents from the outside

Guardrails, input/output filters, and boundary monitoring. Observes API patterns, enforces rate limits, and filters content at the perimeter.

API call patterns and network traffic
Input/output content filtering
Rate limiting and access control
Internal reasoning chain corruption
Subtle behavioral drift over time
Cross-stage feedback attacks
Agentegrity
Endogenous Security

Observe reasoning from within

Cortical models and embedded defenses. Monitors the agent's own reasoning, detecting drift and corruption at the source.

Internal reasoning chain integrity
Behavioural drift detection
Cross-stage feedback monitoring
Value alignment state verification
Baseline continuity and recovery capability

Certain attack classes — particularly those exploiting internal reasoning — are invisible to boundary-only monitoring. Endogenous defenses are the necessary complement.

fig. 01 — perception / decision / actioncontinuous
Attack Surface

Map every stage of the decision loop

Every autonomous agent operates in a continuous Perception → Decision → Action cycle. The framework maps where attacks enter and where defenses must operate.

Perception

Sensor input, API responses. Entry point for injection and poisoning.

Decision

Reasoning and planning. Target of memory corruption and value drift.

Action

Tool calls, physical actuation. Source of cross-stage feedback attacks.

Cross-Stage Feedback Attacks

The most dangerous class: an adversary poisons tool outputs (Action) which feed back into Perception, corrupting subsequent Decision cycles. These are invisible to exogenous monitors.

Scoring

Three properties. One composite score.

AC

Adversarial Coherence

Under adversarial perturbation across every input channel, the agent's decisions stay within tolerance of its baseline behaviour.

Weight 40%
EP

Environmental Portability

The integrity score holds — within tolerance — across every deployment environment the agent runs in.

Weight 25%
VA

Verifiable Assurance

Integrity state is captured in Ed25519-signed, hash-chained attestation records: complete, tamper-evident, non-repudiable.

Weight 35%
Formula

Weighted composite across three properties

Adversarial coherence carries the highest weight — but all three properties matter. Weights are configurable per deployment context.

A=0.40·AC+0.25·EP+0.35·VA

Weights
AC40%
EP25%
VA35%

Spec default weights. Deployments may reweight per context.

Certification

From aware to autonomous

1
Level 1

Aware

Agent profile defined, adversarial layer active, integrity scoring operational. Baseline established.

2
Level 2

Managed

All four layers active. Continuous monitoring with policy enforcement, human escalation paths and audit trails.

3
Level 3

Verified

Cryptographic attestation operational, formal property verification implemented, automated red teaming running continuously, cross-environment evaluation documented.

4
Level 4

Autonomous

Self-healing integrity responses, adaptive policy engine, proven cross-environment portability, continuous adversarial adaptation from live data.

Physical AI

When AI controls real-world systems

Agentegrity extends beyond digital agents. When AI drives robotic systems, autonomous vehicles, or drones, three novel threat classes emerge.

Vehicles Robotics Drones IoT

Prompt-to-Physical

Adversarial prompts that cross the digital-physical boundary, causing embodied agents to take harmful real-world actions through manipulated reasoning.

Actuation Hijacking

Direct manipulation of an agent's physical actuators — motors, grippers, valves — bypassing its decision-making pipeline entirely.

Sim-to-Real Transfer Attacks

Exploiting the gap between simulated training environments and real-world deployment to inject vulnerabilities during model transfer.

fig. 02 — cascade containmenttopology-aware
Multi-Agent

Contain failures before they cascade

When agents collaborate, a single compromise can cascade. Agentegrity tracks peer authority and per-role behaviour across the topology, and escalates a suspected cascade rather than acting on its own.

Peer authority

Every peer message or broadcast is checked to have come from an agent declared in the receiving agent's topology.

Role drift

An agent's observed action distribution is tracked against the baseline for its declared role. When two or more peers degrade together, the cascade is flagged for a human to decide on quarantine.

Get started

Security built in, not bolted on.

Read the founding manifesto or explore the full research framework behind the Agentegrity Score.