Skip to main content

Code

multiple_instances.py

Usage

1

Set up your virtual environment

2

Set Environment Variables

3

Install dependencies

4

Run Example

5

Register Webhooks

Register a webhook for each bot token:

Key Features

  • Prefix-Based Routing: Each agent gets its own webhook path (/basic/webhook, /web-research/webhook)
  • Shared Server: Both agents run on a single AgentOS instance
  • Separate Bot Tokens: Each interface uses its own BotFather bot (Telegram allows only one webhook per token)
  • Shared Database: Both agents share the same SQLite database