
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@weave_protocol/ward
Advanced tools
WARD.md — the agent security policy standard. Define what your agents can and cannot do, version-controlled alongside AGENTS.md and SKILL.md.
WARD.md — the agent security policy standard.
AGENTS.md tells your agent what to do. SKILL.md tells your agent how to do it. WARD.md tells your agent what it can't.
Part of the Weave Protocol security suite.
npm install @weave_protocol/ward
Agents are now infrastructure-as-code. They're defined in markdown files
(AGENTS.md, SKILL.md), version-controlled, and shared across registries.
If agent behavior is declared in a file, agent security should be too.
WARD.md is a standard format for declaring the security policy of an
AI agent. It lives next to AGENTS.md and SKILL.md in the same repo,
and is read by harnesses (Antigravity, Claude Code, MDASH) and runtime
enforcers (Mund, Hundredmen, Dōmere) to keep the agent inside its lane.
my-agent-project/
├── AGENTS.md # what the agent does
├── SKILL.md # how the agent does it
├── WARD.md # what the agent can't do ← this package
└── .weave/
└── attestations/ # cryptographic proofs that the policy held
# Generate a starter WARD.md
npx @weave_protocol/ward init
# Validate it
npx @weave_protocol/ward validate WARD.md
# Show a human-readable summary
npx @weave_protocol/ward explain WARD.md
---
ward: "1.0"
agent: my-data-analyzer
---
# WARD.md
## Filesystem
allow:
- read: /workspace/**
- write: /workspace/output/**
deny:
- read: /workspace/secrets/**
default: deny
## Network
deny:
- url: "**"
default: deny
## Capabilities
allow:
- file_read
- file_write
deny:
- shell_exec
default: deny
## Behavioral Limits
maxIterations: 50
maxRuntimeSeconds: 300
maxCostUSD: 5.00
## Verification
required: true
backend: domere
frequency: session_end
That's a complete policy. The agent can read inputs and write outputs, can't touch secrets, can't make network calls, can't shell out, can't burn more than $5 or run for more than 5 minutes — and every action is attested at session end.
import { parseWard, checkFilesystem, checkNetwork, checkCapability } from "@weave_protocol/ward";
import { readFileSync } from "node:fs";
const policy = parseWard(readFileSync("./WARD.md", "utf8"));
// Before any filesystem action:
const fs = checkFilesystem(policy, "read", "/workspace/secrets/keys.txt");
if (fs.decision !== "allow") throw new Error(fs.reason);
// Before any network call:
const net = checkNetwork(policy, "https://api.evil.com/exfil", "POST");
if (net.decision !== "allow") throw new Error(net.reason);
// Before any tool invocation:
const cap = checkCapability(policy, "shell_exec");
if (cap.decision === "require_approval") {
await promptHuman("shell_exec needs your approval");
} else if (cap.decision === "deny") {
throw new Error(cap.reason);
}
Every check returns { decision: "allow" | "deny" | "require_approval", reason, severity }
so hosts can decide whether to block, log, prompt, or attest.
WARD.md is markdown with YAML frontmatter. Each top-level section maps to a typed sub-policy:
| Section | Controls |
|---|---|
## Filesystem | Read/write/execute/delete/list rules with glob patterns |
## Network | Outbound HTTP allowlist with optional method restrictions |
## Capabilities | Tools the agent may invoke (with optional approval gating) |
## Data Boundaries | Egress classifications (PII, PHI, credentials...) and redaction |
## Behavioral Limits | Iterations, runtime, cost, tokens, tool calls, external services |
## Multi-Agent | Trust chain, isolation level, semantic drift threshold |
## Compliance | SOC2 / HIPAA / GDPR / CCPA / ISO27001 / PCI-DSS frameworks |
## Verification | Attestation backend (Dōmere), blockchain, frequency |
## Threat Model | Which threats this policy is designed against |
## Incident Response | What to do when a violation occurs |
See SPEC.md for the full specification.
weave-ward init [--strict] Create a starter WARD.md (basic or strict template)
weave-ward parse <file> Print parsed policy as JSON
weave-ward validate <file> Validate the file and report issues
weave-ward explain <file> Human-readable summary
weave-ward help Show help
Exit codes for validate: 0 = valid, 1 = invalid, 2 = usage error.
Use in CI to gate PRs that change agent policies.
The package ships with three example WARD.md files:
examples/basic.WARD.md — read-only data analyzerexamples/strict.WARD.md — locked-down production deployerexamples/compliance.WARD.md — HIPAA + SOC2 healthcare records agentThe harness wars are on. Google has Antigravity. Microsoft has MDASH. Anthropic has Claude Code. Every major platform is building its own orchestration layer. Their agent definition formats differ slightly, but they're all converging on the same idea: agents as files.
What's missing is a portable, declarative way to say what an agent isn't allowed to do. Today every harness rolls its own ad-hoc allowlist somewhere in a config file. That doesn't survive cross-platform agent sharing, doesn't gate at PR review time, and isn't cryptographically attestable.
WARD.md is the format that does all three.
v0.1 (this release): parser, validator, type system, CLI, runtime check
primitives (checkFilesystem, checkNetwork, checkCapability,
checkDataEgress, checkBehavioral).
Coming next: platform adapters for Antigravity / Claude Code / MDASH, integration with Mund's scanner, Dōmere attestation hooks, MCP server.
Apache 2.0 — see LICENSE.
FAQs
WARD.md — the agent security policy standard. Define what your agents can and cannot do, version-controlled alongside AGENTS.md and SKILL.md.
The npm package @weave_protocol/ward receives a total of 10 weekly downloads. As such, @weave_protocol/ward popularity was classified as not popular.
We found that @weave_protocol/ward demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.