🚀 Getting Started

First lets initialize an app.

npx '@teams.sdk/cli@latest' new hello-world --start

Here is what your terminal should look like:

    Getting Started CLI


This will use the @teams.sdk/cli to install a starter template and build then run the bot server. The starter code will look something like this:

import { App } from '@teams.sdk/apps';
import { DevtoolsPlugin } from '@teams.sdk/dev';

const app = new App({
    plugins: [new DevtoolsPlugin()],
});

app.on('message', async ({ send, activity }) => {
    await send({ type: 'typing' });
    await send(`you said "${activity.text}"`);
});

(async () => {
    await app.start();
})();

And with just one command, you have a functioning echo bot! Visit http://localhost:3001/devtools to interact with the bot.

Next

The upcoming subsections on the activity types will cover the different types of activities that can be used in a bot. The definition of activities follow the Agents Protocol, and activities specific to Teams are also indicated.