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 agentmods add instructions/microsoft/agents-for-net/copilot-instructionsgit clone --depth 1 https://github.com/microsoft/Agents-for-netWhat 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 | $0.02253 | $0.02253 |
| Opus 5 | $0.01126 | $0.01126 |
| Sonnet 5 | $0.00451 | $0.00451 |
| Haiku 4.5 | $0.00225 | $0.00225 |
Grade A, and why
Agents-for-net copilot-instructions.md 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 2d 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 — 170 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Copilot Instructions for Agents-for-net
Project Overview
This is the Microsoft 365 Agents SDK for .NET — a framework for building enterprise-grade conversational agents that work across M365, Teams, Copilot Studio, and other platforms.
Current State: Generally Available (GA)
Documentation: https://learn.microsoft.com/en-us/microsoft-365/agents-sdk/
Build and Test
# Build entire solution
dotnet build src/Microsoft.Agents.SDK.sln
# Build via top-level project (includes all libraries)
dotnet build AgentSdk.proj
# Restore dependencies
dotnet restore AgentSdk.proj
# Run all tests
dotnet test --no-build -c Debug ./src/
# Run tests for a single project
dotnet test src/tests/Microsoft.Agents.Core.Tests/
# Run a single test
dotnet test --filter "FullyQualifiedName~Namespace.ClassName.MethodName"
# Create NuGet packages
dotnet pack --no-build -c Debug src/Microsoft.Agents.SDK.sln
Architecture
The SDK is organized into layered libraries under src/libraries/. See doc/architecture.md for a architecture overview.
Agent Pattern
public class MyAgent : AgentApplication
{
public MyAgent(AgentApplicationOptions options) : base(options)
{
OnConversationUpdate(ConversationUpdateEvents.MembersAdded, WelcomeMessageAsync);
OnActivity(ActivityTypes.Message, OnMessageAsync, rank: RouteRank.Last);
}
}
ASP.NET Core Startup
builder.AddAgent<MyAgent>();
builder.Services.AddSingleton<IStorage, MemoryStorage>();
builder.Services.AddAgentAspNetAuthentication(builder.Configuration);
app.MapAgentApplicationEndpoints(requireAuth: !app.Environment.IsDevelopment());
See src/samples/EmptyAgent/Program.cs for the canonical minimal example.
Extensions
Microsoft.Agents.Extensions.MSTeams (src/libraries/Extensions/Microsoft.Agents.Extensions.MSTeams/)
- Full Microsoft Teams extensibility: message extensions, task modules, meeting events, channel/team lifecycle, and file consent
- Aligns its models and public feature surface with the Teams SDK. When the Teams SDK removes a feature, MSTeams removes the corresponding feature rather than maintaining a compatibility implementation. These removals are breaking changes for MSTeams users and may occur in minor or patch releases.
- Depends on teams.net's
Microsoft.Teams.AppsNuGet package for Teams schema, API clients, and feature types (e.g.Microsoft.Teams.Apps.Schema.TeamsChannelData,Microsoft.Teams.Apps.Clients.ApiClient,Microsoft.Teams.Apps.MessageExtensions.*); it reimplements only routing onAgentApplication - Agent 365 lifecycle events are not handled by the Agents SDK or the MSTeams extension. Use the A365 Agent Extension (
Microsoft.Agents.A365.Notifications) for these events. - Enable with
[TeamsExtension]attribute on apartial AgentApplicationsubclass — source generator creates aTeamsproperty of typeTeamsAgentExtension - Two routing styles: fluent builders (
Teams.MessageExtensions.OnQuery(...)) or declarative attributes ([TeamsQueryRoute("cmdId")]) - Feature areas exposed as properties on
TeamsAgentExtension(accessed via the generatedTeamsproperty):Teams.MessageExtensions— search queries, link unfurling, anonymous link unfurling, action commands, compose previews, card button clicks, settingsTeams.TaskModules— modal dialogs (fetch + submit), supports string or Regex key matchingTeams.Meetings— start/end, participants join/leaveTeams.Channels— created/deleted/renamed/restored/shared/unshared; member add/removeTeams.Teams— archived/unarchived/renamed/deleted/restoredTeams.FileConsent— file upload consent accept/decline
TeamsAgentExtensionalso provides Graph helpers:GetTeamsClient()(teams.netMicrosoft.Teams.Apps.Clients.ApiClient),GetGraphClient()(user token),GetAppGraphClient()/GetAppGraphClientForConnection()(app-only)- App-level Teams route extension methods on
AgentApplication(inTeamsAppExtensions):OnTeamsHandoff()(Copilot handoff),OnTeamsFeedbackLoop(),OnTeamsMessageReactionsAdded()/OnTeamsMessageReactionsRemoved(), plus genericOnTeamsActivity()/OnTeamsMessage()/OnTeamsConversationUpdate()/OnTeamsEvent() ITeamsTurnContext/TeamsTurnContext—SendTargetedActivityAsync()for sending to specific recipientsTeamsActivityExtensions— activity helpers:TeamsGetChannelId(),TeamsGetMeetingInfo(),TeamsGetTeamInfo(),TeamsEnableFeedbackLoop(), etc.- Route builders accept
autoSignInHandlersand route attributes acceptsignInHandlersparameter for per-route OAuth/SSO flows; Teams SSO and OBO via Azure Bot Token Service are supported - Feedback is the FeedbackLoop feature in
AgentApplication; useAgentApplication.OnFeedbackLoop()or[FeedbackLoopRoute]rather than treating it as an MSTeams-specific feature. - Adaptive Cards support is handled by AgentApplication.AdaptiveCards
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.
- 2d ago First seen · 170 lines · 2,253 tokens per session scan A 72d5dde1b2b3
Agents-for-net copilot-instructions.md is an instructions file published in the GitHub repository microsoft/Agents-for-net (177 stars, last pushed 4d ago), licensed MIT. It adds 2,253 tokens to every session, about $0.0113 per session on Opus 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 instructions, from other repositories
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
next.js AGENTS.md
Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.