# Run multiple bots with a single rasa core server instance

**URL:** <https://forum.rasa.com/t/run-multiple-bots-with-a-single-rasa-core-server-instance/13456>\
**Category:** Rasa Open Source\
**Created:** [July 24, 2019, 10:42am UTC](https://forum.rasa.com/t/run-multiple-bots-with-a-single-rasa-core-server-instance/13456 "2019-07-24T10:42:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![SudheshSolomon](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@SudheshSolomon](https://forum.rasa.com/u/SudheshSolomon)\
**Post date:** [July 24, 2019, 10:42am UTC](https://forum.rasa.com/t/run-multiple-bots-with-a-single-rasa-core-server-instance/13456/1 "2019-07-24T10:42:11Z")

</div>

Hi,

I have built a chatbot using rasa stack, but I am not able to run multiple bot occurrence in a single rasa core instance as the bot gets confused and sends a wrong response to the users (sends User A’s response to User B and vice versa). I’ve read multiple blogs where using uuid was suggested as a solution to this problem but there was no clear explanation. Could you please let me know how to solve this problem. A code example would be much appreciated.

---

<div class="post-metadata">

**Author:** ![fede](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/fede/32/7095_2.png) [@fede](https://forum.rasa.com/u/fede)\
**Post date:** [July 25, 2019, 9:34am UTC](https://forum.rasa.com/t/run-multiple-bots-with-a-single-rasa-core-server-instance/13456/2 "2019-07-25T09:34:01Z")

</div>

Hi @SudheshSolomon, thanks for posting your question. It depends on which input channels you’re using, defined in your `credentials.yml` file. For example, if your file contains the following:

```auto
rest:
 # you don't need to provide anything here - this channel doesn't
 # require any credentials

```

Then each user would need to send a HTTP POST request to `/base/webooks/rest/webhook` with the following JSON contents:

```json
{
    "message": "Hello",
    "sender": "abcd1234"
}

```

Where the `sender` needs to be **unique per user**. How you generate the `sender` value for each user is up to you, but it needs to be sent in each request sent to the Rasa instance. Using UUIDs is a valid option.

---

<div class="post-metadata">

**Author:** ![SudheshSolomon](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@SudheshSolomon](https://forum.rasa.com/u/SudheshSolomon)\
**Post date:** [July 25, 2019, 11:00am UTC](https://forum.rasa.com/t/run-multiple-bots-with-a-single-rasa-core-server-instance/13456/3 "2019-07-25T11:00:29Z")

</div>

@fede. Thank you very much. This solution has given me an insight on how to proceed further 🙂

---

<div class="post-metadata">

**Author:** ![SudheshSolomon](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@SudheshSolomon](https://forum.rasa.com/u/SudheshSolomon)\
**Post date:** [July 29, 2019, 6:22am UTC](https://forum.rasa.com/t/run-multiple-bots-with-a-single-rasa-core-server-instance/13456/4 "2019-07-29T06:22:00Z")

</div>

Hi @fede ,

Greetings. I tried the approach you suggested in creating the credentials file and parsing the chats as post request. However, I am stuck in the latter part. I am using flask to render HTML, but I am stuck at the point where I need to add an id to the user so that concurrent chats can happen simultaneously. Any help on how to proceed further is highly appreciated. NOTE: I am not able to parse my chat as GET/POST request. Kindly help me on this problem. My bot works perfectly fine if it is used only on one system. Also, I am not using slack, but I am using Flask and rendering the HTML.

---

<div class="post-metadata">

**Author:** ![fede](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/fede/32/7095_2.png) [@fede](https://forum.rasa.com/u/fede)\
**Post date:** [July 29, 2019, 12:21pm UTC](https://forum.rasa.com/t/run-multiple-bots-with-a-single-rasa-core-server-instance/13456/5 "2019-07-29T12:21:01Z")

</div>

When you render your HTML page with Flask, you could try including a unique ID somewhere in the page, so that each user that visits your site gets a unique ID assigned (you can also use Cookies for this). Would that help you?

---

<div class="post-metadata">

**Author:** ![SudheshSolomon](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@SudheshSolomon](https://forum.rasa.com/u/SudheshSolomon)\
**Post date:** [July 30, 2019, 4:50am UTC](https://forum.rasa.com/t/run-multiple-bots-with-a-single-rasa-core-server-instance/13456/6 "2019-07-30T04:50:22Z")

</div>

Hi @fede,

Thanks for your reply. I am able to find that an uuid gets appended to the messages. 🙂

I am now able to run my bot in two systems but I get response from the server system and not from the client.

I have changed the ip address of rasa core to the ip of my server system and my core runs on the ip of my server as well. How do I get a response from both the systems.

NOTE: The issue of rendering flask in multiple system is fixed but now I am facing the issue where I get the response only from the server and not from the client machines.

Kindly help me in this.

---

<div class="post-metadata">

**Author:** ![SudheshSolomon](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@SudheshSolomon](https://forum.rasa.com/u/SudheshSolomon)\
**Post date:** [July 30, 2019, 9:48am UTC](https://forum.rasa.com/t/run-multiple-bots-with-a-single-rasa-core-server-instance/13456/7 "2019-07-30T09:48:13Z")

</div>

Hi @fede,

I have fixed this issue as well and found out what needs to be changed but this has led to a new issue. The agent.py file generates new uuid for message.senderId for every message which is sent. How to keep the same sender id until the session is closed?
