[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69ATM434BXPZGEFCN6A460M":3,"skill-same:01M69ATM434BXPZGEFCN6A460M":196},{"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":23,"publishedAt":45,"linkOnly":46,"markdownContent":47,"markdownBody":48,"frontMatter":49,"refName":54,"commitSha":55,"skillDirectory":56,"forksCount":57,"repositoryHtmlUrl":58,"repositoryHomepageUrl":59,"ownerHtmlUrl":60,"ownerBlogUrl":61,"ownerDescription":62,"updatedAt":63,"install":64,"resources":77},"01M69ATM434BXPZGEFCN6A460M","m365-agents-py",null,"Microsoft 365 Agents SDK for Python. Build multichannel agents for Teams\u002FM365\u002FCopilot Studio with aiohttp hosting, AgentApplication routing, streaming responses, and MSAL-based auth. Triggers: \"Microsoft 365 Agents SDK\", \"microsoft_agents\", \"AgentApplication\", \"start_agent_process\", \"TurnContext\", \"Copilot Studio client\", \"CloudAdapter\".","microsoft\u002Fskills","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69AJYYW4E1RMSYCQDJ4FJSH",3204,"MIT","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fazure-sdk-python\u002Fskills\u002Fm365-agents-py\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,9,43,44],"m365 agents py","m365","routing","for","studio","with","activity","triggers","build","start","streaming","authentication","python","copilot studio","teams","copilotstudio","core","copilot","auth","sdk","agents sdk","2026-11-10 10:12:30",false,"---\nname: m365-agents-py\ndescription: |\n  Microsoft 365 Agents SDK for Python. Build multichannel agents for Teams\u002FM365\u002FCopilot Studio with aiohttp hosting, AgentApplication routing, streaming responses, and MSAL-based auth. Triggers: \"Microsoft 365 Agents SDK\", \"microsoft_agents\", \"AgentApplication\", \"start_agent_process\", \"TurnContext\", \"Copilot Studio client\", \"CloudAdapter\".\nlicense: MIT\nmetadata:\n  author: Microsoft\n  version: \"1.0.0\"\n  package: microsoft-agents-hosting-core, microsoft-agents-hosting-aiohttp, microsoft-agents-activity, microsoft-agents-authentication-msal, microsoft-agents-copilotstudio-client\n---\n\n# Microsoft 365 Agents SDK (Python)\n\nBuild enterprise agents for Microsoft 365, Teams, and Copilot Studio using the Microsoft Agents SDK with aiohttp hosting, AgentApplication routing, streaming responses, and MSAL-based authentication.\n\n## Before implementation\n\n- Use the microsoft-docs MCP to verify the latest API signatures for AgentApplication, start_agent_process, and authentication options.\n- Confirm package versions on PyPI for the microsoft-agents-\\* packages you plan to use.\n\n## Important Notice - Import Changes\n\n> **⚠️ Breaking Change**: Recent updates have changed the Python import structure from `microsoft.agents` to `microsoft_agents` (using underscores instead of dots).\n\n## Installation\n\n```bash\npip install microsoft-agents-hosting-core\npip install microsoft-agents-hosting-aiohttp\npip install microsoft-agents-activity\npip install microsoft-agents-authentication-msal\npip install microsoft-agents-copilotstudio-client\npip install python-dotenv aiohttp\n```\n\n## Environment Variables (.env)\n\n```bash\nCONNECTIONS__SERVICE_CONNECTION__SETTINGS__CLIENTID=\u003Cclient-id>\nCONNECTIONS__SERVICE_CONNECTION__SETTINGS__CLIENTSECRET=\u003Cclient-secret>\nCONNECTIONS__SERVICE_CONNECTION__SETTINGS__TENANTID=\u003Ctenant-id>\n\n# Optional: OAuth handlers for auto sign-in\nAGENTAPPLICATION__USERAUTHORIZATION__HANDLERS__GRAPH__SETTINGS__AZUREBOTOAUTHCONNECTIONNAME=\u003Cconnection-name>\n\n# Optional: Azure OpenAI for streaming (AAD auth via DefaultAzureCredential)\nAZURE_OPENAI_ENDPOINT=\u003Cendpoint>\nAZURE_OPENAI_API_VERSION=\u003Cversion>\n\n# Optional: Copilot Studio client\nCOPILOTSTUDIOAGENT__ENVIRONMENTID=\u003Cenvironment-id>\nCOPILOTSTUDIOAGENT__SCHEMANAME=\u003Cschema-name>\nCOPILOTSTUDIOAGENT__TENANTID=\u003Ctenant-id>\nCOPILOTSTUDIOAGENT__AGENTAPPID=\u003Capp-id>\n```\n\n## Authentication & Lifecycle\n\n> **? Two rules apply to every code sample below:**\n>\n> 1. **This SDK is async-first — use `async def` handlers and `async with` throughout.**\n> 2. **Use explicit auth managers and context-managed network resources.** Use `MsalConnectionManager` for agent auth, and wrap per-request HTTP resources in `async with` (for example, `aiohttp.ClientSession`).\n>\n> Snippets may abbreviate this setup, but production code should always follow both rules.\n\n## Core Workflow: aiohttp-hosted AgentApplication\n\n```python\nimport logging\nfrom os import environ\n\nfrom dotenv import load_dotenv\nfrom aiohttp.web import Request, Response, Application, run_app\n\nfrom microsoft_agents.activity import load_configuration_from_env\nfrom microsoft_agents.hosting.core import (\n    Authorization,\n    AgentApplication,\n    TurnState,\n    TurnContext,\n    MemoryStorage,\n)\nfrom microsoft_agents.hosting.aiohttp import (\n    CloudAdapter,\n    start_agent_process,\n    jwt_authorization_middleware,\n)\nfrom microsoft_agents.authentication.msal import MsalConnectionManager\n\n# Enable logging\nms_agents_logger = logging.getLogger(\"microsoft_agents\")\nms_agents_logger.addHandler(logging.StreamHandler())\nms_agents_logger.setLevel(logging.INFO)\n\n# Load configuration\nload_dotenv()\nagents_sdk_config = load_configuration_from_env(environ)\n\n# Create storage and connection manager\nSTORAGE = MemoryStorage()\nCONNECTION_MANAGER = MsalConnectionManager(**agents_sdk_config)\nADAPTER = CloudAdapter(connection_manager=CONNECTION_MANAGER)\nAUTHORIZATION = Authorization(STORAGE, CONNECTION_MANAGER, **agents_sdk_config)\n\n# Create AgentApplication\nAGENT_APP = AgentApplication[TurnState](\n    storage=STORAGE, adapter=ADAPTER, authorization=AUTHORIZATION, **agents_sdk_config\n)\n\n\n@AGENT_APP.conversation_update(\"membersAdded\")\nasync def on_members_added(context: TurnContext, _state: TurnState):\n    await context.send_activity(\"Welcome to the agent!\")\n\n\n@AGENT_APP.activity(\"message\")\nasync def on_message(context: TurnContext, _state: TurnState):\n    await context.send_activity(f\"You said: {context.activity.text}\")\n\n\n@AGENT_APP.error\nasync def on_error(context: TurnContext, error: Exception):\n    await context.send_activity(\"The agent encountered an error.\")\n\n\n# Server setup\nasync def entry_point(req: Request) -> Response:\n    agent: AgentApplication = req.app[\"agent_app\"]\n    adapter: CloudAdapter = req.app[\"adapter\"]\n    return await start_agent_process(req, agent, adapter)\n\n\nAPP = Application(middlewares=[jwt_authorization_middleware])\nAPP.router.add_post(\"\u002Fapi\u002Fmessages\", entry_point)\nAPP[\"agent_configuration\"] = CONNECTION_MANAGER.get_default_connection_configuration()\nAPP[\"agent_app\"] = AGENT_APP\nAPP[\"adapter\"] = AGENT_APP.adapter\n\nif __name__ == \"__main__\":\n    run_app(APP, host=\"localhost\", port=environ.get(\"PORT\", 3978))\n```\n\n## AgentApplication Routing\n\n```python\nimport re\nfrom microsoft_agents.hosting.core import (\n    AgentApplication, TurnState, TurnContext, MessageFactory\n)\nfrom microsoft_agents.activity import ActivityTypes\n\nAGENT_APP = AgentApplication[TurnState](\n    storage=STORAGE, adapter=ADAPTER, authorization=AUTHORIZATION, **agents_sdk_config\n)\n\n# Welcome handler\n@AGENT_APP.conversation_update(\"membersAdded\")\nasync def on_members_added(context: TurnContext, _state: TurnState):\n    await context.send_activity(\"Welcome!\")\n\n# Regex-based message handler\n@AGENT_APP.message(re.compile(r\"^hello$\", re.IGNORECASE))\nasync def on_hello(context: TurnContext, _state: TurnState):\n    await context.send_activity(\"Hello!\")\n\n# Simple string message handler\n@AGENT_APP.message(\"\u002Fstatus\")\nasync def on_status(context: TurnContext, _state: TurnState):\n    await context.send_activity(\"Status: OK\")\n\n# Auth-protected message handler\n@AGENT_APP.message(\"\u002Fme\", auth_handlers=[\"GRAPH\"])\nasync def on_profile(context: TurnContext, state: TurnState):\n    token_response = await AGENT_APP.auth.get_token(context, \"GRAPH\")\n    if token_response and token_response.token:\n        # Use token to call Graph API\n        await context.send_activity(\"Profile retrieved\")\n\n# Invoke activity handler\n@AGENT_APP.activity(ActivityTypes.invoke)\nasync def on_invoke(context: TurnContext, _state: TurnState):\n    invoke_response = Activity(\n        type=ActivityTypes.invoke_response, value={\"status\": 200}\n    )\n    await context.send_activity(invoke_response)\n\n# Fallback message handler\n@AGENT_APP.activity(\"message\")\nasync def on_message(context: TurnContext, _state: TurnState):\n    await context.send_activity(f\"Echo: {context.activity.text}\")\n\n# Error handler\n@AGENT_APP.error\nasync def on_error(context: TurnContext, error: Exception):\n    await context.send_activity(\"An error occurred.\")\n```\n\n## Streaming Responses with Azure OpenAI\n\n```python\nfrom openai import AsyncAzureOpenAI\nfrom azure.identity import DefaultAzureCredential, get_bearer_token_provider\nfrom microsoft_agents.activity import SensitivityUsageInfo\n\n# AAD token provider (preferred over AZURE_OPENAI_API_KEY)\ntoken_provider = get_bearer_token_provider(\n    DefaultAzureCredential(),\n    \"https:\u002F\u002Fcognitiveservices.azure.com\u002F.default\",\n)\n\n# Module-level singleton: client lives for the agent app lifetime.\nCLIENT = AsyncAzureOpenAI(\n    api_version=environ[\"AZURE_OPENAI_API_VERSION\"],\n    azure_endpoint=environ[\"AZURE_OPENAI_ENDPOINT\"],\n    azure_ad_token_provider=token_provider,\n)\n\n@AGENT_APP.message(\"poem\")\nasync def on_poem_message(context: TurnContext, _state: TurnState):\n    # Configure streaming response\n    context.streaming_response.set_feedback_loop(True)\n    context.streaming_response.set_generated_by_ai_label(True)\n    context.streaming_response.set_sensitivity_label(\n        SensitivityUsageInfo(\n            type=\"https:\u002F\u002Fschema.org\u002FMessage\",\n            schema_type=\"CreativeWork\",\n            name=\"Internal\",\n        )\n    )\n    context.streaming_response.queue_informative_update(\"Starting a poem...\\n\")\n\n    # Stream from Azure OpenAI\n    streamed_response = await CLIENT.chat.completions.create(\n        model=\"gpt-4o\",\n        messages=[\n            {\"role\": \"system\", \"content\": \"You are a creative assistant.\"},\n            {\"role\": \"user\", \"content\": \"Write a poem about Python.\"}\n        ],\n        stream=True,\n    )\n\n    try:\n        async for chunk in streamed_response:\n            if chunk.choices and chunk.choices[0].delta.content:\n                context.streaming_response.queue_text_chunk(\n                    chunk.choices[0].delta.content\n                )\n    finally:\n        await context.streaming_response.end_stream()\n```\n\n## OAuth \u002F Auto Sign-In\n\n```python\n@AGENT_APP.message(\"\u002Flogout\")\nasync def logout(context: TurnContext, state: TurnState):\n    await AGENT_APP.auth.sign_out(context, \"GRAPH\")\n    await context.send_activity(MessageFactory.text(\"You have been logged out.\"))\n\n\n@AGENT_APP.message(\"\u002Fme\", auth_handlers=[\"GRAPH\"])\nasync def profile_request(context: TurnContext, state: TurnState):\n    user_token_response = await AGENT_APP.auth.get_token(context, \"GRAPH\")\n    if user_token_response and user_token_response.token:\n        # Use token to call Microsoft Graph\n        async with aiohttp.ClientSession() as session:\n            headers = {\n                \"Authorization\": f\"Bearer {user_token_response.token}\",\n                \"Content-Type\": \"application\u002Fjson\",\n            }\n            async with session.get(\n                \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002Fme\", headers=headers\n            ) as response:\n                if response.status == 200:\n                    user_info = await response.json()\n                    await context.send_activity(f\"Hello, {user_info['displayName']}!\")\n```\n\n## Copilot Studio Client (Direct to Engine)\n\n```python\nimport asyncio\nfrom msal import PublicClientApplication\nfrom microsoft_agents.activity import ActivityTypes, load_configuration_from_env\nfrom microsoft_agents.copilotstudio.client import (\n    ConnectionSettings,\n    CopilotClient,\n)\n\n# Token cache (local file for interactive flows)\nclass LocalTokenCache:\n    # See samples for full implementation\n    pass\n\ndef acquire_token(settings, app_client_id, tenant_id):\n    pca = PublicClientApplication(\n        client_id=app_client_id,\n        authority=f\"https:\u002F\u002Flogin.microsoftonline.com\u002F{tenant_id}\",\n    )\n\n    token_request = {\"scopes\": [\"https:\u002F\u002Fapi.powerplatform.com\u002F.default\"]}\n    accounts = pca.get_accounts()\n\n    if accounts:\n        response = pca.acquire_token_silent(token_request[\"scopes\"], account=accounts[0])\n        return response.get(\"access_token\")\n    else:\n        response = pca.acquire_token_interactive(**token_request)\n        return response.get(\"access_token\")\n\n\nasync def main():\n    settings = ConnectionSettings(\n        environment_id=environ.get(\"COPILOTSTUDIOAGENT__ENVIRONMENTID\"),\n        agent_identifier=environ.get(\"COPILOTSTUDIOAGENT__SCHEMANAME\"),\n    )\n\n    token = acquire_token(\n        settings,\n        app_client_id=environ.get(\"COPILOTSTUDIOAGENT__AGENTAPPID\"),\n        tenant_id=environ.get(\"COPILOTSTUDIOAGENT__TENANTID\"),\n    )\n\n    # CopilotClient does not implement the context manager protocol.\n    copilot_client = CopilotClient(settings, token)\n\n    # Start conversation\n    act = copilot_client.start_conversation(True)\n    async for action in act:\n        if action.text:\n            print(action.text)\n\n    # Ask question\n    replies = copilot_client.ask_question(\"Hello!\", action.conversation.id)\n    async for reply in replies:\n        if reply.type == ActivityTypes.message:\n            print(reply.text)\n\n\nasyncio.run(main())\n```\n\n## Best Practices\n\n1. **This SDK is async-first — use `async def` handlers and `async with` throughout.**\n2. **Always use context managers for clients and async credentials.** Wrap every client in `with Client(...) as client:` (sync) or `async with Client(...) as client:` (async). For async `DefaultAzureCredential` from `azure.identity.aio`, also use `async with credential:` so tokens and transports are cleaned up.\n3. Use `microsoft_agents` import prefix (underscores, not dots).\n4. Use `MemoryStorage` only for development; use BlobStorage or CosmosDB in production.\n5. Always use `load_configuration_from_env(environ)` to load SDK configuration.\n6. Include `jwt_authorization_middleware` in aiohttp Application middlewares.\n7. Use `MsalConnectionManager` for MSAL-based authentication.\n8. Call `end_stream()` in finally blocks when using streaming responses.\n9. Use `auth_handlers` parameter on message decorators for OAuth-protected routes.\n10. Keep secrets in environment variables, not in source code.\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| GitHub samples (Python)       | https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FAgents-for-python                                |\n| PyPI packages                 | https:\u002F\u002Fpypi.org\u002Fsearch\u002F?q=microsoft-agents                                   |\n| Integrate with Copilot Studio | https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fmicrosoft-365\u002Fagents-sdk\u002Fintegrate-with-mcs |\n\n## Reference Files\n\n| File | Contents |\n|------|----------|\n| [references\u002Fcapabilities.md](references\u002Fcapabilities.md) | Additional non-hero capabilities, operation-group coverage, and production checklists. |\n","# Microsoft 365 Agents SDK (Python)\n\nBuild enterprise agents for Microsoft 365, Teams, and Copilot Studio using the Microsoft Agents SDK with aiohttp hosting, AgentApplication routing, streaming responses, and MSAL-based authentication.\n\n## Before implementation\n\n- Use the microsoft-docs MCP to verify the latest API signatures for AgentApplication, start_agent_process, and authentication options.\n- Confirm package versions on PyPI for the microsoft-agents-\\* packages you plan to use.\n\n## Important Notice - Import Changes\n\n> **⚠️ Breaking Change**: Recent updates have changed the Python import structure from `microsoft.agents` to `microsoft_agents` (using underscores instead of dots).\n\n## Installation\n\n```bash\npip install microsoft-agents-hosting-core\npip install microsoft-agents-hosting-aiohttp\npip install microsoft-agents-activity\npip install microsoft-agents-authentication-msal\npip install microsoft-agents-copilotstudio-client\npip install python-dotenv aiohttp\n```\n\n## Environment Variables (.env)\n\n```bash\nCONNECTIONS__SERVICE_CONNECTION__SETTINGS__CLIENTID=\u003Cclient-id>\nCONNECTIONS__SERVICE_CONNECTION__SETTINGS__CLIENTSECRET=\u003Cclient-secret>\nCONNECTIONS__SERVICE_CONNECTION__SETTINGS__TENANTID=\u003Ctenant-id>\n\n# Optional: OAuth handlers for auto sign-in\nAGENTAPPLICATION__USERAUTHORIZATION__HANDLERS__GRAPH__SETTINGS__AZUREBOTOAUTHCONNECTIONNAME=\u003Cconnection-name>\n\n# Optional: Azure OpenAI for streaming (AAD auth via DefaultAzureCredential)\nAZURE_OPENAI_ENDPOINT=\u003Cendpoint>\nAZURE_OPENAI_API_VERSION=\u003Cversion>\n\n# Optional: Copilot Studio client\nCOPILOTSTUDIOAGENT__ENVIRONMENTID=\u003Cenvironment-id>\nCOPILOTSTUDIOAGENT__SCHEMANAME=\u003Cschema-name>\nCOPILOTSTUDIOAGENT__TENANTID=\u003Ctenant-id>\nCOPILOTSTUDIOAGENT__AGENTAPPID=\u003Capp-id>\n```\n\n## Authentication & Lifecycle\n\n> **? Two rules apply to every code sample below:**\n>\n> 1. **This SDK is async-first — use `async def` handlers and `async with` throughout.**\n> 2. **Use explicit auth managers and context-managed network resources.** Use `MsalConnectionManager` for agent auth, and wrap per-request HTTP resources in `async with` (for example, `aiohttp.ClientSession`).\n>\n> Snippets may abbreviate this setup, but production code should always follow both rules.\n\n## Core Workflow: aiohttp-hosted AgentApplication\n\n```python\nimport logging\nfrom os import environ\n\nfrom dotenv import load_dotenv\nfrom aiohttp.web import Request, Response, Application, run_app\n\nfrom microsoft_agents.activity import load_configuration_from_env\nfrom microsoft_agents.hosting.core import (\n    Authorization,\n    AgentApplication,\n    TurnState,\n    TurnContext,\n    MemoryStorage,\n)\nfrom microsoft_agents.hosting.aiohttp import (\n    CloudAdapter,\n    start_agent_process,\n    jwt_authorization_middleware,\n)\nfrom microsoft_agents.authentication.msal import MsalConnectionManager\n\n# Enable logging\nms_agents_logger = logging.getLogger(\"microsoft_agents\")\nms_agents_logger.addHandler(logging.StreamHandler())\nms_agents_logger.setLevel(logging.INFO)\n\n# Load configuration\nload_dotenv()\nagents_sdk_config = load_configuration_from_env(environ)\n\n# Create storage and connection manager\nSTORAGE = MemoryStorage()\nCONNECTION_MANAGER = MsalConnectionManager(**agents_sdk_config)\nADAPTER = CloudAdapter(connection_manager=CONNECTION_MANAGER)\nAUTHORIZATION = Authorization(STORAGE, CONNECTION_MANAGER, **agents_sdk_config)\n\n# Create AgentApplication\nAGENT_APP = AgentApplication[TurnState](\n    storage=STORAGE, adapter=ADAPTER, authorization=AUTHORIZATION, **agents_sdk_config\n)\n\n\n@AGENT_APP.conversation_update(\"membersAdded\")\nasync def on_members_added(context: TurnContext, _state: TurnState):\n    await context.send_activity(\"Welcome to the agent!\")\n\n\n@AGENT_APP.activity(\"message\")\nasync def on_message(context: TurnContext, _state: TurnState):\n    await context.send_activity(f\"You said: {context.activity.text}\")\n\n\n@AGENT_APP.error\nasync def on_error(context: TurnContext, error: Exception):\n    await context.send_activity(\"The agent encountered an error.\")\n\n\n# Server setup\nasync def entry_point(req: Request) -> Response:\n    agent: AgentApplication = req.app[\"agent_app\"]\n    adapter: CloudAdapter = req.app[\"adapter\"]\n    return await start_agent_process(req, agent, adapter)\n\n\nAPP = Application(middlewares=[jwt_authorization_middleware])\nAPP.router.add_post(\"\u002Fapi\u002Fmessages\", entry_point)\nAPP[\"agent_configuration\"] = CONNECTION_MANAGER.get_default_connection_configuration()\nAPP[\"agent_app\"] = AGENT_APP\nAPP[\"adapter\"] = AGENT_APP.adapter\n\nif __name__ == \"__main__\":\n    run_app(APP, host=\"localhost\", port=environ.get(\"PORT\", 3978))\n```\n\n## AgentApplication Routing\n\n```python\nimport re\nfrom microsoft_agents.hosting.core import (\n    AgentApplication, TurnState, TurnContext, MessageFactory\n)\nfrom microsoft_agents.activity import ActivityTypes\n\nAGENT_APP = AgentApplication[TurnState](\n    storage=STORAGE, adapter=ADAPTER, authorization=AUTHORIZATION, **agents_sdk_config\n)\n\n# Welcome handler\n@AGENT_APP.conversation_update(\"membersAdded\")\nasync def on_members_added(context: TurnContext, _state: TurnState):\n    await context.send_activity(\"Welcome!\")\n\n# Regex-based message handler\n@AGENT_APP.message(re.compile(r\"^hello$\", re.IGNORECASE))\nasync def on_hello(context: TurnContext, _state: TurnState):\n    await context.send_activity(\"Hello!\")\n\n# Simple string message handler\n@AGENT_APP.message(\"\u002Fstatus\")\nasync def on_status(context: TurnContext, _state: TurnState):\n    await context.send_activity(\"Status: OK\")\n\n# Auth-protected message handler\n@AGENT_APP.message(\"\u002Fme\", auth_handlers=[\"GRAPH\"])\nasync def on_profile(context: TurnContext, state: TurnState):\n    token_response = await AGENT_APP.auth.get_token(context, \"GRAPH\")\n    if token_response and token_response.token:\n        # Use token to call Graph API\n        await context.send_activity(\"Profile retrieved\")\n\n# Invoke activity handler\n@AGENT_APP.activity(ActivityTypes.invoke)\nasync def on_invoke(context: TurnContext, _state: TurnState):\n    invoke_response = Activity(\n        type=ActivityTypes.invoke_response, value={\"status\": 200}\n    )\n    await context.send_activity(invoke_response)\n\n# Fallback message handler\n@AGENT_APP.activity(\"message\")\nasync def on_message(context: TurnContext, _state: TurnState):\n    await context.send_activity(f\"Echo: {context.activity.text}\")\n\n# Error handler\n@AGENT_APP.error\nasync def on_error(context: TurnContext, error: Exception):\n    await context.send_activity(\"An error occurred.\")\n```\n\n## Streaming Responses with Azure OpenAI\n\n```python\nfrom openai import AsyncAzureOpenAI\nfrom azure.identity import DefaultAzureCredential, get_bearer_token_provider\nfrom microsoft_agents.activity import SensitivityUsageInfo\n\n# AAD token provider (preferred over AZURE_OPENAI_API_KEY)\ntoken_provider = get_bearer_token_provider(\n    DefaultAzureCredential(),\n    \"https:\u002F\u002Fcognitiveservices.azure.com\u002F.default\",\n)\n\n# Module-level singleton: client lives for the agent app lifetime.\nCLIENT = AsyncAzureOpenAI(\n    api_version=environ[\"AZURE_OPENAI_API_VERSION\"],\n    azure_endpoint=environ[\"AZURE_OPENAI_ENDPOINT\"],\n    azure_ad_token_provider=token_provider,\n)\n\n@AGENT_APP.message(\"poem\")\nasync def on_poem_message(context: TurnContext, _state: TurnState):\n    # Configure streaming response\n    context.streaming_response.set_feedback_loop(True)\n    context.streaming_response.set_generated_by_ai_label(True)\n    context.streaming_response.set_sensitivity_label(\n        SensitivityUsageInfo(\n            type=\"https:\u002F\u002Fschema.org\u002FMessage\",\n            schema_type=\"CreativeWork\",\n            name=\"Internal\",\n        )\n    )\n    context.streaming_response.queue_informative_update(\"Starting a poem...\\n\")\n\n    # Stream from Azure OpenAI\n    streamed_response = await CLIENT.chat.completions.create(\n        model=\"gpt-4o\",\n        messages=[\n            {\"role\": \"system\", \"content\": \"You are a creative assistant.\"},\n            {\"role\": \"user\", \"content\": \"Write a poem about Python.\"}\n        ],\n        stream=True,\n    )\n\n    try:\n        async for chunk in streamed_response:\n            if chunk.choices and chunk.choices[0].delta.content:\n                context.streaming_response.queue_text_chunk(\n                    chunk.choices[0].delta.content\n                )\n    finally:\n        await context.streaming_response.end_stream()\n```\n\n## OAuth \u002F Auto Sign-In\n\n```python\n@AGENT_APP.message(\"\u002Flogout\")\nasync def logout(context: TurnContext, state: TurnState):\n    await AGENT_APP.auth.sign_out(context, \"GRAPH\")\n    await context.send_activity(MessageFactory.text(\"You have been logged out.\"))\n\n\n@AGENT_APP.message(\"\u002Fme\", auth_handlers=[\"GRAPH\"])\nasync def profile_request(context: TurnContext, state: TurnState):\n    user_token_response = await AGENT_APP.auth.get_token(context, \"GRAPH\")\n    if user_token_response and user_token_response.token:\n        # Use token to call Microsoft Graph\n        async with aiohttp.ClientSession() as session:\n            headers = {\n                \"Authorization\": f\"Bearer {user_token_response.token}\",\n                \"Content-Type\": \"application\u002Fjson\",\n            }\n            async with session.get(\n                \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002Fme\", headers=headers\n            ) as response:\n                if response.status == 200:\n                    user_info = await response.json()\n                    await context.send_activity(f\"Hello, {user_info['displayName']}!\")\n```\n\n## Copilot Studio Client (Direct to Engine)\n\n```python\nimport asyncio\nfrom msal import PublicClientApplication\nfrom microsoft_agents.activity import ActivityTypes, load_configuration_from_env\nfrom microsoft_agents.copilotstudio.client import (\n    ConnectionSettings,\n    CopilotClient,\n)\n\n# Token cache (local file for interactive flows)\nclass LocalTokenCache:\n    # See samples for full implementation\n    pass\n\ndef acquire_token(settings, app_client_id, tenant_id):\n    pca = PublicClientApplication(\n        client_id=app_client_id,\n        authority=f\"https:\u002F\u002Flogin.microsoftonline.com\u002F{tenant_id}\",\n    )\n\n    token_request = {\"scopes\": [\"https:\u002F\u002Fapi.powerplatform.com\u002F.default\"]}\n    accounts = pca.get_accounts()\n\n    if accounts:\n        response = pca.acquire_token_silent(token_request[\"scopes\"], account=accounts[0])\n        return response.get(\"access_token\")\n    else:\n        response = pca.acquire_token_interactive(**token_request)\n        return response.get(\"access_token\")\n\n\nasync def main():\n    settings = ConnectionSettings(\n        environment_id=environ.get(\"COPILOTSTUDIOAGENT__ENVIRONMENTID\"),\n        agent_identifier=environ.get(\"COPILOTSTUDIOAGENT__SCHEMANAME\"),\n    )\n\n    token = acquire_token(\n        settings,\n        app_client_id=environ.get(\"COPILOTSTUDIOAGENT__AGENTAPPID\"),\n        tenant_id=environ.get(\"COPILOTSTUDIOAGENT__TENANTID\"),\n    )\n\n    # CopilotClient does not implement the context manager protocol.\n    copilot_client = CopilotClient(settings, token)\n\n    # Start conversation\n    act = copilot_client.start_conversation(True)\n    async for action in act:\n        if action.text:\n            print(action.text)\n\n    # Ask question\n    replies = copilot_client.ask_question(\"Hello!\", action.conversation.id)\n    async for reply in replies:\n        if reply.type == ActivityTypes.message:\n            print(reply.text)\n\n\nasyncio.run(main())\n```\n\n## Best Practices\n\n1. **This SDK is async-first — use `async def` handlers and `async with` throughout.**\n2. **Always use context managers for clients and async credentials.** Wrap every client in `with Client(...) as client:` (sync) or `async with Client(...) as client:` (async). For async `DefaultAzureCredential` from `azure.identity.aio`, also use `async with credential:` so tokens and transports are cleaned up.\n3. Use `microsoft_agents` import prefix (underscores, not dots).\n4. Use `MemoryStorage` only for development; use BlobStorage or CosmosDB in production.\n5. Always use `load_configuration_from_env(environ)` to load SDK configuration.\n6. Include `jwt_authorization_middleware` in aiohttp Application middlewares.\n7. Use `MsalConnectionManager` for MSAL-based authentication.\n8. Call `end_stream()` in finally blocks when using streaming responses.\n9. Use `auth_handlers` parameter on message decorators for OAuth-protected routes.\n10. Keep secrets in environment variables, not in source code.\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| GitHub samples (Python)       | https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FAgents-for-python                                |\n| PyPI packages                 | https:\u002F\u002Fpypi.org\u002Fsearch\u002F?q=microsoft-agents                                   |\n| Integrate with Copilot Studio | https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fmicrosoft-365\u002Fagents-sdk\u002Fintegrate-with-mcs |\n\n## Reference Files\n\n| File | Contents |\n|------|----------|\n| [references\u002Fcapabilities.md](references\u002Fcapabilities.md) | Additional non-hero capabilities, operation-group coverage, and production checklists. |\n",{"name":5,"license":15,"metadata":50,"description":53},{"author":12,"package":51,"version":52},"microsoft-agents-hosting-core, microsoft-agents-hosting-aiohttp, microsoft-agents-activity, microsoft-agents-authentication-msal, microsoft-agents-copilotstudio-client","1.0.0","Microsoft 365 Agents SDK for Python. Build multichannel agents for Teams\u002FM365\u002FCopilot Studio with aiohttp hosting, AgentApplication routing, streaming responses, and MSAL-based auth. Triggers: \"Microsoft 365 Agents SDK\", \"microsoft_agents\", \"AgentApplication\", \"start_agent_process\", \"TurnContext\", \"Copilot Studio client\", \"CloudAdapter\".\n","main","3f5b461b2314e01c400564051e92469114c5b68f",".github\u002Fplugins\u002Fazure-sdk-python\u002Fskills\u002Fm365-agents-py",368,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills","https:\u002F\u002Fmicrosoft.github.io\u002Fskills\u002F","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-14 06:48:25",{"source":8,"skillName":5,"commands":65,"prompt":75,"zipAvailable":76},[66,69,72],{"tool":67,"command":68},"npx","npx skills add microsoft\u002Fskills --skill m365-agents-py",{"tool":70,"command":71},"bunx","bunx skills add microsoft\u002Fskills --skill m365-agents-py",{"tool":73,"command":74},"pnpm","pnpm dlx skills add microsoft\u002Fskills --skill m365-agents-py","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fazure-sdk-python\u002Fskills\u002Fm365-agents-py\u002FSKILL.md",true,[78,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160,164,168,172,176,180,184,188,192],{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"metadata.json","REFERENCE","参考文档",518,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Fmetadata.json",{"path":85,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":86,"sourceHtmlUrl":87},"README.md",2635,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002FREADME.md",{"path":89,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":90,"sourceHtmlUrl":91},"references\u002Fcapabilities.md",2825,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fazure-sdk-python\u002Fskills\u002Fm365-agents-py\u002Freferences\u002Fcapabilities.md",{"path":93,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":94,"sourceHtmlUrl":95},"rules\u002F_sections.md",1319,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Frules\u002F_sections.md",{"path":97,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":98,"sourceHtmlUrl":99},"rules\u002Fblazor-code.md",1230,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Frules\u002Fblazor-code.md",{"path":101,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":102,"sourceHtmlUrl":103},"rules\u002Fblazor-components.md",1188,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Frules\u002Fblazor-components.md",{"path":105,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":106,"sourceHtmlUrl":107},"rules\u002Fblazor-css.md",2856,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Frules\u002Fblazor-css.md",{"path":109,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":110,"sourceHtmlUrl":111},"rules\u002Fblazor-javascript.md",1460,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Frules\u002Fblazor-javascript.md",{"path":113,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":114,"sourceHtmlUrl":115},"rules\u002Fblazor-performance.md",3409,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Frules\u002Fblazor-performance.md",{"path":117,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":118,"sourceHtmlUrl":119},"rules\u002Fblazor-structure.md",1368,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Frules\u002Fblazor-structure.md",{"path":121,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":122,"sourceHtmlUrl":123},"rules\u002Fcode-comments.md",853,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Frules\u002Fcode-comments.md",{"path":125,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":126,"sourceHtmlUrl":127},"rules\u002Fcode-conversion.md",716,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Frules\u002Fcode-conversion.md",{"path":129,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":130,"sourceHtmlUrl":131},"rules\u002Fcode-datetime.md",758,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Frules\u002Fcode-datetime.md",{"path":133,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":134,"sourceHtmlUrl":135},"rules\u002Fcode-exceptions.md",1161,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Frules\u002Fcode-exceptions.md",{"path":137,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":138,"sourceHtmlUrl":139},"rules\u002Fcode-if-pattern.md",1403,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Frules\u002Fcode-if-pattern.md",{"path":141,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":142,"sourceHtmlUrl":143},"rules\u002Fcode-operators.md",954,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Frules\u002Fcode-operators.md",{"path":145,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":146,"sourceHtmlUrl":147},"rules\u002Fcode-static.md",654,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Frules\u002Fcode-static.md",{"path":149,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":150,"sourceHtmlUrl":151},"rules\u002Fcode-strings.md",1647,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Frules\u002Fcode-strings.md",{"path":153,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":154,"sourceHtmlUrl":155},"rules\u002Fcode-using-namespace.md",1087,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Frules\u002Fcode-using-namespace.md",{"path":157,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":158,"sourceHtmlUrl":159},"rules\u002Fcode-variables.md",2197,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Frules\u002Fcode-variables.md",{"path":161,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":162,"sourceHtmlUrl":163},"rules\u002Flayout-formatting.md",2475,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Frules\u002Flayout-formatting.md",{"path":165,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":166,"sourceHtmlUrl":167},"rules\u002Flayout-members-order.md",1003,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Frules\u002Flayout-members-order.md",{"path":169,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":170,"sourceHtmlUrl":171},"rules\u002Fnaming-async.md",1434,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Frules\u002Fnaming-async.md",{"path":173,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":174,"sourceHtmlUrl":175},"rules\u002Fnaming-casing.md",3122,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Frules\u002Fnaming-casing.md",{"path":177,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":178,"sourceHtmlUrl":179},"rules\u002Fnaming-files.md",1002,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Frules\u002Fnaming-files.md",{"path":181,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":182,"sourceHtmlUrl":183},"rules\u002Fnaming-items.md",845,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Frules\u002Fnaming-items.md",{"path":185,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":186,"sourceHtmlUrl":187},"rules\u002Ftesting-blazor.md",2002,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Frules\u002Ftesting-blazor.md",{"path":189,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":190,"sourceHtmlUrl":191},"rules\u002Ftesting-coverage.md",1152,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Frules\u002Ftesting-coverage.md",{"path":193,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":194,"sourceHtmlUrl":195},"rules\u002Ftesting-practices.md",2653,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ffluentui-blazor\u002Fblob\u002Fdev\u002F.github\u002Fskills\u002Fcsharp-naming-conventions\u002Frules\u002Ftesting-practices.md",[197,205,229,265,292,312],{"skillNo":198,"name":199,"nameZh":6,"description":200,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":201,"categories":202,"keywords":203,"publishedAt":204},"01M741JBE1VH8A2Y3FXX2P7386","azure-advisor-cost-optimization","Analyze Azure Advisor Cost\u002FIdleResources findings and prevalidate deletion safety, including Service Groups. WHEN: \"find unused Azure resources\", \"what resources am I paying for but no longer using\", \"idle-resource savings\", \"historical idle-resource savings\", \"are these idle resources safe to delete\". Generic Cost, other subcategories, and cross-category requests use azure-advisor.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fazure-advisor\u002Fskills\u002Fazure-advisor-cost-optimization\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":206,"name":207,"nameZh":6,"description":208,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":209,"categories":210,"keywords":212,"publishedAt":45},"01M69B4JCRQV5SPXAFCKXQRV0H","skill-creator","Guide for creating effective skills for AI coding agents working with Azure SDKs and Microsoft Foundry services. Use when creating new skills or updating existing skills.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fskill-creator\u002FSKILL.md",[211],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[213,214,215,216,9,217,218,219,220,221,27,222,223,224,225,226,227,29,228],"skill creator","creator","ai coding agents","coding agents","azure","foundry","microsoft foundry","coding","guide","use","Existing","services","new","when","sdks","ai coding",{"skillNo":230,"name":231,"nameZh":6,"description":232,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":233,"categories":234,"keywords":245,"publishedAt":45},"01M69B4FD57V1MYKRWAJJECTZ7","podcast-generation","Generate AI-powered podcast-style audio narratives using Azure OpenAI's GPT Realtime Mini model via WebSocket. Use when building text-to-speech features, audio narrative generation, podcast creation from content, or integrating with Azure OpenAI Realtime API for real audio output. Covers full-stack implementation from React frontend to Python FastAPI backend with WebSocket streaming.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fpodcast-generation\u002FSKILL.md",[235,238,241,244],{"categoryNo":236,"categoryName":237,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":239,"categoryName":240,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":242,"categoryName":243,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[246,247,248,249,217,250,251,252,36,253,254,255,256,257,258,226,259,34,260,261,262,263,264],"podcast generation","generation","podcast","frontend","azure openai","realtime","react","Audio","creation","model","fastapi backend","python fastapi","fastapi","api","text","narrative","stack","generate","features",{"skillNo":266,"name":267,"nameZh":6,"description":268,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":269,"categories":270,"keywords":272,"publishedAt":45},"01M69B4CYPM5SESY5ZWEFDXEQZ","microsoft-docs","Understand Microsoft technologies by querying official documentation. Use whenever the user asks how something works, wants tutorials, needs configuration options, limits, quotas, or best practices for any Microsoft technology (Azure, .NET, M365, Windows, Power Platform, etc.)—even if they don't mention \"docs.\" If the question is about understanding a concept rather than writing code, this is the right skill.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fmicrosoft-docs\u002FSKILL.md",[271],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[273,9,274,275,276,277,278,217,279,280,281,282,283,284,285,286,27,287,67,288,222,289,290,291],"microsoft docs","docs","documentation","windows","official","cli","MCP","writing","power platform","mcp server","back","concept","power","platform","technology","question","learn mcp","learn","best practices",{"skillNo":293,"name":294,"nameZh":6,"description":295,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":296,"categories":297,"keywords":299,"publishedAt":45},"01M69B49C3YPD1ZJ3NC0HPCY58","mcp-builder","Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP), Node\u002FTypeScript (MCP SDK), or C#\u002F.NET (Microsoft MCP SDK).","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fmcp-builder\u002FSKILL.md",[298],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[300,279,301,302,43,9,36,303,304,255,305,226,306,307,308,221,309,310,27,311,222,29],"mcp builder","builder","llms","typescript","model context protocol","building mcp servers","node","integrate","Tools","context","fastmcp","mcp sdk",{"skillNo":313,"name":314,"nameZh":6,"description":315,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":316,"categories":317,"keywords":330,"publishedAt":45},"01M69B467A7CDMFQ0T6Q0ZA12Q","kql","KQL language expertise for writing correct, efficient Kusto Query Language queries. Covers syntax gotchas, join patterns, dynamic types, datetime pitfalls, regex patterns, serialization, memory management, result-size discipline, and advanced functions (geo, vector, graph). USE THIS SKILL whenever writing, debugging, or reviewing KQL queries — even simple ones — because the gotchas section prevents the most common errors that waste tool calls and cause expensive retry cascades. Trigger on: KQL, Kusto, ADX, Azure Data Explorer, Fabric Real-Time Intelligence, EventHouse, Log Analytics, log analysis, data exploration, time series, anomaly detection, summarize, where clause, join, extend, project, let statement, parse operator, extract function, any mention of pipe-forward query syntax.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fkql\u002FSKILL.md",[318,321,322,327],{"categoryNo":319,"categoryName":320,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":323,"categoryName":324,"taxonomyType":325,"taxonomyTypeDesc":326},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",{"categoryNo":328,"categoryName":329,"taxonomyType":325,"taxonomyTypeDesc":326},"01JBSEEDCAT000000000000036","内容创作者",[314,217,280,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,27,347,348,349],"analytics","memory","summarize","exploration","parse","project","time","vector","join","log","pipe","datetime","discipline","time series","regex","anomaly","section","tool","geo"]