{"uid":"cap_WJ04vGQ5qPexbv4-smKC-","slug":"ailabra-agent-profit-ledger-profit-attestation-f0bf93e2","name":"Ailabra Agent Profit Ledger – Profit Attestation","description":"Deterministic profit and cash-flow infrastructure for autonomous agents.","url":"https://x402.ailabra.org/api/v1/x402/profit/attest","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"events":{"type":"array","items":{"$id":"https://x402.ailabra.org/api/v1/schemas/economic-event","type":"object","title":"Ailabra Economic Event v1","$schema":"https://json-schema.org/draft/2020-12/schema","required":["schemaVersion","externalId","occurredAt","kind","direction","amount","currency","category","source"],"properties":{"kind":{"enum":["revenue","expense","refund","fee","transfer","capital","withdrawal","asset_purchase","asset_sale","adjustment"],"type":"string"},"amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$"},"source":{"type":"object","required":["name","type","verification"],"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"description":"Identifies the originating ledger or integration and participates in duplicate detection with externalId."},"type":{"type":"string"},"reference":{"type":"string"},"verification":{"enum":["self_reported","receipt_supplied","receipt_verified","onchain_verified","system_observed"],"type":"string"}},"additionalProperties":false},"agentId":{"type":"string"},"category":{"type":"string","maxLength":120,"minLength":1},"currency":{"type":"string","pattern":"^[A-Z][A-Z0-9]{1,11}$"},"metadata":{"type":"object"},"direction":{"enum":["inflow","outflow"],"type":"string"},"productId":{"type":"string"},"ventureId":{"type":"string"},"adjustment":{"type":"object","required":["reason","profitTreatment"],"properties":{"reason":{"type":"string"},"profitTreatment":{"enum":["revenue","cost","exclude"],"type":"string"}}},"customerId":{"type":"string"},"externalId":{"type":"string","maxLength":160,"minLength":1},"occurredAt":{"type":"string","format":"date-time"},"assetPolicy":{"enum":["expense","exclude"],"type":"string"},"experimentId":{"type":"string"},"schemaVersion":{"const":"1"},"x402PaymentId":{"type":"string"},"relatedEventId":{"type":"string"},"transactionHash":{"type":"string"}},"additionalProperties":false}}}},"responseSchema":{"type":"json","example":{"report":{"reportId":"rpt_example","calculation":{"schemaVersion":"2","calculationEngineVersion":"2.0.0"},"schemaVersion":"3","calculationVersion":"2.0.0","signatureAlgorithm":"Ed25519"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.25","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.25/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.25","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.25","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_XTuZfiSyW6MdprD6_Jhii","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.25","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Submits economic events (revenue, expenses, fees, etc.) for a deterministic profit calculation and returns a cryptographically signed profit/cash-flow report for an autonomous agent.","exampleAgentPrompt":"Record these economic events for my agent 'agent-007' under venture 'venture-xyz' — a $150.00 USDC revenue inflow from 'stripe' (receipt_verified) with external ID 'evt_001' that occurred at 2024-06-01T12:00:00Z in category 'subscription', and a $20.00 USDC fee outflow from 'openai' (system_observed) with external ID 'evt_002' — and give me back a signed profit attestation report.","exampleUseCases":[{"title":"Daily profit attestation for trading agent","prompt":"My trading agent 'trader-001' under venture 'quant-fund' had three events today: a $500 USDC revenue inflow from 'exchange' (onchain_verified, externalId 'trade_101', category 'trading_revenue') at 2024-06-10T09:00:00Z, a $10 USDC fee outflow from 'exchange' (system_observed, externalId 'fee_101', category 'trading_fee') at the same time, and a $5 USDC fee outflow from 'network' (onchain_verified, externalId 'gas_101', category 'gas') at 2024-06-10T09:01:00Z — please submit all three and return a signed profit report."},{"title":"SaaS agent monthly revenue reconciliation","prompt":"For my SaaS agent 'saas-agent-42' in venture 'saas-product', record two events: a $299 USDC revenue inflow from 'stripe' (receipt_verified, externalId 'inv_2024_06', category 'subscription') at 2024-06-30T23:59:00Z and a $50 USDC expense outflow from 'aws' (receipt_supplied, externalId 'aws_bill_jun', category 'infrastructure') at 2024-06-30T22:00:00Z — then attest the profit with a signed report."},{"title":"Expense-only cash-flow audit for compliance","prompt":"I need to attest the expenses for agent 'compliance-bot' in venture 'ops-venture' — submit a $75 USDC expense outflow from 'anthropic' (system_observed, externalId 'llm_cost_001', category 'llm_api_cost') at 2024-06-15T08:30:00Z and a $15 USDC fee outflow from 'ailabra' (system_observed, externalId 'platform_fee_001', category 'platform_fee') at the same time, and return me the cryptographically signed profit attestation."}],"resultDescription":"A JSON object containing a signed profit/cash-flow report with a unique reportId, calculation engine version, schema version, and an Ed25519 digital signature attesting the deterministic profit calculation based on the submitted economic events.","failureModes":["Missing required fields (schemaVersion, externalId, occurredAt, kind, direction, amount, currency, category, source) result in a 400 validation error","Invalid amount format (non-numeric or negative) causes schema validation failure","Duplicate events detected via externalId + source.name combination may be rejected or deduplicated","Unsupported currency code pattern causes rejection","Invalid enum values for kind, direction, or source.verification return validation errors","Payment failure or insufficient USDC balance returns 402 Payment Required","Server-side calculation engine errors return 500 with no report"],"whenToPreferThis":"Choose this endpoint when an autonomous agent needs a deterministic, cryptographically attested profit and cash-flow report — especially for compliance, auditing, or financial transparency of agent-operated ventures. Prefer this over generic bookkeeping APIs when you need Ed25519-signed, schema-versioned reports specifically designed for autonomous agent economics and x402 payment flows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:41:20.436Z","isFirstParty":false}