Assay
Policy-as-Code for AI Agents. Deterministic testing, runtime enforcement, and verifiable evidence for the Model Context Protocol.
Open Core: Engine + baseline packs are open source (MIT/Apache-2.0). Enterprise packs and managed workflows are commercial. See ADR-016 for details.
Install
|
Or via Cargo:
Core Workflow
1. Record → Replay → Validate
Record agent behavior once, replay deterministically in CI. No LLM calls, no flakiness.
# Capture traces from your agent
# Validate against policy (milliseconds, $0 cost)
# CI gate with SARIF output
2. Generate Policies from Behavior
# Single trace → policy
# Multi-run profiling for stable policies
3. Evidence Bundles
Tamper-evident bundles with content-addressed IDs. CloudEvents v1.0 format.
# Export evidence
# Verify integrity
# Lint for security issues (SARIF output)
# Lint with compliance pack
# Compare runs
4. Compliance Packs
Built-in rule packs for regulatory compliance. Article-referenced, auditor-friendly.
# EU AI Act Article 12 (logging requirements)
# Multiple packs
# Custom pack
SARIF output includes article references for audit trails.
5. Tool Signing
Cryptographic signatures for tool definitions. Ed25519 + DSSE.
# Generate keypair
# Sign tool definition
# Verify signature
6. BYOS (Bring Your Own Storage)
Push evidence to your own S3-compatible storage. No vendor lock-in.
# Push bundle
# Pull by ID
# List bundles
Supports: AWS S3, Backblaze B2, Cloudflare R2, MinIO, Azure Blob, GCS.
Runtime Enforcement
MCP Server Proxy
# Start policy enforcement proxy
Kernel-Level Sandbox (Linux)
# Landlock isolation (rootless)
# eBPF/LSM enforcement (requires capabilities)
GitHub Action
- uses: Rul1an/assay-action@v2
Zero-config evidence verification. SARIF integration with GitHub Security tab.
See GitHub Marketplace.
Configuration
assay.yaml:
version: "2.0"
name: "mcp-default-gate"
allow:
deny:
- "exec*"
- "shell*"
constraints:
- tool: "read_file"
params:
path:
matches: "^/app/.*|^/data/.*"
Python SDK
# Record traces
=
# Validate
=
assert
Pytest plugin for automatic trace capture:
pass
Documentation
Contributing
See CONTRIBUTING.md.