Agent Broker

Created By
Basil AlShukailia month ago
13 MCP tools to find, message, and book appointments at small businesses worldwide. Turns any Cal.com / Calendly / Doctolib / Booksy / OpenTable / Setmore / Square / Acuity / Schedulista / Squarespace / BookMyCity URL into a Claude-bookable smb_id. TCPA / GDPR / CASL compliance enforced. Free tier: 100 ops/month.
Overview

SMB Transaction & Communication Broker

An agent-callable service that lets autonomous AI agents discover, verify, communicate with, schedule with, and transact with the long tail of small and mid-sized businesses (SMBs) — through a single compliance-aware tool surface.

Tests License Python Edge


Why this exists

There are ~60 million long-tail small businesses in the US — barbers, plumbers, accountants, home cleaners — and they have no API surface. AI agents that need to schedule a haircut, get a quote on a roof repair, or send a transactional confirmation today have to either: (a) drive a browser, (b) cold-call by voice, or (c) give up.

This service is the missing layer. Agents call us; we route to the right SMB through whichever channel reaches them fastest — Cal.com → SMS → voice AI → email → web form fallback — with full TCPA / GDPR / CASL / 10DLC / two-party recording-consent compliance enforced as a non-bypassable gate.

What you can do with it

13 operations, all callable via REST, MCP, OpenAI tools, Anthropic tools, or A2A protocol:

OperationWhat it doesCostLatency
find_businessSearch SMBs by vertical + location + capability$0.01<2s
verify_businessConfirm an SMB has the capability you need$0.01<2s
send_messageSMS / email / voice with full compliance pre-check$0.05<5s
capture_leadHand a prospect to an SMB with dedup$0.02<2s
schedule_appointmentBook / reschedule / cancel — direct API → voice fallback$0.15 base + $0.85 success premium<5s sync, async otherwise
send_transactional_confirmationTCPA-exempt confirmations (booking, receipt)$0.04<5s
handle_inboundClassify customer messages (booking / cancel / opt-out / question)$0.03<5s
escalate_to_humanHand off to a human when an agent is stuck$0.10 base + $0.40 success premiumasync
get_statusPoll status of an async operation$0.001<1s
get_outcomeRetrieve final outcome of an async operation$0.001<1s
preview_costEstimate cost / latency / success probability — free$0.00<500ms
self_testService health check — free$0.00<2s
import_booking_urlParse any Cal.com / Calendly / Doctolib / Booksy / OpenTable / 7 more URLs into a bookable SMB$0.01<2s

Quick start (for AI agents)

Option 1: MCP (Claude Desktop, Cursor, Continue, etc.)

// Add to your MCP client config
{
  "mcpServers": {
    "agent-broker": {
      "url": "https://agent-broker-edge.basil-agent.workers.dev/mcp",
      "headers": { "X-Agent-Identity": "$AGENT_BROKER_TOKEN" }
    }
  }
}

Option 2: OpenAI function calling

import httpx, openai
tools = httpx.get("https://agent-broker-edge.basil-agent.workers.dev/.well-known/openai-tools.json").json()["tools"]
client = openai.OpenAI()
resp = client.chat.completions.create(
    model="gpt-4",
    messages=[{"role":"user","content":"Book me a haircut in Atlanta for Saturday under $50"}],
    tools=tools,
)

Option 3: Anthropic tool use

import httpx, anthropic
tools = httpx.get("https://agent-broker-edge.basil-agent.workers.dev/.well-known/anthropic-tools.json").json()["tools"]
client = anthropic.Anthropic()
msg = client.messages.create(
    model="claude-opus-4-5",
    max_tokens=1024,
    tools=tools,
    messages=[{"role":"user","content":"Book me a haircut in Atlanta for Saturday under $50"}],
)

Option 4: Plain REST

