# microsoft/agents architecture

> Architecture diagram of the GitHub repository microsoft/agents, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/microsoft/agents
- Repository: https://github.com/microsoft/agents

## Overview

This repository is the Microsoft 365 Agents SDK landing point: it directs developers to language-specific SDKs and provides samples, agent-assistant plugins, and specifications. Its substantial in-repository runtime is a tool that plans and validates migrations of .NET samples from upstream, then prepares publishable changes. The sync source excerpts show the CLI, planning, guarded agent session, and validation boundaries; other SDK implementation details live in the linked language repositories and are not represented here.

Main entry points: [`README.md`](https://github.com/microsoft/agents/blob/main/README.md) (Agents SDK), [`automation/teams-sample-sync/src/cli.ts`](https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/cli.ts) (Sync CLI), [`automation/teams-sample-sync/src/plan.ts`](https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/plan.ts) (Migration planner), [`automation/teams-sample-sync/src/context.ts`](https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/context.ts) (Evidence context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sdk["SDK ecosystem"]
  node_sdk["Agents SDK<br/>[README.md]"]
  node_language_sdks["Language SDKs"]
  node_samples["SDK samples"]
  node_specs["Protocol specs"]
end

subgraph group_plugins["Assistant plugins"]
  node_common_plugins["Common skills"]
  node_js_plugins["JavaScript skills"]
  node_net_plugins[".NET skills"]
  node_python_plugins["Python skills"]
end

subgraph group_syncflow["Sample sync workflow"]
  node_cli["Sync CLI<br/>[cli.ts]"]
  node_planner["Migration planner<br/>[plan.ts]"]
  node_context["Evidence context<br/>[context.ts]"]
  node_agent_session["Agent session<br/>[sync-session.ts]"]
  node_copilot_runner["Copilot runner<br/>[agent-runner.ts]"]
  node_publish["Patch publishing<br/>[publish-pr.ts]"]
end

subgraph group_syncinfra["Sync foundations"]
  node_policy["Sync policy<br/>[config.ts]"]
  node_tool_guard["Trusted tools<br/>[agent-tools.ts]"]
  node_validation["Sample validation<br/>[validate.ts]"]
  node_git_evidence["Git evidence<br/>[git.ts]"]
  node_version_resolution["SDK version resolver<br/>[versions.ts]"]
  node_migration_state[("Verified state<br/>[state.ts]")]
  node_contracts["Workflow contracts<br/>[types.ts]"]
end

node_developer(("Developer"))
node_sync_user(("Workflow operator"))

node_developer -->|"build with"| node_sdk
node_sdk -->|"implemented in"| node_language_sdks
node_sdk -->|"learn from"| node_samples
node_sdk -.->|"defines protocols"| node_specs
node_sdk -->|"offers skills"| node_common_plugins
node_sdk -->|"offers skills"| node_js_plugins
node_sdk -->|"offers skills"| node_net_plugins
node_sdk -->|"offers skills"| node_python_plugins
node_sync_user -->|"runs commands"| node_cli
node_cli -->|"creates plan"| node_planner
node_cli -->|"creates context"| node_context
node_cli -->|"runs migration"| node_agent_session
node_agent_session -.->|"requests session"| node_copilot_runner
node_cli -->|"validates tools"| node_tool_guard
node_cli -->|"publishes patch"| node_publish
node_planner -->|"loads policy"| node_policy
node_planner -->|"compares trees"| node_git_evidence
node_planner -->|"reads state"| node_migration_state
node_planner -->|"checks version"| node_version_resolution
node_context -->|"loads targets"| node_policy
node_context -->|"materializes evidence"| node_git_evidence
node_context -->|"reads prior state"| node_migration_state
node_agent_session -->|"runs validation"| node_validation
node_tool_guard -->|"validates sample"| node_validation
node_tool_guard -->|"checks digests"| node_git_evidence
node_tool_guard -->|"checks boundaries"| node_policy
node_cli -->|"resolves version"| node_version_resolution
node_cli -->|"exchanges results"| node_contracts

click node_sdk "https://github.com/microsoft/agents/blob/main/README.md"
click node_samples "https://github.com/microsoft/agents/tree/main/samples"
click node_specs "https://github.com/microsoft/agents/tree/main/specs"
click node_common_plugins "https://github.com/microsoft/agents/tree/main/agent-plugins/agents-sdk-common/skills"
click node_js_plugins "https://github.com/microsoft/agents/tree/main/agent-plugins/agents-for-js/skills"
click node_net_plugins "https://github.com/microsoft/agents/tree/main/agent-plugins/agents-for-net/skills"
click node_python_plugins "https://github.com/microsoft/agents/tree/main/agent-plugins/agents-for-python/skills"
click node_cli "https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/cli.ts"
click node_planner "https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/plan.ts"
click node_context "https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/context.ts"
click node_agent_session "https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/sync-session.ts"
click node_copilot_runner "https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/agent-runner.ts"
click node_publish "https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/publish-pr.ts"
click node_policy "https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/config.ts"
click node_tool_guard "https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/agent-tools.ts"
click node_validation "https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/validate.ts"
click node_git_evidence "https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/git.ts"
click node_version_resolution "https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/versions.ts"
click node_migration_state "https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/state.ts"
click node_contracts "https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/types.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_sdk,node_language_sdks,node_samples,node_specs toneBlue
class node_common_plugins,node_js_plugins,node_net_plugins,node_python_plugins toneAmber
class node_cli,node_planner,node_context,node_agent_session,node_copilot_runner,node_publish toneMint
class node_policy,node_tool_guard,node_validation,node_git_evidence,node_version_resolution,node_migration_state,node_contracts toneRose
class node_developer,node_sync_user toneIndigo
```

## Components

### SDK ecosystem

- [Agents SDK](https://github.com/microsoft/agents/blob/main/README.md): `README.md`
- **Language SDKs**
- [SDK samples](https://github.com/microsoft/agents/tree/main/samples): `samples`
- [Protocol specs](https://github.com/microsoft/agents/tree/main/specs): `specs`

### Assistant plugins

- [Common skills](https://github.com/microsoft/agents/tree/main/agent-plugins/agents-sdk-common/skills): `agent-plugins/agents-sdk-common/skills`
- [JavaScript skills](https://github.com/microsoft/agents/tree/main/agent-plugins/agents-for-js/skills): `agent-plugins/agents-for-js/skills`
- [.NET skills](https://github.com/microsoft/agents/tree/main/agent-plugins/agents-for-net/skills): `agent-plugins/agents-for-net/skills`
- [Python skills](https://github.com/microsoft/agents/tree/main/agent-plugins/agents-for-python/skills): `agent-plugins/agents-for-python/skills`

### Sample sync workflow

- [Sync CLI](https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/cli.ts): `automation/teams-sample-sync/src/cli.ts`
- [Migration planner](https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/plan.ts): `automation/teams-sample-sync/src/plan.ts`
- [Evidence context](https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/context.ts): `automation/teams-sample-sync/src/context.ts`
- [Agent session](https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/sync-session.ts): `automation/teams-sample-sync/src/sync-session.ts`
- [Copilot runner](https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/agent-runner.ts): `automation/teams-sample-sync/src/agent-runner.ts`
- [Patch publishing](https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/publish-pr.ts): `automation/teams-sample-sync/src/publish-pr.ts`

### Sync foundations

- [Sync policy](https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/config.ts): `automation/teams-sample-sync/src/config.ts`
- [Trusted tools](https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/agent-tools.ts): `automation/teams-sample-sync/src/agent-tools.ts`
- [Sample validation](https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/validate.ts): `automation/teams-sample-sync/src/validate.ts`
- [Git evidence](https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/git.ts): `automation/teams-sample-sync/src/git.ts`
- [SDK version resolver](https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/versions.ts): `automation/teams-sample-sync/src/versions.ts`
- [Verified state](https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/state.ts): `automation/teams-sample-sync/src/state.ts`
- [Workflow contracts](https://github.com/microsoft/agents/blob/main/automation/teams-sample-sync/src/types.ts): `automation/teams-sample-sync/src/types.ts`

### Other components

- **Developer**
- **Workflow operator**

## Connections

- Developer → Agents SDK: build with (evidence: `README.md`)
- Agents SDK → Language SDKs: implemented in (evidence: `README.md`)
- Agents SDK → SDK samples: learn from (evidence: `README.md`)
- Agents SDK → Protocol specs: defines protocols
- Agents SDK → Common skills: offers skills (evidence: `README.md`)
- Agents SDK → JavaScript skills: offers skills (evidence: `README.md`)
- Agents SDK → .NET skills: offers skills (evidence: `README.md`)
- Agents SDK → Python skills: offers skills (evidence: `README.md`)
- Workflow operator → Sync CLI: runs commands (evidence: `automation/teams-sample-sync/src/cli.ts`)
- Sync CLI → Migration planner: creates plan (evidence: `automation/teams-sample-sync/src/cli.ts`)
- Sync CLI → Evidence context: creates context (evidence: `automation/teams-sample-sync/src/context.ts`)
- Sync CLI → Agent session: runs migration (evidence: `automation/teams-sample-sync/src/cli.ts`)
- Agent session → Copilot runner: requests session (evidence: `automation/teams-sample-sync/src/sync-session.ts`)
- Sync CLI → Trusted tools: validates tools (evidence: `automation/teams-sample-sync/src/cli.ts`)
- Sync CLI → Patch publishing: publishes patch (evidence: `automation/teams-sample-sync/src/cli.ts`)
- Migration planner → Sync policy: loads policy (evidence: `automation/teams-sample-sync/src/plan.ts`)
- Migration planner → Git evidence: compares trees (evidence: `automation/teams-sample-sync/src/plan.ts`)
- Migration planner → Verified state: reads state (evidence: `automation/teams-sample-sync/src/plan.ts`)
- Migration planner → SDK version resolver: checks version (evidence: `automation/teams-sample-sync/src/plan.ts`)
- Evidence context → Sync policy: loads targets (evidence: `automation/teams-sample-sync/src/context.ts`)
- Evidence context → Git evidence: materializes evidence (evidence: `automation/teams-sample-sync/src/context.ts`)
- Evidence context → Verified state: reads prior state (evidence: `automation/teams-sample-sync/src/context.ts`)
- Agent session → Sample validation: runs validation (evidence: `automation/teams-sample-sync/src/sync-session.ts`)
- Trusted tools → Sample validation: validates sample (evidence: `automation/teams-sample-sync/src/agent-tools.ts`)
- Trusted tools → Git evidence: checks digests (evidence: `automation/teams-sample-sync/src/agent-tools.ts`)
- Trusted tools → Sync policy: checks boundaries (evidence: `automation/teams-sample-sync/src/agent-tools.ts`)
- Sync CLI → SDK version resolver: resolves version (evidence: `automation/teams-sample-sync/src/cli.ts`)
- Sync CLI → Workflow contracts: exchanges results (evidence: `automation/teams-sample-sync/src/cli.ts`)
