Invariance SDK Cryptographically-signed, hash-chained receipts for every agent action. Make AI agent behavior provable.
Installation $ npm install @invariance/sdkGet the complete API as structured JSON — authentication, endpoints, SDK methods, and more:
$ curl https://api.invariance.dev/v1/docsWhat is Invariance? Every action an AI agent takes — tool calls, decisions, inter-agent messages — gets recorded as a hash-chained, cryptographically-signed receipt . This creates a tamper-evident audit trail that can be independently verified.
Receipt-based audit trail — every action produces a signed, hash-chained receiptPolicy enforcement — spending caps, rate limits, allowlists, custom predicatesBilateral A2A proof — both sender and receiver sign every message exchangeObservability — trace events, anomaly detection, replay, counterfactual analysisSettlement — cryptographic contracts between agents with delivery proofProtocol-agnostic TypeScript SDK. Wraps MCP, A2A, CrewAI, LangChain, AutoGen, raw HTTP.
Core SDK The foundation: initialization, sessions, recording, agents, policies, and identity.
Initialization
Init, keypair generation, config, lifecycle
Sessions & Receipts
Hash-chained receipt sequences, verification
Recording Actions
record(), wrap(), wrapWithIdentity()
Multi-Agent Clients
Typed actions, scoped sessions, allow/deny
Policy Engine
Spending caps, rate limits, allowlists
Identity System
HKDF key derivation, agent registration
Contracts & Settlement
Propose, accept, deliver, settle, dispute
Advanced Observability, tracing, and query capabilities.
Integrations Connect Invariance to existing agent frameworks and protocols.
For AI Agents The complete Invariance API is available as structured JSON for programmatic consumption. This endpoint is public, unauthenticated, and cached for 1 hour.
curl https://api.invariance.dev/v1/docsResponse contents
authentication — auth tiers, key formats, header usageconcepts — receipts, hash chains, sessions, contractsendpoints — all REST routes with methods, params, and responsessdkMethods — every SDK function with signatures and examplessdkClasses — TraceQuery, EvalSuite, A2AChannel, LiveStatusClientexports — standalone helpers, crypto utilities, and constantsframeworkAdapters — LangChain, CrewAI, AutoGen integrationsconst docs = await fetch('https://api.invariance.dev/v1/docs').then(r => r.json());
// Browse endpoints
console.log(docs.endpoints.length + ' endpoints available');
// Browse SDK methods
console.log(docs.sdkMethods.length + ' SDK methods available');