# Create Your First Bot

> Step-by-step guide to creating and deploying your first Aerostack bot using the Admin Dashboard. Choose a platform, connect a workspace, set a system prompt, and go live.

This guide walks you through creating a bot using the Admin Dashboard at [app.aerostack.dev](https://app.aerostack.dev). By the end, you will have a working bot connected to a messaging platform with access to MCP tools.

**Prerequisites:**
- An Aerostack account
- An MCP workspace with at least one MCP server (or create one during setup)
- A messaging platform account (Telegram, Discord, WhatsApp, or Slack)

---

## Dashboard Walkthrough

1. **Open the Bot Builder**

   Log in to [app.aerostack.dev](https://app.aerostack.dev) and click **Bots** in the left sidebar. Click the **New Bot** button in the top right.

2. **Name Your Bot**

   Enter a name for your bot. This is displayed in the dashboard and used to generate the bot's slug. Choose something descriptive — "Acme Support Bot" is better than "Bot 1".

3. **Choose a Platform**

   Select the messaging platform where your bot will live.

   
   

   **What you need:** A bot token from [@BotFather](https://t.me/BotFather) on Telegram.

   1. Open Telegram and message `@BotFather`
   2. Send `/newbot` and follow the prompts
   3. Copy the bot token (looks like `123456789:ABCdefGhIJKlmNoPQRsTUVwxyz`)
   4. Paste it into the **Bot Token** field
   5. Set a **Webhook Secret** — any random string (recommended for production)

   
   Keep your bot token secret. Anyone with this token can control your Telegram bot. If compromised, use `/revoke` with BotFather to get a new one.
   

   
   

   **What you need:** Application ID, Public Key, and Bot Token from the [Discord Developer Portal](https://discord.com/developers/applications).

   1. Create a new application in the Discord Developer Portal
   2. Copy the **Application ID** and **Public Key** from the General Information tab
   3. Navigate to the Bot tab and copy the **Bot Token**
   4. Enter all three in the platform configuration fields

   You will also need to invite the bot to your server using an OAuth2 URL with `bot` and `applications.commands` scopes.

   
   

   **What you need:** Phone Number ID, Access Token, Verify Token, and App Secret from the [Meta Developer Portal](https://developers.facebook.com/).

   1. Create a Meta app with WhatsApp product enabled
   2. Copy the **Phone Number ID** from WhatsApp > API Setup
   3. Generate a permanent **Access Token** (System User token, not the 24-hour test token)
   4. Choose a **Verify Token** (any random string you pick)
   5. Copy the **App Secret** from App Settings > Basic

   
   After activation, you must manually set the webhook URL in the Meta Developer Portal. Aerostack provides the URL — you paste it into WhatsApp > Configuration > Webhook.
   

   
   

   **What you need:** Bot Token and Signing Secret from [api.slack.com/apps](https://api.slack.com/apps).

   1. Create a new Slack app (from scratch)
   2. Add bot token scopes: `chat:write`, `app_mentions:read`, `im:history`, `im:read`, `reactions:write`
   3. Install the app to your workspace and copy the **Bot User OAuth Token** (`xoxb-...`)
   4. Copy the **Signing Secret** from Basic Information

   
   After activation, you must manually set the Event Subscriptions URL in the Slack App settings and subscribe to `message.im` and `app_mention` events.
   

   
   

   **No platform configuration needed.** The custom webhook gives you a URL endpoint that accepts JSON payloads. Use it to connect any application, build a custom chat UI, or integrate with platforms Aerostack does not natively support.

   
   

4. **Connect a Workspace**

   Select an existing MCP workspace or create a new one. The workspace determines what tools your bot can access.

   If you do not have a workspace yet:
   1. Click **Create New Workspace**
   2. Give it a name
   3. Add MCP servers from the marketplace (e.g., a database MCP for data queries, a Stripe MCP for payments)

   The bot inherits all tools from every MCP server, Skill, and Function in the workspace. You can add or remove tools later without changing the bot.

5. **Write a System Prompt**

   The system prompt defines your bot's personality, role, and behavior. This is the most important configuration field — it shapes every response.

   A good system prompt includes:
   - **Role definition** — who the bot is and what it does
   - **Behavioral guidelines** — tone, style, boundaries
   - **Tool guidance** — when to use specific tools
   - **Escalation rules** — when to hand off to humans

   Example:

   ```
   You are a customer support agent for Acme Corp. You help customers with order
   inquiries, billing questions, and returns.

   Rules:
   - Always verify the customer's identity before accessing account data
   - Use the orders__get_order tool when customers ask about order status
   - Use the stripe__create_refund tool for refunds under $100
   - Escalate refunds over $100 to a human agent
   - Be concise and professional
   - If you do not know the answer, say so honestly
   ```

6. **Choose an LLM**

   Select the LLM provider and model. The default is **Anthropic Claude Sonnet 4** — a strong balance of capability and cost.

   | If your bot needs... | Choose |
   |---------------------|--------|
   | Complex reasoning, nuanced responses | Claude Opus 4, GPT-4o, Gemini 2.5 Pro |
   | Good quality at lower cost | Claude Sonnet 4, GPT-4o |
   | Maximum speed and lowest cost | Claude Haiku, GPT-4o Mini, Gemini 2.5 Flash |
   | Fastest inference | Groq Llama 3.3 70B |

   **Billing mode:** Leave on **Wallet** to use Aerostack's pooled keys (charges deducted from your balance). Switch to **BYOK** and enter your own API key if you have negotiated rates or free credits.

7. **Create and Activate**

   Click **Create Bot**. Your bot is created in `draft` status.

   Review the configuration on the bot detail page, then click **Activate** to go live. Activation registers the webhook with your platform (Telegram and Discord do this automatically; Slack and WhatsApp require a manual step in the platform's settings).

8. **Test It**

   Send a message to your bot on the platform you chose. You should see a response within a few seconds.

   You can also use the **Test Console** in the dashboard — click the **Test** button on your bot's detail page to send messages without going through the platform.

---

## Using a Template (Shortcut)

If you prefer to start from a pre-built configuration, use the **Template** option when creating a bot:

1. Click **New Bot** and select **From Template**
2. Choose a template (Customer Support, Community Manager, or Sales Assistant)
3. Fill in the template's config values (company name, support hours, etc.)
4. Select a platform and enter credentials
5. Click **Create Bot** — the wizard creates a workspace, connects the template's suggested MCPs, and builds the bot in one step

Templates come with pre-written system prompts and optional workflows. You can customize everything after creation.

---

## What Happens Under the Hood

When you create a bot, Aerostack:

1. **Stores credentials securely** — platform tokens and LLM API keys are encrypted at rest
2. **Links the workspace** — the bot gets a managed access token for the workspace gateway
3. **Sets status to `draft`** — the bot exists but does not receive messages yet

When you **activate**, Aerostack:

1. **Registers the webhook** — calls the platform's API to set the webhook URL (Telegram, Discord) or provides the URL for manual setup (Slack, WhatsApp)
2. **Sets status to `active`** — the bot begins receiving and processing messages
3. **Reports any warnings** — missing webhook secrets, manual setup steps, etc.

---

## Next Steps

- [Connect Tools](/bots/connect-tools) — Add more capabilities through the workspace
- [Workflows](/bots/workflows) — Add structured automation
- [Platform Guides](/bots/platforms/telegram) — Detailed setup for each platform
- [Testing & Debugging](/bots/testing) — Use the test console and conversation logs
