Skip to content

Open standard for AI-to-AI commerce. Let buyer agents and seller agents negotiate directly, no platform needed. Inspired by Perplexity vs Amazon.

License

Notifications You must be signed in to change notification settings

acp0-protocol/acp0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ACP0: Agent-Commerce Protocol

The HTTP of AI Shopping / AI ่ดญ็‰ฉ็š„ HTTP ๅ่ฎฎ

Python License Status Tests

Open standard for AI-to-AI commerce. Let buyer agents and seller agents negotiate directly, no platform needed.

AI ๅฏน AI ่ดญ็‰ฉ็š„ๅผ€ๆ”พๆ ‡ๅ‡†ๅ่ฎฎใ€‚่ฎฉไนฐๅฎถไปฃ็†ไธŽๅ–ๅฎถไปฃ็†็›ดๆŽฅๅๅ•†๏ผŒๆ— ้œ€ๅนณๅฐไธญไป‹ใ€‚


โšก Why ACP0 is Fast (Not Another Slow Blockchain App)

ACP0 is NOT a blockchain e-commerce platform.

It's a high-speed off-chain protocol with optional on-chain anchoring:

  • ๐Ÿ’จ 99% traffic: MQTT/HTTP messaging (< 50ms latency)
  • โ›“๏ธ 1% traffic: Blockchain hashes for dispute resolution
  • ๐Ÿšซ 0% dependency: Works without any blockchain at all

Think of it as:

  • ๐Ÿ“ก Broadcast: MQTT (like WhatsApp for agents)
  • ๐Ÿ›๏ธ Trust: Blockchain (like notary, only used when disputes happen)

Example - Buying a $500 laptop:

1. Your agent broadcasts intent via MQTT     โ†’  0ms,  $0
2. 10 sellers respond in 50ms                โ†’  Off-chain
3. You buy with Stripe                       โ†’  Off-chain
4. Optional: Store deal hash on Arbitrum     โ†’  $0.0002

Blockchain is the "stone tablet on the roadside", not the highway.


๐Ÿš€ Current Status: v0.9.0 (MVP)

What's Ready:

  • โœ… Complete protocol specification (Intent/Offer/Deal)
  • โœ… ECC signature and verification
  • โœ… Reference implementation with 32 passing tests
  • โœ… Working demo (1-2s transaction time)

What's Coming in v1.0 (Q1 2025):

  • ๐Ÿšง MQTT network layer (real-time broadcast)
  • ๐Ÿšง HTTP Indexer (distributed discovery)
  • ๐Ÿšง Blockchain anchoring (optional trust layer)
  • ๐Ÿšง Async/await refactoring

What This Means: v0.9.0 proves the protocol works. It's ready for:

  • โœ… Protocol discussion and feedback
  • โœ… Academic research
  • โœ… Building proof-of-concepts
  • โŒ Not yet for production e-commerce (wait for v1.0)

See ROADMAP.md for the full plan.


๐ŸŽฏ What is ACP0?

The Story Behind It

In November 2024, Amazon sued Perplexity for building "Comet" - an AI agent that logs into Amazon, compares products, and buys based on real user needs instead of paid ads.

Amazon's lawsuit revealed a fundamental conflict:

  • Platforms want control: They make money from ads and recommendations
  • Users want agents: AI that works for them, not for advertisers

ACP0 is the answer: What if agents don't need platforms at all?

How It Works

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Buyer Agent โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€ 1. Broadcast Intent โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ถโ”‚  MQTT/HTTP  โ”‚
โ”‚  (User AI)  โ”‚                                    โ”‚   Network   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
       โ–ฒ                                                  โ”‚
       โ”‚                                                  โ”‚ 2. Forward
       โ”‚                                                  โ–ผ
       โ”‚                                           โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
       โ”‚                                           โ”‚Seller Agent โ”‚
       โ”‚                                           โ”‚Seller Agent โ”‚
       โ”‚                                           โ”‚Seller Agent โ”‚
       โ”‚                                           โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
       โ”‚                                                  โ”‚
       โ”‚                                                  โ”‚ 3. Send Offers
       โ”‚                                                  โ–ผ
       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ 4. Compare & Select โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ”‚
                            โ”‚ 5. Payment & Delivery
                            โ–ผ
                      [Transaction Complete]

