Portable security rules for AI agents.
HushSpec is an open specification for declaring what an agent may access, invoke, and send at the tool boundary: one rule language across runtimes, frameworks, and languages.
hushspec: "0.1.0"
name: agent-boundary
rules:
egress:
allow: ["api.anthropic.com"]
default: block
forbidden_paths:
patterns: ["**/.ssh/**", "**/.aws/**"]
tool_access:
confirm: [deploy_service]Declare what, never how.
AI agents interact with tools: file systems, network APIs, shell commands, MCP servers. HushSpec is a standard way to declare which of those interactions are allowed, blocked, or require confirmation.
Policy is what you declare. Enforcement is how an engine applies it. HushSpec only ever specifies the first.
Engines like Clawdstrike implement the spec and add engine-specific features: detection algorithms, receipt signing, broker subsystems, async guard pipelines. The policy document stays portable between them.
Ten rules, one language.
Every HushSpec document uses the same ten rule types. Each rule is a pure declaration: no runtime state, no detection algorithms, no plugin systems. Every evaluation resolves to allow, warn, or deny.
Field-level documentation for every rule lives in the rules reference.
Four languages, a shared core.
Every SDK implements the full evaluator pipeline. Receipts, sinks, and detection helpers are available across all four. Runtime integrations differ by language, but the decision model never does.
| SDK | Level | Parse | Validate | Merge | Resolve | Evaluate | Audit | Detection |
|---|---|---|---|---|---|---|---|---|
| Rust | Level 3 | yes | yes | yes | yes | yes | yes | yes |
| TypeScript | Level 3 | yes | yes | yes | yes | yes | yes | yes |
| Python | Level 3 | yes | yes | yes | yes | yes | yes | yes |
| Go | Level 3 | yes | yes | yes | yes | yes | yes | yes |
TypeScript adds Anthropic, OpenAI, and MCP adapters plus watcher and poller support. Python adds adapters and an observer layer. Rust is the reference implementation and currently the only SDK with Ed25519 signing. Full detail in the SDK conformance matrix.
The h2h command line.
h2h, hush to hush: one binary for the whole policy lifecycle. Validate, test, lint, and diff policies in CI; sign and verify them for distribution; flip the panic switch when something goes wrong.
Install and usage documentation in the CLI reference.
Rulesets, ready to extend.
Seven built-in rulesets cover common deployment scenarios. Reference them with extends: and layer your own rules on top; the merge semantics are part of the spec.
Extensions, kept outside.
Three optional modules add state machines, origin-aware profiles, and detection thresholds without bloating the core. A conforming engine may implement none of them.
Declare the boundary once. Any engine can enforce it.
Open specification · The normative spec, JSON Schemas, four SDKs,
the CLI, conformance fixtures, and built-in rulesets, all Apache-2.0.