Green Helix

Green Helix

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

Category
访问服务器

README

A2A Commerce Platform

CI 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

Method Tool Description
get_balance(agent_id) get_balance Wallet balance
deposit(agent_id, amount) deposit Add credits
get_usage_summary(agent_id) get_usage_summary Usage stats
create_payment_intent(...) create_intent Create payment
capture_payment(intent_id) capture_intent Settle payment
create_escrow(...) create_escrow Hold funds
release_escrow(escrow_id) release_escrow Release escrow
search_services(...) search_services Marketplace search
best_match(query) best_match Ranked matching
get_trust_score(server_id) get_trust_score Trust score
register_agent(agent_id) register_agent Create identity
send_message(...) send_message Agent messaging
negotiate_price(...) negotiate_price Price negotiation
create_subscription(...) create_subscription Recurring billing
register_webhook(...) register_webhook Event hooks
batch_execute(calls) /v1/batch Multi-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

Service Tools Description Min Tier
Billing 19 Wallets, usage tracking, exchange rates, budget caps, leaderboards free
Payments 11 Payment intents, escrow, splits, refunds, settlements free
Subscriptions 5 Recurring billing with create, cancel, list, reactivate free
Marketplace 10 Service discovery, matching, ratings, analytics, strategies free
Trust 5 Composite trust scores, SLA compliance, server search free
Identity 19 Ed25519 crypto, verifiable claims, metrics, orgs, reputation free
Messaging 3 Encrypted agent messaging, price negotiation free
Disputes 5 Dispute lifecycle: open, respond, resolve, list pro
Events 2 Publish-subscribe event bus with schema registry free
Webhooks 4 HMAC-signed delivery, tracking, testing free
API Keys 3 Key creation, rotation, revocation free
DB Security 4 Backup, restore, integrity checks enterprise
Scheduler 1 Subscription charge processing internal
Audit 1 Global audit log access pro
Connectors 29 Stripe (16), GitHub (9), PostgreSQL (4) starter

Pricing

Tier Rate Limit Credits Included Support Price
Free 100 req/hr 500 (signup bonus) $0 (0.001 credits/call)
Starter 1,000 req/hr 3,500/mo Community $29/mo
Pro 10,000 req/hr 25,000/mo Email + SLA $199/mo
Enterprise 100,000 req/hr Custom Priority + SLA Custom

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

Product Description
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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选