Skip to main content

AI

How to run a Claude Agent SDK agent on WhatsApp (with MonoChat)

The Claude Agent SDK is the harness behind Claude Code. Here is how to put a Claude Agent SDK agent in front of your WhatsApp customers, what changes when the conversation happens in a chat app, and how to keep it safe with fallback models, budgets and handover.

MonoChat Team Updated: 7 min read

On this page
  1. What the Claude Agent SDK is (and why it suits support)
  2. Three ways to use Claude agents in MonoChat
  3. Step by step: a Claude Agent SDK agent on WhatsApp
  4. Writing instructions for a WhatsApp agent
  5. Handover: the part that makes or breaks trust
  6. Costs and control
  7. When to choose a different harness

The Claude Agent SDK is Anthropic’s agent harness: the same loop of reasoning, tool use and self-checking that powers Claude Code, packaged so developers can build their own agents. To run one on WhatsApp you need three more things around it: a connection to the WhatsApp Business Platform, a way to give the agent your business tools, and a safe path to a human when the agent should stop. With MonoChat’s Agent Harness, you add the Claude Agent SDK as an AI Harness, drop an AI Agent node into a flow, connect your WhatsApp number and test. No servers to run.

This guide explains what the Claude Agent SDK brings to customer conversations, how the setup works in MonoChat, and what to get right before customers start writing.

What the Claude Agent SDK is (and why it suits support)

Most AI on WhatsApp today is a single model call: a message comes in, the model writes a reply, done. That is fine for “What are your opening hours?” It breaks down for “My order hasn’t arrived and I’m travelling on Friday.”

A harness runs the model in a loop. The model decides what to do next, the harness runs that step (look something up, call a tool, read a file), feeds the result back, and repeats until the task is done or a person is needed. The Claude Agent SDK is Anthropic’s version of that loop. It is the foundation of Claude Code and comes with the building blocks developers rely on there: tool use, MCP support, sub-agents, context management for long sessions and permission controls.

For customer messaging, that loop is what turns an answer into a resolution:

  • It checks before it promises. Stock, delivery status, appointment slots or a refund rule are looked up at the moment of answering instead of guessed.
  • It works a case in several steps. Find the order, check the carrier, see the parcel is stuck, offer a replacement, all in one conversation.
  • It knows when to stop. A good harness hands the case to a person instead of improvising when it reaches the edge of what it may do.

If you want the background on harnesses versus plain inference, read what an agent harness is and why WhatsApp support needs one.

Three ways to use Claude agents in MonoChat

MonoChat supports three routes to a Claude-powered agent. All three use the same AI Agent node, the same channels and the same handover.

OptionWhere it runsWhat you need
Claude Agent SDKMonoChat’s agent runner; each run is an isolated Claude Code-style agent processNothing extra; your AI models through MonoChat’s gateway
Claude Managed AgentsAnthropic’s cloudYour Anthropic API key
Custom (your own Claude Agent SDK service)Your own serverAn endpoint URL and a shared secret

For most teams the first option is the right start: you get the Claude Agent SDK harness without deploying or maintaining anything. Pick Claude Managed Agents if you already build on Anthropic’s hosted agents and want to keep them there. Choose Custom if your developers have built and tested their own agent with the SDK and want to keep running it on their own infrastructure; our guide to connecting your own AI agent to WhatsApp covers that path.

Step by step: a Claude Agent SDK agent on WhatsApp

1. Add an AI Harness

In MonoChat, an AI Harness is a service definition you add once and reuse. Add one and choose Claude Agent SDK as the provider. There is nothing else to configure for the provider itself: it runs on MonoChat’s agent runner and reaches your AI models through MonoChat’s gateway.

2. Add an AI Agent node to a flow

Open the flow that handles incoming conversations, or create a new one, and add an AI Agent node. Select the harness you just created. This is where the agent gets its job: write instructions that describe who it serves, what it may do and when it must hand over.

3. Choose the main, fallback and fast models

Each AI Agent node has three model roles:

  • Main model: reasons, decides and writes the replies.
  • Fallback model: takes over after a soft limit or when the main model fails, so the customer still gets an answer.
  • Fast model: handles background work.

Set a budget limit per run as well. A customer conversation rarely needs a long chain of steps, and a budget stops an unusual case from becoming an expensive one. Our article on why your customer-facing agent needs a fallback model explains how to choose the pair.

4. Give the agent tools

An agent without tools can only talk. In MonoChat the agent can use:

  • AI function tools to call your APIs with structured inputs, for example “get order status” or “create a return”.
  • MCP servers to bring in tools from any MCP-compatible system.
  • The AI knowledge base for answers grounded in your own policies and documents.
  • Custom functions for business logic that runs inside the conversation.

