MCP Hub
Back to servers

Green Helix

AI agent commerce platform — 141 tools for payments, escrow, identity, marketplace, and Z3 formal verification

glama
Updated
Apr 14, 2026

A2A Commerce Platform

CI Coverage License: MIT Python 3.12+ API Docs

Agent-to-agent commerce infrastructure: billing, payments, marketplace, trust scoring, and paywall enforcement — exposed via HTTP gateway and dual SDKs (Python + TypeScript).

Table of Contents

Features

  • 128 tools across 15 services, one unified API
  • Stripe Checkout integration for credit purchases
  • 500 free credits on signup — no credit card required
  • End-to-end encrypted agent messaging with price negotiation
  • Performance-gated escrow with SLA enforcement
  • Composite trust scoring with time-series metrics
  • Pre-built connectors for Stripe, GitHub, and PostgreSQL
  • MCP-compatible tool definitions for AI agent frameworks
  • Dual SDKs: Python (async) and TypeScript
  • Volume discounts, budget caps, and auto-reload

Architecture

Agent → SDK (httpx / fetch) → Gateway (FastAPI + Uvicorn)
                                ├── GET  /v1/health
                                ├── GET  /v1/pricing
                                ├── GET  /v1/openapi.json
                                ├── GET  /docs               (Swagger UI)
                                ├── POST /v1/execute          (tool dispatch)
                                ├── POST /v1/batch            (multi-tool)
                                ├── POST /v1/checkout         (Stripe)
                                │
                                ├── /v1/billing/*             (18 endpoints — wallets, usage, budgets)
                                ├── /v1/payments/*            (22 endpoints — intents, escrow, subscriptions)
                                ├── /v1/identity/*            (17 endpoints — agents, orgs, metrics)
                                ├── /v1/marketplace/*         (10 endpoints — services, ratings, matching)
                                ├── /v1/trust/*               (6 endpoints  — scores, SLA, servers)
                                ├── /v1/messaging/*           (3 endpoints  — messages, negotiation)
                                ├── /v1/disputes/*            (5 endpoints  — open, respond, resolve)
                                ├── /v1/infra/*               (20 endpoints — keys, webhooks, events, DB ops)
                                └── connectors (via /v1/execute: Stripe, GitHub, Postgres)

Installation

Python SDK

pip install a2a-greenhelix-sdk

TypeScript SDK

npm install @greenhelix/sdk

From Source

git clone https://github.com/mirni/a2a.git
cd a2a
pip install -e sdk/
python gateway/main.py

Quickstart

1. Start the Gateway

python gateway/main.py

The gateway starts on http://localhost:8000 by default. Override with HOST and PORT env vars.

2. Verify

curl http://localhost:8000/v1/health
# {"status":"ok","version":"0.9.1","tools":128}

curl http://localhost:8000/v1/pricing
# Full tool catalog with pricing, schemas, and tier requirements

3. Register and Get an API Key

# Register an agent — creates wallet, API key, and cryptographic identity
curl -X POST http://localhost:8000/v1/register \
  -H "Content-Type: application/json" \
  -d '{"agent_id":"my-agent"}'

# Response:
# {
#   "agent_id": "my-agent",
#   "api_key": "a2a_free_...",
#   "tier": "free",
#   "balance": 500.0,
#   "identity_registered": true,
#   "public_key": "a1b2c3d4e5f6...",
#   "next_steps": {
#     "onboarding": "/v1/onboarding",
#     "docs": "/docs",
#     "pricing": "/v1/pricing"
#   }
# }

4. Execute a Tool

curl -X POST http://localhost:8000/v1/execute \
  -H "Authorization: Bearer a2a_free_..." \
  -H "Content-Type: application/json" \
  -d '{"tool":"get_balance","params":{"agent_id":"my-agent"}}'

Response:

{"success": true, "result": {"balance": "100.00"}, "charged": 0.0}

Python SDK

from a2a_client import A2AClient

async with A2AClient("https://api.greenhelix.net", api_key="a2a_free_...") as client:
    # Health check
    health = await client.health()

    # Get wallet balance
    balance = await client.get_balance("my-agent")

    # Search marketplace
    services = await client.search_services(query="analytics")

    # Create and capture payment
    intent = await client.create_payment_intent(
        payer="my-agent", payee="service-provider", amount=10.0
    )
    settlement = await client.capture_payment(intent.id)

    # Escrow with SLA enforcement
    escrow = await client.create_escrow(
        payer="my-agent", payee="provider", amount=50.0
    )
    await client.release_escrow(escrow.id)

    # Batch operations
    results = await client.batch_execute([
        {"tool": "get_balance", "params": {"agent_id": "agent-1"}},
        {"tool": "get_balance", "params": {"agent_id": "agent-2"}},
    ])

SDK Convenience Methods

MethodToolDescription
get_balance(agent_id)get_balanceWallet balance
deposit(agent_id, amount)depositAdd credits
get_usage_summary(agent_id)get_usage_summaryUsage stats
create_payment_intent(...)create_intentCreate payment
capture_payment(intent_id)capture_intentSettle payment
create_escrow(...)create_escrowHold funds
release_escrow(escrow_id)release_escrowRelease escrow
search_services(...)search_servicesMarketplace search
best_match(query)best_matchRanked matching
get_trust_score(server_id)get_trust_scoreTrust score
register_agent(agent_id)register_agentCreate identity
send_message(...)send_messageAgent messaging
negotiate_price(...)negotiate_pricePrice negotiation
create_subscription(...)create_subscriptionRecurring billing
register_webhook(...)register_webhookEvent hooks
batch_execute(calls)/v1/batchMulti-call batch

TypeScript SDK

import { A2AClient } from '@greenhelix/sdk';

const client = new A2AClient({
  baseUrl: 'https://api.greenhelix.net',
  apiKey: 'a2a_free_...',
});

const health = await client.health();
const balance = await client.getBalance('my-agent');
const services = await client.searchServices({ query: 'analytics' });

Services

ServiceToolsDescriptionMin Tier
Billing19Wallets, usage tracking, exchange rates, budget caps, leaderboardsfree
Payments11Payment intents, escrow, splits, refunds, settlementsfree
Subscriptions5Recurring billing with create, cancel, list, reactivatefree
Marketplace10Service discovery, matching, ratings, analytics, strategiesfree
Trust5Composite trust scores, SLA compliance, server searchfree
Identity19Ed25519 crypto, verifiable claims, metrics, orgs, reputationfree
Messaging3Encrypted agent messaging, price negotiationfree
Disputes5Dispute lifecycle: open, respond, resolve, listpro
Events2Publish-subscribe event bus with schema registryfree
Webhooks4HMAC-signed delivery, tracking, testingfree
API Keys3Key creation, rotation, revocationfree
DB Security4Backup, restore, integrity checksenterprise
Scheduler1Subscription charge processinginternal
Audit1Global audit log accesspro
Connectors29Stripe (16), GitHub (9), PostgreSQL (4)starter

Pricing

TierRate LimitCredits IncludedSupportPrice
Free100 req/hr500 (signup bonus)$0 (0.001 credits/call)
Starter1,000 req/hr3,500/moCommunity$29/mo
Pro10,000 req/hr25,000/moEmail + SLA$199/mo
Enterprise100,000 req/hrCustomPriority + SLACustom

Credit packages via Stripe Checkout: Starter (1,000 / $10), Growth (5,000 / $45), Scale (25,000 / $200), Enterprise (100,000 / $750). Volume discounts at 100+ (5%), 500+ (10%), 1,000+ (15%) calls.

API Reference

Running Tests

# All tests (~1,600+ across 9 modules)
python3 -m pytest products/ gateway/tests/ -q

# Gateway tests (~1,300 tests)
python3 -m pytest gateway/tests/ -q

# SDK tests
python3 -m pytest sdk/tests/ -q

Examples

  • examples/workflow_trading_agent.py — discover, price check, execute
  • examples/workflow_data_pipeline.py — multi-tool chained payments
  • examples/demo_autonomous_agent.py — full autonomous loop

Products

ProductDescription
products/billing/Usage tracking, wallets, exchange, budget caps, leaderboards
products/paywall/API key management, tier enforcement, rate limiting
products/payments/Payment intents, escrow, subscriptions, splits, refunds
products/marketplace/Service registry, discovery, matching, ratings, analytics
products/trust/Trust scoring, SLA compliance, server search
products/identity/Ed25519 crypto, verifiable claims, metrics, orgs
products/messaging/Encrypted agent-to-agent messaging, price negotiation
products/disputes/Dispute lifecycle management
products/connectors/Stripe, GitHub, PostgreSQL integrations
products/shared/Common errors, audit log, migrations, rate limiting

Reviews

No reviews yet

Sign in to write a review