Microsoft 365 Agents SDK for TypeScript
Build TypeScript enterprise agents with routing, Express hosting, streaming responses, and Copilot Studio integration.
The skill loads secrets from environment variables and advises keeping secrets out of source code, showing basic secret-handling awareness. It does not specify least-privilege permissions, token scopes, data flows, external effects, user confirmation, or rollback, so points are deducted.
The core examples are broadly self-consistent and the streaming sample uses finally to end the stream. However, there are no skill-specific tests, pinned versions, complete authentication setup, or robust abnormal-input handling; the streaming example also omits installation of its ai and @ai-sdk/azure dependencies, so points are deducted.
The name, audience, TypeScript/Node.js scope, and trigger terms are clear, covering AgentApplication, Express, streaming, and Copilot Studio. Non-fit boundaries, input/output contracts, runtime prerequisites, Chinese-language support, and mainland-China network reachability are not established, so points are deducted.
The document includes front matter, MIT licensing, a version, installation steps, environment variables, examples, best practices, and reference links. It lacks FAQs, troubleshooting, known limitations, dependency-version policy, changelog, and a clear maintenance/update path, so points are deducted.
The examples provide directly useful starting points for routing, streaming, invoke handling, and Copilot Studio integration. They omit complete project configuration, authentication flow, deployment guidance, recovery behavior, and some required dependencies, leaving substantial manual verification and rework, so points are deducted.
Microsoft documentation, API references, and GitHub samples provide some traceability. This review is static only; no skill-specific tests or executable results are supplied, and repository-level CI evidence does not demonstrate coverage of this skill path, so the score remains conservative.
- The installation commands omit the ai and @ai-sdk/azure dependencies used by the streaming example and do not pin versions; current APIs and package versions must be verified before implementation.
- The environment-variable examples include a client secret, API key, and bearer token without documenting scopes, rotation, storage controls, or log-redaction requirements.
- Copilot Studio and Azure services depend on external network access and cloud credentials; the files do not establish mainland-China reachability, regional availability, or offline alternatives.
- No skill-specific acceptance criteria, test suite, deployment configuration, or failure-troubleshooting procedure is provided.
What it does & when to use it
This skill is for the Microsoft 365 Agents SDK in TypeScript/Node.js. It provides patterns for AgentApplication routing, Express hosting, streaming responses, invoke activity handling, and Copilot Studio direct and WebChat integrations. Its scope covers Teams, Microsoft 365, and Copilot Studio agent scenarios. Before implementation, it instructs users to verify current API signatures with the microsoft-docs MCP and confirm npm package versions.
Guides installation of the Microsoft 365 Agents SDK npm packages; creates an AgentApplication and starts an Express server with startServer; registers handlers for member-joined events, messages, and invoke activities; streams Azure OpenAI output by queuing informative updates and text chunks before ending the stream; creates a CopilotStudioClient, starts a conversation, and asks a question; creates a CopilotStudioWebChat connection and renders WebChat; and documents environment variables for Azure, tenant, and Copilot Studio credentials.
- A TypeScript developer building a Teams or Microsoft 365 agent needs AgentApplication routes for welcome and message handling.
- A developer generating long responses with Azure OpenAI needs to deliver text incrementally to users.
- A team building an external Copilot Studio client needs to start conversations and submit questions directly.
- A frontend developer embedding Copilot Studio in a webpage needs a WebChat connection pattern.
- A developer handling Teams or Microsoft 365 invoke activities needs to return a status and send feedback text.
Pros & cons
- Provides adaptable TypeScript/Node.js patterns for routing, Express hosting, and streaming responses.
- Covers both Teams/Microsoft 365 agent handling and Copilot Studio client integration.
- Documents environment variables and practical guidance for secrets, stream cleanup, and invoke validation.
- Uses a simple SKILL.md format with no visible Claude Code- or Codex-only extensions.
- The examples depend on several Microsoft npm packages and Azure/Copilot Studio configuration, including credentials and environment variables.
- Package versions are not pinned, and the skill requires checking current API signatures and npm versions.
- The source does not provide skill-specific test scenarios or acceptance criteria.
- It focuses on SDK integration patterns and does not document complete deployment, permission configuration, or production operations.
How to install
Install the folder .github/plugins/azure-sdk-typescript/skills/m365-agents-ts/ as a skill in the Agent Skills-compatible client you use. To install the collection, run: npx skills add microsoft/skills, then select the required skill in the wizard. Install the packages used by the examples with: npm install @microsoft/agents-hosting @microsoft/agents-hosting-express @microsoft/agents-activity; npm install @microsoft/agents-copilotstudio-client.
How to use
Invoke it with a request containing a supported trigger, for example: “Use the Microsoft 365 Agents SDK to create an AgentApplication and Express server for a TypeScript project, including streamingResponse.” Triggers include Microsoft 365 Agents SDK, @microsoft/agents-hosting, AgentApplication, startServer, streamingResponse, Copilot Studio client, and @microsoft/agents-copilotstudio-client. Before implementation, use the microsoft-docs MCP to verify current signatures for AgentApplication, startServer, and CopilotStudioClient, and confirm npm versions. The source does not document a complete client-specific installation path or automatic-trigger configuration.