MnemoPay

by mnemopay

Not rated
GitHub

About

Trust and reputation layer for AI agents that handle money. Agent Credit Score (300-850), hash-chained ledger, behavioral finance, real payment rails (Stripe, Paystack, Lightning), autonomous shopping with escrow.

Details

Author
mnemopay
Categories
Other, AI, Finance

Setup

Install MnemoPay in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/mnemopay/mnemopay-sdk

Follow the installation instructions in the repository README, then restart your MCP client.

The governance layer for AI agents that handle money.Charter-driven mission scope, FiscalGate budget enforcement, EU AI Act Article 12 audit bundles, Agent Reputation Scoring (300-850), and a tamper-evident MerkleAudit chain — across every payment rail an agent will ever touch.

MnemoPay sitsabovethe rail (Stripe, Paystack, Lightning, Stripe MPP, x402, Google AP2) andbelowthe agent runtime (LangChain, CrewAI, Claude Agent SDK, your own loop). The rail moves money. The runtime decides. MnemoPay declares the rules, enforces the budget, and produces the evidence.

New here?Start atdocs/QUICKSTART.md— 60 seconds, three steps, working code.

Docs:Quickstart·Architecture·Permissions·Action ledger·Integrations (OpenAI/Anthropic/Gemini/Cohere/Mistral/LangGraph)·Recall·FiscalGate·Audit bundles (EU AI Act Art. 12)·Subpath import rule·Claude Agent SDK guide·Bundlers: Vite·Webpack·Bun

Community:LICENSE (Apache 2.0)·CHANGELOG·CONTRIBUTING·CODE_OF_CONDUCT·SECURITY·Discussions·Good first issues

Receipts:Trust hub(entity, KYB, Apple Team ID, Article 12 audit chain — verify in <5 min) ·Benchmarks(1M ops, 100% adversarial detection, $0 ledger drift) ·Python SDK on PyPI(full TS-rail parity since 1.1.0)

import MnemoPay, { Charter, FiscalGate, MerkleAudit, // governance primitives AgentReputationScoring, BehavioralEngine, // trust + reputation StripeRail, X402Rail, GoogleAP2Rail, // rails } from "@mnemopay/sdk"; const agent = MnemoPay.quick("my-agent"); await agent.remember("User prefers monthly billing"); const tx = await agent.charge(25, "Monthly API access"); // FiscalGate hold await agent.settle(tx.id); // FiscalGate capture // Agent Reputation Score — portable, 300-850 range. NOT FICO-brand, NOT a consumer // credit report, NOT governed by FCRA. Scores agents (software), not humans. const scorer = new AgentReputationScoring(); const result = scorer.compute({ transactions: [tx], createdAt: new Date(), / ... / }); // → { score: 672, rating: "good", feeRate: 0.015, trustLevel: "standard" }

14 modules. Hash-chained ledger. Charter / FiscalGate / Article 12 audit bundles. 6 payment rails. 200K-operation stress tested. Apache 2.0.

What MnemoPay is NOT:not a bank, not a money transmitter, not a Stripe replacement, not an agent framework, not a compliance platform. It's the rules-and-evidence layer between the rail and the runtime.

Governance latency (sub-second invariant)

"Sub-second governance" is a tested invariant, not marketing. The bench intests/bench/governance-latency.bench.tsmeasures each governance hot path withvitest benchand emits a grep-able[gov-bench]summary line per scenario. Numbers below are steady-state percentiles fromnpm run bench:governance(run on the dev machine — your hardware will differ; the relative ordering is what matters).

Both per-event hot paths (evaluateAction,MerkleAudit.record) clear an entire EU AI Act policy gate and audit-chain writetwo orders of magnitude inside one millisecond. The end-to-endremember()path — including Ed25519 sign + sequence + chain emit — still sits comfortably inside the "sub-second governance" envelope with three decimal-orders of headroom.

A CI-enforced guard spec intests/governance/latency-invariant.test.tsruns a degraded-mode sample on everynpm testand fails if p95 forpolicy.evaluateActionregresses past 1 ms, orMerkleAudit.recordpast 5 ms. Bounds are sized to catch a ~10x regression, not flap on jitter.

How to reproduce:npm run bench:governance(full vitest.bench harness) ornpm test -- latency-invariant(CI-bound check).

Every rail ships with the samePaymentRailinterface asStripeRail/PaystackRail/LightningRail:

Plus theSpatial governance foldattachSpatialEvidence()co-signs the MerkleAudit chain with GridStamp proof-of-presence for embodied agents (drones, robots). Loose-coupled — nogridstampruntime dependency.

Subpath imports for smaller, safer consumers

If you only need one MnemoPay module, import that subpath instead of the package root. This keeps MCP servers and other stdio tools quiet, avoids pulling unused middleware into bundles, and makes the dependency boundary obvious.

import { localEmbed, cosineSimilarity } from "@mnemopay/sdk/recall"; import { StripeRail, X402Rail } from "@mnemopay/sdk/rails"; import { SQLiteStorage } from "@mnemopay/sdk/storage"; import { CommerceEngine } from "@mnemopay/sdk/commerce";

Use the root import when you want the full SDK surface. Use@mnemopay/sdk/mcponly when you are intentionally mounting the MnemoPay MCP server.

@mnemopay/sdk/swarmis the missing piece that browse.sh shipped as a public skill catalog. Ours adds the bit they don't: every agent in the swarm carries a DID, every action is FiscalGate-prechecked against per-agent + total caps, every TaskResult is appended to a shared Article-12 audit chain, and every skill invocation is billable through the same hash-chained ledger the rest of the SDK already uses.

CLI:npx @mnemopay/swarm list·npx @mnemopay/swarm demo— seemnemopay-swarm.

import { Swarm } from "@mnemopay/sdk/swarm"; import { AuditChain } from "@mnemopay/sdk/governance"; import { open } from "@mnemopay/browser"; // any BrowserProvider works const provider = await someProviderFactory(); const swarm = new Swarm({ size: 4, provider, did: "did:mp:abc...", budget: { perAgent: 0.25, total: 1.00 }, audit: { chain: new AuditChain() }, }); const run = await swarm.spawn([ { id: "t1", skillId: "ramp.com/expense-create", prompt: "submit $42 lunch" }, { id: "t2", skillId: "linear/issue-create", prompt: "file UI bug" }, { id: "t3", skillId: "cloudflare/dns-record-set", prompt: "add CNAME" }, ]); const results = await swarm.gather(run); const final = await swarm.recombine(results, "merge-json");

When to use it.Any time you'd open N parallel browser sessions to attack a problem — multi-source research, cross-platform issue triage, A/B-style "ask three agents, take the majority answer" — but you want one audit bundle, one budget envelope, and one place where billing happens.

Three recombine strategies (plus your own).

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.