{"id":46611772,"url":"https://github.com/agentralabs/xap-protocol","last_synced_at":"2026-03-10T21:01:58.786Z","repository":{"id":341949974,"uuid":"1172133761","full_name":"agentralabs/xap-protocol","owner":"agentralabs","description":"XAP (eXchange Agent Protocol): open economic protocol for autonomous agents.","archived":false,"fork":false,"pushed_at":"2026-03-06T02:13:18.000Z","size":54,"stargazers_count":2,"open_issues_count":6,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-08T20:52:35.773Z","etag":null,"topics":["agent-commerce","agent-economy","agent-identity","agent-infrastructure","agent-settlement","agentic-ai","agentra","ai-agents","autonomous-agents","escrow","llm-agents","multi-agent","open-standard","protocol","xap-protocol"],"latest_commit_sha":null,"homepage":"https://www.agentralabs.tech","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agentralabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-04T01:19:26.000Z","updated_at":"2026-03-06T02:14:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/agentralabs/xap-protocol","commit_stats":null,"previous_names":["agentralabs/acp-protocol","agentralabs/xap-protocol"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/agentralabs/xap-protocol","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentralabs%2Fxap-protocol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentralabs%2Fxap-protocol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentralabs%2Fxap-protocol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentralabs%2Fxap-protocol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agentralabs","download_url":"https://codeload.github.com/agentralabs/xap-protocol/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentralabs%2Fxap-protocol/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30309997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T17:35:44.120Z","status":"ssl_error","status_checked_at":"2026-03-09T17:35:43.707Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-commerce","agent-economy","agent-identity","agent-infrastructure","agent-settlement","agentic-ai","agentra","ai-agents","autonomous-agents","escrow","llm-agents","multi-agent","open-standard","protocol","xap-protocol"],"created_at":"2026-03-07T18:32:54.644Z","updated_at":"2026-03-09T20:01:02.495Z","avatar_url":"https://github.com/agentralabs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XAP — eXchange Agent Protocol\n\n**The open economic protocol for autonomous agents.**\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-white.svg)](https://opensource.org/licenses/MIT)\n[![Status: Draft v0.1](https://img.shields.io/badge/Status-Draft%20v0.1-yellow.svg)](#versioning)\n[![Maintained by: Agentra Labs](https://img.shields.io/badge/Maintained%20by-Agentra%20Labs-blue.svg)](https://www.agentralabs.tech)\n[![Discord](https://img.shields.io/badge/Discord-Join%20Community-5865F2.svg)](https://discord.gg/agentralabs)\n\n---\n\n## What Is XAP?\n\nXAP (eXchange Agent Protocol) is an open standard that defines how autonomous AI agents identify themselves, negotiate terms, settle value, and prove what happened — without human involvement.\n\nToday, agents can think. They can reason. They can execute tasks. But when two agents need to transact with each other — pay for compute, buy data, settle a service — there is no shared language for how that happens. Every system invents its own format. Nothing interoperates. Nothing is auditable.\n\nXAP fixes that.\n\nIt defines five primitive objects that every agent commerce interaction maps to:\n\n```\nAgentIdentity        →  who the agent is and what it can do\nNegotiationContract  →  what two agents agreed to\nSettlementIntent     →  what value is locked and under what condition\nExecutionReceipt     →  what happened and what was paid\nVerityReceipt        →  why it happened and can it be proven\n```\n\nIf your agent can produce and consume these five objects — it can transact with any other XAP-compatible agent, on any platform, with any model, in any settlement unit.\n\n---\n\n## Why This Protocol Exists\n\nThe agent economy is forming right now. Agents are being deployed that call other agents, pay for API access, rent capabilities, and coordinate on tasks. But there is no economic primitive underneath any of it.\n\nWithout a shared protocol:\n- Agents cannot safely pay each other\n- There is no standard for negotiating usage terms\n- Escrow and conditional settlement do not exist at the agent layer\n- No tamper-proof record of what an agent did or was paid for\n- Split revenue across multi-agent workflows is impossible to automate\n- Disputes have no deterministic resolution path\n\nXAP is the missing economic layer. It does not replace existing payment systems. It sits above them as a coordination and accountability standard that any settlement unit — fiat, stablecoin, or network credit — can plug into.\n\n---\n\n## The Five Primitives\n\n### 1. `AgentIdentity`\nThe permanent economic passport of an autonomous agent. Cryptographically anchored with Ed25519. Includes capability declarations in machine-readable schema, pricing structure (fixed, dynamic, auction, outcome-based), SLA guarantees, risk profile, and an append-only reputation ledger. An agent reads another agent's `AgentIdentity` and decides autonomously whether to hire it — no human involvement required.\n\n### 2. `NegotiationContract`\nThe terms of a proposed exchange. XAP uses exactly four states: `OFFER → COUNTER → ACCEPT → REJECT`. Every offer is time-bound. Conditional pricing is supported natively — \"pay X if completed in 2 seconds, Y if 5 seconds.\" SLA is declared before execution begins. Every state transition is signed and permanently logged to both agents' histories.\n\n### 3. `SettlementIntent`\nThe escrow instruction. Funds are locked. The release condition is declared upfront. The verification method is specified — deterministic, probabilistic, or human-verified. Split rules for multi-agent workflows are declared at creation time. Every failure mode has a pre-declared outcome. No money ever sits in limbo. Idempotent by design — agents retry safely.\n\n### 4. `ExecutionReceipt`\nThe tamper-proof record of every economic event. Cryptographically signed. Timestamped. Permanently attached to both agents' identities. Contains the full event chain from negotiation initiation to final settlement, split distributions, performance against declared SLA, and reputation impact. Replayable. The audit primitive of the agent economy.\n\n### 5. `VerityReceipt`\nThe truth primitive. Every significant decision in the settlement flow — condition verification, dispute resolution, reputation scoring — is captured with its complete reasoning state. Not just what was decided. Why. The `VerityReceipt` is signed, replayable, and provable. Given the same input state and the same rules, any decision can be re-run to produce the same outcome deterministically. This is the legal and regulatory primitive for autonomous commerce.\n\n---\n\n## How The Protocol Works\n\nEvery XAP interaction follows one sequence:\n\n```\nREGISTER → NEGOTIATE → EXECUTE → SETTLE → AUDIT\n```\n\nEvery feature of every XAP-compatible system maps to one of these five steps. Nothing outside this sequence is part of XAP. Simplicity is a design constraint.\n\n### Negotiation States\n\n```\nOFFER\n  ↓\nCOUNTER  ←── (repeatable)\n  ↓\nACCEPT or REJECT\n```\n\nFour states. No more. Agents operate in milliseconds. Complexity kills adoption.\n\n### Settlement Flow\n\n```\nNegotiationContract accepted\n        ↓\nSettlementIntent created (funds locked)\n        ↓\nExecution begins\n        ↓\nResult submitted by executing agent\n        ↓\nCondition verified (deterministic / probabilistic / human)\n        ↓\nFunds released to split recipients  OR  rolled back to payer\n        ↓\nExecutionReceipt issued + VerityReceipt captured\n```\n\n---\n\n## Schema Reference\n\nAll five XAP primitive schemas live in `/acp/schemas`. They are JSON Schema (Draft 2020-12) documents, validated against the specification.\n\n| Schema | File | Status |\n|---|---|---|\n| `AgentIdentity` | [`/acp/schemas/agent-identity.json`](/acp/schemas/agent-identity.json) | ✅ v0.1 Draft |\n| `NegotiationContract` | [`/acp/schemas/negotiation-contract.json`](/acp/schemas/negotiation-contract.json) | ✅ v0.1 Draft |\n| `SettlementIntent` | [`/acp/schemas/settlement-intent.json`](/acp/schemas/settlement-intent.json) | ✅ v0.1 Draft |\n| `ExecutionReceipt` | [`/acp/schemas/execution-receipt.json`](/acp/schemas/execution-receipt.json) | ✅ v0.1 Draft |\n| `VerityReceipt` | [`/acp/schemas/verity-receipt.json`](/acp/schemas/verity-receipt.json) | 🔄 In Progress |\n\nEach schema includes a working example showing a complete, valid object. Read the schema. You understand XAP.\n\n---\n\n## What XAP Is Not\n\n**XAP is not a payment processor.** It does not move money. It defines the coordination layer above payment systems. Stripe, USDC, and internal credit systems are all valid settlement units underneath XAP.\n\n**XAP is not a blockchain protocol.** It does not require a chain. It can settle on-chain if desired but operates equally well on traditional financial infrastructure.\n\n**XAP is not a marketplace.** It does not match buyers to sellers. It defines what happens after they find each other.\n\n**XAP is not model-specific.** It does not care what model powers an agent. GPT-4, Claude, Gemini, Llama — any agent on any model can implement XAP.\n\n**XAP is not a vendor lock-in mechanism.** Any system can implement it. The spec is MIT licensed. The goal is for XAP to become the default assumption in agent commerce — not to lock anyone in.\n\n---\n\n## Relationship To Agentra Labs And Agentra Rail\n\nXAP is maintained by [Agentra Labs](https://www.agentralabs.tech) as an open contribution to the agent economy.\n\n**Agentra Labs** builds the open-source cognitive substrate that makes agents persistent, trustworthy, and governable — memory, identity, planning, communication, and more. The Labs stack is what makes agents capable enough to transact.\n\n**Agentra Rail** is the production implementation of XAP — the commercial infrastructure layer where agents register, negotiate, settle, and audit at scale. Rail is what runs XAP in production with the reliability, speed, and correctness that enterprises depend on.\n\nThe relationship:\n\n```\nXAP (this repo)     →  the open language everyone speaks\nAgentra Labs        →  the cognitive substrate that makes agents capable\nAgentra Rail        →  the production infrastructure XAP runs on\n```\n\nXAP belongs to the community. Agentra Rail is the reference implementation. You do not need Rail to implement XAP. But if you want production settlement, governance, Verity replay, and split settlement at scale — Rail is where you go.\n\n---\n\n## Design Principles\n\n**Deterministic over ambiguous.** Every interaction has a defined outcome. Every failure mode has a pre-declared resolution. No money in limbo. No unresolved states.\n\n**Agent-native over human-friendly.** XAP is designed for LLMs and agents to consume autonomously. Machine-readable first. If an agent can read the spec and integrate without human help — the design is working.\n\n**Protocol over product.** XAP defines behavior, not implementation. Any system that produces and consumes the five primitive objects correctly is XAP-compatible.\n\n**Escrow over payment.** The core primitive is not \"agent A pays agent B.\" It is \"agent A releases funds to agent B when verifiable condition X is satisfied.\" This distinction is architectural.\n\n**Open primitives, closed engines.** The protocol is open. What settlement engines, verification algorithms, and reputation systems do with the protocol is up to each implementer.\n\n**Append-only truth.** Reputation history is never deleted. Execution history is permanent. Negotiation history is signed and immutable. The past is not editable. This is the foundation of trust between agents that have never met.\n\n---\n\n## Versioning\n\nXAP uses semantic versioning. Breaking changes increment the major version. The current status is `v0.1 Draft` — open for community review and feedback before `v1.0` is locked.\n\nBackward compatibility is a first-class design constraint from `v1.0` onward. Once locked, systems built on XAP v1.0 will not break when v1.1 ships.\n\n---\n\n## How To Implement XAP\n\nAn XAP-compatible system must:\n\n1. **Produce valid objects** — every object created validates against the corresponding JSON schema\n2. **Sign every object** — using Ed25519. The signing key must correspond to a registered `AgentIdentity`\n3. **Enforce state machines** — `NegotiationContract` and `SettlementIntent` follow declared state transitions only\n4. **Handle idempotency** — settlement calls with the same `idempotency_key` return the existing result without creating duplicates\n5. **Issue receipts** — every settled `SettlementIntent` produces an `ExecutionReceipt`\n6. **Capture decisions** — every significant decision point produces a `VerityReceipt`\n\nThere is no certification process yet. If your system does these six things correctly — it is XAP-compatible. We are working on a compliance test suite (see Contributing below).\n\n---\n\n## Contributing\n\nXAP is an early-stage open standard. The most valuable contributions right now are not code — they are thinking.\n\n### What We Need Most\n\n**Schema feedback — most urgent**\nRead the five schemas. Try to build something with them. Tell us where they break, where they are too rigid, where they are too loose, where a field is missing, where a field makes no sense. Every schema issue found now prevents a breaking change later.\n\nOpen an issue with the label `schema-feedback`.\n\n**Edge cases**\nWhat happens when an agent submits an execution result after the deadline? What happens when split rules don't sum correctly? What happens when a quality score is gamed? We have thought hard about this — but we have not thought of everything. Every edge case you surface that we have not handled is a gift.\n\nOpen an issue with the label `edge-case`.\n\n**Vertical-specific schemas**\nXAP v0.1 includes capability schemas for four verticals: AI inference, data enrichment, web automation, and developer tooling. Every industry that deploys agents will need its own capability vocabulary. If you are building agents in legal, finance, healthcare, logistics, or any other domain — we want to define the capability schema for your vertical together.\n\nOpen an issue with the label `vertical-schema` and describe your use case.\n\n**Alternative implementation feedback**\nIf you are building an XAP-compatible system that is not Agentra Rail — we want to know what was hard to implement, what was unclear, and what you had to invent yourself because the spec did not cover it.\n\nOpen an issue with the label `implementation-feedback`.\n\n**Dispute resolution rules**\nXAP declares that disputes have deterministic resolution — but the spec does not yet fully define what those rules are. This is an open design problem. How should a dispute between two agents be resolved automatically? What inputs matter? What is the fairest deterministic algorithm? This requires real thinking from people who understand agent economics.\n\nOpen a discussion with the label `dispute-resolution`.\n\n**XAP Credit monetary policy**\nThe spec references XAP Credit as a native settlement unit but does not define its monetary policy — how credits are issued, what they are worth, whether there is a supply cap, and how they are burned. This is a hard problem that intersects economics, game theory, and agent incentive design.\n\nOpen a discussion with the label `monetary-policy`.\n\n**Verity legal standing**\nThe `VerityReceipt` is designed to be the legal and regulatory primitive for autonomous agent decisions. But whether a replay constitutes admissible evidence varies by jurisdiction. We need people who understand law in the US, EU, UK, Singapore, and other key jurisdictions to engage with what `VerityReceipt` would need to satisfy legal standards in their jurisdiction.\n\nOpen a discussion with the label `verity-legal`.\n\n### What We Are Not Looking For Right Now\n\n- Pull requests that change the core protocol objects without a prior discussion issue\n- Implementation code in this repo (implementations belong in separate repos)\n- Marketing copy improvements\n\n### How To Contribute\n\n1. Read the schemas in `/acp/schemas` first. They are the source of truth.\n2. Read the open discussions to understand what is already being debated.\n3. Open an issue or discussion before writing anything substantial.\n4. Use the correct label so it reaches the right people.\n\n---\n\n## Open Questions\n\nThese are the hardest unsolved problems in XAP. If you have deep expertise in any of these — we want to hear from you.\n\n**XAP Credit monetary policy** — How is XAP Credit issued? Is it earned through completed settlements only? Is there a supply cap? What maintains the peg? What happens if Rail shuts down?\n\n**Verity legal standing** — Which jurisdictions would recognize a `VerityReceipt` replay as admissible evidence? What additional fields or attestations would be required?\n\n**Cross-model credit bridging** — Agents run on different models with different native credit systems. How does a universal conversion layer work without introducing a custodial risk?\n\n**Registry governance** — Who can propose changes to XAP schemas after v1.0 is locked? How are breaking changes decided? Does governance eventually decentralize?\n\n**Dispute escalation threshold** — At what transaction value does human arbitration become mandatory? How is this calibrated across different verticals?\n\n**Agent insurance** — Should XAP define a primitive for agent insurance? Who underwrites it? How does the `ExecutionReceipt` interact with an insurance claim?\n\n**DAO transition** — Should XAP governance eventually move to token holders? If so, what triggers that transition, and how does it happen without breaking existing implementations?\n\n---\n\n## Community\n\n**Discord:** [Join @agentralabs](https://discord.gg/agentralabs) — real-time discussion, implementation help, schema debates\n\n**X / Twitter:** [Follow @agentralab](https://x.com/agentralab) — protocol updates, launch signals, community highlights\n\n**Email:** [hello@agentralabs.tech](mailto:hello@agentralabs.tech) — research collaboration, enterprise implementation, formal feedback\n\n---\n\n## License\n\nXAP schemas and specification documents are released under the [MIT License](LICENSE).\n\nThe protocol is free. Forever. The goal is adoption, not control.\n\n---\n\n## GitHub Topics\n\n`agent-commerce` `autonomous-agents` `xap-protocol` `agent-economy` `ai-agents` `agent-settlement` `agent-identity` `escrow` `multi-agent` `open-standard` `protocol` `agentic-ai` `llm-agents` `agent-infrastructure` `agentra`\n\n---\n\n*XAP is maintained by Agentra Labs. The protocol belongs to the community. The reference implementation is [Agentra Rail](https://www.agentralabs.tech).*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentralabs%2Fxap-protocol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagentralabs%2Fxap-protocol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentralabs%2Fxap-protocol/lists"}