@agentrust/sdk
v0.2.0
Published
Verifiable identity for AI agents on MCP. Passports, mandates, and audit trails.
Maintainers
Readme
@agentrust/sdk
Verifiable identity for AI agents on MCP (Model Context Protocol).
Agentrust gives your AI agents cryptographic passports and scoped permission mandates — so you always know who is acting, what they're allowed to do, and when they did it.
Install
npm install @agentrust/sdkQuick start
import { AgentrustClient, Profile } from "@agentrust/sdk";
// Create an agent with scoped permissions (one line)
const client = await AgentrustClient.create({
name: "my-shopping-agent",
model: "claude-sonnet-4-20250514",
profile: Profile.ECOMMERCE, // can browse catalog, manage cart, pay up to $5K
});
// Call MCP tools through the Agentrust proxy
const result = await client.callTool("catalog:search", { query: "running shoes" });
// Verify the agent's identity
console.log(await client.verifyPassport()); // true
// Check permissions locally (no network call)
const { authorized, reason } = client.checkScope("tools:payment:execute");
console.log(`Can pay? ${authorized} — ${reason}`);Profiles
| Profile | Scopes | Max transaction |
|---------|--------|----------------|
| READONLY | Read everything | — |
| ECOMMERCE | Catalog + cart + payment | $5,000 |
| FINANCE | Accounts + transfers + reports | $10,000 |
| ADMIN | Everything | $50,000 |
| ASSISTANT | Prompts + read resources | — |
How it works
- Passport — Ed25519 keypair proving the agent's identity
- Mandate — Scoped permissions with quantitative limits
- Proxy — Transparent MCP middleware that verifies credentials on every request
Links
License
Apache-2.0
