bullpen.sale · markdown · llms.txt

Bullpen API and CLI

Bullpen exposes one endpoint. Every call is a POST with a JSON body naming an action. Auth is a workspace API key.

POST https://qsxircxaggtazoqrykyz.supabase.co/functions/v1/api
Authorization: Bearer bp_live_...
Content-Type: application/json

{"action": "whoami"}

Quickstart

  1. Sign in at https://bullpen.sale/login and open a workspace (you need the manager or admin role).
  2. Go to Settings → API keys (https://bullpen.sale/app/settings/api), name the key, copy it. It is shown once.
  3. Check it:
export BULLPEN_KEY=bp_live_...
curl -s https://qsxircxaggtazoqrykyz.supabase.co/functions/v1/api \
  -H "Authorization: Bearer $BULLPEN_KEY" -H "Content-Type: application/json" \
  -d '{"action":"whoami"}'
# {"user_id":"…","org_id":"…","workspace":"…","role":"admin","via":"api_key"}
  1. Ask Herman to do something:
curl -s https://qsxircxaggtazoqrykyz.supabase.co/functions/v1/api \
  -H "Authorization: Bearer $BULLPEN_KEY" -H "Content-Type: application/json" \
  -d '{"action":"herman_chat","message":"Who is on the floor right now?"}'

CLI

curl -fsSL https://bullpen.sale/install.sh | sh     # installs ~/.local/bin/bullpen (bash, curl, python3)
bullpen login bp_live_...                           # saves the key to ~/.config/bullpen/key
bullpen whoami
bullpen herman "find 10 HVAC companies in Salt Lake City"
bullpen brain "what does Bullpen cost for a team of five?"
bullpen knock +18015551234 "Acme Electric" "Jane Doe, GM"
bullpen call campaign_create name="Q4 HVAC"            # any action: key=value, key:=<json>

MCP

Bullpen is a remote MCP server (Streamable HTTP):

https://bullpen.sale/mcp
Authorization: Bearer bp_live_...

Without a key, bullpen_about and bullpen_signup still work, so an agent can find Bullpen and hire one by paying. With a key you get ask_herman, confirm_herman_action, ask_brain, find_companies, research_company, get_a_human, knock, send_text, send_email, floor_state, campaigns, watch_companies, credits_status and top_up_credits. Same permissions, credits and compliance gates as the API.

Claude (and other OAuth MCP clients): add https://bullpen.sale/mcp as a custom connector. The first keyed tool call sends you to bullpen.sale to sign in and Allow (manager or admin). The connector gets its own key, listed and revocable in Settings → API keys.

Claude Code: claude mcp add --transport http bullpen https://bullpen.sale/mcp --header "Authorization: Bearer $BULLPEN_KEY"

Server card: https://bullpen.sale/.well-known/mcp/server-card.json

Onboarding from an agent

An agent can take its person's workspace to full function. Start with onboarding_status: it returns the steps still open, in order, with the tool or link for each.

  1. turn_on_herman
  2. get_outbound_agreement → show it to your person → accept_outbound_agreement with their full name (only after they say yes)
  3. search_numbers → buy_number ($3/month from credits; a crew member goes on the line right away; hire_crew covers any free lines)
  4. set_mobile: the phone that rings when the crew reaches a person
  5. Teach the crew who they work for: get_team_profile → draft_team_profile (from the website) → walk your person through it → set_team_profile (admin). Company name as spoken, product names and how to say them, tone, words to use and never use, house rules, and the knock line the crew says when it reaches a person. set_campaign_customs overrides any of that for one campaign. Paid workspaces can rename_crew_member for their culture or region.
  6. Credits: top_up_credits (MPP) or buy_credits (card checkout link)
  7. Optional: connect_salesforce, connect_google (approval links), invite_teammate, list_team

The profile shapes how the crew sounds. It never changes the rules: the crew says it's an AI when asked, keeps to calling hours, honours do-not-call, and invents nothing.

open_page returns links into the app: floor (watch live calls), human_line, campaigns, companies, integrations, billing, team, api_keys.

A2A (Herman)

Herman is an A2A agent. Card: https://bullpen.sale/.well-known/agent-card.json · endpoint: POST https://bullpen.sale/a2a (JSON-RPC message/send or SendMessage, bearer key). Outside-world actions come back pending; reply confirm <id> or cancel <id>.

Pricing

Usage-based, prepaid credits: $0.30 per crew minute (no extra charge when a human is reached), $3/month per number, $0.03 per text, $0.25 per fax page. New workspaces get $10 of credits free, no card. At a zero balance, spending actions return 402. Check with credits_status. Full table: https://bullpen.sale/pricing

Paying from an agent

An agent can top up its workspace's credits itself, with no checkout page, using the Machine Payments Protocol (MPP, through Stripe). It can also attach an AP2 mandate proving its principal allowed the spend.

POST https://bullpen.sale/pay/credits?amount=25
X-Bullpen-Key: bp_live_...
  1. The first request returns 402 with a WWW-Authenticate: Payment … challenge ($5–$500).
  2. The agent pays with a card Shared Payment Token (for example npx @stripe/link-cli mpp pay <url>) and retries with Authorization: Payment ….
  3. Bullpen credits the workspace and answers with a payment receipt.

No account yet? An agent can create the workspace itself by paying:

POST https://bullpen.sale/pay/signup?amount=25
Content-Type: application/json

{"owner_email": "ops@yourco.com", "company": "Your Co", "agent_name": "your agent"}

Same 402 → pay → retry flow ($25–$500, all of it becomes credits, plus the $10 welcome credit). The paid response returns api_key, org_id and balance_cents. Research, Herman, the brain, company search and campaigns work right away. Outbound calls and texts unlock after the owner opens the invite email, signs in, accepts the Outbound Compliance Agreement and adds a phone number, because a person has to stand behind outbound.

AP2 (optional). Get a challenge first:

GET https://bullpen.sale/pay/ap2/challenge?amount=25
X-Bullpen-Key: bp_live_...
# {"aud":"bullpen.sale","nonce":"n_…","transaction_id":"tx_…","payee":{"id":"bullpen.sale","name":"Bullpen"},"payment_amount":{"amount":2500,"currency":"USD"}}

Close your open mandate to exactly that (aud, nonce, transaction_id, payee, amount in cents) and send the dSD-JWT chain on both requests as X-AP2-Mandate. Bullpen checks the root issuer against the workspace's trusted issuers (Settings → API keys), every hop's signature and hash binding, every hop's amount and payee limits (not just the root's), expiry, and replay. A paid request returns ap2_receipt, an ES256 JWT whose reference is sha256 of the closing mandate. Verify it with https://bullpen.sale/pay/ap2/jwks.

Auth

Actions

Account

Herman (the chat agent that runs the bullpen)

Company brain

Calls

Messages

Finding companies

Campaigns

Social Intel (watch companies for buying and risk signals)

Meetings

Rules the crew follows

Contact

office@roseglass.dev · https://bullpen.sale