npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mandatedev/agent

v0.1.1

Published

The Mandate Agent SDK — Trust Engine for the Agent Economy

Readme

Mandate

The Trust Engine for the Agent Economy

Move your AI agents from 20% to 70% autonomy — without trading control for chaos.


The Problem

You built AI agents expecting 70% automation.
You are running at 20% because you cannot trust your agents with real permissions.

One incident happened. Your team lobotomized the agents.
Now they run as suggestion engines — requiring human approval for everything.
You spent millions building autonomous systems that are no longer autonomous.

The gap between 20% and 70% is not an intelligence problem. It is a trust infrastructure problem.


What Mandate Does

Three things. Non-negotiable on engineering quality.

1. Hard-Scoped Permissions
The agent physically cannot touch anything outside its defined boundary.
Not prompt-level guardrails. Not "please only do X."
Infrastructure-level enforcement. Deterministic. Sub-millisecond.

2. The Real Kill Switch
Cryptographic key revocation across every platform in under one second.
Tested continuously. Graduated 5-level response. Never a false-positive fleet halt.

3. Unified Execution Graph
One immutable, searchable, timestamped record of every decision, every tool call, every action.
Replaces PagerDuty + LangSmith + OpenTelemetry + Jira + 4 other tools.


Install

npm install @mandatedev/agent

Quickstart — OpenAI

import { createMandateAgent } from '@mandate/agent';

const agent = createMandateAgent({
  agentId: 'procurement-agent-v1',
  orgId: 'acme-corp',
  framework: 'openai-assistants',
  environment: 'production',
  auditLevel: 'full',
  policy: {
    agentId: 'procurement-agent-v1',
    version: '1.0.0',
    policyHash: 'sha256-abc123',
    identity: { org: 'acme-corp', env: 'production' },
    allow: [
      { tool: 'read_*' },
      {
        tool: 'process_payment',
        conditions: [
          { field: 'intent.args.amount', operator: 'lte', value: 10000 },
        ],
      },
    ],
    deny: [
      { tool: 'process_payment',
        conditions: [
          { field: 'intent.args.amount', operator: 'gt', value: 10000 },
        ],
      },
    ],
    anomalyThresholds: { alert: 0.6, throttle: 0.8 },
    localAutonomy: { gracePeriodMs: 1800000, postGrace: 'PAUSE' },
  },
  onViolation: (intent, result) => {
    console.error(`[BLOCKED] ${intent.toolName} — ${result.reason}`);
  },
});

// Intercept tool calls before execution
const { allowed, blocked } = await agent.openai.interceptToolCalls(
  response.tool_calls
);

// Execute only the allowed ones
for (const toolCall of allowed) {
  // run your tool
}

Quickstart — LangChain

const mandateHook = agent.langchain.getBeforeToolCallHook();

// Attach to your LangChain agent
yourLangChainAgent.beforeToolCall = mandateHook;
// Mandate now enforces policy on every tool call automatically

Quickstart — Anthropic

const { allowed, blocked } = await agent.anthropic.interceptToolUse(
  response.content.filter(b => b.type === 'tool_use')
);

How It Works

Modern agent frameworks declare intent as structured data before any tool executes.
Mandate intercepts that declaration and evaluates it against your policy in 0.3–0.8ms.
No LLM involved in enforcement. Deterministic. Hardware-agnostic.

Agent reasons → LLM produces tool call → MANDATE INTERCEPTS → WASM policy evaluation (0.3–0.8ms) → ALLOW / DENY / ESCALATE → Audit event sealed to hash chain → Tool executes (if allowed)


Framework Support

| Framework | Hook | Enforcement | |-----------|------|-------------| | OpenAI Assistants API | agent.openai.interceptToolCalls() | Full | | LangChain / LangGraph | agent.langchain.getBeforeToolCallHook() | Full | | Anthropic Tool Use | agent.anthropic.interceptToolUse() | Full | | AutoGen / AG2 | Coming Month 2 | Full | | Custom frameworks | agent.evaluate(intent) | Full |


Audit Chain

Every action is sealed to a cryptographic hash chain before any network transmission.
The audit record exists regardless of Mandate's availability.

// Verify chain integrity — any tampering is detectable
const { valid, corruptedAt } = agent.verifyAuditChain();

// Flush buffer to control plane
await agent.flushAuditBuffer();

Degradation

Mandate never becomes a single point of failure.
If the control plane is unreachable, agents continue on their last signed policy for 30 minutes.

| Tier | State | Agent Status | |------|-------|-------------| | NOMINAL | Full enforcement | Full capacity | | DEGRADED | Local cache | Full capacity | | ISOLATED | No control plane | Full capacity | | GRACE_STD | 30min elapsed | Continues | | GRACE_HIGH | 30min elapsed, high risk | PAUSE |


License

MIT — the SDK is free and open source forever.
The control plane, fleet management, and kill switch infrastructure are commercial products.


Company

Mandate is building the trust infrastructure for the agent economy.
mandate.dev · GitHub