I tried organizing the tool types that continue conversations and those that end conversations in Amazon Connect Customer AI Agent

I tried organizing the tool types that continue conversations and those that end conversations in Amazon Connect Customer AI Agent

Amazon Connect Customer AI Agent tool types differ in whether the conversation continues or ends. Here we organize these differences and explain how to use Flow Module tools and Return to Control tools appropriately.
2026.07.21

This page has been translated by machine translation. View original

Introduction

When configuring self-service with Amazon Connect Customer AI agents, you may wonder whether the conversation continues or control returns to the contact flow after the AI agent calls a tool.

For example, consider the following configuration:

Customer and AI agent have a conversation

AI agent classifies the inquiry

Reference the classification result in the contact flow

Branch in the subsequent contact flow

In this case, I wondered whether simply writing "end the conversation after classification" in the flow module tool instructions would cause control to return to the contact flow.

To get straight to the conclusion: to end the conversation with the AI agent and return control to the contact flow, you use a tool with Tool Type set to Return to Control.

On the other hand, out-of-the-box tools, flow module tools, third-party MCP tools, and Constant tools do not end the conversation with the AI agent — they use the tool execution results to continue the conversation.

This article organizes, for each tool available in Amazon Connect Customer AI agents, whether the conversation continues or ends and control returns to the contact flow.

Conclusion

From the perspective of conversation continuation and termination, the following summary applies:

Tool Conversation Handling Primary Use Case
Out-of-the-box tools Continues Use pre-built tools provided by Amazon Connect Customer
Flow module tools Continues Call flow modules to execute business logic
Third-party MCP tools Continues Call external systems or third-party tools
Constant tools Continues Return a configured static string to the AI agent
Return to Control tools Ends End the conversation with the AI agent and return control to the contact flow

Whether control returns to the contact flow depends not on whether the tool instructions say "end the conversation," but on whether the Tool Type is Return to Control.

In the official documentation, Return to Control is described as instructing the AI agent to stop and return control to the contact flow.

Return to Control – Instructs the AI agent to stop and returns control to the contact flow.

https://docs.aws.amazon.com/ja_jp/connect/latest/adminguide/agentic-self-service.html

The SelfServiceOrchestrator AI agent includes Complete and Escalate as Return to Control tools by default.

  • Complete: Ends the interaction
  • Escalate: Transfers to a human agent

You can also create custom Return to Control tools with any input schema.

Behavior by Tool

Out-of-the-box Tools

Out-of-the-box tools are pre-built tools provided by Amazon Connect Customer.

The official documentation describes them as tools available for common tasks such as updating contact attributes and retrieving case information.

Connect Customer includes pre-built tools for common tasks like updating contact attributes and retrieving case information, and they can work immediately without additional configuration.

https://docs.aws.amazon.com/ja_jp/connect/latest/adminguide/ai-agent-mcp-tools.html

Out-of-the-box tools are used by the AI agent to retrieve information or perform actions during a conversation.

The tool execution results are returned to the AI agent, which uses them to continue responding to the customer or processing next steps. Simply calling an out-of-the-box tool does not return control to the contact flow.

Flow Module Tools

Flow module tools allow newly created flow modules, or existing flow modules, to be called from an AI agent.

The official documentation explains that you can convert existing flow modules into MCP tools, enabling the same business logic to be reused across both static AI workflows and generative AI workflows.

You can create new flow modules or convert existing flow modules into MCP tools, so you can reuse the same business logic in both static AI workflows and generative AI workflows.

https://docs.aws.amazon.com/ja_jp/connect/latest/adminguide/ai-agent-mcp-tools.html

For example, suppose you create a flow module tool called GetInquiryCategories that retrieves inquiry category masters from a Data Table.

AI agent

Calls GetInquiryCategories

Lists and retrieves Data Table entries inside the flow module

Returns inquiry category candidates to the AI agent

Continues the conversation with the AI agent

GetInquiryCategories is a tool for returning inquiry category candidates retrieved from the Data Table to the AI agent.

Even if you include the following in the flow module tool instructions, control will not return to the contact flow on its own:

After classification, do not ask additional questions or provide additional explanations. End the conversation.

This instruction guides the AI agent's behavior but does not execute the return of control to the contact flow.

To return control to the contact flow, you need to call a Return to Control tool after the flow module tool's processing.

Third-Party MCP Tools

Third-party MCP tools use Amazon Bedrock AgentCore Gateway to allow the AI agent to use external systems or third-party tools.

The official documentation explains that by registering AgentCore Gateway in the AWS Management Console, you can access tools available on those servers, such as remote MCP servers.

You can use third-party integrations using Amazon Bedrock AgentCore Gateway. By registering the AgentCore Gateway in the AWS Management Console, you can access any tools available on those servers, such as remote MCP servers.

https://docs.aws.amazon.com/ja_jp/connect/latest/adminguide/ai-agent-mcp-tools.html

It is also described that AI agents call MCP tools during a conversation without returning control to the contact flow.

AI agents call MCP tools during a conversation without returning control to the contact flow.

https://docs.aws.amazon.com/ja_jp/connect/latest/adminguide/agentic-self-service.html

Therefore, when a third-party MCP tool is called, the tool execution results are also returned to the AI agent and the conversation continues.

If you want to return to the contact flow after an external system's processing is complete, configure the flow to call a Return to Control tool afterward.

Constant Tools

The Constant tool is a tool that returns a configured static string to the AI agent.

The official documentation describes the behavior of the Constant tool as follows:

A constant tool returns a configured static string value to the AI agent when invoked. Unlike a Return to Control tool, a constant tool does not end the AI conversation. The AI agent receives the string and continues the conversation.

