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

**URL:** <https://community.crewai.com/t/why-i-am-not-getting-exception-if-i-am-not-using-this-line-config-agents-yaml-in-my-crew/1681>\
**Category:** General\
**Created:** [November 28, 2024, 9:52am UTC](https://community.crewai.com/t/why-i-am-not-getting-exception-if-i-am-not-using-this-line-config-agents-yaml-in-my-crew/1681 "2024-11-28T09:52:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jitendra](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@jitendra](https://community.crewai.com/u/jitendra)\
**Post date:** [November 28, 2024, 9:52am UTC](https://community.crewai.com/t/why-i-am-not-getting-exception-if-i-am-not-using-this-line-config-agents-yaml-in-my-crew/1681/1 "2024-11-28T09:52:52Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![matt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/matt/32/3_2.png) [@matt](https://community.crewai.com/u/matt)\
**Post date:** [November 28, 2024, 10:14am UTC](https://community.crewai.com/t/why-i-am-not-getting-exception-if-i-am-not-using-this-line-config-agents-yaml-in-my-crew/1681/2 "2024-11-28T10:14:13Z")

</div>

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”)

---

<div class="post-metadata">

**Author:** ![jitendra](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@jitendra](https://community.crewai.com/u/jitendra)\
**Post date:** [November 28, 2024, 11:18am UTC](https://community.crewai.com/t/why-i-am-not-getting-exception-if-i-am-not-using-this-line-config-agents-yaml-in-my-crew/1681/3 "2024-11-28T11:18:23Z")

</div>

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.