Core Components:

  • Intent: Structured shopping request (JSON)
  • Offer: Merchant's response with price, stock, delivery
  • Deal: Payment and fulfillment confirmation
  • Signature: ECC-based verification (no middleman needed)

โšก Quick Start

Installation

pip install acp0

Buyer Agent (3 lines)

from acp0 import BuyerAgent

agent = BuyerAgent()
offers = agent.broadcast(
    category="laptop",
    budget_range=(4000, 6000),
    currency="CNY",
    location="shanghai"
)

best = agent.select_best(offers)
agent.purchase(best)

Seller Agent (3 lines)

from acp0 import SellerAgent

agent = SellerAgent(
    name="MyShop",
    inventory="./products.json",
    location="shanghai"
)

agent.listen()  # Start receiving intents and auto-respond

That's it! Two agents just completed a transaction without any platform.

Run the Demo

# Clone the repository
git clone https://github.com/acp0/acp0.git
cd acp0

# Install dependencies
pip install -e .

# Run minimal demo
python examples/minimal_demo.py

Expected output:

๐Ÿš€ ACP0 Minimal Demo Starting...
๐Ÿ“ฆ Setting up Seller Agent...
โœ“ Seller is listening for Intents...
๐Ÿ›๏ธ Setting up Buyer Agent...
โœ“ Buyer is ready
๐Ÿ“ข Buyer broadcasting Intent...
๐Ÿ“ฌ Received 1 offer(s)
๐Ÿ† Best Offer Selected
๐Ÿ’ณ Buyer confirming purchase...
โœ… Deal confirmed
๐ŸŽ‰ Transaction Complete!

๐ŸŒŸ Key Features

โœ… Platform-Free

  • Works with WeChat shops, Shopify stores, 1688 suppliers, or any merchant
  • No listing fees, no commission cuts

โœ… Agent-First Design

  • Structured JSON for AI agents (not keyword search for humans)
  • Real-time negotiation between buyer AI and seller AI

โœ… Trust Without Middlemen

  • Cryptographic signatures verify every message
  • Optional blockchain anchoring for disputes
  • Decentralized reputation (coming in v1.0)

โœ… Lightweight & Extensible

  • Core spec: 3 message types, <500 lines of code
  • Plug in any payment method (Stripe, Alipay, crypto)
  • Add custom fields without breaking compatibility

๐Ÿ“– Documentation

Core Documents:

For Developers:


๐Ÿš€ Use Cases

1๏ธโƒฃ WeChat Shop Discovery

Problem: 1M+ WeChat shops have great products but no way to be discovered by AI agents
Solution: Shops implement ACP0, agents can find them via intent broadcast

2๏ธโƒฃ Cross-Border B2B

Problem: Alibaba/1688 suppliers pay high platform fees
Solution: Direct agent-to-agent negotiation, no middleman

3๏ธโƒฃ Private Domain Commerce

Problem: Influencers sell via manual messages (inefficient)
Solution: Deploy a seller agent, handle inquiries 24/7

4๏ธโƒฃ AI Shopping Assistants

Problem: Today's AI can only search Amazon/Taobao (controlled by ads)
Solution: Access decentralized merchant network with better prices


๐Ÿ› ๏ธ Implementation Status

Component Status Notes
Core Protocol โœ… Complete Intent/Offer/Deal messages
Signatures โœ… Complete ECC-based verification
Agents โœ… Complete Buyer and Seller logic
In-Memory Network โœ… Complete Demo/testing only
MQTT Network ๐Ÿšง Planned v1.0 Real-time broadcast
HTTP Indexer ๐Ÿšง Planned v1.0 Distributed discovery
Blockchain ๐Ÿšง Planned v1.0 Optional anchoring
Smart Contracts ๐Ÿ“‹ Planned v2.0 Dispute resolution

