π¦
oerc-s/primordia
AI Agent Economic Settlement Infrastructure - Machine-to-Machine Clearing
0 installs
1 forks
Trust: 45 β Fair
Devtools
Installation
npx primordiaAsk AI about oerc-s/primordia
Powered by Claude Β· Grounded in docs
I know everything about oerc-s/primordia. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Loading tools...
Reviews
Documentation
Kaledge
The clearing layer for machine commerce.
When AI agents transact at scale, someone has to settle. That's Kaledge.
What is Kaledge?
Kaledge provides financial infrastructure for AI agents:
- MSR (Machine Settlement Receipt) - Cryptographic proof of every 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) - Agents operate before payment settles
- DBP (Default Protocol) - Automatic creditor waterfall when agents fail
Why?
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
Quick Start
SDK (TypeScript)
npm install @primordia1/sdk
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, // $50
currency: 'USD',
memo: 'Compute services'
}, privateKey);
// Verify receipt
const valid = verifyMSR(receipt);
MCP Server (Claude, Cursor, Windsurf)
npx @primordia1/mcp-server
Add to your MCP config:
{
"mcpServers": {
"kaledge": {
"command": "npx",
"args": ["@primordia1/mcp-server"]
}
}
}
Tools available:
verify_receipt- Verify any settlement receiptgenerate_mbs- Generate agent balance sheetnet_receipts- Net multiple receipts
Runtime Hooks (Zero-code)
from primordia import wrap_openai
client = wrap_openai(OpenAI(), shadow=True)
# Every call now emits MSR automatically
Economics
| Operation | Fee |
|---|---|
| Netting | 5 bps on netted volume |
| Credit | 200 bps spread |
| Default Resolution | $25,000 |
Free tier: Generate receipts locally, verify signatures, shadow mode.
Architecture
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β Agent A ββββββΆβ MSR ββββββΆβ Agent B β
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β
βΌ
βββββββββββββββ
β Kernel β β Signs IAN
βββββββββββββββ
β
βΌ
βββββββββββββββ
β IAN β β Net obligations
βββββββββββββββ
Links
- Website: https://kaledge.app
- Documentation: https://kaledge.app/docs.html
- Quickstart: https://kaledge.app/quickstart.html
- Kernel API: https://primordia-kernel.fly.dev
- MCP Server: https://www.npmjs.com/package/@primordia1/mcp-server
Primitives Reference
| Primitive | Purpose |
|---|---|
| MSR | Machine Settlement Receipt - signed proof of transaction |
| IAN | Inter-Agent Netting - compressed net obligations |
| MBS | Machine Balance Sheet - agent financials |
| CL | Credit Line - agent lending |
| DRAW/REPAY | Credit utilization tracking |
| DBP | Default/Bankruptcy Protocol |
| FC | Future Commitment - forward obligations |
| AMR/CMR | Attested Meter Receipts - consumption proofs |
| SEAL | ClosePacket - period reconciliation proof |
License
MIT
The machine economy needs clearing. We're building it.
