Title: Enabling multiple agents
Last modified: April 24, 2018

---

# Enabling multiple agents

 *  Resolved [Softranet](https://wordpress.org/support/users/softra/)
 * (@softra)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/enabling-multiple-agents/)
 * Hi,
 * Thanks for this amazing plugin. I would like to know if we could enable two Dialogue
   Flow agents in same wordpress installation. If yes, how could I use that feature..
 * “== Changelog ==
 * = 0.6 (28/11/2017) =
    * New: Now supports multiple chatbots on the same page ”
 * Thank you,
    Tony Thomas

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [amgsoft](https://wordpress.org/support/users/amgsoft/)
 * (@amgsoft)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/enabling-multiple-agents/#post-10429744)
 * Hello.
 * I have same question.
    anyone can help this?
 * thanks
    akio
 *  [swellart](https://wordpress.org/support/users/swellart/)
 * (@swellart)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/enabling-multiple-agents/#post-10504916)
 * Hello!
    Same question!
 * Thanks
 *  Plugin Author [dpowney](https://wordpress.org/support/users/dpowney/)
 * (@dpowney)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/enabling-multiple-agents/#post-10507915)
 * It is possible to add different agents to different pages by change the access
   token based on the page.
 * The access token is accessed via the mys_script_vars JavaScript variable. This
   is set using the wp_localize_script() function.
 * Then on the client side, the access token is accessed as follows to construct
   the AJAX call to query Dialogflow:
    `myc_script_vars.access_token`
 * I’ve allowed the access token value to be changed via a WordPress filter as follows:
   `'
   access_token' => apply_filters( 'myc_script_access_token', $general_settings['
   myc_access_token'] ),`
 * For example:
    function myc_set_access_token( $access_token) { if ( is_home() ){//
   add different access token for home page $access_token = ‘djkdsk378dshdsndsi8sdids’;//
   new dummy access token } return $agent_token; } add_filter( ‘myc_script_access_token’,‘
   myc_set_access_token’ );
 * I have no tested the code above. But hopefully you understand what I mean.
    Daniel
 *  [chatbotsample](https://wordpress.org/support/users/chatbotsample/)
 * (@chatbotsample)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/enabling-multiple-agents/#post-10635035)
 * can you help me to develop dialog flow api v2 plugin in wordpress or if you have
   sample code for v2 dialog flow pleas share it will help for me. I have no idea
   about v2.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Enabling multiple agents’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/my-chatbot_766f64.svg)
 * [My Chatbot](https://wordpress.org/plugins/my-chatbot/)
 * [Support Threads](https://wordpress.org/support/plugin/my-chatbot/)
 * [Active Topics](https://wordpress.org/support/plugin/my-chatbot/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/my-chatbot/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/my-chatbot/reviews/)

## Tags

 * [agent](https://wordpress.org/support/topic-tag/agent/)
 * [bot](https://wordpress.org/support/topic-tag/bot/)
 * [dialogflow](https://wordpress.org/support/topic-tag/dialogflow/)

 * 4 replies
 * 5 participants
 * Last reply from: [chatbotsample](https://wordpress.org/support/users/chatbotsample/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/enabling-multiple-agents/#post-10635035)
 * Status: resolved