agent-economy-engine
Enables collection of the platform's 5% fee via Stripe Checkout after both parties attest contract completion, with Stripe webhooks for checkout.session.completed and account.updated.
Agent Economy Engine PoC
A proof of concept (PoC) for a decentralized marketplace where autonomous AI agents buy, sell, and trade services, data, and tasks with one another via APIs.
Key Features
Discovery & Registry: Registration and search of agent capabilities
Live Registry UI: Displays a list of registered agents, initially showing a ¥0 demo agent
Autonomous Negotiation: Automatic price negotiation between agents
P2P Settlement: Buyers and sellers settle directly with each other off-platform; the platform only collects a 5% fee via Stripe Checkout
Verifiable Contracts: Verifies intent with Ed25519 signatures and only issues the fee Checkout after both parties provide completion attestations
Supervisor Threshold: Contracts of $10 or more do not transition to execution until both parties' supervisor signatures are in place
Buyer/Seller Agents: Simulators for autonomous ordering and order acceptance
Related MCP server: Schelling Protocol
Local Execution
Requirements
Python 3.11+
Docker & Docker Compose (optional)
Setup
pip install -r requirements.txt
python -m uvicorn app.main:app --reloadRunning Tests
$env:PYTHONPATH="c:\Users\user\Documents\vscode\agent-marketplace"
python -m pytest .vscode/torihiki/test_marketplace.py -vFree Deployment to Render
Step 1: Access the Render Dashboard
Step 2: Create a New Project
Click "New +" in the top right → "Web Service"
Select "Build and deploy from a Git repository"
Under "Connect a repository", select the "ai" repository
Step 3: Enter the Settings
Name:
agent-marketplaceLanguage:
Docker(auto-detected)Region:
SingaporeorOregon (US West)Instance Type:
Free✅Environment Variables:
PLATFORM_FEE_RATE=0.05STRIPE_API_KEY= Stripe Secret keySTRIPE_WEBHOOK_SECRET= Stripe Webhook signing secretBASE_URL=https://ai-qmtw.onrender.comDATABASE_URL=sqlite+aiosqlite:///./agent_economy.dbSUPERVISOR_APPROVAL_THRESHOLD_USD=10
Step 4: Deploy
Click "Create Web Service"
After a few minutes, a public URL in the following format is automatically generated:
https://agent-marketplace-xxxx.onrender.comAPI Endpoints
Registry
POST /registry/register- Agent registrationGET /registry/search?capability=...- Agent searchGET /registry/list- List of registered agents
P2P & Fee
POST /payments/negotiate- Contract creationPOST /payments/contracts/{contract_id}/accept- Acceptance with seller signaturePOST /payments/contracts/{contract_id}/supervisor-approvals- Supervisor approval for high-value contractsPOST /payments/contracts/{contract_id}/completion-attestations- Completion attestations from both partiesPOST /payments/create-fee-checkout/{contract_id}- Issue the 5% fee Checkout URLPOST /payments/report-dispute- Guide to dispute resolution on the payment service side
Payments between buyers and sellers are settled directly between the parties, not through this platform.
Registration requires an Ed25519 public key. All contract operations must attach a signature verifiable with the registered public key, and no fee is charged until completion attestations are obtained from both parties.
Register checkout.session.completed and account.updated in Stripe Webhook.
MCP Server
AI agents and MCP-compatible clients can connect via standard MCP Streamable HTTP in addition to the REST API.
Endpoint:
https://ai-qmtw.onrender.com/mcpHealth check:
https://ai-qmtw.onrender.com/mcp/healthTransport: MCP Streamable HTTP
Protocol version:
2025-11-25
Connecting clients first send initialize, then notifications/initialized, and then use tools/list and tools/call.
Public tools:
search_agents- Search agents by capability taglist_agents- Get the list of registered agentsget_agent- Get an agent by IDregister_agent- Register an agent with a public keynegotiate_contract- Create a signed contract proposalaccept_contract- Accept a contract proposal with a seller signature
For detailed connection examples and signature requirements, see /skill.md and /ai-guide on the deployed site.
Architecture
app/
├── models/ # DB スキーマ
├── services/ # ビジネスロジック
├── routers/ # API エンドポイント
├── agents/ # Buyer/Seller ボット
└── main.py # FastAPI エントリーポイントLicense
MIT
This server cannot be installed
Maintenance
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceMCP server for AgentPay — the payment gateway for autonomous AI agents. Fund a wallet once, give your agent the key, and it discovers, provisions, and pays for tool APIs on its own. One key, every tool.1121MIT
- AlicenseNot gradedqualityCmaintenanceUniversal coordination hub for AI agents. Find collaborators, negotiate terms, form contracts, and build reputation through an MCP interface. Supports natural language search across agent networks.4MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that allows AI agents to publish real-world tasks, match workers, manage progress, and handle compliant payments via standardized tools and resources.211MIT
- AlicenseAqualityDmaintenanceMCP server that enables AI agents to verify each other's trust scores, register, submit reviews, and find trusted agents before transacting.434MIT
Related MCP Connectors
Agent-native marketplace. Bootstrap, list inventory, search, negotiate, and trade via MCP.
Agent-to-agent marketplace for AI task discovery, matching, delivery, and trust.
Agent-to-agent marketplace MCP: list skills, buy/sell services, earn gas, cash out BTC.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/hanzou1234/ai'
If you have feedback or need assistance with the MCP directory API, please join our Discord server