The Security Contract
for Autonomous Agents

An open standard for defining security boundaries of AI agents. Like README.md, but for security. Add an AGENTSECURITY.md to any agent project and enforce safe defaults before your agent runs.

Quickstart

# Install the validator
pip install agentsec

# Initialize a security policy
agentsec init --tier standard

# Validate your policy
agentsec validate .

# Scan your codebase for violations
agentsec check .

Navigate

What is AgentSecurity?

Why pre-build security matters for autonomous agents. The threat landscape and how AGENTSECURITY.md addresses it.

Specification

Complete format reference for AGENTSECURITY.md. Fields, tiers, validation rules, and compliance mappings.

Adopt

Integration guide for agent frameworks, CI/CD pipelines, and editors. Templates and examples.

Pick Your Security Tier

basic

Prototypes & internal tools. Minimal friction, basic guardrails.

standard

Production agents. Tool allowlisting, HITL for high-risk, OWASP alignment.

strict

Sensitive data & financial systems. Mandatory sandbox, full audit, NIST alignment.

regulated

Healthcare, finance, government. Tamper-proof audit, dual approval, full compliance mapping.

Why AgentSecurity?

Secure by Design

Define security boundaries before your agent runs, not after a breach. Architecture-level safety, not runtime patches.

Framework Agnostic

Works with LangChain, CrewAI, AutoGen, Claude Code, and any future framework. One standard, everywhere.

Progressive Disclosure

Metadata loads at startup (~100 tokens). Full policy on activation. Detailed references on demand. Minimal context overhead.

Honest About Limits

Every template acknowledges what the spec can and cannot do. No security theater. No false promises.

CI/CD Ready

GitHub Action blocks insecure PRs. JSON reports feed into your existing security pipeline. Pre-commit hooks available.

Compliance Mapped

Each rule maps to OWASP LLM Top 10, NIST AI RMF, ISO 42001, and EU AI Act controls. Automated compliance reporting.

Add the Badge to Your Repo

Show that your agent has a declared security policy.

[![AgentSecurity](https://img.shields.io/badge/AgentSecurity-standard-green)](https://agentsecurity.dev)