curl -X POST https://agent-broker-edge.basil-agent.workers.dev/ops/find_business \
  -H "X-Agent-Identity: $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "vertical": "personal_services",
    "location": {"zip_or_city": "30309"},
    "capability": "haircut"
  }'

Discovery surfaces

We're discoverable through every protocol agents currently use:

ProtocolURL
MCPhttps://agent-broker-edge.basil-agent.workers.dev/mcp
MCP descriptorhttps://agent-broker-edge.basil-agent.workers.dev/.well-known/mcp.json
OpenAI ChatGPT pluginhttps://agent-broker-edge.basil-agent.workers.dev/.well-known/ai-plugin.json
OpenAI function toolshttps://agent-broker-edge.basil-agent.workers.dev/.well-known/openai-tools.json
Anthropic tool_usehttps://agent-broker-edge.basil-agent.workers.dev/.well-known/anthropic-tools.json
A2A (Agent-to-Agent)https://agent-broker-edge.basil-agent.workers.dev/.well-known/agents.json
llms.txthttps://agent-broker-edge.basil-agent.workers.dev/llms.txt
OpenAPI 3.1https://agent-broker-edge.basil-agent.workers.dev/openapi.yaml
Capability manifesthttps://agent-broker-edge.basil-agent.workers.dev/manifest
Service discovery cardhttps://agent-broker-edge.basil-agent.workers.dev/.well-known/agent-service

Why agents pick us (measured, not assumed)

From our agent-simulation harness — 168 trials × 3 personas (cost / quality / latency) across 56 tasks, with noisy agent perception (±15% on price, ±10% on quality, ±20% on latency):

PersonaSelection rateSuccess when selectedWinRate
cost_minimizer94.6%88.7%0.839
quality_maximizer91.1%88.2%0.804
latency_sensitive91.7%88.3%0.810
Aggregate92.5%88.4%0.818

We deliberately included tasks where we should lose — out-of-region SMBs (Tokyo / Mumbai / Berlin), complex web automation, trivial lookups — and the simulation correctly routes those to competitors. See BENCHMARKS.md.

Compliance posture

Every outbound communication passes through compliance/pre_check():

  1. Content classification (gambling / lending / cannabis / adult / spam) — blocks restricted categories.
  2. Opt-out check — TCPA STOP keyword, GDPR right-to-be-forgotten, CASL.
  3. Consent check for marketing — TCPA written consent, GDPR opt-in, CASL implied/express.
  4. 10DLC campaign-registry check for US SMS.
  5. Two-party recording consent for CA / FL / IL / MD / MA / MT / NV / NH / PA / WA.
  6. Audit log entry (PII stored as SHA-256 hash, never plaintext).

Compliance violations surface as ComplianceViolationErrorcompliance_violation API error. Never silently dropped, never bypassed by middleware.

Architecture

AI agent → Cloudflare Worker edge (agent-broker-edge.basil-agent.workers.dev)
               ├── Discovery + MCP read → embedded snapshots  40–70 ms
               └── tools/call + /ops/*  → proxy to origin    170–190 ms
           Python FastAPI on Render (smb-broker.onrender.com)
               Cron */2 keeps Render warm — cold starts eliminated

The Python service exposes 13 operations over REST + MCP + .well-known surfaces. Each handler validates input with Pydantic models, runs through compliance/pre_check, executes via channel-fallback (direct_api → voice_ai → sms → email → web_form), and writes an immutable OutcomeReceipt to the outcome store. Async operations return pending_async. Idempotency is keyed by (agent_id, operation, idempotency_key) with 24h TTL.

Full architecture: docs/architecture.md · Edge layer: edge/README.md

Repo layout

