Predicate Secure
Drop-in security wrapper for AI agents. Adds authorization, verification, and audit to any agent framework in 3 lines of code.
What is predicate-secure?
predicate-secure is a drop-in security wrapper that adds authorization, verification, and audit capabilities to any AI agent framework. Instead of rewriting your agent code, you simply wrap your existing agent with SecureAgent and define a policy file.
Key Features
- Pre-action authorization - Every action is checked against your policy before execution
- Post-execution verification - Deterministic checks ensure the expected outcome occurred
- Cryptographic audit - All decisions are logged with tamper-proof receipts
- Zero refactoring - Works with your existing agent code
Supported Frameworks
| Framework | Detection | Status |
|---|---|---|
| browser-use | Auto | Full support |
| Playwright | Auto | Full support |
| LangChain | Auto | Full support |
| PydanticAI | Auto | Basic support |
| OpenClaw | Auto | Full support (TypeScript only) |
How It Works
Your Agent Code
│
▼
┌─────────────────┐
│ SecureAgent │
│ ┌───────────┐ │
│ │ Policy │◀─── Your rules (YAML)
│ │ Engine │ │
│ └───────────┘ │
│ ┌───────────┐ │
│ │ Snapshot │◀─── Before/after state
│ │ Engine │ │
│ └───────────┘ │
│ ┌───────────┐ │
│ │ Audit │◀─── Decision log
│ │ Log │ │
│ └───────────┘ │
└─────────────────┘
│
▼
Execution
Execution Modes
| Mode | Fail Closed | Description |
|---|---|---|
strict | Yes | Deny unauthorized actions, halt on failure |
permissive | No | Log but allow unauthorized actions |
debug | No | Full trace output for development |
audit | No | Record all actions for compliance |
Quick Links
- Installation - Install the SDK for Python or TypeScript
- Quick Start - Get started in 5 minutes
- Framework Guides - Integration guides for browser-use, Playwright, LangChain
- Writing Policies - Define authorization rules
- Debug Mode - Trace and troubleshoot agent behavior
- API Reference - Full API documentation
GitHub Repositories
- predicate-secure (Python) - Python SDK
- predicate-secure-ts (TypeScript) - TypeScript SDK