How to Run Your Bot
Follow these steps and your AI bot will be running in under 10 minutes.
What You Need
- 1Python 3.8 or higher installed on your computer
- 2An OpenAI API key (from platform.openai.com)
- 3The
.pyfile you downloaded from RoboSmith - 4A terminal / command prompt
Step 1
Install the OpenAI library
Run this in your terminal:
pip install openaiIf you're on Mac/Linux and pip doesn't work, try pip3 install openai.
Step 2
Add your OpenAI API key
This is the most important step. The bot needs your API key to call OpenAI.
Environment variable (recommended)
Windows (Command Prompt):
setx OPENAI_API_KEY "sk-your-key-here"After running this, close and reopen your terminal.
Mac / Linux (Terminal):
export OPENAI_API_KEY="sk-your-key-here"Paste directly into the file
Open the .py file in any text editor. Near the top, find the line that creates the OpenAI client and add your key:
from openai import OpenAI
client = OpenAI(api_key="sk-your-key-here")Where to get your API key:
- 1Go to platform.openai.com
- 2Click "API keys" in the left sidebar
- 3Click "Create new secret key"
- 4Copy it immediately — you won't see it again
- 5Note: you need OpenAI API credits (separate from a ChatGPT Plus subscription)
Step 3
Run the bot
In your terminal, navigate to where you downloaded the file:
cd DownloadsThen run it:
python ai-bot-builder-template.py(Replace the filename with whichever template you downloaded.)
Type hello and press Enter. Your bot will respond.
Common errors
Click any error below to see the fix.
Need a different bot template?
Browse the full collection — customer support, sales, HR, social media, and more.
Browse Bot Templates