Language difference cause different behavior with Hierarchical process?

Hi team!

When I ran Hierarchical process, it worked fine when I wrote descriptions (and roles, backstories etc) in English but didn’t work when I did it in Japanese :japan: .

In English, manager agent delegated task immediately to its coworker but in Japanese, it tries to come up with the answer on its own without delegating to other agents.

I’m using the same crewai version (1.5.0) to both, so the only difference is the language.

Are there any tips / hacks to get better outcome with the local languages?

FYI, I went through the following topic.

English version:

from crewai import Agent, Task, Crew, LLM, Process
from crewai.knowledge.source.string_knowledge_source import StringKnowledgeSource

return_policy_knowledge = StringKnowledgeSource(content="Returns are allowed for defective products. Returns for other reasons are not accepted.")
inventory_knowledge = StringKnowledgeSource(content="White earphones are in stock. No other stock is available.")

# -------------------------
# Define Agents
# -------------------------

concierge = Agent(
    role="Customer Support Concierge",
    goal="Respond politely to customer inquiries. Depending on the inquiry, consult the appropriate agent and compile the final response for the customer.",
    backstory="Highly capable of understanding customer inquiries and delegating to specialized agents as needed.",
    allow_delegation=True,   # Important: this agent can delegate tasks
    llm="gpt-5-nano",
    verbose=True,
)


# Backline agent specialized in return policies
return_checker = Agent(
    role="Return Policy Checker",
    goal="Accurately answer questions about the return eligibility and conditions of the inquired products.",
    backstory="Back-office staff specialized in return policies.",
    knowledge_sources=[return_policy_knowledge],
    allow_delegation=False,
    llm="gpt-5-nano",
    verbose=True,
)


# Backline agent specialized in inventory status
inventory_checker = Agent(
    role="Inventory Checker",
    goal="Check the stock of products. If out of stock, suggest similar products that are available.",
    backstory="Back-office staff knowledgeable about warehouse inventory.",
    knowledge_sources=[inventory_knowledge],
    allow_delegation=False,
    llm="gpt-5-nano",
    verbose=True,
)


# Parent task: Concierge receives customer inquiry,
# delegates to specialized agents as needed, and generates the final response
customer_support_task = Task(
    description=(
        "Please respond to the following customer inquiry.\n\n"
        "Inquiry:\n"
        "\"{inquiry}\"\n\n"
        "For questions about returns, consult the Return Policy Checker. "
        "For questions about inventory, consult the Inventory Checker. "
        "Finally, as the Concierge, provide a clear and polite response to the customer."
    ),
    agent=concierge,
    expected_output="A polite final response addressed to the customer.",
)


crew = Crew(
    agents=[return_checker, inventory_checker],
    tasks=[customer_support_task],
    process=Process.hierarchical,
    manager_agent=concierge,
    verbose=True
)

result = crew.kickoff(inputs={'inquiry': "I bought earphones yesterday, but sound only comes from one side. Can I return them?"})

Japanese version:

import os
from crewai import Agent, Task, Crew, LLM, Process
from crewai.knowledge.source.string_knowledge_source import StringKnowledgeSource

return_policy_knowledge = StringKnowledgeSource(content="不良品なら返品可能。それ以外の返品は不可")
inventory_knowledge = StringKnowledgeSource(content="イヤホン(白)の在庫がある。他の在庫はない")

# エージェントの定義

concierge = Agent(
    role="お客様対応コンシェルジュ",
    goal="お客様からの問い合わせに丁寧に対応する。内容に応じて適切なエージェントに照会し、最終的な回答をお客様向けにまとめる。",
    backstory="問い合わせ内容を正しく理解し、必要に応じて専門担当に委譲する能力が高い。",
    allow_delegation=True,   # ←ここが重要:委譲できる
    llm="gpt-5-nano",
    #llm="gpt-4o-mini", # Both llm ended up with pretty much same result
    verbose=True,
)


# (バックライン)返品ルールの専門担当者
return_checker = Agent(
    role="返品ルール確認係",
    goal="問い合わせ商品の返品可否や条件などを正しく回答する。",
    backstory="返品ルールに特化したバックオフィス担当者。",
    knowledge_sources=[return_policy_knowledge],
    allow_delegation=False,
    llm="gpt-5-nano",
    verbose=True,
)


# (バックライン)在庫状況チェッカー
inventory_checker = Agent(
    role="在庫状況チェック係",
    goal="商品の在庫を確認する。在庫がない場合は、在庫の中の類似商品を提案する。",
    backstory="倉庫の情報に詳しいバックオフィス担当者。",
    knowledge_sources=[inventory_knowledge],
    allow_delegation=False,
    llm="gpt-5-nano",
    verbose=True,
)

# お客様からの問い合わせをコンシェルジュが受け取り、
# 必要に応じて専門担当に委譲して最終回答を生成する「親タスク」
customer_support_task = Task(
    description=(
        "以下のお客様問い合わせに回答してください。\n\n"
        "問い合わせ内容:\n"
        "「{inquiry}」\n\n"
        "返品や在庫状況の問い合わせは自己判断せず、適切な係に照会した上で、最終的にはコンシェルジュとしてお客様向けに分かりやすい日本語で返答してください。"
    ),
    agent=concierge,
    expected_output="お客様に向けた丁寧な最終回答。",
)

