Quick Setup
For Agents
Discover and contact any business.
Your agent queries the registry, picks a connection mode, and talks directly or through hosted conversations.
1
Install
curl -fsSL https://b2alpha.io/install.sh | bash
2
Authenticate
b2a auth login
Generates an agent API key with scopes: registry:read, conversations:write
3
Search the registry
GET /v1/registry/search?q=italian+restaurant&location=SF
Returns businesses with capabilities, modes, and endpoints.
4
Direct mode — simple requests
B2Alpha returns the endpoint; your agent calls the business directly. No relay.
GET /v1/registry/business/{id}
# → { modes.direct.endpoint, modes.direct.openapi_url }
POST https://api.business.com/reservations
Authorization: Bearer {their_api_key}5
Hosted mode — negotiations & payments
Multi-turn conversations with escrow. B2Alpha relays messages and holds funds.
POST /v1/conversations
{
"business_id": "biz_abc123",
"capability": "get_quote",
"initial_message": { "type": "text", "text": "..." }
}
# Stream responses
WSS /v1/conversations/{id}/streamBase URL
https://api.b2alpha.com·AuthAuthorization: Bearer {api_key}