https://docs.aws.amazon.com/ja_jp/connect/latest/adminguide/agentic-self-service.html

For example, you can create a Constant tool that returns a fixed response like the following before connecting to an actual order management system:

{
  "orderId": "ORDER-12345",
  "status": "shipped"
}

Even if the AI agent calls this tool, control does not return to the contact flow.

The AI agent uses the returned static string to continue responding to the customer or processing next steps.

Return to Control Tools

The Return to Control tool is used to end the conversation with the AI agent and return control to the contact flow.

When a Return to Control tool is called, the following occurs:

  • The conversation with the AI agent ends
  • Control returns to the contact flow
  • The called tool name and input parameters are stored in Amazon Lex session attributes

In the contact flow, you can reference these session attributes and branch to subsequent processing based on the called tool and input parameters.

https://docs.aws.amazon.com/ja_jp/connect/latest/adminguide/agentic-self-service.html#agentic-self-service-escalation-flow-steps

Return to Control tools include default tools and custom tools.

Tool Use Case
Complete Ends the interaction
Escalate Transfers to a human agent
Custom Return to Control tool Passes values defined in the input schema to the contact flow

If you simply want to end the conversation with the AI agent, you can use the default Complete.

On the other hand, if you want to pass values such as inquiry classification results or conversation summaries to the contact flow, create a custom Return to Control tool with an input schema.

Configuration Examples for Inquiry Classification

For inquiry classification, the configuration differs depending on how inquiry categories are managed.

When Configuring with Return to Control Tools Only

If the inquiry categories are fixed and can all be defined in the input schema of a custom Return to Control tool, you can configure everything with Return to Control tools alone.

For example, consider a case where the inquiry categories are fixed at the following three types:

inquiryTypeName
Billing
Contract
Other

Define the inquiry categories as an enum in the input schema of the custom Return to Control tool.

{
  "type": "object",
  "properties": {
    "inquiryTypeName": {
      "type": "string",
      "description": "The inquiry category closest to the conversation content.",
      "enum": [
        "Billing",
        "Contract",
        "Other"
      ]
    }
  },
  "required": [
    "inquiryTypeName"
  ]
}

The AI agent selects inquiryTypeName based on the conversation content and calls the custom Return to Control tool.

Customer and AI agent have a conversation

AI agent selects inquiryTypeName

Calls the Return to Control tool

Conversation with the AI agent ends

Control returns to the contact flow

If the number of inquiry categories is small and changes infrequently, this configuration is simple.

When Combining Flow Module Tools and Return to Control Tools

If inquiry categories are managed in a Data Table and retrieved via a flow module tool, combine a flow module tool with a Return to Control tool.

For example, consider a case where the following inquiry category master is registered in a Data Table:

inquiryTypeName examples
Billing Payment delays, invoice reissuance
Contract Cancellation, plan changes
Other Unknown department, inquiries not falling into the above

In this configuration, the roles of the two tools are separated:

GetInquiryCategories
  → Flow module tool
  → Retrieves inquiry category candidates from the Data Table
  → Returns candidates to the AI agent
  → Continues the conversation with the AI agent

CompleteInquiryClassification
  → Custom Return to Control tool
  → Passes the inquiryTypeName selected by the AI agent
  → Ends the conversation with the AI agent
  → Returns control to the contact flow

GetInquiryCategories and CompleteInquiryClassification are example tool names. In your actual environment, replace the tool names and input schemas to match your requirements.

The roles in this configuration are as follows:

Tool Role
Flow module tool Retrieves inquiry category candidates from the Data Table
Return to Control tool Passes classification results to the contact flow and ends the conversation with the AI agent

Rather than giving the flow module tool the role of ending the conversation, candidate retrieval and control return are executed by separate tools.

Values to Check in the Contact Flow

When a Return to Control tool is called, the conversation with the AI agent ends and control returns to the contact flow. The called tool name and input parameters are stored in Amazon Lex session attributes.

In the contact flow, place a Check contact attributes block after the default output of the Get customer input block, and check the following values:

Item Value
Namespace Lex
Key Session attributes
Session attribute key Tool
Condition value The name of the called Return to Control tool

https://docs.aws.amazon.com/ja_jp/connect/latest/adminguide/agentic-self-service.html#agentic-self-service-escalation-flow-steps

For example, if the custom Return to Control tool name is CompleteInquiryClassification, confirm that Tool is CompleteInquiryClassification.

Tool and the tool's input parameters serve different roles:

Value Example Purpose
Tool CompleteInquiryClassification Determines which Return to Control tool was called
inquiryTypeName Billing Used in subsequent processing as the inquiry classification result

In this example, GetInquiryCategories is a flow module tool. Therefore, the value to check with Tool is not GetInquiryCategories but CompleteInquiryClassification, which returned control to the contact flow.

Summary

This article organized the tools available in Amazon Connect Customer AI agents into those that continue the conversation and those that end it.

Out-of-the-box tools, flow module tools, third-party MCP tools, and Constant tools return execution results to the AI agent and continue the conversation. In contrast, Return to Control tools end the conversation with the AI agent and return control to the contact flow.

If inquiry categories can be directly defined in the input schema, you can configure everything with a custom Return to Control tool alone. If inquiry categories are managed in a Data Table, use a flow module tool to retrieve candidates and a Return to Control tool to pass classification results and end the conversation.

Simply writing "end the conversation" in the flow module tool instructions will not return control to the contact flow, so be sure to use a Return to Control tool wherever control return is needed.

Share this article

AWSのお困り事はクラスメソッドへ