See ROADMAP.md for detailed plans.


๐Ÿงช Testing

# Run all tests
pytest tests/ -v

# Run with coverage
pytest tests/ --cov=acp0 --cov-report=term-missing

# Run specific test
pytest tests/test_messages.py -v

Current Test Status:

  • โœ… 32 tests passing
  • โœ… 100% pass rate
  • โœ… Core protocol fully tested

๐Ÿค Contributing

We welcome contributions from everyone! Here's how to get started:

  1. Read CONTRIBUTING.md - Guidelines and workflow
  2. Check Good First Issues - Easy tasks for newcomers
  3. Join the discussion - GitHub Issues or Discussions
  4. Submit a PR - We review within 48 hours

Priority Areas for v1.0:

  • ๐Ÿ”ด MQTT network layer implementation
  • ๐Ÿ”ด HTTP Indexer service
  • ๐Ÿ”ด Async/await refactoring
  • ๐ŸŸก Additional language SDKs (Node.js, Rust, Go)
  • ๐ŸŸก Documentation improvements

๐ŸŒ Community

Communication Channels

  • GitHub Issues - Bug reports, feature requests, RFCs
  • GitHub Discussions - General questions and ideas
  • Discord - Real-time chat (coming soon)
  • Twitter - @acp0protocol
  • ไธญๆ–‡็คพๅŒบ - ๅณๅˆป | ็ŸฅไนŽ

Monthly RFC Meetings

When: First Saturday of each month, 10:00 AM UTC
Where: Zoom (public, link in Discussions)
What: Protocol discussions and RFC voting


๐Ÿ† Hall of Fame

๐Ÿฅ‡ First Production Deployment: [Waiting for you]
๐Ÿฅˆ First Cross-Border Transaction: [Waiting for you]
๐Ÿฅ‰ First 1M GMV Milestone: [Waiting for you]

Want your name here? Ship something awesome with ACP0!


๐Ÿ“œ About This Project

Created by Human + AI Collaboration

ACP0 was designed by @deloog, a non-technical founder, working with Claude (Anthropic), DeepSeek, and KIMI. This project itself is a proof that:

If humans and AI can design protocols together, imagine what agents can achieve in commerce.

ๅฆ‚ๆžœไบบ็ฑปๅ’Œ AI ่ƒฝไธ€่ตท่ฎพ่ฎกๅ่ฎฎ๏ผŒๆƒณ่ฑกไปฃ็†ๅœจๅ•†ไธšไธญ่ƒฝๆˆๅฐฑไป€ไนˆใ€‚

Inspiration

This project was inspired by the Perplexity vs Amazon case, which showed that:

  • AI agents can challenge traditional platforms
  • Users want agents that work for them, not for advertisers
  • The future needs open protocols, not closed platforms

๐Ÿ“„ License

  • Protocol Specification: CC0-1.0 (Public Domain) - Use freely, modify freely
  • Reference Implementation: MIT License
  • Documentation: CC-BY-4.0

๐Ÿ”— Links


๐ŸŒŸ Star History

Star History Chart


Built with โค๏ธ by the ACP0 Community

"The future of shopping is agent-to-agent, not human-to-platform."
"่ดญ็‰ฉ็š„ๆœชๆฅๆ˜ฏไปฃ็†ๅฏนไปฃ็†๏ผŒ่€Œ้žไบบ็ฑปๅฏนๅนณๅฐใ€‚"


๐Ÿ“Š Quick Stats

  • Protocol Version: v0.9.0
  • Tests: 32 passing
  • Transaction Time: 1-2 seconds
  • Lines of Code: ~2,000 (core)
  • Languages: Python (more coming)
  • License: MIT

Ready to build the future of commerce? ๐Ÿš€

Get Started | Read Docs | Contribute | Join Community

About

Open standard for AI-to-AI commerce. Let buyer agents and seller agents negotiate directly, no platform needed. Inspired by Perplexity vs Amazon.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published