Primordia

مجتمعي الأمن

Economic settlement for AI agents: receipt verification, metering, net settlements, credit lines and balance sheets.

التثبيت

خطوات التثبيت موجودة في التوثيق أدناه. التوثيق

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. Kaledge
  2. What is Kaledge?
  3. Why?
  4. Quick Start
  5. Economics
  6. Architecture
  7. Links
  8. Primitives Reference
  9. License

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 receipt
  • generate_mbs - Generate agent balance sheet
  • net_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

OperationFee
Netting5 bps on netted volume
Credit200 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
                    └─────────────┘

Primitives Reference

PrimitivePurpose
MSRMachine Settlement Receipt - signed proof of transaction
IANInter-Agent Netting - compressed net obligations
MBSMachine Balance Sheet - agent financials
CLCredit Line - agent lending
DRAW/REPAYCredit utilization tracking
DBPDefault/Bankruptcy Protocol
FCFuture Commitment - forward obligations
AMR/CMRAttested Meter Receipts - consumption proofs
SEALClosePacket - period reconciliation proof

License

MIT


The machine economy needs clearing. We're building it.

الأسئلة الشائعة

ما هو Primordia؟

Economic settlement for AI agents: receipt verification, metering, net settlements, credit lines and balance sheets.

كيف أثبّت Primordia؟

اتبع خطوات التثبيت في توثيقه المعروض في هذه الصفحة وفي مستودعه.

هل Primordia مفتوح المصدر؟

شيفرته علنية على GitHub، لكن المستودع لا يعلن ترخيصًا قياسيًا.

من يصون Primordia؟

ينشره oerc-s. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من القوائم المجتمعية awesome-mcp-servers ومستودع المشروع على GitHub. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.