Run the shipped SDK and MCP paths

A brake on your agents that only you control.

Verifiable. No third party in the decision path. No prompts, outputs, provider keys, policy, or signing key sent to AgentGuard. Pick the SDK for hard enforcement in your call path, or add the MCP server for explicit spend decisions and receipt tools.

Requirements: Node 20.19 or newer. Versions match the supplied local package manifests as of July 27, 2026. Registry availability was not checked offline.

SDK, one line

Run a real policy decision and verify its signed receipt

This runs the built-in local demo, then verifies its receipt chain offline.

npx -y @agentguard-run/[email protected] demo && npx -y @agentguard-run/[email protected] verify

The built-in demo reports the decision and verifier checks separately:

status    BLOCKED
saved     +$622.41

✓ spend cap enforced
✓ receipt tamper-evident
✓ provider never charged

entries       1
policy        agentguard-demo-policy-v1
action        block

✓ full chain valid
✓ entry hashes match canonical JSON
✓ signatures match supplied public key
✓ no sequence gaps (ledger appears complete)

The source manifest identifies version 0.16.0. The source constant used by some internal version output still says 0.15.12, so the manifest is the version authority for this instruction.

MCP, one line

Add the local MCP server to this Claude Code project

Run this in the project where Claude Code should see AgentGuard. The server communicates over local standard input and output.

npm install -D @agentguard-run/[email protected] && claude mcp add -s local agentguard node ./node_modules/@agentguard-run/mcp/dist/index.js

A connected local registration is reported in this form:

agentguard:
  Scope: Local config (private to you in this project)
  Status: ✔ Connected
  Type: stdio
  Command: node
  Args: ./node_modules/@agentguard-run/mcp/dist/index.js

Important: MCP exposes spend_decide, receipt verification, export, pricing, provenance preview, and status tools. MCP alone does not force every host or model call through spend_decide. Use the SDK wrapper or a mandatory host hook when you need an unavoidable brake.

See the whole failure sequence

The rogue agent hits every line

This recording is a deterministic SDK run. Its fixture blocks $96.00 of projected API spend. Separately, it blocks a simulated $9,000.00 wire because the declared capability is insufficient. A zero-cap policy blocks later calls, the receipt chain verifies, and a tampered receipt fails.

Terminal recording of AgentGuard blocking projected spend, refusing an insufficient-capability wire fixture, applying a zero-cap policy, verifying receipts, and detecting tampering