Send iMessages from LangChain
The short answer
Yes. The Blue Reacher REST API wraps into a LangChain tool in a dozen lines, so an agent can send a blue-bubble iMessage from a dedicated line as an action, with reply webhooks feeding inbound messages back into your graph. MCP server available for Model Context Protocol stacks. No A2P registration required, unlimited iMessages per line. Lines pace at 50 opted-in / 30 cold new contacts a day; replies unmetered.
Key takeaways
- The same as any other tool: a function with a clear docstring, registered with your agent.
- Webhooks. Blue Reacher posts every reply, delivery state, and opt-out to endpoints you host, which makes the inbound side an event feed your application consumes: a FastAPI route receives the reply, l
- If your agent stack already loads MCP servers, yes, it's less code you own: Blue Reacher ships an MCP server exposing messaging as typed tools, and LangChain's MCP adapters load them like any other toolset.
- $249 per line per month with unlimited iMessages (50 opted-in / 30 cold new contacts a day), which is the number that matters for agent workloads: no per-message metering, so an agent handling hundred
How a message falls back
What does an iMessage tool look like in LangChain?
The same as any other tool: a function with a clear docstring, registered with your agent. The Blue Reacher API is plain HTTPS with a bearer key, so the whole wrapper is:
- from langchain_core.tools import tool import requests @tool def send_imessage(phone: str, message: str) -> dict: """Send an iMessage to a contact. Use for confirmed, human-approved outreach only.""" r = requests.post( "https://api.bluereacher.com/v1/messages", headers={"Authorization": "Bearer brk_live_your_key"}, json={"to": phone, "message": message}, ) return r.json()
- Bind that tool to your model, and "text the prospect that the demo moved to 3pm" becomes something the agent can actually do from a dedicated iMessage line with typing indicators and read receipts. The endpoint shape is documented (https://api.bluereacher.com/v1/messages, bearer-key auth); onboarding covers the full function list: scheduled sends, availability checks, sequence enrollment.
How do inbound replies reach the agent?
Webhooks. Blue Reacher posts every reply, delivery state, and opt-out to endpoints you host, which makes the inbound side an event feed your application consumes: a FastAPI route receives the reply, loads the conversation state for that contact, and invokes your graph with the new message. In LangGraph terms, the webhook is the entry point that resumes a thread; contact phone number maps naturally to thread ID.
- Delivery states matter more than they look. An agent that knows a message was delivered but unanswered for two days can decide to follow up; one that sees an RCS or SMS fallback (which Blue Reacher performs automatically when a contact can't receive iMessage) can shorten its message the way you would on plain SMS. STOP handling costs you nothing: it's detected and the contact suppressed platform-side, before your code ever has to enforce it.
Should I use the MCP server instead of raw tools?
If your agent stack already loads MCP servers, yes, it's less code you own: Blue Reacher ships an MCP server exposing messaging as typed tools, and LangChain's MCP adapters load them like any other toolset. The raw-API route wins when you want tight control over the tool surface, custom docstrings that steer the model, or guardrail wrappers.
- On guardrails: an agent with a send_message tool is production outbound, not a demo. The patterns that hold up:
- Human-in-the-loop on first contact: agent drafts, a human approves, the tool sends; autonomy comes later, on replies
- Allowlist the recipients: the tool checks the contact exists in your CRM segment before sending, so a hallucinated number is a no-op
- Let the platform own compliance: STOP suppression and availability checks happen in Blue Reacher, not in your prompt
- Log tool calls against delivery states, so you can audit what the agent sent and what actually landed
What does this cost to run?
$249 per line per month with unlimited iMessages (50 opted-in / 30 cold new contacts a day), which is the number that matters for agent workloads: no per-message metering, so an agent handling hundreds of conversations doesn't run a variable bill. $199 per line at 4+ lines, or $1,949 per line per year (about $162.50 a month) with the $449 activation waived on annual. No A2P registration required, so there's no carrier approval between your prototype and production. White-glove onboarding includes the API and webhook setup, and yes, that offer extends to reviewing your tool schema.
Frequently asked questions
Can a LangChain agent send iMessages autonomously?
Technically yes, the tool is just an HTTPS call. Practically, start with human approval on first-contact sends and let the agent run autonomously on replies within a thread. STOP detection and availability checking run platform-side either way, so compliance doesn't depend on your prompt engineering.
Is there an MCP server, or only the REST API?
Both. The REST API (https://api.bluereacher.com/v1/messages, bearer-key auth) is the direct route; the MCP server exposes the same messaging capabilities as typed tools for MCP-speaking stacks, loadable in LangChain via its MCP adapters. Pick per project; they're the same platform underneath.
How does the agent receive replies?
Blue Reacher posts replies, delivery states, and opt-outs to webhooks you host. Your endpoint receives the event, resolves it to a conversation thread, and invokes your agent with the new message: the standard event-driven inbound pattern, with contact number as the thread key.
Do I need A2P registration to text from an agent?
No A2P registration required. Sends go out over iMessage from a dedicated line, with automatic RCS then SMS fallback per contact. That also means no carrier campaign-approval queue sitting between your build and your first real send.
What does it cost for an agent workload?
$249 per line per month, unlimited iMessages, no per-message fees, so cost is flat regardless of how chatty the agent's threads get. Lines pace at 50 opted-in / 30 cold new contacts a day to stay deliverable; replies are never metered. $199 per line at 6+, $1,949 per line per year (about $162.50 a month), $449 activation waived on annual.
Ship an agent that sends iMessages
Book a demo and bring your agent's use case. We'll walk the API surface and webhook flow against your architecture on the call, and onboarding sets up the line, the keys, and the endpoints with you.