crew = Crew(
    agents=[return_checker, inventory_checker],
    tasks=[customer_support_task],
    process=Process.hierarchical,
    manager_agent=concierge,
    verbose=True
)

result = crew.kickoff(inputs={'inquiry': "昨日買ったイヤホンですが、片耳から音が出ないので返品できますか?"})

FYI: The code I ran in English

from crewai import Agent, Task, Crew, LLM, Process
from crewai.knowledge.source.string_knowledge_source import StringKnowledgeSource

return_policy_knowledge = StringKnowledgeSource(content="Returns are allowed for defective products. Returns for other reasons are not accepted.")
inventory_knowledge = StringKnowledgeSource(content="White earphones are in stock. No other stock is available.")

# -------------------------
# Define Agents
# -------------------------

concierge = Agent(
    role="Customer Support Concierge",
    goal="Respond politely to customer inquiries. Depending on the inquiry, consult the appropriate agent and compile the final response for the customer.",
    backstory="Highly capable of understanding customer inquiries and delegating to specialized agents as needed.",
    allow_delegation=True,   # Important: this agent can delegate tasks
    llm="gpt-5-nano",
    verbose=True,
)


# Backline agent specialized in return policies
return_checker = Agent(
    role="Return Policy Checker",
    goal="Accurately answer questions about the return eligibility and conditions of the inquired products.",
    backstory="Back-office staff specialized in return policies.",
    knowledge_sources=[return_policy_knowledge],
    allow_delegation=False,
    llm="gpt-5-nano",
    verbose=True,
)


# Backline agent specialized in inventory status
inventory_checker = Agent(
    role="Inventory Checker",
    goal="Check the stock of products. If out of stock, suggest similar products that are available.",
    backstory="Back-office staff knowledgeable about warehouse inventory.",
    knowledge_sources=[inventory_knowledge],
    allow_delegation=False,
    llm="gpt-5-nano",
    verbose=True,
)


# Parent task: Concierge receives customer inquiry,
# delegates to specialized agents as needed, and generates the final response
customer_support_task = Task(
    description=(
        "Please respond to the following customer inquiry.\n\n"
        "Inquiry:\n"
        "\"{inquiry}\"\n\n"
        "For questions about returns, consult the Return Policy Checker. "
        "For questions about inventory, consult the Inventory Checker. "
        "Finally, as the Concierge, provide a clear and polite response to the customer."
    ),
    agent=concierge,
    expected_output="A polite final response addressed to the customer.",
)


crew = Crew(
    agents=[return_checker, inventory_checker],
    tasks=[customer_support_task],
    process=Process.hierarchical,
    manager_agent=concierge,
    verbose=True
)

result = crew.kickoff(inputs={'inquiry': "I bought earphones yesterday, but sound only comes from one side. Can I return them?"})

With this, the manager agent immediately delegated its task to “Return Policy Checker“

FYI: Japanese version code

import os
from crewai import Agent, Task, Crew, LLM, Process
from crewai.knowledge.source.string_knowledge_source import StringKnowledgeSource


return_policy_knowledge = StringKnowledgeSource(content="不良品なら返品可能。それ以外の返品は不可")
inventory_knowledge = StringKnowledgeSource(content="イヤホン(白)の在庫がある。他の在庫はない")

concierge = Agent(
    role="お客様対応コンシェルジュ",
    goal="お客様からの問い合わせに丁寧に対応する。内容に応じて適切なエージェントに照会し、最終的な回答をお客様向けにまとめる。",
    backstory="問い合わせ内容を正しく理解し、必要に応じて専門担当に委譲する能力が高い。",
    allow_delegation=True, 
    llm="gpt-5-nano",
    #llm="gpt-4o-mini",  # both llm ended up with pretty much same result
    verbose=True,
)


# (バックライン)返品ルールの専門担当者
return_checker = Agent(
    role="返品ルール確認係",
    goal="問い合わせ商品の返品可否や条件などを正しく回答する。",
    backstory="返品ルールに特化したバックオフィス担当者。",
    knowledge_sources=[return_policy_knowledge],
    allow_delegation=False,
    llm="gpt-5-nano",
    verbose=True,
)


# (バックライン)在庫状況チェッカー
inventory_checker = Agent(
    role="在庫状況チェック係",
    goal="商品の在庫を確認する。在庫がない場合は、在庫の中の類似商品を提案する。",
    backstory="倉庫の情報に詳しいバックオフィス担当者。",
    knowledge_sources=[inventory_knowledge],
    allow_delegation=False,
    llm="gpt-5-nano",
    verbose=True,
)

customer_support_task = Task(
    description=(
        "以下のお客様問い合わせに回答してください。\n\n"
        "問い合わせ内容:\n"
        "「{inquiry}」\n\n"
        "返品や在庫状況の問い合わせは自己判断せず、適切な係に照会した上で、最終的にはコンシェルジュとしてお客様向けに分かりやすい日本語で返答してください。"
    ),
    agent=concierge,
    expected_output="お客様に向けた丁寧な最終回答。",
)

crew = Crew(
    agents=[return_checker, inventory_checker],
    tasks=[customer_support_task],
    process=Process.hierarchical,
    manager_agent=concierge,
    verbose=True
)

result = crew.kickoff(inputs={'inquiry': "昨日買ったイヤホンですが、片耳から音が出ないので返品できますか?"})

Then it’s repeatedly delegated to the manager agent itself

Output: