[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M713Z6Z1PS9EWMVVBADVD92B":3,"skill-same:01M713Z6Z1PS9EWMVVBADVD92B":57},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":31,"linkOnly":32,"markdownContent":33,"markdownBody":34,"frontMatter":35,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":14,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":42,"install":43,"resources":56},"01M713Z6Z1PS9EWMVVBADVD92B","m365-agents-ts",null,"Microsoft 365 Agents SDK for TypeScript\u002FNode.js.","sapsapshen\u002Fai-memory-router","sapsapshen","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F20347959?v=4","01M6XDQEF1DP50DKF37H81J3J5","shenmian","01M6XDQEJPE41Y3DT2763X8ZJN",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcopilot\u002Fm365-agents-ts\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30],"m365 agents ts","m365","typescript","agents sdk","sdk","microsoft","js","node","community","for","unknown","2026","2026-11-10 10:12:30",false,"---\nname: m365-agents-ts\ndescription: Microsoft 365 Agents SDK for TypeScript\u002FNode.js.\nrisk: unknown\nsource: community\ndate_added: '2026-02-27'\n---\n\n# Microsoft 365 Agents SDK (TypeScript)\n\nBuild enterprise agents for Microsoft 365, Teams, and Copilot Studio using the Microsoft 365 Agents SDK with Express hosting, AgentApplication routing, streaming responses, and Copilot Studio client integrations.\n\n## Before implementation\n- Use the microsoft-docs MCP to verify the latest API signatures for AgentApplication, startServer, and CopilotStudioClient.\n- Confirm package versions on npm before wiring up samples or templates.\n\n## Installation\n\n```bash\nnpm install @microsoft\u002Fagents-hosting @microsoft\u002Fagents-hosting-express @microsoft\u002Fagents-activity\nnpm install @microsoft\u002Fagents-copilotstudio-client\n```\n\n## Environment Variables\n\n```bash\nPORT=3978\nAZURE_RESOURCE_NAME=\u003Cazure-openai-resource>\nAZURE_API_KEY=\u003Cazure-openai-key>\nAZURE_OPENAI_DEPLOYMENT_NAME=gpt-4o-mini\n\nTENANT_ID=\u003Ctenant-id>\nCLIENT_ID=\u003Cclient-id>\nCLIENT_SECRET=\u003Cclient-secret>\n\nCOPILOT_ENVIRONMENT_ID=\u003Cenvironment-id>\nCOPILOT_SCHEMA_NAME=\u003Cschema-name>\nCOPILOT_CLIENT_ID=\u003Ccopilot-app-client-id>\nCOPILOT_BEARER_TOKEN=\u003Ccopilot-jwt>\n```\n\n## Core Workflow: Express-hosted AgentApplication\n\n```typescript\nimport { AgentApplication, TurnContext, TurnState } from \"@microsoft\u002Fagents-hosting\";\nimport { startServer } from \"@microsoft\u002Fagents-hosting-express\";\n\nconst agent = new AgentApplication\u003CTurnState>();\n\nagent.onConversationUpdate(\"membersAdded\", async (context: TurnContext) => {\n  await context.sendActivity(\"Welcome to the agent.\");\n});\n\nagent.onMessage(\"hello\", async (context: TurnContext) => {\n  await context.sendActivity(`Echo: ${context.activity.text}`);\n});\n\nstartServer(agent);\n```\n\n## Streaming responses with Azure OpenAI\n\n```typescript\nimport { azure } from \"@ai-sdk\u002Fazure\";\nimport { AgentApplication, TurnContext, TurnState } from \"@microsoft\u002Fagents-hosting\";\nimport { startServer } from \"@microsoft\u002Fagents-hosting-express\";\nimport { streamText } from \"ai\";\n\nconst agent = new AgentApplication\u003CTurnState>();\n\nagent.onMessage(\"poem\", async (context: TurnContext) => {\n  context.streamingResponse.setFeedbackLoop(true);\n  context.streamingResponse.setGeneratedByAILabel(true);\n  context.streamingResponse.setSensitivityLabel({\n    type: \"https:\u002F\u002Fschema.org\u002FMessage\",\n    \"@type\": \"CreativeWork\",\n    name: \"Internal\",\n  });\n\n  await context.streamingResponse.queueInformativeUpdate(\"starting a poem...\");\n\n  const { fullStream } = streamText({\n    model: azure(process.env.AZURE_OPENAI_DEPLOYMENT_NAME || \"gpt-4o-mini\"),\n    system: \"You are a creative assistant.\",\n    prompt: \"Write a poem about Apollo.\",\n  });\n\n  try {\n    for await (const part of fullStream) {\n      if (part.type === \"text-delta\" && part.text.length > 0) {\n        await context.streamingResponse.queueTextChunk(part.text);\n      }\n      if (part.type === \"error\") {\n        throw new Error(`Streaming error: ${part.error}`);\n      }\n    }\n  } finally {\n    await context.streamingResponse.endStream();\n  }\n});\n\nstartServer(agent);\n```\n\n## Invoke activity handling\n\n```typescript\nimport { Activity, ActivityTypes } from \"@microsoft\u002Fagents-activity\";\nimport { AgentApplication, TurnContext, TurnState } from \"@microsoft\u002Fagents-hosting\";\n\nconst agent = new AgentApplication\u003CTurnState>();\n\nagent.onActivity(\"invoke\", async (context: TurnContext) => {\n  const invokeResponse = Activity.fromObject({\n    type: ActivityTypes.InvokeResponse,\n    value: { status: 200 },\n  });\n\n  await context.sendActivity(invokeResponse);\n  await context.sendActivity(\"Thanks for submitting your feedback.\");\n});\n```\n\n## Copilot Studio client (Direct to Engine)\n\n```typescript\nimport { CopilotStudioClient } from \"@microsoft\u002Fagents-copilotstudio-client\";\n\nconst settings = {\n  environmentId: process.env.COPILOT_ENVIRONMENT_ID!,\n  schemaName: process.env.COPILOT_SCHEMA_NAME!,\n  clientId: process.env.COPILOT_CLIENT_ID!,\n};\n\nconst tokenProvider = async (): Promise\u003Cstring> => {\n  return process.env.COPILOT_BEARER_TOKEN!;\n};\n\nconst client = new CopilotStudioClient(settings, tokenProvider);\n\nconst conversation = await client.startConversationAsync();\nconst reply = await client.askQuestionAsync(\"Hello!\", conversation.id);\nconsole.log(reply);\n```\n\n## Copilot Studio WebChat integration\n\n```typescript\nimport { CopilotStudioWebChat } from \"@microsoft\u002Fagents-copilotstudio-client\";\n\nconst directLine = CopilotStudioWebChat.createConnection(client, {\n  showTyping: true,\n});\n\nwindow.WebChat.renderWebChat({\n  directLine,\n}, document.getElementById(\"webchat\")!);\n```\n\n## Best Practices\n\n1. Use AgentApplication for routing and keep handlers focused on one responsibility.\n2. Prefer streamingResponse for long-running completions and call endStream in finally blocks.\n3. Keep secrets out of source code; load tokens from environment variables or secure stores.\n4. Reuse CopilotStudioClient instances and cache tokens in your token provider.\n5. Validate invoke payloads before logging or persisting feedback.\n\n## Reference Files\n\n| File | Contents |\n| --- | --- |\n| references\u002Facceptance-criteria.md | Import paths, hosting pipeline, streaming, and Copilot Studio patterns |\n\n## Reference Links\n\n| Resource | URL |\n| --- | --- |\n| Microsoft 365 Agents SDK | https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fmicrosoft-365\u002Fagents-sdk\u002F |\n| JavaScript SDK overview | https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fjavascript\u002Fapi\u002Foverview\u002Fagents-overview?view=agents-sdk-js-latest |\n| @microsoft\u002Fagents-hosting-express | https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fjavascript\u002Fapi\u002F%40microsoft\u002Fagents-hosting-express?view=agents-sdk-js-latest |\n| @microsoft\u002Fagents-copilotstudio-client | https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fjavascript\u002Fapi\u002F%40microsoft\u002Fagents-copilotstudio-client?view=agents-sdk-js-latest |\n| Integrate with Copilot Studio | https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fmicrosoft-365\u002Fagents-sdk\u002Fintegrate-with-mcs |\n| GitHub samples | https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FAgents\u002Ftree\u002Fmain\u002Fsamples\u002Fnodejs |\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n","# Microsoft 365 Agents SDK (TypeScript)\n\nBuild enterprise agents for Microsoft 365, Teams, and Copilot Studio using the Microsoft 365 Agents SDK with Express hosting, AgentApplication routing, streaming responses, and Copilot Studio client integrations.\n\n## Before implementation\n- Use the microsoft-docs MCP to verify the latest API signatures for AgentApplication, startServer, and CopilotStudioClient.\n- Confirm package versions on npm before wiring up samples or templates.\n\n## Installation\n\n```bash\nnpm install @microsoft\u002Fagents-hosting @microsoft\u002Fagents-hosting-express @microsoft\u002Fagents-activity\nnpm install @microsoft\u002Fagents-copilotstudio-client\n```\n\n## Environment Variables\n\n```bash\nPORT=3978\nAZURE_RESOURCE_NAME=\u003Cazure-openai-resource>\nAZURE_API_KEY=\u003Cazure-openai-key>\nAZURE_OPENAI_DEPLOYMENT_NAME=gpt-4o-mini\n\nTENANT_ID=\u003Ctenant-id>\nCLIENT_ID=\u003Cclient-id>\nCLIENT_SECRET=\u003Cclient-secret>\n\nCOPILOT_ENVIRONMENT_ID=\u003Cenvironment-id>\nCOPILOT_SCHEMA_NAME=\u003Cschema-name>\nCOPILOT_CLIENT_ID=\u003Ccopilot-app-client-id>\nCOPILOT_BEARER_TOKEN=\u003Ccopilot-jwt>\n```\n\n## Core Workflow: Express-hosted AgentApplication\n\n```typescript\nimport { AgentApplication, TurnContext, TurnState } from \"@microsoft\u002Fagents-hosting\";\nimport { startServer } from \"@microsoft\u002Fagents-hosting-express\";\n\nconst agent = new AgentApplication\u003CTurnState>();\n\nagent.onConversationUpdate(\"membersAdded\", async (context: TurnContext) => {\n  await context.sendActivity(\"Welcome to the agent.\");\n});\n\nagent.onMessage(\"hello\", async (context: TurnContext) => {\n  await context.sendActivity(`Echo: ${context.activity.text}`);\n});\n\nstartServer(agent);\n```\n\n## Streaming responses with Azure OpenAI\n\n```typescript\nimport { azure } from \"@ai-sdk\u002Fazure\";\nimport { AgentApplication, TurnContext, TurnState } from \"@microsoft\u002Fagents-hosting\";\nimport { startServer } from \"@microsoft\u002Fagents-hosting-express\";\nimport { streamText } from \"ai\";\n\nconst agent = new AgentApplication\u003CTurnState>();\n\nagent.onMessage(\"poem\", async (context: TurnContext) => {\n  context.streamingResponse.setFeedbackLoop(true);\n  context.streamingResponse.setGeneratedByAILabel(true);\n  context.streamingResponse.setSensitivityLabel({\n    type: \"https:\u002F\u002Fschema.org\u002FMessage\",\n    \"@type\": \"CreativeWork\",\n    name: \"Internal\",\n  });\n\n  await context.streamingResponse.queueInformativeUpdate(\"starting a poem...\");\n\n  const { fullStream } = streamText({\n    model: azure(process.env.AZURE_OPENAI_DEPLOYMENT_NAME || \"gpt-4o-mini\"),\n    system: \"You are a creative assistant.\",\n    prompt: \"Write a poem about Apollo.\",\n  });\n\n  try {\n    for await (const part of fullStream) {\n      if (part.type === \"text-delta\" && part.text.length > 0) {\n        await context.streamingResponse.queueTextChunk(part.text);\n      }\n      if (part.type === \"error\") {\n        throw new Error(`Streaming error: ${part.error}`);\n      }\n    }\n  } finally {\n    await context.streamingResponse.endStream();\n  }\n});\n\nstartServer(agent);\n```\n\n## Invoke activity handling\n\n```typescript\nimport { Activity, ActivityTypes } from \"@microsoft\u002Fagents-activity\";\nimport { AgentApplication, TurnContext, TurnState } from \"@microsoft\u002Fagents-hosting\";\n\nconst agent = new AgentApplication\u003CTurnState>();\n\nagent.onActivity(\"invoke\", async (context: TurnContext) => {\n  const invokeResponse = Activity.fromObject({\n    type: ActivityTypes.InvokeResponse,\n    value: { status: 200 },\n  });\n\n  await context.sendActivity(invokeResponse);\n  await context.sendActivity(\"Thanks for submitting your feedback.\");\n});\n```\n\n## Copilot Studio client (Direct to Engine)\n\n```typescript\nimport { CopilotStudioClient } from \"@microsoft\u002Fagents-copilotstudio-client\";\n\nconst settings = {\n  environmentId: process.env.COPILOT_ENVIRONMENT_ID!,\n  schemaName: process.env.COPILOT_SCHEMA_NAME!,\n  clientId: process.env.COPILOT_CLIENT_ID!,\n};\n\nconst tokenProvider = async (): Promise\u003Cstring> => {\n  return process.env.COPILOT_BEARER_TOKEN!;\n};\n\nconst client = new CopilotStudioClient(settings, tokenProvider);\n\nconst conversation = await client.startConversationAsync();\nconst reply = await client.askQuestionAsync(\"Hello!\", conversation.id);\nconsole.log(reply);\n```\n\n## Copilot Studio WebChat integration\n\n```typescript\nimport { CopilotStudioWebChat } from \"@microsoft\u002Fagents-copilotstudio-client\";\n\nconst directLine = CopilotStudioWebChat.createConnection(client, {\n  showTyping: true,\n});\n\nwindow.WebChat.renderWebChat({\n  directLine,\n}, document.getElementById(\"webchat\")!);\n```\n\n## Best Practices\n\n1. Use AgentApplication for routing and keep handlers focused on one responsibility.\n2. Prefer streamingResponse for long-running completions and call endStream in finally blocks.\n3. Keep secrets out of source code; load tokens from environment variables or secure stores.\n4. Reuse CopilotStudioClient instances and cache tokens in your token provider.\n5. Validate invoke payloads before logging or persisting feedback.\n\n## Reference Files\n\n| File | Contents |\n| --- | --- |\n| references\u002Facceptance-criteria.md | Import paths, hosting pipeline, streaming, and Copilot Studio patterns |\n\n## Reference Links\n\n| Resource | URL |\n| --- | --- |\n| Microsoft 365 Agents SDK | https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fmicrosoft-365\u002Fagents-sdk\u002F |\n| JavaScript SDK overview | https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fjavascript\u002Fapi\u002Foverview\u002Fagents-overview?view=agents-sdk-js-latest |\n| @microsoft\u002Fagents-hosting-express | https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fjavascript\u002Fapi\u002F%40microsoft\u002Fagents-hosting-express?view=agents-sdk-js-latest |\n| @microsoft\u002Fagents-copilotstudio-client | https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fjavascript\u002Fapi\u002F%40microsoft\u002Fagents-copilotstudio-client?view=agents-sdk-js-latest |\n| Integrate with Copilot Studio | https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fmicrosoft-365\u002Fagents-sdk\u002Fintegrate-with-mcs |\n| GitHub samples | https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FAgents\u002Ftree\u002Fmain\u002Fsamples\u002Fnodejs |\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n",{"name":5,"risk":29,"source":27,"date_added":36,"description":7},"2026-02-27","main","7a38d8e7073e61c16eda85681cb32fb68a8657a5","skills-store\u002Fcopilot\u002Fm365-agents-ts","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router","https:\u002F\u002Fgithub.com\u002Fsapsapshen","2026-04-14 21:12:12",{"source":8,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add sapsapshen\u002Fai-memory-router --skill m365-agents-ts",{"tool":49,"command":50},"bunx","bunx skills add sapsapshen\u002Fai-memory-router --skill m365-agents-ts",{"tool":52,"command":53},"pnpm","pnpm dlx skills add sapsapshen\u002Fai-memory-router --skill m365-agents-ts","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcopilot\u002Fm365-agents-ts\u002FSKILL.md",true,[],[58,68,75,83,89,97],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":62,"licenseFileUrl":63,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":67},"01M72R8PZX1ABFHJGTYPA4CAF1","webapp-testing","To test local web applications, write native Python Playwright scripts.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fwebapp-testing\u002FSKILL.md",[],[],"2026-11-10 22:39:42",{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":67},"01M72QG37MMZNDY7X7GXPAK5W6","python-packaging","Comprehensive guide to creating, structuring, and distributing Python packages using modern packaging tools, pyproject.toml, and publishing to PyPI.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fpython-packaging\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":62,"licenseFileUrl":79,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":67},"01M72NXR0QMP9G46TW6A2DH59C","canvas-design","These are instructions for creating design philosophies - aesthetic movements that are then EXPRESSED VISUALLY. Output only .md files, .pdf files, and .png files.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fcanvas-design\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fcanvas-design\u002FSKILL.md",[],[],{"skillNo":84,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":62,"licenseFileUrl":85,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":67},"01M72N55TK3EEQ4QK4AWDC2KZS","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcursor\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcursor\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":62,"licenseFileUrl":93,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":67},"01M72MTWC150CFAP4Y5GSNKF80","slack-gif-creator","A toolkit providing utilities and knowledge for creating animated GIFs optimized for Slack.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcursor\u002Fslack-gif-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcursor\u002Fslack-gif-creator\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":62,"licenseFileUrl":101,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":67},"01M72KPT3VVNSP88MNAY466TZT","frontend-design","You are a frontend designer-engineer, not a layout generator.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcursor\u002Ffrontend-design\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcursor\u002Ffrontend-design\u002FSKILL.md",[],[]]