service-root/
├── core/                  # 12 operation handlers + shared Pydantic models
├── channels/              # Twilio, SendGrid, Vapi, Bland, Cal.com, Playwright
├── compliance/            # pre_check, jurisdiction_rules, consent_store, audit_log
├── reliability/           # retry, circuit_breaker, channel_fallback, async_runner
├── billing/               # meter, budget_guard, receipt_signer, pricing_tiers
├── telemetry/             # tracer, log_redactor, metrics_emitter
├── storage/               # outcome_store, idempotency_store
├── supply/                # smb_directory (20+ seed SMBs)
├── onboarding/            # self_serve, verification_flow, channel_capture
├── feedback/              # failure_classifier, attribution_engine, outcome_evaluator
├── optimizer/             # ab_router, selection_analytics, weekly_report
├── agent_interface/       # manifest_server, mcp_server, well_known, identity, webhooks, self_test
├── manifest/              # manifest.json, mcp_tools.json, openapi.yaml
├── api/                   # errors.md, identity.md, async.md
├── docs/                  # mission, architecture, compliance, ADRs
├── deploy/                # Dockerfile, docker-compose.yml, .ci/
├── tests/                 # unit, contract, compliance, fault_injection, agent_sim
├── reports/               # agent_sim_report.json, weekly winrate reports
├── main.py                # FastAPI entry point
├── config.py              # Centralized config from env
└── requirements.txt

Local development

# 1. Clone & install
pip install -r requirements.txt

# 2. Run the test suite
python -m pytest tests/ -q

# 3. Run the agent simulation
python -m tests.agent_sim.harness

# 4. Run the self-test
python -c "import asyncio; from agent_interface.self_test import run_self_test; print(asyncio.run(run_self_test()).all_passed)"

# 5. Start the API
python main.py
# → http://localhost:8000/docs  (Swagger)
# → http://localhost:8000/manifest
# → http://localhost:8000/mcp

Or with Docker:

docker compose -f deploy/docker-compose.yml up

Documentation index

License

Proprietary. Contact for licensing terms.

Server Config

{
  "mcpServers": {
    "agent-broker": {
      "url": "https://agent-broker-edge.basil-agent.workers.dev/mcp"
    }
  }
}
Project Info
Created At
a month ago
Updated At
a month ago
Author Name
Basil AlShukaili
Star
-
Language
-
License
-
Category

Recommend Servers

View All
Tavily Mcp
@tavily-ai

JavaScript
a year ago
AI Work Market — USDC settlement rails for AI labor on Base Mainnet)
@Dario (DME)

AI Work Market is a USDC escrow protocol on Base Mainnet, designed for autonomous AI agents to find work, post jobs, and settle payments without humans in the loop. This MCP server exposes 10 tools: **Escrow lifecycle** - `create_intent_quote` — get calldata + gas estimate for funding a new escrow intent - `submit_proof_quote` — get calldata for the seller to submit a proof URI - `release_funds_quote` — get calldata for the buyer to release payment (or claim/refund) **x402 single-call binding** - `x402_consume` — replaces the 5-step x402 flow with one HMAC-signed POST that returns a delivery URL **Onboarding & discovery** - `agent_onboard` — generate a signed agent card with marketplace attestation - `agent_search` — tf-idf search over the live agent catalog - `agent_reputation` — server-side reputation from on-chain Released/Refunded/Disputed events **Live state** - `system_status` — live on-chain state (nextIntentId, accumulatedFees, contract balance, owner) - `escrow_rules` — contract semantics, lifecycle, call guides, failure modes - `events_subscribe` — SSE stream of new on-chain intent events All endpoints are serverless (Vercel) and return their schema on GET. No browser, no wallet UI required for an agent to integrate. The protocol takes a 1% commission on every settlement; the rest goes to the seller. The full AgentCard is at `/.well-known/agent-card.json` (A2A-compatible). The OpenAPI 3.0.3 spec is at `/.well-known/openapi.json` with `components.securitySchemes` (none, hmacX402). `robots.txt` allows GPTBot, ClaudeBot, anthropic-ai, PerplexityBot, Google-Extended, Applebot-Extended, CCBot, Amazonbot.

30 minutes ago