# L3: Agentic Sales Pipeline - @router&paths error

**URL:** <https://community.deeplearning.ai/t/l3-agentic-sales-pipeline-router-paths-error/716277>\
**Category:** Practical Multi AI Agents and Advanced Use Cases w\
**Created:** [October 30, 2024, 5:10pm UTC](https://community.deeplearning.ai/t/l3-agentic-sales-pipeline-router-paths-error/716277 "2024-10-30T17:10:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ville\_Laukkanen](https://avatars.discourse-cdn.com/v4/letter/v/ea666f/32.png) [@Ville\_Laukkanen](https://community.deeplearning.ai/u/Ville_Laukkanen)\
**Post date:** [October 30, 2024, 5:10pm UTC](https://community.deeplearning.ai/t/l3-agentic-sales-pipeline-router-paths-error/716277/1 "2024-10-30T17:10:26Z")

</div>

I am trying to get the code to work in my Pycharm and this part I just can’t get to work even with ChatGPT or the CrewAI Assistant customGPT.

@router(filter\_leads, paths=[“high”, “medium”, “low”])  
TypeError: router() got an unexpected keyword argument ‘paths’

Of course I can just delete this part as it’s not exactly an important part of the code, but it would still be nice to know how to get this working.  
Anybody?

Many thanks in advance,  
Ville

---

<div class="post-metadata">

**Author:** ![SSS07](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@SSS07](https://community.deeplearning.ai/u/SSS07)\
**Post date:** [November 28, 2024, 8:08pm UTC](https://community.deeplearning.ai/t/l3-agentic-sales-pipeline-router-paths-error/716277/2 "2024-11-28T20:08:05Z")

</div>

> [@Ville\_Laukkanen](#):
>
> or the CrewAI Assistant customGPT.

I am also getting the same error in vscode. Any ideas? Thanks in advance!

---

<div class="post-metadata">

**Author:** ![djeetee](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/djeetee/32/103599_2.png) [@djeetee](https://community.deeplearning.ai/u/djeetee)\
**Post date:** [January 16, 2025, 12:13am UTC](https://community.deeplearning.ai/t/l3-agentic-sales-pipeline-router-paths-error/716277/3 "2025-01-16T00:13:22Z")

</div>

I replaced:  
@router(filter\_leads, paths=[“high”, “medium”, “low”])  
with:  
@router(log\_leads) # Listen to the input method  
def count\_leads(self, scores):  
if len(scores) \> 10:  
return ‘high’  
elif len(scores) \> 5:  
return ‘medium’  
else:  
return ‘low’

the flow will be like this…

 ![image](https://global.discourse-cdn.com/dlai/original/3X/4/4/44a1bb47e90790f65a4976e82a51db567ae58649.png)

I hope this helps.

---

<div class="post-metadata">

**Author:** ![viniciusgribas](https://avatars.discourse-cdn.com/v4/letter/v/51bf81/32.png) [@viniciusgribas](https://community.deeplearning.ai/u/viniciusgribas)\
**Post date:** [April 21, 2025, 9:44pm UTC](https://community.deeplearning.ai/t/l3-agentic-sales-pipeline-router-paths-error/716277/4 "2025-04-21T21:44:44Z")

</div>

All I had to do was remove the “paths” parameter, and it worked.

The code will be:

```auto
 @router(filter_leads)
  def count_leads(self, scores):
    if len(scores) > 10:
      return 'high'
    elif len(scores) > 5:
      return 'medium'
    else:
      return 'low'

```

And the rest keep the same.
