Does AgentGuard bound OpenRouter?

Yes, through the guarded client.

A brake on your agents that only you control: verifiable, no third party, no data leaves your machine for AgentGuard. Wrap the OpenRouter client once and policy evaluation happens locally before dispatch. A refusal never reaches the network, and every verdict is signed with the key generated in your runtime.

The exact install we ran

This fresh scratch install resolved AgentGuard Spend 0.15.13, OpenAI 6.49.0, and the SDK's local Ed25519 dependency. Use Node 20.19 or newer.

npm install @agentguard-run/[email protected] openai@latest

The binding point is the OpenAI-compatible client you already use for OpenRouter:

import OpenAI from 'openai'; import { withSpendGuardOpenRouter } from '@agentguard-run/spend/frameworks/openrouter'; const raw = new OpenAI({ apiKey: process.env.OPENROUTER_API_KEY, baseURL: 'https://openrouter.ai/api/v1', }); const client = withSpendGuardOpenRouter(raw, { policy, scope: { tenantId: 'acme', agentId: 'researcher' }, capabilityClaim: 'read_only', config: { signingKeys, logStore }, }); await client.chat.completions.create(request);

Every call must use client, not raw. Keep the raw client private to the module so a caller cannot bypass the guard.

Three real outcomes

We ran the published OpenRouter adapter against a local OpenAI-compatible endpoint. That exercised the actual request wrapper without spending against or probing a third-party account. The dispatch counter was placed on the raw client below the guard.

ALLOWED
action=allow projected=2c dispatched=1 seq=0
entryHash=a696c9489dd719c2b70803723c6f0a355ca80c5d45af67cc5fc609b92e882016
signer=0e714af8d2520c5d signature prefix=7f594e9196d08790eb891868
SPEND CAP REFUSED
action=block dispatched=0 seq=2
reason=Cap 'per_call=1c' exceeded (spent=0c, +call=2c, total=2c) to block
CAPABILITY CEILING REFUSED
action=block dispatched=0 seq=3
reason=Capability 'read_only' below required 'payment_execute'

Offline verification

OFFLINE_VERIFY valid=true entries=4 TAMPER_VERIFY valid=false reason="Signature or hash invalid at sequence 0"

The signing key, policy, decisions, and receipt chain stayed inside the scratch process. AgentGuard adds no vendor data plane. OpenRouter still receives the allowed provider request, as it must; it receives no blocked request.

What makes this a real bound

Both refusal cases showed dispatched=0. The wrapper throws before the raw client's network method runs. That is stronger than asking an agent to consult a tool. It remains your responsibility to expose only the guarded client to the rest of your application.

OpenRouter integration verdictyes
spend cap
hard preflight
capability ceiling
hard preflight
blocked dispatches
zero
offline chain
valid, tamper rejected

Run the exact harness at scripts/adoption-smoke/sdk-openai-compatible.mjs. The npm package is @agentguard-run/spend.