CINXE.COM

Create a basic bot - Bot Service | Microsoft Learn

<!DOCTYPE html><html class="hasSidebar hasPageActions hasBreadcrumb conceptual has-default-focus theme-light" lang="en-us" dir="ltr" data-authenticated="false" data-auth-status-determined="false" data-target="docs" x-ms-format-detection="none"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta property="og:title" content="Create a basic bot - Bot Service" /> <meta property="og:type" content="website" /> <meta property="og:url" content="https://learn.microsoft.com/en-us/azure/bot-service/bot-service-quickstart-create-bot?view=azure-bot-service-4.0" /><meta property="og:description" content="Create your first bot with the Bot Framework SDK, in C#, Java, JavaScript, or Python." /><meta property="og:image" content="https://learn.microsoft.com/en-us/media/open-graph-image.png" /> <meta property="og:image:alt" content="Microsoft Learn" /> <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:site" content="@MicrosoftLearn" /> <meta name="color-scheme" content="light dark"><meta name="archive_url" content="https://docs.microsoft.com/previous-versions/azure/bot-service/index-bf-sdk" /> <meta name="author" content="JonathanFingold" /> <meta name="breadcrumb_path" content="/azure/bot-service/breadcrumb/TOC.json" /> <meta name="default_moniker" content="azure-bot-service-4.0" /> <meta name="depot_name" content="Azure.bot-framework" /> <meta name="description" content="Create your first bot with the Bot Framework SDK, in C#, Java, JavaScript, or Python." /> <meta name="document_id" content="f55c86f2-9c0d-015b-d44f-58914fed2deb" /> <meta name="document_version_independent_id" content="85fe7f0c-002a-e449-55cb-712d92874b19" /> <meta name="exclude_monikers" content="azure-bot-service-3.0" /> <meta name="feedback_help_link_type" content="" /> <meta name="feedback_help_link_url" content="" /> <meta name="feedback_product_url" content="" /> <meta name="feedback_system" content="None" /> <meta name="git_commit_id" content="8e69ee990db208c72c53eeb03eccf22f5fef38d4" /> <meta name="gitcommit" content="https://github.com/MicrosoftDocs/bot-docs-pr/blob/8e69ee990db208c72c53eeb03eccf22f5fef38d4/articles/bot-service-quickstart-create-bot.md" /> <meta name="locale" content="en-us" /> <meta name="manager" content="shellyha" /> <meta name="monikers" content="azure-bot-service-4.0" /> <meta name="ms.author" content="iawilt" /> <meta name="ms.custom" content="mode-api" /> <meta name="ms.custom" content="tab-zone-seo" /> <meta name="ms.custom" content="abs-meta-21q1" /> <meta name="ms.custom" content="evergreen" /> <meta name="ms.date" content="10/09/2024" /> <meta name="ms.reviewer" content="micchow" /> <meta name="ms.service" content="azure-ai-bot-service" /> <meta name="ms.topic" content="quickstart" /> <meta name="original_content_git_url" content="https://github.com/MicrosoftDocs/bot-docs-pr/blob/live/articles/bot-service-quickstart-create-bot.md" /> <meta name="page_type" content="conceptual" /> <meta name="pdf_url_template" content="https://learn.microsoft.com/pdfstore/en-us/Azure.bot-framework/{branchName}{pdfName}" /> <meta name="schema" content="Conceptual" /> <meta name="site_name" content="Docs" /> <meta name="toc_rel" content="toc.json" /> <meta name="uhfHeaderId" content="azure" /> <meta name="updated_at" content="2024-12-19 01:00 AM" /> <meta name="word_count" content="2275" /> <meta name="persistent_id" content="673a4a1b-c096-c1dc-820b-0b7f8b7a28e0" /> <meta name="platform_id" content="673a4a1b-c096-c1dc-820b-0b7f8b7a28e0" /> <meta name="cmProducts" content="https://authoring-docs-microsoft.poolparty.biz/devrel/7696cda6-0510-47f6-8302-71bb5d2e28cf" data-source="generated" /> <meta name="cmProducts" content="https://authoring-docs-microsoft.poolparty.biz/devrel/4628cbd9-6f47-4ae1-b371-d34636609eaf" data-source="generated" /> <meta name="cmProducts" content="https://microsoft-devrel.poolparty.biz/DevRelOfferingOntology/c6f99e62-1cf6-4b71-af9b-649b05f80cce" data-source="generated" /> <meta name="spProducts" content="https://authoring-docs-microsoft.poolparty.biz/devrel/69c76c32-967e-4c65-b89a-74cc527db725" data-source="generated" /> <meta name="spProducts" content="https://authoring-docs-microsoft.poolparty.biz/devrel/be21deb8-8c64-44b0-b71f-2dc56ca7364f" data-source="generated" /> <meta name="spProducts" content="https://microsoft-devrel.poolparty.biz/DevRelOfferingOntology/3f56b378-07a9-4fa1-afe8-9889fdc77628" data-source="generated" /> <meta name="scope" content="Azure, BotService" /><meta name="github_feedback_content_git_url" content="https://github.com/MicrosoftDocs/bot-docs-pr/blob/live/articles/bot-service-quickstart-create-bot.md" /><link href="https://learn.microsoft.com/en-us/azure/bot-service/bot-service-quickstart-create-bot?view=azure-bot-service-4.0" rel="canonical"><title>Create a basic bot - Bot Service | Microsoft Learn</title><link rel="stylesheet" href="/static/assets/0.4.029766323/styles/site-ltr.css"> <script id="msdocs-script"> var msDocs = {environment: { supportLevel: 'production', accessLevel: 'online', reviewFeatures: false, systemContent: true, azurePortalHostname: 'portal.azure.com', legacyHosting: false, siteName: 'learn', },data: { timeOrigin: Date.now(), contentLocale: 'en-us', contentDir: 'ltr', userLocale: 'en-us', userDir: 'ltr', pageTemplate: 'Conceptual', brand: 'azure', context: {}, hasBinaryRating: true, feedbackHelpLinkType:'', feedbackHelpLinkUrl:'', standardFeedback: false, showFeedbackReport: false, enableTutorialFeedback: false, feedbackSystem: 'None', feedbackGitHubRepo: '', feedbackProductUrl: '',extendBreadcrumb: false,isEditDisplayable: false, hideViewSource: false, hasPageActions: true, hasPrintButton: true, hasBookmark: true, hasShare: true, isPermissioned: false, isPrivateUnauthorized: false,hasRecommendations: true,contributors: [{ name: "JonathanFingold", url: "https://github.com/JonathanFingold" },{ name: "cyrilanderson", url: "https://github.com/cyrilanderson" },{ name: "rido-min", url: "https://github.com/rido-min" },{ name: "eric-urban", url: "https://github.com/eric-urban" },{ name: "Roudabeh1348", url: "https://github.com/Roudabeh1348" },{ name: "emgrol", url: "https://github.com/emgrol" },{ name: "MarcFromTerawe", url: "https://github.com/MarcFromTerawe" },{ name: "erhopf", url: "https://github.com/erhopf" }],}, functions:{} }; </script><script src="https://wcpstatic.microsoft.com/mscc/lib/v2/wcp-consent.js"></script> <script src="https://js.monitor.azure.com/scripts/c/ms.jsll-4.min.js"></script><script src="/static/assets/0.4.029766323/global/deprecation.js"></script><script src="/static/assets/0.4.029766323/scripts/en-us/index-docs.js"></script></head> <body lang="en-us" dir="ltr"> <div class="header-holder has-default-focus"> <a href="#main" style="z-index: 1070" class="outline-color-text visually-hidden-until-focused position-fixed inner-focus focus-visible top-0 left-0 right-0 padding-xs text-align-center has-body-background" tabindex="1">Skip to main content</a><div hidden id="cookie-consent-holder" data-test-id="cookie-consent-container"></div> <div id="unsupported-browser" style=" background-color: white; color: black; padding: 16px; border-bottom: 1px solid grey;" hidden > <div style="max-width: 800px; margin: 0 auto;"> <p style="font-size: 24px">This browser is no longer supported.</p> <p style="font-size: 16px; margin-top: 16px;">Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.</p> <div style="margin-top: 12px;"> <a href="https://go.microsoft.com/fwlink/p/?LinkID=2092881 " style=" background-color: #0078d4; border: 1px solid #0078d4; color: white; padding: 6px 12px; border-radius: 2px; display: inline-block; ">Download Microsoft Edge</a> <a href="https://learn.microsoft.com/en-us/lifecycle/faq/internet-explorer-microsoft-edge" style=" background-color: white; padding: 6px 12px; border: 1px solid #505050; color: #171717; border-radius: 2px; display: inline-block; ">More info about Internet Explorer and Microsoft Edge</a> </div> </div> </div> <!-- liquid-tag banners global --> <!-- site header --> <header id="ms--site-header" data-test-id="site-header-wrapper" role="banner" itemscope="itemscope" itemtype="http://schema.org/Organization"> <div id="ms--mobile-nav" class="site-header display-none-tablet padding-inline-none gap-none" data-bi-name="mobile-header" data-test-id="mobile-header"></div> <div id="ms--primary-nav" class="site-header display-none display-flex-tablet" data-bi-name="L1-header" data-test-id="primary-header"></div> <div id="ms--secondary-nav" class="site-header display-none display-flex-tablet" data-bi-name="L2-header" data-test-id="secondary-header"></div> </header><div id="content-header" class="content-header uhf-container has-padding has-default-focus border-bottom-none" data-bi-name="content-header"> <div class="content-header-controls margin-xxs margin-inline-sm-tablet"> <button type="button" class="contents-button button button-sm margin-right-xxs" data-bi-name="contents-expand" aria-haspopup="true" data-contents-button> <span class="icon"><span class="docon docon-menu" aria-hidden="true"></span></span> <span class="contents-expand-title">Table of contents</span> </button> <button type="button" class="ap-collapse-behavior ap-expanded button button-sm" data-bi-name="ap-collapse" aria-controls="action-panel"> <span class="icon"><span class="docon docon-exit-mode" aria-hidden="true"></span></span> <span>Exit focus mode</span> </button> </div> </div><div id="disclaimer-holder" class="has-overflow-hidden has-default-focus"> <!-- liquid-tag banners sectional --> </div> </div> <div class="mainContainer uhf-container has-default-focus" data-bi-name="body"> <div class="columns has-large-gaps is-gapless-mobile "><div id="left-container" class="left-container is-hidden-mobile column is-one-third-tablet is-one-quarter-desktop"> <nav id="affixed-left-container" class="margin-top-sm-tablet position-sticky display-flex flex-direction-column" aria-label="Primary"></nav> </div><!-- .primary-holder --> <section class="primary-holder column is-two-thirds-tablet is-three-quarters-desktop"> <!--div.columns --> <div class="columns is-gapless-mobile has-large-gaps "><div id="main-column" class="column is-full is-8-desktop" data-main-column> <main id="main" class="" role="main" data-bi-name="content" lang="en-us" dir="ltr"><!-- article-header --> <div id="article-header" class="background-color-body margin-top-sm-tablet margin-bottom-xs display-none-print"> <div class="display-flex align-items-center "><details id="article-header-breadcrumbs-overflow-popover" class="popover" data-for="article-header-breadcrumbs"> <summary class="button button-clear button-primary button-sm inner-focus" aria-label="All breadcrumbs"> <span class="icon"> <span class="docon docon-more"></span> </span> </summary> <div id="article-header-breadcrumbs-overflow" class="popover-content padding-none"> </div> </details> <bread-crumbs id="article-header-breadcrumbs" data-test-id="article-header-breadcrumbs" class="overflow-hidden flex-grow-1 margin-right-sm margin-right-md-tablet margin-right-lg-desktop margin-left-negative-xxs padding-left-xxs"></bread-crumbs><div id="article-header-page-actions" class="opacity-none margin-left-auto display-flex flex-wrap-no-wrap align-items-stretch"><a id="lang-link-tablet" class="button button-primary button-clear button-sm display-none display-inline-flex-tablet" title="Read in English" data-bi-name="language-toggle" data-read-in-link hidden> <span class="icon margin-none" aria-hidden="true" data-read-in-link-icon> <span class="docon docon-locale-globe"></span> </span> <span class="is-visually-hidden" data-read-in-link-text>Read in English</span> </a><button type="button" class="collection button button-clear button-sm button-primary display-none display-inline-flex-tablet" data-list-type="collection" data-bi-name="collection" title="Add to collection"> <span class="icon margin-none" aria-hidden="true"> <span class="docon docon-circle-addition"></span> </span> <span class="collection-status is-visually-hidden">Save</span> </button><a data-contenteditbtn class="button button-clear button-sm text-decoration-none button-primary display-none display-inline-flex-tablet" aria-label="Edit" title="Edit This Document" data-bi-name="edit" hidden href="https://github.com/MicrosoftDocs/bot-docs-pr/blob/live/articles/bot-service-quickstart-create-bot.md"> <span class="icon margin-none" aria-hidden="true"> <span class="docon docon-edit-outline"></span> </span> </a> <details class="popover popover-right" id="article-header-page-actions-overflow"> <summary class="justify-content-flex-start button button-clear button-sm button-primary" aria-label="More actions" title="More actions"> <span class="icon" aria-hidden="true"> <span class="docon docon-more-vertical"></span> </span> </summary> <div class="popover-content padding-xs"><button data-page-action-item="overflow-mobile" type="button" class="justify-content-flex-start button-block button-sm has-inner-focus button button-clear display-none-tablet" data-bi-name="contents-expand" data-contents-button data-popover-close> <span class="icon"> <span class="docon docon-editor-list-bullet" aria-hidden="true"></span> </span><span class="contents-expand-title">Table of contents</span></button><a id="lang-link-overflow" class="justify-content-flex-start button-sm has-inner-focus button button-clear button-block display-none-tablet" title="Read in English" data-bi-name="language-toggle" data-page-action-item="overflow-mobile" data-check-hidden="true" data-read-in-link hidden > <span class="icon" aria-hidden="true" data-read-in-link-icon> <span class="docon docon-locale-globe"></span> </span> <span data-read-in-link-text>Read in English</span> </a><button type="button" class="collection justify-content-flex-start button button-clear button-sm has-inner-focus button-block display-none-tablet" data-list-type="collection" data-bi-name="collection" title="Save" data-page-action-item="overflow-mobile" data-check-hidden="true" data-popover-close> <span class="icon" aria-hidden="true"> <span class="docon docon-circle-addition"></span> </span> <span class="collection-status">Save</span> </button> <button type="button" class="collection justify-content-flex-start button button-clear button-sm has-inner-focus button-block display-none-tablet" data-list-type="plan" data-bi-name="plan" title="Add to plan" data-page-action-item="overflow-mobile" data-check-hidden="true" data-popover-close hidden> <span class="icon" aria-hidden="true"> <span class="docon docon-circle-addition"></span> </span> <span class="plan-status">Add to plan</span> </button><a data-contenteditbtn class="button button-clear button-block button-sm has-inner-focus justify-content-flex-start text-decoration-none display-none-tablet" aria-label="Edit" title="Edit This Document" data-bi-name="edit" hidden href="https://github.com/MicrosoftDocs/bot-docs-pr/blob/live/articles/bot-service-quickstart-create-bot.md"> <span class="icon" aria-hidden="true"> <span class="docon docon-edit-outline"></span> </span> <span>Edit</span> </a><div aria-hidden="true" class="margin-none" data-page-action-item="overflow-all"></div> <hr class="display-none-tablet margin-bottom-xxs margin-top-xxs" /> <h4 class="font-size-sm padding-left-xxs">Share via</h4> <a class="button button-clear button-sm button-block has-inner-focus text-decoration-none justify-content-flex-start share-facebook" data-bi-name="facebook" data-page-action-item="overflow-all"> <span class="icon" aria-hidden="true"> <span class="docon docon-facebook-share font-size-md color-primary"></span> </span> <span class="margin-left-xxs">Facebook</span> </a> <a class="button button-clear button-sm has-inner-focus button-block text-decoration-none justify-content-flex-start share-twitter" data-bi-name="twitter" data-page-action-item="overflow-all"> <span class="icon" aria-hidden="true"> <span class="docon docon-xlogo-share font-size-xxs"></span> </span> <span class="margin-left-xxs">x.com</span> </a> <a class="button button-clear button-sm has-inner-focus button-block text-decoration-none justify-content-flex-start share-linkedin" data-bi-name="linkedin" data-page-action-item="overflow-all"> <span class="icon" aria-hidden="true"> <span class="docon docon-linked-in-logo font-size-sm color-primary"></span> </span> <span class="margin-left-xxs">LinkedIn</span> </a> <a class="button button-clear button-sm button-block has-inner-focus text-decoration-none justify-content-flex-start margin-bottom-xxs share-email" data-bi-name="email" data-page-action-item="overflow-all"> <span class="icon" aria-hidden="true"> <span class="docon docon-mail-message font-size-sm color-primary"></span> </span> <span class="margin-left-xxs">Email</span> </a><hr /> <button class="button button-block button-clear button-sm justify-content-flex-start has-inner-focus margin-top-xxs" title="Print" type="button" aria-label="Print" data-bi-name="print" data-page-action-item="overflow-all" data-popover-close data-print-page data-check-hidden="true"> <span class="icon" aria-hidden="true"> <span class="docon docon-print font-size-sm color-primary"></span> </span> <span class="margin-left-xxs">Print</span> </button> </div> </details> </div></div> </div> <!-- end article-header --><div> <button type="button" class="border contents-button button button-clear button-sm is-hidden-tablet has-inner-focus" data-bi-name="contents-expand" data-contents-button hidden> <span class="icon"> <span class="docon docon-editor-list-bullet" aria-hidden="true"></span> </span><span class="contents-expand-title">Table of contents</span></button> </div><!-- end mobile-contents button --> <div class="content "><h1 id="create-a-bot-with-the-bot-framework-sdk">Create a bot with the Bot Framework SDK</h1><div class="display-flex justify-content-space-between align-items-center flex-wrap-wrap page-metadata-container"> <div class="margin-right-xxs"> <ul class="metadata page-metadata" data-bi-name="page info" lang="en-us" dir="ltr"><li>Article</li><li class="visibility-hidden-visual-diff"><time class="is-invisible" data-article-date aria-label="Article review date" datetime="2024-10-09T08:00:00Z" data-article-date-source="calculated">10/09/2024</time> </li><li class="contributors-holder display-none-print"> <button type="button" class="contributors-button link-button" data-bi-name="contributors">8 contributors</button> </li></ul> </div> <div id="user-feedback" class="margin-block-xxs display-none-print" data-hide-on-archived> <button id="user-feedback-button" data-test-id="conceptual-feedback-button" class="button button-sm button-clear button-primary" type="button" data-bi-name="user-feedback-button" data-user-feedback-button > <span class="icon" aria-hidden="true"> <span class="docon docon-like"></span> </span> <span>Feedback</span> </button> </div></div><nav id="center-doc-outline" class="doc-outline is-hidden-desktop display-none-print margin-bottom-sm" data-bi-name="intopic toc" aria-label="In this article"> <h2 id="ms--in-this-article" class="title is-6 margin-block-xs">In this article</h2> </nav><!-- <content> --><p><strong>APPLIES TO:</strong> SDK v4</p> <p>This article describes how to build your first bot with the Bot Framework SDK for C#, Java, JavaScript or Python, and how to test your bot with the Bot Framework Emulator.</p> <p>Creating your first bot doesn't require an Azure subscription or an Azure AI Bot Service resource. This quickstart focuses on creating your first bot locally. If you'd like to learn how to create a bot in Azure, see <a href="abs-quickstart?view=azure-bot-service-4.0" data-linktype="relative-path">Create an Azure Bot resource</a>.</p> <div class="NOTE"> <p>Note</p> <p>The Bot Framework JavaScript, C#, and Python SDKs will continue to be supported, however, the Java SDK is being retired with final long-term support ending in November 2023.</p> <p>Existing bots built with the Java SDK will continue to function.</p> <p>For new bot building, consider using <a href="/en-us/microsoft-copilot-studio" data-linktype="absolute-path">Microsoft Copilot Studio</a> and read about <a href="bot-overview?view=azure-bot-service-4.0" data-linktype="relative-path">choosing the right copilot solution</a>.</p> <p>For more information, see <a href="https://powervirtualagents.microsoft.com/blog/the-future-of-bot-building/" data-linktype="external">The future of bot building</a>.</p> </div> <h2 id="prerequisites">Prerequisites</h2> <div class="tabGroup" id="tabgroup_1"> <ul role="tablist"> <li role="presentation"> <a href="#tabpanel_1_csharp" role="tab" aria-controls="tabpanel_1_csharp" data-tab="csharp" tabindex="0" aria-selected="true" data-linktype="self-bookmark">C#</a> </li> <li role="presentation"> <a href="#tabpanel_1_java" role="tab" aria-controls="tabpanel_1_java" data-tab="java" tabindex="-1" data-linktype="self-bookmark">Java</a> </li> <li role="presentation"> <a href="#tabpanel_1_javascript" role="tab" aria-controls="tabpanel_1_javascript" data-tab="javascript" tabindex="-1" data-linktype="self-bookmark">JavaScript</a> </li> <li role="presentation"> <a href="#tabpanel_1_python" role="tab" aria-controls="tabpanel_1_python" data-tab="python" tabindex="-1" data-linktype="self-bookmark">Python</a> </li> </ul> <section id="tabpanel_1_csharp" role="tabpanel" data-tab="csharp"> <ul> <li><a href="https://dotnet.microsoft.com/download" data-linktype="external">.NET 6.0 SDK</a></li> <li><a href="https://github.com/microsoft/BotFramework-Emulator/blob/master/README.md" data-linktype="external">Bot Framework Emulator</a></li> <li>Knowledge of <a href="/en-us/aspnet/core/" data-linktype="absolute-path">ASP.NET Core</a> and <a href="/en-us/dotnet/csharp/programming-guide/concepts/async/index" data-linktype="absolute-path">asynchronous programming in C#</a></li> </ul> <h3 id="c-templates">C# templates</h3> <p>The current bot samples use .NET Core 3.1 templates.</p> <div class="tabGroup" id="tabgroup_1"> <ul role="tablist"> <li role="presentation"> <a href="#tabpanel_1_vs" role="tab" aria-controls="tabpanel_1_vs" data-tab="vs" tabindex="0" aria-selected="true" data-linktype="self-bookmark">Visual Studio</a> </li> <li role="presentation"> <a href="#tabpanel_1_vscode+cli" role="tab" aria-controls="tabpanel_1_vscode+cli" data-tab="vscode+cli" tabindex="-1" data-linktype="self-bookmark">VS Code / CLI</a> </li> </ul> <section id="tabpanel_1_vs" role="tabpanel" data-tab="vs"> <ul> <li><a href="https://www.visualstudio.com/downloads" data-linktype="external">Visual Studio 2022 or later</a></li> <li><a href="https://marketplace.visualstudio.com/items?itemName=BotBuilder.botbuilderv4" data-linktype="external">Bot Framework v4 SDK Templates for Visual Studio</a></li> </ul> <p>To add the bot templates to Visual Studio, download and install the <a href="https://marketplace.visualstudio.com/items?itemName=BotBuilder.botbuilderv4" data-linktype="external">Bot Framework v4 SDK Templates for Visual Studio</a> VSIX file.</p> <div class="NOTE"> <p>Note</p> <p>You can install the templates from within Visual Studio.</p> <ol> <li>In the menu, select <strong>Extensions</strong> then <strong>Manage Extensions</strong>.</li> <li>In the <strong>Manage Extensions</strong> dialog, search for and install <strong>Bot Framework v4 SDK templates for Visual Studio</strong>.</li> </ol> <p>For information about deploying .NET bots to Azure, see how to <a href="provision-and-publish-a-bot?view=azure-bot-service-4.0" data-linktype="relative-path">Provision and publish a bot</a>.</p> </div> </section> <section id="tabpanel_1_vscode+cli" role="tabpanel" data-tab="vscode+cli" aria-hidden="true" hidden="hidden"> <p>.NET Core Templates will help you to quickly build new conversational AI bots using Bot Framework v4. As of May 2020, these templates and the code they generate require .NET Core 3.1 or later.</p> <p>To install the Bot Framework templates:</p> <ol> <li><p>Open a console window.</p> </li> <li><p>Download and install <a href="https://dotnet.microsoft.com/download" data-linktype="external">.NET Core SDK download</a> version 3.1 or later.</p> </li> <li><p>You can use this command to determine which versions of the .NET Core command-line interface are installed.</p> <pre><code class="lang-console">dotnet --version </code></pre> </li> <li><p>Install the three Bot Framework C# templates: the echo, core, and empty bot templates.</p> <pre><code class="lang-console">dotnet new -i Microsoft.Bot.Framework.CSharp.EchoBot dotnet new -i Microsoft.Bot.Framework.CSharp.CoreBot dotnet new -i Microsoft.Bot.Framework.CSharp.EmptyBot </code></pre> </li> <li><p>Verify the templates have been installed correctly.</p> <pre><code class="lang-console">dotnet new --list </code></pre> </li> </ol> <div class="NOTE"> <p>Note</p> <p>The steps above install all three Bot Framework templates. You don't need to install all the templates and can install just the ones you'll use. This article makes use of the <em>echo bot</em> template.</p> </div> </section> </div> </section> <section id="tabpanel_1_java" role="tabpanel" data-tab="java" aria-hidden="true" hidden="hidden"> <ul> <li>Java 1.8 or later</li> <li><a href="https://github.com/microsoft/BotFramework-Emulator/blob/master/README.md" data-linktype="external">Bot Framework Emulator</a></li> <li><a href="https://www.visualstudio.com/downloads" data-linktype="external">Visual Studio Code</a> or your favorite IDE, if you want to edit the bot code.</li> <li>Install <a href="https://maven.apache.org/" data-linktype="external">Maven</a></li> <li>Install <a href="https://nodejs.org/" data-linktype="external">node.js</a> version 12.10 or later.</li> <li>An Azure account if you want to deploy to <a href="https://azure.microsoft.com/" data-linktype="external">Azure</a>.</li> </ul> <h3 id="java-templates">Java templates</h3> <p>Use the Yeoman generator to quickly create a conversational AI bot using core AI capabilities in the <a href="https://dev.botframework.com" data-linktype="external">Bot Framework v4</a>. For more information, see <a href="https://yeoman.io" data-linktype="external">yeoman.io</a>.</p> <p>The generator supports three different template options as shown below.</p> <table> <thead> <tr> <th>Template</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>Echo Bot</td> <td>A good template if you want a little more than "Hello World!", but not much more. This template handles the very basics of sending messages to a bot, and having the bot process the messages by repeating them back to the user. This template produces a bot that simply "echoes" back to the user anything the user says to the bot.</td> </tr> <tr> <td>Empty Bot</td> <td>A good template if you're familiar with Bot Framework v4, and simply want a basic skeleton project. Also a good option if you want to take sample code from the documentation and paste it into a minimal bot in order to learn.</td> </tr> <tr> <td>Core Bot</td> <td>A good template if you want to create advanced bots, as it uses multi-turn dialogs and <a href="https://www.luis.ai" data-linktype="external">Azure AI LUIS</a> to implement language understanding. This template creates a bot that can extract places and dates to book a flight.</td> </tr> </tbody> </table> <div class="NOTE"> <p>Note</p> <p><a href="https://azure.microsoft.com/updates/language-understanding-retirement/" data-linktype="external">Language Understanding (LUIS) will be retired on 1 October 2025</a>. Beginning 1 April 2023, you won't be able to create new LUIS resources. A newer version of language understanding is now available as part of Azure AI Language.</p> <p>Conversational language understanding (CLU), a feature of Azure AI Language, is the updated version of LUIS. For more information about language understanding support in the Bot Framework SDK, see <a href="bot-builder-concept-luis?view=azure-bot-service-4.0" data-linktype="relative-path">Natural language understanding</a>.</p> </div> <h3 id="install-yeoman">Install Yeoman</h3> <ol> <li><p>Assure that you have installed <a href="https://nodejs.org/" data-linktype="external">node.js</a> version 12.10 or later.</p> </li> <li><p>Install latest <a href="https://www.npmjs.com" data-linktype="external">npm</a>.</p> <pre><code class="lang-console">npm install -g npm </code></pre> </li> <li><p>Install <a href="http://yeoman.io" data-linktype="external">Yeoman</a>. Make sure to install globally.</p> <pre><code class="lang-console">npm install -g yo </code></pre> </li> <li><p>Install <em>generator-botbuilder-java</em>. Make sure to install globally.</p> <pre><code class="lang-console">npm install -g generator-botbuilder-java </code></pre> </li> <li><p>Verify that <em>Yeoman</em> and <em>generator-botbuilder-java</em> have been installed correctly.</p> <pre><code class="lang-console">yo botbuilder-java --help </code></pre> </li> </ol> </section> <section id="tabpanel_1_javascript" role="tabpanel" data-tab="javascript" aria-hidden="true" hidden="hidden"> <ul> <li><a href="https://nodejs.org/" data-linktype="external">Node.js</a></li> <li><a href="https://github.com/microsoft/BotFramework-Emulator/blob/master/README.md" data-linktype="external">Bot Framework Emulator</a></li> <li>Knowledge of <a href="http://restify.com/" data-linktype="external">restify</a> and asynchronous programming in JavaScript</li> <li><a href="https://www.visualstudio.com/downloads" data-linktype="external">Visual Studio Code</a> or your favorite IDE, if you want to edit the bot code.</li> </ul> <h3 id="javascript-and-typescript-templates">JavaScript and TypeScript templates</h3> <p>To install Yeoman and the Yeoman generator for Bot Framework v4:</p> <ol> <li><p>Open a terminal or elevated command prompt.</p> </li> <li><p>Switch to the directory for your JavaScript bots. Create it first if you don't already have one.</p> <pre><code class="lang-console">mkdir myJsBots cd myJsBots </code></pre> </li> <li><p>Make sure you have the latest versions of npm and Yeoman.</p> <pre><code class="lang-console">npm install -g npm npm install -g yo </code></pre> </li> <li><p>Install the Yeoman generator. Yeoman is a tool for creating applications. For more information, see <a href="https://yeoman.io" data-linktype="external">yeoman.io</a>.</p> <pre><code class="lang-console">npm install -g generator-botbuilder </code></pre> <div class="NOTE"> <p>Note</p> <p>The install of Windows build tools listed below is only required if you use Windows as your development operating system. For some installations, the install step for restify is giving an error related to <code>node-gyp</code>. If this is the case you can try running this command with elevated permissions. This call may also hang without exiting if Python is already installed on your system:</p> <p>Only run this command if you're on Windows.</p> <pre><code class="lang-console">npm install -g windows-build-tools </code></pre> </div> </li> </ol> </section> <section id="tabpanel_1_python" role="tabpanel" data-tab="python" aria-hidden="true" hidden="hidden"> <ul> <li>Python <a href="https://www.python.org/downloads/release/python-383/" data-linktype="external">3.8.3</a></li> <li><a href="https://github.com/microsoft/BotFramework-Emulator/blob/master/README.md" data-linktype="external">Bot Framework Emulator</a></li> <li>Knowledge of asynchronous programming in Python</li> </ul> <h3 id="create-and-enable-a-virtual-environment">Create and enable a virtual environment</h3> <p>A virtual environment is a combination of a specific Python interpreter and libraries that are different from your global settings. The virtual environment is specific to a project and is maintained in the project folder. A benefit to using a virtual environment is that as you develop a project over time, the virtual environment always reflects the project's exact dependencies. To learn more about virtual environments, see <a href="https://docs.python.org/3/library/venv.html" data-linktype="external">Creation of virtual environments</a>.</p> <p>Navigate to the directory where you want to create your bot. Then run the following commands for your preferred platform. After you activate your virtual environment, your command line/terminal should be prefaced with <code>(venv)</code>. This lets you know that the virtual environment is active. You can deactivate your virtual environment at any time by typing: <code>deactivate</code>.</p> <p><strong>macOS/Linux</strong></p> <pre><code class="lang-bash">python3 -m venv venv source venv/bin/activate </code></pre> <p><strong>Windows</strong></p> <pre><code class="lang-console">python -m venv venv venv\Scripts\activate.bat </code></pre> <h3 id="python-templates">Python templates</h3> <p>Install the necessary packages by running the following <code>pip install</code> commands:</p> <pre><code class="lang-console">pip install botbuilder-core pip install asyncio pip install aiohttp pip install cookiecutter==1.7.0 </code></pre> <div class="IMPORTANT"> <p>Important</p> <p>If you're using a 32-bit version of Python, make sure you also run <code>pip install cryptography==2.8</code>.</p> </div> </section> </div> <h2 id="create-a-bot">Create a bot</h2> <div class="tabGroup" id="tabgroup_2"> <ul role="tablist"> <li role="presentation"> <a href="#tabpanel_2_csharp" role="tab" aria-controls="tabpanel_2_csharp" data-tab="csharp" tabindex="0" aria-selected="true" data-linktype="self-bookmark">C#</a> </li> <li role="presentation"> <a href="#tabpanel_2_java" role="tab" aria-controls="tabpanel_2_java" data-tab="java" tabindex="-1" data-linktype="self-bookmark">Java</a> </li> <li role="presentation"> <a href="#tabpanel_2_javascript" role="tab" aria-controls="tabpanel_2_javascript" data-tab="javascript" tabindex="-1" data-linktype="self-bookmark">JavaScript</a> </li> <li role="presentation"> <a href="#tabpanel_2_python" role="tab" aria-controls="tabpanel_2_python" data-tab="python" tabindex="-1" data-linktype="self-bookmark">Python</a> </li> </ul> <section id="tabpanel_2_csharp" role="tabpanel" data-tab="csharp"> <div class="tabGroup" id="tabgroup_1"> <ul role="tablist"> <li role="presentation"> <a href="#tabpanel_1_vs" role="tab" aria-controls="tabpanel_1_vs" data-tab="vs" tabindex="0" aria-selected="true" data-linktype="self-bookmark">Visual Studio</a> </li> <li role="presentation"> <a href="#tabpanel_1_vscode" role="tab" aria-controls="tabpanel_1_vscode" data-tab="vscode" tabindex="-1" data-linktype="self-bookmark">VS Code</a> </li> <li role="presentation"> <a href="#tabpanel_1_cli" role="tab" aria-controls="tabpanel_1_cli" data-tab="cli" tabindex="-1" data-linktype="self-bookmark">CLI</a> </li> </ul> <section id="tabpanel_1_vs" role="tabpanel" data-tab="vs"> <p>In Visual Studio, create a new bot project and use the <strong>Echo Bot (Bot Framework v4 - .NET Core 3.1)</strong> template. To see only bot templates, choose the <strong>AI Bots</strong> project type.</p> </section> <section id="tabpanel_1_vscode" role="tabpanel" data-tab="vscode" aria-hidden="true" hidden="hidden"> <p>Make sure that <a href="https://dotnet.microsoft.com/download" data-linktype="external">.NET Core 3.1</a> or later is installed.</p> <ol> <li><p>In Visual Studio Code, open a new terminal window.</p> </li> <li><p>Go to the directory in which you want to create your bot project.</p> </li> <li><p>Create a new echo bot project using the following command. Replace <code>&lt;your-bot-name&gt;</code> with the name to use for your bot project.</p> <pre><code class="lang-console">dotnet new echobot -n &lt;your-bot-name&gt; </code></pre> </li> </ol> </section> <section id="tabpanel_1_cli" role="tabpanel" data-tab="cli" aria-hidden="true" hidden="hidden"> <ol> <li><p>Open a new terminal window.</p> </li> <li><p>Go to the directory in which you want to create your bot project.</p> </li> <li><p>Create a new echo bot project using the following command. Replace <code>&lt;your-bot-name&gt;</code> with the name to use for your bot project.</p> <pre><code class="lang-console">dotnet new echobot -n &lt;your-bot-name&gt; </code></pre> </li> </ol> </section> </div> <p>Thanks to the template, your project contains all the necessary code to create the bot in this quickstart. You don't need any more code to test your bot.</p> <div class="nextstepaction"> <p><a href="#start-your-bot" data-linktype="self-bookmark">I created an echo bot</a> <a href="https://microsoft.qualtrics.com/jfe/form/SV_6D4KLPZc2jTIa2O?Product=BotSDK&amp;Page=bot-service-quickstart-create-bot&amp;Section=create-a-bot&amp;PLanguage=Csharp" data-linktype="external">I ran into an issue</a></p> </div> </section> <section id="tabpanel_2_java" role="tabpanel" data-tab="java" aria-hidden="true" hidden="hidden"> <p>Run the following command to create an echo bot from templates. The command uses default options for its parameters.</p> <pre><code class="lang-console">yo botbuilder-java -T "echo" </code></pre> <p>Yeoman prompts you for some information with which to create your bot. For this tutorial, use the default values.</p> <pre><code class="lang-text">? What's the name of your bot? (echo) ? What's the fully qualified package name of your bot? (com.mycompany.echo) ? Which template would you like to start with? (Use arrow keys) Select "Echo Bot" ? Looking good. Shall I go ahead and create your new bot? (Y/n) Enter "y" </code></pre> <p>The generator supports many command-line options you can use to change the generator's defaults or to pre-seed a prompt. The options are case-sensitive.</p> <table> <thead> <tr> <th>Command-line option</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--help, -h</code></td> <td>List help text for all supported command-line options</td> </tr> <tr> <td><code>--botName, -N</code></td> <td>The name given to the bot project</td> </tr> <tr> <td><code>--packageName, -P</code></td> <td>The Java package name to use for the bot</td> </tr> <tr> <td><code>--template, -T</code></td> <td>The template used to generate the project. Options are <code>echo</code>, <code>empty</code>, <code>core</code>. For more information about the different templates, see the GitHub repository for your language, <a href="https://github.com/microsoft/botbuilder-dotnet/tree/main/generators/dotnet-templates#readme" data-linktype="external">C#</a>, <a href="https://github.com/microsoft/botbuilder-js/tree/main/generators/generator-botbuilder#readme" data-linktype="external">JavaScript</a>, <a href="https://github.com/microsoft/botbuilder-python/tree/main/generators#readme" data-linktype="external">Python</a>, or <a href="https://github.com/microsoft/botbuilder-java/tree/main/generators#readme" data-linktype="external">Java</a>.</td> </tr> <tr> <td><code>--noprompt</code></td> <td>The generator won't prompt for confirmation before creating a new bot. Any requirement options not passed on the command line will use a reasonable default value. This option is intended to enable automated bot generation for testing purposes.</td> </tr> </tbody> </table> <p>Thanks to the template, your project contains all the code that's necessary to create the bot in this quickstart. You don't need any other code to test your bot.</p> <div class="nextstepaction"> <p><a href="#start-your-bot" data-linktype="self-bookmark">I created an echo bot</a> <a href="https://microsoft.qualtrics.com/jfe/form/SV_6D4KLPZc2jTIa2O?Product=BotSDK&amp;Page=bot-service-quickstart-create-bot&amp;Section=create-a-bot&amp;PLanguage=Java" data-linktype="external">I ran into an issue</a></p> </div> </section> <section id="tabpanel_2_javascript" role="tabpanel" data-tab="javascript" aria-hidden="true" hidden="hidden"> <ol> <li><p>Use the generator to create an echo bot.</p> <pre><code class="lang-console">yo botbuilder </code></pre> <p>Yeoman prompts you for some information with which to create your bot. For this tutorial, use the default values.</p> <pre><code class="lang-text">? What's the name of your bot? my-chat-bot ? What will your bot do? Demonstrate the core capabilities of the Microsoft Bot Framework ? What programming language do you want to use? JavaScript ? Which template would you like to start with? Echo Bot - https://aka.ms/bot-template-echo ? Looking good. Shall I go ahead and create your new bot? Yes </code></pre> </li> </ol> <p>Thanks to the template, your project contains all the code that's necessary to create the bot in this quickstart. You don't need any other code to test your bot.</p> <div class="nextstepaction"> <p><a href="#start-your-bot" data-linktype="self-bookmark">I created an echo bot</a> <a href="https://microsoft.qualtrics.com/jfe/form/SV_6D4KLPZc2jTIa2O?Product=BotSDK&amp;Page=bot-service-quickstart-create-bot&amp;Section=create-a-bot&amp;PLanguage=Javascript" data-linktype="external">I ran into an issue</a></p> </div> </section> <section id="tabpanel_2_python" role="tabpanel" data-tab="python" aria-hidden="true" hidden="hidden"> <ol> <li><p>From your working directory, run the following command to download the <a href="https://github.com/microsoft/BotBuilder-Samples/blob/main/samples/csharp_dotnetcore/01.console-echo/EchoBot.cs" data-linktype="external">echo bot</a> template and its dependencies:</p> <pre><code class="lang-console">cookiecutter https://github.com/microsoft/BotBuilder-Samples/releases/download/Templates/echo.zip </code></pre> </li> <li><p>You'll be prompted to give your bot a name and description. Enter the following values:</p> <ul> <li><strong>bot_name</strong>: <em>echo_bot</em></li> <li><strong>bot_description</strong>: <em>A bot that echoes back user response.</em></li> </ul> <p><span class="mx-imgBorder"> <img src="media/python/quickstart/set-name-description.png?view=azure-bot-service-4.0" alt="Set Python bot name and description" data-linktype="relative-path"> </span> </p> </li> </ol> <div class="nextstepaction"> <p><a href="#start-your-bot" data-linktype="self-bookmark">I created an echo bot</a> <a href="https://microsoft.qualtrics.com/jfe/form/SV_6D4KLPZc2jTIa2O?Product=BotSDK&amp;Page=bot-service-quickstart-create-bot&amp;Section=create-a-bot&amp;PLanguage=Python" data-linktype="external">I ran into an issue</a></p> </div> </section> </div> <h2 id="start-your-bot">Start your bot</h2> <div class="tabGroup" id="tabgroup_3"> <ul role="tablist"> <li role="presentation"> <a href="#tabpanel_3_csharp" role="tab" aria-controls="tabpanel_3_csharp" data-tab="csharp" tabindex="0" aria-selected="true" data-linktype="self-bookmark">C#</a> </li> <li role="presentation"> <a href="#tabpanel_3_java" role="tab" aria-controls="tabpanel_3_java" data-tab="java" tabindex="-1" data-linktype="self-bookmark">Java</a> </li> <li role="presentation"> <a href="#tabpanel_3_javascript" role="tab" aria-controls="tabpanel_3_javascript" data-tab="javascript" tabindex="-1" data-linktype="self-bookmark">JavaScript</a> </li> <li role="presentation"> <a href="#tabpanel_3_python" role="tab" aria-controls="tabpanel_3_python" data-tab="python" tabindex="-1" data-linktype="self-bookmark">Python</a> </li> </ul> <section id="tabpanel_3_csharp" role="tabpanel" data-tab="csharp"> <div class="tabGroup" id="tabgroup_1"> <ul role="tablist"> <li role="presentation"> <a href="#tabpanel_1_vs" role="tab" aria-controls="tabpanel_1_vs" data-tab="vs" tabindex="0" aria-selected="true" data-linktype="self-bookmark">Visual Studio</a> </li> <li role="presentation"> <a href="#tabpanel_1_vscode" role="tab" aria-controls="tabpanel_1_vscode" data-tab="vscode" tabindex="-1" data-linktype="self-bookmark">VS Code</a> </li> <li role="presentation"> <a href="#tabpanel_1_cli" role="tab" aria-controls="tabpanel_1_cli" data-tab="cli" tabindex="-1" data-linktype="self-bookmark">CLI</a> </li> </ul> <section id="tabpanel_1_vs" role="tabpanel" data-tab="vs"> <p>In Visual Studio:</p> <ol> <li>Open your bot project.</li> <li>Run the project without debugging.</li> <li>Visual Studio builds the application, deploys it to localhost, and launches the web browser to display the application's <code>default.htm</code> page.</li> </ol> <p>At this point, your bot is running locally on port 3978.</p> </section> <section id="tabpanel_1_vscode" role="tabpanel" data-tab="vscode" aria-hidden="true" hidden="hidden"> <p>In Visual Studio Code:</p> <ol> <li><p>Open your bot project folder.</p> <p>If you're prompted to select a project, select the one for the bot you created.</p> </li> <li><p>From the menu, select <strong>Run</strong>, and then <strong>Run Without Debugging</strong>.</p> <ul> <li>If prompted to select an environment, select <strong>.Net Core</strong>.</li> <li>If this command updated your launch settings, save the changes and rerun the command.</li> </ul> <p>The run command builds the application, deploys it to localhost, and launches the web browser to display the application's <code>default.htm</code> page.</p> </li> </ol> <p>At this point, your bot is running locally on port 3978.</p> </section> <section id="tabpanel_1_cli" role="tabpanel" data-tab="cli" aria-hidden="true" hidden="hidden"> <p>From a command prompt or terminal:</p> <ol> <li><p>Change directories to the project folder for your bot.</p> </li> <li><p>Use <code>dotnet run</code> to start the bot.</p> <pre><code class="lang-console">dotnet run </code></pre> </li> <li><p>This command builds the application and deploys it to localhost.</p> </li> </ol> <p>The application's default web page won't display, but at this point, your bot is running locally on port 3978.</p> </section> </div> <div class="nextstepaction"> <p><a href="#start-the-emulator-and-connect-your-bot" data-linktype="self-bookmark">I started the echo bot</a> <a href="https://microsoft.qualtrics.com/jfe/form/SV_6D4KLPZc2jTIa2O?Product=BotSDK&amp;Page=bot-service-quickstart-create-bot&amp;Section=start-your-bot&amp;PLanguage=Csharp" data-linktype="external">I ran into an issue</a></p> </div> </section> <section id="tabpanel_3_java" role="tabpanel" data-tab="java" aria-hidden="true" hidden="hidden"> <ol> <li><p>From a terminal, navigate to the directory where you saved your bot, then execute the commands listed below.</p> </li> <li><p>Build the Maven project and packages it into a <em>.jar</em> file (archive).</p> <pre><code class="lang-console">mvn package </code></pre> </li> <li><p>Run the bot locally. Replace the <em>archive-name</em> with the actual name from the previous command.</p> <pre><code class="lang-console">java -jar .\target\&lt;archive-name&gt;.jar </code></pre> </li> </ol> <p>You're now ready to start the Emulator.</p> <div class="nextstepaction"> <p><a href="#start-the-emulator-and-connect-your-bot" data-linktype="self-bookmark">I started the echo bot</a> <a href="https://microsoft.qualtrics.com/jfe/form/SV_6D4KLPZc2jTIa2O?Product=BotSDK&amp;Page=bot-service-quickstart-create-bot&amp;Section=start-your-bot&amp;PLanguage=Java" data-linktype="external">I ran into an issue</a></p> </div> </section> <section id="tabpanel_3_javascript" role="tabpanel" data-tab="javascript" aria-hidden="true" hidden="hidden"> <p>In a terminal or command prompt change directories to the one created for your bot, and start it with <code>npm start</code>.</p> <pre><code class="lang-console">cd my-chat-bot npm start </code></pre> <p>At this point, your bot is running locally on port 3978.</p> <div class="nextstepaction"> <p><a href="#start-the-emulator-and-connect-your-bot" data-linktype="self-bookmark">I started the echo bot</a> <a href="https://microsoft.qualtrics.com/jfe/form/SV_6D4KLPZc2jTIa2O?Product=BotSDK&amp;Page=bot-service-quickstart-create-bot&amp;Section=start-your-bot&amp;PLanguage=Javascript" data-linktype="external">I ran into an issue</a></p> </div> </section> <section id="tabpanel_3_python" role="tabpanel" data-tab="python" aria-hidden="true" hidden="hidden"> <ol> <li><p>From the command line/terminal, change directories to <code>echo_bot</code>.</p> <pre><code class="lang-console">cd echo_bot </code></pre> </li> <li><p>Install the dependencies for the echo bot template.</p> <pre><code class="lang-console">pip install -r requirements.txt </code></pre> </li> <li><p>After the dependencies are installed, run the following command to start your bot:</p> <pre><code class="lang-console">python app.py </code></pre> <p>You'll know your bot is ready to test when you see the last line shown in the screenshot below:</p> <p><span class="mx-imgBorder"> <img src="media/python/quickstart/bot-running-locally.png?view=azure-bot-service-4.0" alt="Python bot running locally" data-linktype="relative-path"> </span> </p> </li> <li><p>Copy the http address in the last line. You'll need it when you use the Emulator to interact with your bot.</p> </li> </ol> <div class="nextstepaction"> <p><a href="#start-the-emulator-and-connect-your-bot" data-linktype="self-bookmark">I started the echo bot</a> <a href="https://microsoft.qualtrics.com/jfe/form/SV_6D4KLPZc2jTIa2O?Product=BotSDK&amp;Page=bot-service-quickstart-create-bot&amp;Section=start-your-bot&amp;PLanguage=Python" data-linktype="external">I ran into an issue</a></p> </div> </section> </div> <h2 id="start-the-emulator-and-connect-your-bot">Start the Emulator and connect your bot</h2> <ol> <li><p>Start the Bot Framework Emulator.</p> </li> <li><p>Select <strong>Open Bot</strong> on the Emulator's <strong>Welcome</strong> tab.</p> </li> <li><p>Enter your bot's URL, which is your local host and port, with <code>/api/messages</code> added to the path. The address is usually: <code>http://localhost:3978/api/messages</code>.</p> <p><span class="mx-imgBorder"> <img src="media/quickstart/emulator-open-bot.png?view=azure-bot-service-4.0" alt="open a bot" data-linktype="relative-path"> </span> </p> </li> <li><p>Then select <strong>Connect</strong>.</p> <p>Send a message to your bot, and the bot will respond back.</p> <p><span class="mx-imgBorder"> <img src="media/quickstart/emulator-hello-echo.png?view=azure-bot-service-4.0" alt="echo message" data-linktype="relative-path"> </span> </p> </li> </ol> <div class="nextstepaction"> <p><a href="#next-steps" data-linktype="self-bookmark">I started the Emulator and connected to my bot</a> <a href="https://microsoft.qualtrics.com/jfe/form/SV_6D4KLPZc2jTIa2O?Product=BotSDK&amp;Page=bot-service-quickstart-create-bot&amp;Section=start-the-emulator-and-connect-your-bot" data-linktype="external">I ran into an issue</a></p> </div> <h2 id="next-steps">Next steps</h2> <ul> <li>For information about how to debug using Visual Studio or Visual Studio Code and the Bot Framework Emulator, see <a href="bot-service-debug-channel-devtunnel?view=azure-bot-service-4.0" data-linktype="relative-path">Debug a bot</a>.</li> <li>For information about devtunnel, see <a href="https://github.com/Microsoft/BotFramework-Emulator/wiki/Tunneling-(devtunnel)" data-linktype="external">Tunneling (devtunnel)</a>.</li> </ul> <div class="nextstepaction"> <p><a href="bot-builder-deploy-az-cli?view=azure-bot-service-4.0" data-linktype="relative-path">Deploy your bot to Azure</a></p> </div> </div><div id="ms--inline-notifications" class="margin-block-xs" data-bi-name="inline-notification"></div><div id="assertive-live-region" role="alert" aria-live="assertive" class="visually-hidden" aria-relevant="additions" aria-atomic="true"></div> <div id="polite-live-region" role="status" aria-live="polite" class="visually-hidden" aria-relevant="additions" aria-atomic="true"></div> <!-- </content> --> </main><!-- recommendations section --><!-- end recommendations section --> <!-- feedback section --><!-- end feedback section --> <!-- feedback report section --><!-- end feedback report section --><aside id="ms--additional-resources-mobile" aria-label="Additional resources" class="display-none-desktop display-none-print" > <hr class="hr" hidden /> <h2 id="ms--additional-resources-mobile-heading" class="title is-3" hidden>Additional resources</h2> <section id="right-rail-recommendations-mobile" data-bi-name="recommendations" hidden></section> <section id="right-rail-training-mobile" data-bi-name="learning-resources-card" hidden></section> <section id="right-rail-events-mobile" data-bi-name="events-card" hidden></section> <section id="right-rail-qna-mobile" data-bi-name="qna-link-card" hidden></section> </aside><div class="border-top is-visible-interactive has-default-focus margin-top-sm "><footer id="footer-interactive" data-bi-name="footer" class="footer-layout"><div class="display-flex gap-xs flex-wrap-wrap is-full-height padding-right-lg-desktop"><a data-mscc-ic="false" class="locale-selector-link button button-sm button-clear flex-shrink-0" href="#" data-bi-name="select-locale"> <span class="icon" aria-hidden="true"> <span class="docon docon-world"></span> </span> <span class="local-selector-link-text"></span></a><div class="ccpa-privacy-link" data-ccpa-privacy-link hidden> <a href="https://aka.ms/yourcaliforniaprivacychoices" class="button button-sm button-clear flex-shrink-0" data-mscc-ic="false" data-bi-name="your-privacy-choices" > <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 14" xml:space="preserve" height="16" width="43" aria-hidden="true" focusable="false" > <path d="M7.4 12.8h6.8l3.1-11.6H7.4C4.2 1.2 1.6 3.8 1.6 7s2.6 5.8 5.8 5.8z" style="fill-rule:evenodd;clip-rule:evenodd;fill:#fff"></path> <path d="M22.6 0H7.4c-3.9 0-7 3.1-7 7s3.1 7 7 7h15.2c3.9 0 7-3.1 7-7s-3.2-7-7-7zm-21 7c0-3.2 2.6-5.8 5.8-5.8h9.9l-3.1 11.6H7.4c-3.2 0-5.8-2.6-5.8-5.8z" style="fill-rule:evenodd;clip-rule:evenodd;fill:#06f"></path> <path d="M24.6 4c.2.2.2.6 0 .8L22.5 7l2.2 2.2c.2.2.2.6 0 .8-.2.2-.6.2-.8 0l-2.2-2.2-2.2 2.2c-.2.2-.6.2-.8 0-.2-.2-.2-.6 0-.8L20.8 7l-2.2-2.2c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0l2.2 2.2L23.8 4c.2-.2.6-.2.8 0z" style="fill:#fff"></path> <path d="M12.7 4.1c.2.2.3.6.1.8L8.6 9.8c-.1.1-.2.2-.3.2-.2.1-.5.1-.7-.1L5.4 7.7c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0L8 8.6l3.8-4.5c.2-.2.6-.2.9 0z" style="fill:#06f"></path> </svg> <span>Your Privacy Choices</span> </a> </div> <div class="flex-shrink-0"> <div class="dropdown has-caret-up"> <button class="dropdown-trigger button button-clear button-sm has-inner-focus theme-dropdown-trigger" aria-controls="theme-menu-interactive" aria-expanded="false" title="Theme" data-bi-name="theme"> <span class="icon"> <span class="docon docon-sun" aria-hidden="true"></span> </span> <span>Theme</span> <span class="icon expanded-indicator" aria-hidden="true"> <span class="docon docon-chevron-down-light"></span> </span> </button> <div class="dropdown-menu" id="theme-menu-interactive" role="menu"> <ul class="theme-selector padding-xxs" role="none"> <li class="theme display-block" role="menuitem"> <button class="button button-clear button-sm theme-control button-block justify-content-flex-start" data-theme-to="light"> <span class="theme-light margin-right-xxs"> <span class="theme-selector-icon border display-inline-block has-body-background" aria-hidden="true"> <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 14"> <rect width="22" height="14" class="has-fill-body-background" /> <rect x="5" y="5" width="12" height="4" class="has-fill-secondary" /> <rect x="5" y="2" width="2" height="1" class="has-fill-secondary" /> <rect x="8" y="2" width="2" height="1" class="has-fill-secondary" /> <rect x="11" y="2" width="3" height="1" class="has-fill-secondary" /> <rect x="1" y="1" width="2" height="2" class="has-fill-secondary" /> <rect x="5" y="10" width="7" height="2" rx="0.3" class="has-fill-primary" /> <rect x="19" y="1" width="2" height="2" rx="1" class="has-fill-secondary" /> </svg> </span> </span> <span>Light</span> </button> </li> <li class="theme display-block" role="menuitem"> <button class="button button-clear button-sm theme-control button-block justify-content-flex-start" data-theme-to="dark"> <span class="theme-dark margin-right-xxs"> <span class="border theme-selector-icon display-inline-block has-body-background" aria-hidden="true"> <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 14"> <rect width="22" height="14" class="has-fill-body-background" /> <rect x="5" y="5" width="12" height="4" class="has-fill-secondary" /> <rect x="5" y="2" width="2" height="1" class="has-fill-secondary" /> <rect x="8" y="2" width="2" height="1" class="has-fill-secondary" /> <rect x="11" y="2" width="3" height="1" class="has-fill-secondary" /> <rect x="1" y="1" width="2" height="2" class="has-fill-secondary" /> <rect x="5" y="10" width="7" height="2" rx="0.3" class="has-fill-primary" /> <rect x="19" y="1" width="2" height="2" rx="1" class="has-fill-secondary" /> </svg> </span> </span> <span>Dark</span> </button> </li> <li class="theme display-block" role="menuitem"> <button class="button button-clear button-sm theme-control button-block justify-content-flex-start" data-theme-to="high-contrast"> <span class="theme-high-contrast margin-right-xxs"> <span class="border theme-selector-icon display-inline-block has-body-background" aria-hidden="true"> <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 14"> <rect width="22" height="14" class="has-fill-body-background" /> <rect x="5" y="5" width="12" height="4" class="has-fill-secondary" /> <rect x="5" y="2" width="2" height="1" class="has-fill-secondary" /> <rect x="8" y="2" width="2" height="1" class="has-fill-secondary" /> <rect x="11" y="2" width="3" height="1" class="has-fill-secondary" /> <rect x="1" y="1" width="2" height="2" class="has-fill-secondary" /> <rect x="5" y="10" width="7" height="2" rx="0.3" class="has-fill-primary" /> <rect x="19" y="1" width="2" height="2" rx="1" class="has-fill-secondary" /> </svg> </span> </span> <span>High contrast</span> </button> </li> </ul> </div> </div> </div> </div> <ul class="links" data-bi-name="footerlinks"> <li class="manage-cookies-holder" hidden></li><li><a class="external-link-indicator" data-mscc-ic="false" href="/en-us/previous-versions/" data-bi-name="archivelink">Previous Versions</a></li> <li><a class="external-link-indicator" data-mscc-ic="false" href="https://techcommunity.microsoft.com/t5/microsoft-learn-blog/bg-p/MicrosoftLearnBlog" data-bi-name="bloglink">Blog</a></li> <li><a class="external-link-indicator" data-mscc-ic="false" href="/en-us/contribute/" data-bi-name="contributorGuide">Contribute</a></li><li><a class="external-link-indicator" data-mscc-ic="false" href="https://go.microsoft.com/fwlink/?LinkId=521839" data-bi-name="privacy">Privacy</a></li><li><a class="external-link-indicator" data-mscc-ic="false" href="/en-us/legal/termsofuse" data-bi-name="termsofuse">Terms of Use</a></li><li><a class="external-link-indicator" data-mscc-ic="false" href="https://www.microsoft.com/legal/intellectualproperty/Trademarks/" data-bi-name="trademarks">Trademarks</a></li><li>&copy; Microsoft 2025</li> </ul> </footer></div></div><div id="ms--additional-resources" class="right-container column is-4-desktop display-none display-block-desktop" data-bi-name="pageactions" role="complementary" aria-label="Additional resources" > <div id="affixed-right-container" class="margin-top-sm-tablet" data-bi-name="right-column"> <h2 id="ms--additional-resources-heading" class="title is-6 margin-top-md" hidden>Additional resources</h2> <section id="right-rail-events" data-bi-name="events-card" hidden></section> <section id="right-rail-training" data-bi-name="learning-resources-card" hidden></section> <section id="right-rail-recommendations" data-bi-name="recommendations" hidden></section> <nav id="side-doc-outline" class="doc-outline" data-bi-name="intopic toc" aria-label="In this article"> <h3>In this article</h3> </nav> <section id="right-rail-qna" class="margin-top-xxs" data-bi-name="qna-link-card" hidden></section> </div> </div></div> <!--end of div.columns --> </section> <!--end of .primary-holder --> <!-- interactive container --> <aside id="interactive-container" class="interactive-container is-visible-interactive column has-body-background-dark "> </aside> <!-- end of interactive container --> </div> </div> <!--end of .mainContainer --> <section class="border-top has-default-focus is-hidden-interactive margin-top-sm "><footer id="footer" data-bi-name="footer" class="footer-layout uhf-container has-padding" role="contentinfo"><div class="display-flex gap-xs flex-wrap-wrap is-full-height padding-right-lg-desktop"><a data-mscc-ic="false" class="locale-selector-link button button-sm button-clear flex-shrink-0" href="#" data-bi-name="select-locale"> <span class="icon" aria-hidden="true"> <span class="docon docon-world"></span> </span> <span class="local-selector-link-text"></span></a><div class="ccpa-privacy-link" data-ccpa-privacy-link hidden> <a href="https://aka.ms/yourcaliforniaprivacychoices" class="button button-sm button-clear flex-shrink-0" data-mscc-ic="false" data-bi-name="your-privacy-choices" > <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 14" xml:space="preserve" height="16" width="43" aria-hidden="true" focusable="false" > <path d="M7.4 12.8h6.8l3.1-11.6H7.4C4.2 1.2 1.6 3.8 1.6 7s2.6 5.8 5.8 5.8z" style="fill-rule:evenodd;clip-rule:evenodd;fill:#fff"></path> <path d="M22.6 0H7.4c-3.9 0-7 3.1-7 7s3.1 7 7 7h15.2c3.9 0 7-3.1 7-7s-3.2-7-7-7zm-21 7c0-3.2 2.6-5.8 5.8-5.8h9.9l-3.1 11.6H7.4c-3.2 0-5.8-2.6-5.8-5.8z" style="fill-rule:evenodd;clip-rule:evenodd;fill:#06f"></path> <path d="M24.6 4c.2.2.2.6 0 .8L22.5 7l2.2 2.2c.2.2.2.6 0 .8-.2.2-.6.2-.8 0l-2.2-2.2-2.2 2.2c-.2.2-.6.2-.8 0-.2-.2-.2-.6 0-.8L20.8 7l-2.2-2.2c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0l2.2 2.2L23.8 4c.2-.2.6-.2.8 0z" style="fill:#fff"></path> <path d="M12.7 4.1c.2.2.3.6.1.8L8.6 9.8c-.1.1-.2.2-.3.2-.2.1-.5.1-.7-.1L5.4 7.7c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0L8 8.6l3.8-4.5c.2-.2.6-.2.9 0z" style="fill:#06f"></path> </svg> <span>Your Privacy Choices</span> </a> </div> <div class="flex-shrink-0"> <div class="dropdown has-caret-up"> <button class="dropdown-trigger button button-clear button-sm has-inner-focus theme-dropdown-trigger" aria-controls="theme-menu" aria-expanded="false" title="Theme" data-bi-name="theme"> <span class="icon"> <span class="docon docon-sun" aria-hidden="true"></span> </span> <span>Theme</span> <span class="icon expanded-indicator" aria-hidden="true"> <span class="docon docon-chevron-down-light"></span> </span> </button> <div class="dropdown-menu" id="theme-menu" role="menu"> <ul class="theme-selector padding-xxs" role="none"> <li class="theme display-block" role="menuitem"> <button class="button button-clear button-sm theme-control button-block justify-content-flex-start" data-theme-to="light"> <span class="theme-light margin-right-xxs"> <span class="theme-selector-icon border display-inline-block has-body-background" aria-hidden="true"> <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 14"> <rect width="22" height="14" class="has-fill-body-background" /> <rect x="5" y="5" width="12" height="4" class="has-fill-secondary" /> <rect x="5" y="2" width="2" height="1" class="has-fill-secondary" /> <rect x="8" y="2" width="2" height="1" class="has-fill-secondary" /> <rect x="11" y="2" width="3" height="1" class="has-fill-secondary" /> <rect x="1" y="1" width="2" height="2" class="has-fill-secondary" /> <rect x="5" y="10" width="7" height="2" rx="0.3" class="has-fill-primary" /> <rect x="19" y="1" width="2" height="2" rx="1" class="has-fill-secondary" /> </svg> </span> </span> <span>Light</span> </button> </li> <li class="theme display-block" role="menuitem"> <button class="button button-clear button-sm theme-control button-block justify-content-flex-start" data-theme-to="dark"> <span class="theme-dark margin-right-xxs"> <span class="border theme-selector-icon display-inline-block has-body-background" aria-hidden="true"> <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 14"> <rect width="22" height="14" class="has-fill-body-background" /> <rect x="5" y="5" width="12" height="4" class="has-fill-secondary" /> <rect x="5" y="2" width="2" height="1" class="has-fill-secondary" /> <rect x="8" y="2" width="2" height="1" class="has-fill-secondary" /> <rect x="11" y="2" width="3" height="1" class="has-fill-secondary" /> <rect x="1" y="1" width="2" height="2" class="has-fill-secondary" /> <rect x="5" y="10" width="7" height="2" rx="0.3" class="has-fill-primary" /> <rect x="19" y="1" width="2" height="2" rx="1" class="has-fill-secondary" /> </svg> </span> </span> <span>Dark</span> </button> </li> <li class="theme display-block" role="menuitem"> <button class="button button-clear button-sm theme-control button-block justify-content-flex-start" data-theme-to="high-contrast"> <span class="theme-high-contrast margin-right-xxs"> <span class="border theme-selector-icon display-inline-block has-body-background" aria-hidden="true"> <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 14"> <rect width="22" height="14" class="has-fill-body-background" /> <rect x="5" y="5" width="12" height="4" class="has-fill-secondary" /> <rect x="5" y="2" width="2" height="1" class="has-fill-secondary" /> <rect x="8" y="2" width="2" height="1" class="has-fill-secondary" /> <rect x="11" y="2" width="3" height="1" class="has-fill-secondary" /> <rect x="1" y="1" width="2" height="2" class="has-fill-secondary" /> <rect x="5" y="10" width="7" height="2" rx="0.3" class="has-fill-primary" /> <rect x="19" y="1" width="2" height="2" rx="1" class="has-fill-secondary" /> </svg> </span> </span> <span>High contrast</span> </button> </li> </ul> </div> </div> </div> </div> <ul class="links" data-bi-name="footerlinks"> <li class="manage-cookies-holder" hidden></li><li><a class="external-link-indicator" data-mscc-ic="false" href="/en-us/previous-versions/" data-bi-name="archivelink">Previous Versions</a></li> <li><a class="external-link-indicator" data-mscc-ic="false" href="https://techcommunity.microsoft.com/t5/microsoft-learn-blog/bg-p/MicrosoftLearnBlog" data-bi-name="bloglink">Blog</a></li> <li><a class="external-link-indicator" data-mscc-ic="false" href="/en-us/contribute/" data-bi-name="contributorGuide">Contribute</a></li><li><a class="external-link-indicator" data-mscc-ic="false" href="https://go.microsoft.com/fwlink/?LinkId=521839" data-bi-name="privacy">Privacy</a></li><li><a class="external-link-indicator" data-mscc-ic="false" href="/en-us/legal/termsofuse" data-bi-name="termsofuse">Terms of Use</a></li><li><a class="external-link-indicator" data-mscc-ic="false" href="https://www.microsoft.com/legal/intellectualproperty/Trademarks/" data-bi-name="trademarks">Trademarks</a></li><li>&copy; Microsoft 2025</li> </ul> </footer> </section> <div id="action-panel" role="region" aria-label="Action Panel" class="action-panel has-default-focus" tabindex="-1"></div> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10