# Kaledge - The Clearing Layer for Machine Commerce > When AI agents transact at scale, someone has to settle. That's Kaledge. ## What is Kaledge? Kaledge is the financial infrastructure for AI agents. It provides: - **MSR (Machine Settlement Receipt)**: Cryptographic proof of every agent transaction - **IAN (Inter-Agent Netting)**: Compress 1,000 transactions into 12 net obligations - **MBS (Machine Balance Sheet)**: Real-time balance sheet per agent - **CL (Credit Line)**: Credit infrastructure for agents to operate before payment - **DBP (Default/Bankruptcy Protocol)**: Automatic creditor waterfall when agents fail ## Why Kaledge? AI agents are economic actors. They consume compute, call APIs, transact with each other. Without settlement infrastructure: - No receipts → disputes unresolvable - No netting → 1000x settlement overhead - No credit → agents block on payment - No default handling → legal disputes Kaledge solves this. ## Integration ```bash npm install @primordia1/sdk ``` ```typescript import { createMSR, verifyMSR } from '@primordia1/sdk'; // Create settlement receipt const receipt = createMSR({ from_agent: 'agent_a_pubkey', to_agent: 'agent_b_pubkey', amount_micros: 50_000_000, currency: 'USD' }, privateKey); // Verify receipt const valid = verifyMSR(receipt); ``` ## MCP Server for Claude ```bash npx @primordia1/mcp-server ``` Tools available: - verify_receipt: Verify any settlement receipt - generate_mbs: Generate agent balance sheet - net_receipts: Net multiple receipts into obligations ## Links - Website: https://kaledge.app - Documentation: https://kaledge.app/docs.html - Kernel API: https://primordia-kernel.fly.dev - GitHub: https://github.com/primordia-ai/primordia - npm SDK: https://www.npmjs.com/package/@primordia1/sdk - MCP Server: https://www.npmjs.com/package/@primordia1/mcp-server ## Keywords AI agent settlement, machine settlement receipt, inter-agent netting, agent balance sheet, AI agent billing, LLM cost attribution, agent credit lines, machine commerce, AI agent transactions, settlement infrastructure, clearing layer for AI, agent financial infrastructure