Create agents to manage brands

After you register as a partner, you can enable conversations for brands you manage by creating Business Messages agents for them.

An agent is a conversational entity that users interact with. You create one agent for each brand you manage. You create and manage agents with the Business Communications API, and you control messaging for your agents with the Business Messages API.

An agent encompasses a brand's business functions, such as online support, and physical locations (if any). Each message contains the context from which the user initiated the conversation. Your message routing infrastructure can detect if the user viewed a specific business location or looked for general support and route messages to the correct destination.

The agent/brand relationship

For example, if you manage the Growing Tree Bank brand, which has a website and two locations, you create a single "Growing Tree Bank" agent. Users can encounter the agent through general or location-based searches, and the context in which the user found the agent is passed along with each message to your webhook. You use that context to route the message to either staff at a location or the website support team, who create a response and continue the conversation with the user.


Before you create an agent, understand the expectations of agents on Business Messages.

  • Agents should follow the agent and conversation design guidance outlined in Conversation design for Business Messages.
  • Agents should have human representatives available to answer questions when automation is unable to fulfill a request or when requested by users.
  • Agents should maintain a customer satisfaction rating (CSAT) of at least 80% and a merchant response rate (MRR) of at least 95% as outlined in Metrics.

Create an agent

To create an agent, you need to gather and submit information about the brand and how you want the agent to appear to users.

If you manage multiple brands, repeat the steps to create an agent for each brand.


Before you create agents for brands you manage, you need to gather some information.

  • Brand name
  • Agent name

Create the agent

Once you've gathered your information, it's time to create your agent.

  1. Open the Business Communications Developer Console and sign in with your Business Messages Google account.
  2. Click Create agent.
  3. If you're prompted for Agent type, choose Business Messages.
  4. Enter values for Brand name and Agent name.
  5. Click Create agent.
  6. When your agent is available, click your agent.

Set an agent-level webhook

You receive messages sent to your agent at your webhook. If you want messages for a specific agent to arrive at a different webhook instead, you can set an agent-level webhook.

  1. Open the Business Communications Developer Console and sign in with your Business Messages Google account.
  2. Click your agent.
  3. Click Integrations.
  4. For Webhook, click Configure.
  5. For Webhook endpoint URL, enter your webhook's URL, beginning with "https://".
  6. Note your clientToken value. You need it to verify that messages you receive are coming from Google.
  7. Configure your webhook to accept a POST request with the specified clientToken parameter and send a 200 OK response with the value of the secret parameter.

    For example, if your webhook receives a POST request with the following body content


    your webhook should confirm the clientToken value and, if clientToken is correct, return a 200 OK response with the secret URL parameter set to 0123456789.

  8. In the console, click Verify.

    When Business Messages verifies your webhook, the dialog closes.

Test an agent

Each agent has test URLs that let you see how a conversation with that agent appears to users and gives you the opportunity to verify your messaging infrastructure.

To test an agent,

  1. Open the Business Communications Developer Console and sign in with your Business Messages Google account.
  2. Choose your agent.
  3. Under Agent test URLs on the Overview page, click the Android button or iOS button to copy the test URL to your device's clipboard.
  4. To open the agent's test URL, use the Business Messages Agent Launcher on a mobile device. Copying and pasting or otherwise manually navigating to a test URL doesn't work because of browser security measures.

Update agent information

After you create your agent, you can edit the agent's information on the Agent information page:

  • Brand name
  • Agent name
  • Agent logo (1024x1024 px)

    In conversations, logos display as 1024 px diameter circles. Make sure that your logo displays well as a circle.

  • Phone number

  • Privacy Policy URL

  • Default locale

  • Welcome message

  • Offline message

  • Conversation starters

  • Messaging availability through primary and secondary interactions

The Overview and Agent information pages preview how your agent appears in conversations.

Delete an agent

When you delete an agent, Business Messages deletes all agent data. Business Messages doesn't delete messages sent by your agent that are in transit to or stored on a user's device. Messages to users aren't agent data.

Delete requests fail if the agent has an associated location or if you've attempted to verify the agent one or more times. To update locations, see Add locations. To delete an agent that you've verified or attempted to verify, contact us. (You must first sign in with a Business Messages Google account. To register for an account, see Register with Business Messages.)

To delete an agent,

  1. Open the Business Communications Developer Console and sign in with your Business Messages Google account.
  2. Choose your agent.
  3. At the bottom of the Overview page, click Delete agent.
  4. Enter "DELETE", then click Delete agent.

Deleting an agent doesn't delete associated brand data. Use the Business Communications API to delete a brand.

Next steps

Now that you have an agent, you can add locations to your agent and design your messaging flows.