Issue with Prompt Customization Example – KeyError: 'role_playing'

Hi everyone,

While going through the official CrewAI documentation, I followed the example on basic prompt customization: Customizing Prompts - CrewAI

When I tried running the code, I got this error:

File "C:\Users\s.russo\Desktop\multi-agent\.venv\Lib\site-packages\crewai\utilities\i18n.py", line 51, in retrieve
    return self._prompts[kind][key]
           ~~~~~~~~~~~~~~~~~~~^^^^^
KeyError: 'role_playing'

Is it correct to assume that in order for this to work, I need to provide a JSON file that includes all the expected keys—like the one here? crewAI/src/crewai/translations/en.json at main · crewAIInc/crewAI · GitHub

Or am I missing a simpler way to handle this?

Thanks in advance!

Yes, you’re right. You would need to have it in a JSON file.