Handing off to Human agent

How to implement a Human Handoff feature in Bot? Is there any working code?

There are multiple ways to do so:

  • your frontend can route messages to a different backend when the bot sends some specific message
  • you can use custom actions to forward messages to a human

In general it highly depends on your existing infrastructure, that’s probably why there aren’t any examples out there.

I build using this repo: GitHub - moaazsidat/rasa-handoff: Experiments with Rasa human handoff but not working

Thanks for Reply, please check this one

The linked repository is very outdated (still uses the deprecated rasa_core and rasa_nlu). They used a custom action (rasa-handoff/actions.py at fa66c4f802d6edb1fb91bd59ab65dea4a736a40e · moaazsidat/rasa-handoff · GitHub).

1 Like

Thanks for sharing this. Quite useful

1 Like

could you suggest me some ways to do human-handoff feature?

@ravikrcs

Please see Handing off to Human agent . I think the first approach with having the frontend send messages to a different endpoint is the simplest and most scalable one.

Thanks @Tobias_Wochinger can i use slack where human can takeover? how to do…

Sure, the frontend can send the messages wherever you want to. Where are you currently stuck / what’s your setup so far?

is it possible through webhook?

want to create an action that interact with slack through webhook.

A reliable way of accomplishing without switching the frontend for routing messages (which is a good way of going about it) would be defining your own policy in addition to a custom action to facilitate the communication. Give the policy the highest priority in your configuration and let it predict the action when a certain slot is triggered like handoff_active.

After you are done talking with the human agent you can unset the slot to finish the story and optionally predict some follow-up actions like feedback and whatnot.

how to connect with slack and getback response?

@Tobias_Wochinger Could you explain in brief or steps , how to perform handoff through slack or rocketchat live?

Hey @Tobias_Wochinger!

Do you have any tips on forwarding the messages to a human?

I have posted my implementation based on the suggestion from @chkoss in the following thread.

Hello @Mappi Thanks for your suggestion , i thinks thats really a good one but can your help me the custom policy how and what ? i am not getting what kind of policy will help me to hand over the human , please exaplain or guide me through this . Thanks

@nchauras would you please provide a working code to test it and customize it?

Apologize for the delayed response. I have not been working on Rasa for a while now. Please let me know what code you need. You can reach out to me or we can work on a shared repo.