Microsoft 365 Agents SDK is a software toolkit for building AI agents that can communicate through channels such as Microsoft 365 Copilot, Teams, web apps, and custom applications. Developers use it to add state, storage, event handling, and channel-specific behavior while choosing their own AI services and models. The catalogue entries are skills and plugins for working with this SDK.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add microsoft/Agents --skill agents-sdk-dotnet-activityhandler-migrationgit clone --depth 1 https://github.com/microsoft/AgentsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/microsoft/agents/agents-sdk-dotnet-activityhandler-migration)<a href="https://agentmods.dev/skills/microsoft/agents/agents-sdk-dotnet-activityhandler-migration"><img src="https://agentmods.dev/badge/skills/microsoft/agents/agents-sdk-dotnet-activityhandler-migration/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/microsoft/agents/agents-sdk-dotnet-activityhandler-migration"><img src="https://agentmods.dev/badge/skills/microsoft/agents/agents-sdk-dotnet-activityhandler-migration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00076 | $0.09442 |
| Opus 5.5 | $0.00030 | $0.03777 |
| Sonnet 5.5 | $0.00015 | $0.01888 |
| Haiku 4.5 | $0.00008 | $0.00944 |
Grade A, and why
agents-sdk-dotnet-activityhandler-migration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 759 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agents SDK ActivityHandler → AgentApplication Migration (.NET)
Overview
Upgrades a bot from the ActivityHandler compat layer to the modern AgentApplication routing pattern. This is ONLY for DotNet projects that already use Microsoft.Agents.* packages. If the project is still using Microsoft.Bot.* packages the bf-to-agents-sdk-dotnet-migration skill should be used first.
Two entry points:
- Standalone: The bot already uses
Microsoft.Agents.*packages, namespaces, and appsettings — focus is on the bot class, Program.cs, and endpoint mapping. - Second step after
bf-to-agents-sdk-dotnet-migration: Packages, namespaces, and appsettings were converted in that step — this skill handles the AgentApplication conversion.
What Does NOT Need to Change
Verify each of these is already correct — do not modify unless broken:
| Item | Expected State |
|---|---|
| Namespaces in bot class | Already Microsoft.Agents.* — only remove compat namespaces |
appsettings.json |
Already has Connections + TokenValidation sections |
builder.Services.AddAgentAspNetAuthentication(...) |
Already present — keep |
AspNetExtensions.cs (if present) |
Sample-provided auth helper — keep as-is |
| Custom DI in Program.cs | Preserve dialogs, adapters, custom services — but remove ConversationState and UserState (see Step 2) |
⚠️ If beta packages are required: Tell the user explicitly: "This migration uses pre-release (
-beta) Agents SDK packages, which are nightly builds and not suitable for production. Upgrade to a stable release before deploying."
Handler Mapping: ActivityHandler → AgentApplication
| ActivityHandler Override | AgentApplication Registration |
|---|---|
OnMessageActivityAsync(ITurnContext<IMessageActivity>, CT) |
OnActivity(ActivityTypes.Message, handler, rank: RouteRank.Last) |
OnMembersAddedAsync(IList<ChannelAccount>, ITurnContext<IConversationUpdateActivity>, CT) |
OnConversationUpdate(ConversationUpdateEvents.MembersAdded, handler) |
OnMembersRemovedAsync(...) |
OnConversationUpdate(ConversationUpdateEvents.MembersRemoved, handler) |
OnMessageUpdateActivityAsync(...) |
OnActivity(ActivityTypes.MessageUpdate, handler) |
OnMessageDeleteActivityAsync(...) |
OnActivity(ActivityTypes.MessageDelete, handler) |
OnReactionsAddedAsync(IList<MessageReaction>, ...) |
OnMessageReactionsAdded(handler) |
OnReactionsRemovedAsync(IList<MessageReaction>, ...) |
OnMessageReactionsRemoved(handler) |
OnEventAsync(ITurnContext<IEventActivity>, CT) |
OnEvent(eventName, handler) or OnActivity(ActivityTypes.Event, handler) |
OnInvokeActivityAsync(...) with adaptiveCard/action + verb switch |
AdaptiveCards.OnActionExecute(verb, handler) — one registration per verb (preferred) |
OnInvokeActivityAsync(...) with application/search |
AdaptiveCards.OnSearch(dataset, handler) — one registration per choices.data.dataset value |
OnInvokeActivityAsync(...) (other invoke types) |
OnActivity(ActivityTypes.Invoke, handler) |
OnTurnAsync(...) override (cross-cutting) |
OnBeforeTurn(handler) / OnAfterTurn(handler) |
OnInstallationUpdateActivityAsync(...) |
OnActivity(ActivityTypes.InstallationUpdate, handler) |
OnEndOfConversationActivityAsync(...) |
OnActivity(ActivityTypes.EndOfConversation, handler) |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 759 lines · 76 tokens per session scan A db61a9a3eb35
agents-sdk-dotnet-activityhandler-migration is a skill published in the GitHub repository microsoft/Agents (1,086 stars, last pushed today), licensed MIT. It adds 76 tokens to every session and 9,442 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
azure-ai-openai-dotnet
Azure OpenAI SDK for .NET. Client library for Azure OpenAI and OpenAI services. Use for chat completions, embeddings, image generation, audio transcription, and assistants. Triggers: "Azure OpenAI", "AzureOpenAIClient", "ChatClient", "chat completions .NET", "GPT-4", "embeddings", "DALL-E", "Whisper", "OpenAI .NET".
azure-eventgrid-dotnet
Azure Event Grid SDK for .NET. Client library for publishing and consuming events with Azure Event Grid. Use for event-driven architectures, pub/sub messaging, CloudEvents, and EventGridEvents. Triggers: "Event Grid", "EventGridPublisherClient", "CloudEvent", "EventGridEvent", "publish events .NET", "event-driven"…
azure-maps-search-dotnet
Azure Maps SDK for .NET. Location-based services including geocoding, routing, rendering, geolocation, and weather. Use for address search, directions, map tiles, IP geolocation, and weather data. Triggers: "Azure Maps", "MapsSearchClient", "MapsRoutingClient", "MapsRenderingClient", "geocoding .NET", "route…
azure-mgmt-apicenter-dotnet
Azure API Center SDK for .NET. Centralized API inventory management with governance, versioning, and discovery. Use for creating API services, workspaces, APIs, versions, definitions, environments, deployments, and metadata schemas. Triggers: "API Center", "ApiCenterService", "ApiCenterWorkspace", "ApiCenterApi", "API…
azure-resource-manager-postgresql-dotnet
Azure PostgreSQL Flexible Server SDK for .NET. Database management for PostgreSQL Flexible Server deployments. Use for creating servers, databases, firewall rules, configurations, backups, and high availability. Triggers: "PostgreSQL", "PostgreSqlFlexibleServer", "PostgreSQL Flexible Server", "Azure Database for…
azure-security-keyvault-keys-dotnet
Azure Key Vault Keys SDK for .NET. Client library for managing cryptographic keys in Azure Key Vault and Managed HSM. Use for key creation, rotation, encryption, decryption, signing, and verification. Triggers: "Key Vault keys", "KeyClient", "CryptographyClient", "RSA key", "EC key", "encrypt decrypt .NET", "key…