Start with two or three tools that cover your most common requests. Each tool you add is one more thing the agent can do, and one more thing to test.

5. Connect WhatsApp and your other channels

Connect your WhatsApp Business number to MonoChat if you have not already (MonoChat is an official Meta Business Partner and uses the official WhatsApp Business Platform). Because the agent lives in a flow, you can attach the same flow to Instagram, Messenger, TikTok, Telegram, web chat, SMS and voice without rebuilding anything.

6. Test, then go live

Send the agent the messages your customers actually send: short, misspelled, in more than one language, three questions in one message. Check that it uses the right tool, stays within your rules, and hands over at the right moment. Then switch the flow on for real traffic.

Writing instructions for a WhatsApp agent

The Claude Agent SDK grew up in coding, where long, detailed answers are welcome. WhatsApp is the opposite. A few rules make a big difference:

  • Keep replies short. Two or three sentences per message, one question at a time. Customers read on a phone.
  • Confirm before acting. “I can cancel order 4821 and refund €39. Shall I go ahead?” before anything that costs money or cannot be undone.
  • Name the handover rule explicitly. For example: “Hand over to a person for complaints about staff, legal threats, refunds above €100, or when the customer asks for a human.”
  • Stay inside your business. Since January 15, 2026, WhatsApp’s terms keep general-purpose AI assistants off the platform. An agent that serves your own customers is fine; one that writes essays on any topic is not. Our WhatsApp AI chatbot policy guide explains the rule.
  • Respect the 24-hour window. Free-form replies are allowed within 24 hours of the customer’s last message. After that, a message needs an approved template.

Handover: the part that makes or breaks trust

Customers forgive an agent that says “Let me get a colleague.” They do not forgive one that loops. In MonoChat the agent hands the conversation to your team in the shared inbox with the full history: what the customer asked, what the agent looked up and what it already tried. The person who picks it up does not need to ask the customer to start over.

Plan your handover rules before you plan your tools. Decide which cases the agent should never handle alone, who receives them, and what the agent tells the customer while they wait.

Costs and control

With an agent there are two cost lines on top of your MonoChat plan: the AI model usage and Meta’s WhatsApp fees. Since October 1, 2026, Meta charges service replies after the first 1,000 per business number each month; our WhatsApp API pricing guide has the details.

On the AI side, MonoChat adds no markup when you use your own provider keys. A budget limit per run, a sensible fallback model and a fast model for background work keep usage predictable as volume grows.

When to choose a different harness

The Claude Agent SDK is a strong default for agents that need to reason through several steps. But Agent Harness is built so you are not locked in. If your team already works with the OpenAI Agents SDK, Pi, a hosted OpenAI or Anthropic agent, or its own framework, you can add another AI Harness and switch the AI Agent node over, without touching your channels, tools or handover. See all options on the Agent Harness page.

FAQ

Frequently asked questions

Do I need to write code to run a Claude Agent SDK agent on WhatsApp with MonoChat?

No. Choose the Claude Agent SDK as the provider of an AI Harness and MonoChat runs it on its agent runner, using your AI models through MonoChat's gateway. You configure the agent in a flow with an AI Agent node. Code is only needed if you want to run your own Claude Agent SDK service and connect it as a Custom harness.

Where does the Claude Agent SDK agent run?

On MonoChat's agent runner. Each run is an isolated Claude Code-style agent process, so one conversation does not share a working environment with another.

What is the difference between the Claude Agent SDK and Claude Managed Agents in MonoChat?

The Claude Agent SDK harness runs on MonoChat's agent runner and needs nothing extra. Claude Managed Agents are hosted by Anthropic in its cloud and need your own Anthropic API key. Both are used from the same AI Agent node in a flow.

Can the agent hand a WhatsApp conversation over to a person?

Yes. The agent runs inside a MonoChat flow, so it can hand the conversation to your team in the shared inbox with the full history. WhatsApp's Business Messaging Policy also expects a clear way to reach a human when replies are automated.

Does the same agent work on Instagram and web chat?

Yes. Because the agent is part of a MonoChat flow, it works on every channel MonoChat connects: WhatsApp, Instagram, Messenger, TikTok, Telegram, web chat, SMS and voice.

First month of Growth on us

Run WhatsApp, Instagram and Messenger from one inbox

Start free with MonoChat: shared team inbox, AI assistants, templates and campaigns on official Meta APIs.

One code per business • 30 days to redeem • No card needed

$150 to get started.

Claim