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
- Sign in at https://bullpen.sale/login and open a workspace (you need the manager or admin role).
- Go to Settings → API keys (https://bullpen.sale/app/settings/api), name the key, copy it. It is shown once.
- 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"}- 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.
turn_on_hermanget_outbound_agreement→ show it to your person →accept_outbound_agreementwith their full name (only after they say yes)search_numbers→buy_number($3/month from credits; a crew member goes on the line right away;hire_crewcovers any free lines)set_mobile: the phone that rings when the crew reaches a person- 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_customsoverrides any of that for one campaign. Paid workspaces canrename_crew_memberfor their culture or region. - Credits:
top_up_credits(MPP) orbuy_credits(card checkout link) - 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_...- The first request returns 402 with a
WWW-Authenticate: Payment …challenge ($5–$500). - The agent pays with a card Shared Payment Token (for example
npx @stripe/link-cli mpp pay <url>) and retries withAuthorization: Payment …. - 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
- API key (
bp_live_…): acts as the member who created it, in that workspace. Revoke it any time in Settings → API keys. - Keys can call the actions listed below, including onboarding: buying crew lines from credits, hiring the crew, inviting teammates, and accepting the Outbound Compliance Agreement with the person's typed name. Card payments and Salesforce/Google approval happen in the person's browser through links the API returns. Key management and the billing portal need a signed-in person.
- Errors come back as
{"error":"…"}with an HTTP status: 400 bad input, 401 bad or revoked key, 403 not allowed for this key or role, 402 out of credits, 409 a precondition (e.g. phones not set up).
Actions
Account
whoami→ user, workspace, role.
Herman (the chat agent that runs the bullpen)
herman_chat{message}→ Herman's reply. Outside actions (calls, texts, email) come back as pending with an id; nothing goes out until confirmed. Herman must be switched on for the key's user.herman_decide{id, decision: "confirm"|"cancel"}→ runs or drops a pending action.
Company brain
brain_ask{question}→ answer with sources, gated by the member's role.
Calls
bridge_call{to, target?, why?}→ a crew member dials, works the menu / hold / AI receptionist, asks "real person or AI?", and connects the key's user the moment a person is on.knock_call{to, company, target?, note?}→ reach a human at a company line and leave "we got to your humans — find us at bullpen.sale". Company lines only, business hours, once a week per company.knock_many{targets:[{company, phone, target?}]}→ two at a time.floor_state→ live and recent crew calls.
Messages
send_sms{to, body}→ from the workspace's line (E.164to). Opt-outs are honored.mail_send{to, subject, text, cc?}→ from the workspace's agent inbox.
Finding companies
company_search{query, max?}→ companies with their main line and website.company_research{id}→ who to ask for at a found company.twilio_search{area_code}→ numbers available to buy (buying needs a person).
Campaigns
campaign_create{name, goal?}·campaign_import{id, csv}·campaign_update·campaign_cycle_now{id}·campaign_work{id}·campaign_chat{id, message}
Social Intel (watch companies for buying and risk signals)
intel_add{names}(comma or newline separated) ·intel_update·intel_remove·intel_scan_now
Meetings
book_meeting·meeting_status
Rules the crew follows
- Cell phones need written consent before an AI calls them; company lines don't.
- Calling hours follow the callee's time zone.
- STOP / opt-outs end texts and calls to that number.
- The crew says it is an AI when asked.
Contact
office@roseglass.dev · https://bullpen.sale