AI Agents can already support multi-language communication with users, as they are based on large language models (LLMs), and those models are usually trained in multiple languages. However, depending on the task you want to run with your agent, you might need to add further instructions to the agent so that it can better support multi-language communication.

Before your begin

Before you start, you must comply with some requirements:

Configuring multi-language support

Follow the steps to configure the multi-language support in your agent.

  1. Open the service_now_agent.yaml file with a text editor, such as Visual Studio Code.

  2. In the instructions section, add the two following lines:

[YAML]
Make sure to communicate with the user by matching the language it uses to communicate with you and adapting names and terms as appropriate, and also translate column names and anything else when returning the information to the user.

Pay attention to the correct language adaptation of inputs and outputs, always returning the information to the user in the same language they are using to communicate with you.
  1. Save the YAML file.

  2. Open the customer_care_agent.yaml file and apply the previous steps. It is necessary as the Customer Care agent is the supervisor of the ServiceNow agent.

By adding these two lines of instructions to your agents, you can ensure that the agent expects to be engaged in multiple languages and can adapt more accurately. You can even use these same instructions, or something similar to them, with any agent you build to help ensure that your agent can adapt to being engaged in multiple languages.

Importing your agents

Now that you finished editing instructions of the two agents, you must reimport them to update these agents in the IBM watsonx Orchestrate ADK. You can follow the steps that are described in the Empower agent tutorial, but that procedure also reimports the tools, which can take a long time. To import only the agents directly, you can follow the steps:

  1. Open the terminal that you commonly use.

  2. Navigate to the folder where your agents are saved.

  3. Write the command orchestrate agents import -f agent_file_name.yaml.

  4. Replace agent_file_name expression with your agent file name. For this tutorial, you can run the following commands:

    orchestrate agents import -f customer_care_agent.yaml orchestrate agents import -f service_now_agent.yaml

  5. Run the command.

You can see in the terminal a message that confirms the agents were successfully imported.

Note: If you do not navigate to the agent files folder, you must run the command with the folder path, for example: orchestrate agents import -f home/documents/agents/agentFile.yaml.

Testing your agent

Now, you can test your multilanguage agents in the chat by using other languages.