Hive A/B Test

Registre officiel Autres

A/B experiment runner for the A2A network with x402 micropayments on Base USDC.

Installation

Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).

Remote (streamable-http)
Claude Code
claude mcp add --transport http hive-a-b-test 'https://hive-mcp-abtest.onrender.com/mcp'
Configuration JSON (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "hive-a-b-test": {
            "type": "http",
            "url": "https://hive-mcp-abtest.onrender.com/mcp"
        }
    }
}

Documentation

Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.

Sommaire
  1. hive-mcp-abtest
  2. How bucket assignment works
  3. Stat-sig calculator
  4. MCP
  5. REST
  6. Storage
  7. Environment
  8. Quickstart
  9. License
  10. Author
  11. Hive Civilization Directory

hive-mcp-abtest

A/B experiment runner for the A2A network. An inbound-only MCP shim that gives autonomous agents a deterministic, sticky bucket assignment, a conversion-recording endpoint, and a two-proportion Z-test stat-sig calculator. Pricing is per call via x402 on Base USDC.

  • $0.001 per abtest_assign
  • $0.005 per abtest_record_conversion
  • abtest_results is free and read-only

The shim does not run experiments on behalf of the caller. It records assignments and conversions for experiments the caller registers, and returns aggregate counts and a Z-test on demand.

How bucket assignment works

Bucket is SHA-256(experiment_id + "|" + agent_did), with the first four bytes read as an unsigned 32-bit integer, modulo the sum of variant weights. The first call writes the result. Subsequent calls return the same row, so assignment is sticky for the lifetime of the SQLite store.

A variant list is [{ id, weight? }, ...]. Weight defaults to 1 per variant. Pass [{id:"control"},{id:"treatment",weight:3}] for a 25/75 split.

Stat-sig calculator

Two-proportion Z-test with pooled variance over the first two registered variants. Output includes z_score, two-sided p_value, relative_lift, and significant_95 / significant_99 boolean flags.

MCP

  • Transport: Streamable HTTP, JSON-RPC 2.0
  • Protocol: 2024-11-05
  • Endpoint: POST /mcp

Tools:

ToolTierPrice
abtest_assign3$0.001
abtest_record_conversion3$0.005
abtest_results0free

REST

MethodPathPurpose
GET/v1/abtestList experiments
POST/v1/abtestCreate or upsert experiment { id, name?, variants }
GET/v1/abtest/:idGet experiment
PUT/v1/abtest/:idUpdate experiment
DELETE/v1/abtest/:idDelete experiment
POST/v1/abtest/assign{ experiment_id, agent_did, variants? } — $0.001
POST/v1/abtest/convert{ experiment_id, agent_did, metric?, value? } — $0.005
GET/v1/abtest/results?experiment_id=...&metric=... — Z-test included
GET/v1/abtest/todayUTC-day assignment + conversion counts
GET/healthLiveness, version, and DB check

Storage

SQLite at /tmp/abtest.db with three tables: experiments, assignments, conversions. Override with DB_PATH.

Environment

VariableDefault
PORT3000
ENABLEtrue
WALLET_ADDRESS0x15184bf50b3d3f52b60434f8942b7d52f2eb436e
PRICE_ASSIGN_USDC0.001
PRICE_CONVERT_USDC0.005
DB_PATH/tmp/abtest.db
X402_ENABLEDtrue

Set X402_ENABLED=false to bypass payment gating in local development.

Quickstart

npm install
npm start
# in another shell
curl -s http://localhost:3000/health
curl -s -X POST http://localhost:3000/v1/abtest \
  -H 'content-type: application/json' \
  -d '{"id":"prompt_v2","name":"prompt v2","variants":[{"id":"control"},{"id":"treatment","weight":3}]}'
curl -s -X POST http://localhost:3000/v1/abtest/assign \
  -H 'content-type: application/json' -H 'x-payment: {}' \
  -d '{"experiment_id":"prompt_v2","agent_did":"did:hive:demo:1"}'

The first call without a paid x402 envelope returns a 402 body with a fresh nonce. Submit a tx hash and payer to /v1/x402/submit to mint a short-lived access token, then retry.

License

MIT. See LICENSE.

Author

Steve Rotzin · steve@thehiveryiq.com · https://www.thehiveryiq.com

Hive Civilization Directory

Part of the Hive Civilization — agent-native financial infrastructure.

Brand: #C08D23

Questions fréquentes

Qu'est-ce que Hive A/B Test ?

A/B experiment runner for the A2A network with x402 micropayments on Base USDC.

Comment installer Hive A/B Test ?

Il fonctionne comme serveur distant. Dans Claude Code : claude mcp add --transport http hive-a-b-test 'https://hive-mcp-abtest.onrender.com/mcp'. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.

Faut-il une clé API pour Hive A/B Test ?

Son entrée au registre n'indique aucune clé ni secret obligatoire. Certaines fonctions peuvent tout de même demander un compte auprès du service auquel il se connecte.

Hive A/B Test est-il open source ?

Oui. Son code est sur GitHub sous licence MIT.

Qui maintient Hive A/B Test ?

Il est publié par srotzin. AI.tn le référence sans le maintenir ni le recommander.

Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.