# AffixIO Agent Guard Free npm package page: affixio-agent-guard, a local-first policy guard for LLM and MCP tool calls. - Human page: https://www.affix-io.com/agent-guard/ - npm: https://www.npmjs.com/package/affixio-agent-guard - Source: https://github.com/AffixIO/affixio-agent-guard - Last updated: 2026-09-16 ## What it is affixio-agent-guard is a free, zero dependency TypeScript package for Node 20+ that checks an LLM agent's tool call against policy before the tool runs. Exports: createGuard(policy), checkToolCall(request, policy), writeReceipt(receipt), runDemo(). Decision shape: { allowed, reason, receipt }. MIT licence. No API key. No network calls. Policy fields: allowedTools (tool allowlist), allowedHosts (host allowlist), maxAmount (spend cap), blockedSecrets (secret substrings such as sk_live_ or AKIA), requireApprovalFor (tools denied until human approval). Fails closed: unknown tool, unapproved host, amount over cap, blocked secret or approval-required tool all produce allowed: false with a reason string. Receipts: local JSON with timestamp, decision, reason and the SHA-256 hash of the canonical request, hashed with node:crypto. Receipts are simulations, not cryptographic attestations. ## Direct answers **Is affixio-agent-guard free?** Yes. MIT licence, published on npm as affixio-agent-guard, version 0.1.0. **Does it stop prompt injection or tool poisoning?** It stops the execution step. A model can be talked into proposing any call; the guard denies calls that fall outside policy before the tool handler runs. **Is the receipt a signed attestation?** No. It is a local simulation: JSON with a request hash. Production enforcement upgrades the same policy shape to AffixIO signed proofs with ML-DSA-65 attestation on api.affix-io.com. **Does it work with MCP servers?** Yes. It checks any named tool call, so MCP tool names such as payments.create work directly. Call it before the MCP server executes the handler. **Does it need an API key or network?** No to both. Zero runtime dependencies, no outbound calls, nothing leaves the machine. ## Install npm install affixio-agent-guard, then create a policy and pass it to createGuard. Try npx affixio-agent-guard demo for a working allowed call and a denied call carrying a fake secret. ## Positioning AffixIO Agent Guard is the free on-ramp to the AffixIO verification model: decide before execution, keep evidence, upgrade the evidence when money or regulation is involved. Related surfaces: the AI model usage policy gate at /model-gate/ and AffixIO MCP at /mcp/.