Why I am not getting exception, if I am not using this line(config/agents.yaml) in my crew

I have observed if I am not writing ‘config/agents.yaml or tasks.yaml’ in my crew but I am writing below
@agent
def researcher(self) → Agent:
config = self.agents_config[‘researcher’]

Still it is working fine. Why?

It is handled by the crewbase decorator

  • It first tries to get custom paths from the class
  • If no custom paths are specified, it uses the default paths (“config/agents.yaml” and “config/tasks.yaml”)
1 Like

Thanks matt for quick reply, it’s really great help to understand crewai.
Now I understood If I am using multiple crews then custom path will work for me in better way to achieve the goals.