AGENT SKILL

agent-framework-builder-python

Use this skill when building, modifying, reviewing, evaluating, integrating, or hosting Python applications with Microsoft Agent Framework. Use it for Agent Framework agents, harness agents, workflows, orchestrations, declarative definitions, tools, sessions, middleware, evaluation, observability, integrations, or hosting, even when the user has not yet chosen the correct framework pattern.

License 许可
MIT
最近更新
2026-11-14
Stars
★ 1.5w
Forks
2.6k

01 前言 Front Matter

name
agent-framework-builder-python
license
MIT
metadata
{ "project": "agent-framework", "version": "0.3", "language": "python" }
description
Use this skill when building, modifying, reviewing, evaluating, integrating, or hosting Python applications with Microsoft Agent Framework. Use it for Agent Framework agents, harness agents, workflows, orchestrations, declarative definitions, tools, sessions, middleware, evaluation, observability, integrations, or hosting, even when the user has not yet chosen the correct framework pattern.

02 资源文件 9

03 SKILL.md 正文

Agent Framework builder for Python

Use this skill as the entry point for Python Agent Framework application work. Choose the smallest framework pattern that preserves the required behavior, load only the relevant references, and validate against current APIs instead of relying on remembered preview-era syntax.

Workflow

  1. Inspect the existing project, Python version, dependency manager, and installed Agent Framework packages.
  2. Choose the simplest matching path from the table below.
  3. Resolve design questions only when they materially change the implementation.
  4. Read only the linked reference for the selected path.
  5. Implement the smallest coherent change and run the narrowest validation that exercises it.

Core abstractions

  • A chat client implements the model-facing SupportsChatGetResponse protocol. It sends messages and options to a model provider and returns chat responses or streaming updates.
  • An agent implements the SupportsAgentRun protocol. The standard Agent implementation combines a chat client with instructions, tools, middleware, context providers, and session handling behind one run(...) interface.
  • A harness agent is a regular Agent assembled by create_harness_agent. It adds an opinionated set of context providers and middleware; it does not introduce a separate agent abstraction.
  • A workflow coordinates explicit execution paths. Graph workflows and most orchestration builders can use multiple SupportsAgentRun implementations or executors. HandoffBuilder is the exception: its participants must be concrete Agent instances.

User interface options

  • DevUI is a local development, testing, and debugging tool for interacting with agents and workflows. Never run or deploy DevUI as a production application host.
  • AG-UI is the application-facing protocol integration for connecting an agent or workflow to an AG-UI-compatible frontend. Use the agent-framework-ag-ui package when the product needs streaming UI events, tool interactions, shared state, interrupts, or resume behavior.

Choose the build path

Path Choose it when Details
Plain agent One model-driven actor owns the task and tools, sessions, context, and middleware are sufficient. Plain agents
Harness agent The product needs an operating loop with todos, modes, memory, approvals, skills, optional file access, background agents, shell, compaction, or repeated execution. Harness agents
Workflow or orchestration Explicit stages, routing, parallelism, multiple participants, checkpointing, human input, or intermediate outputs are central to correctness. Workflows
Declarative definition YAML or JSON should be the source of truth for a supported agent or workflow. Declarative definitions
Evaluation Expected outputs, tool calls, failed runs, or quality regressions are the main concern. Evaluation
Observability The task is diagnosing or monitoring runtime behavior with traces, logs, and metrics. Observability
Extensibility The application needs a custom provider, ContextProvider, or middleware component. Extensibility
Integration The task is choosing or wiring a provider, protocol, memory store, tool service, UI, or platform extension. Integrations
Hosting and deployment Working Agent Framework code needs a process host, protocol endpoint, identity contract, or deployment shape. Hosting and deployment

Defaults

  • Agent Framework requires Python 3.11 or later. Prefer the latest supported Python release or the previous release (N-1), unless a required dependency has a narrower compatibility range.
  • Install the narrow Agent Framework distribution needed by the application instead of defaulting to the agent-framework meta-package.
  • Agent Framework does not automatically read .env files. If the project uses one, call load_dotenv() explicitly or use the selected API's documented env_file_path or equivalent initialization option.

Current documentation lookup

This skill and its references guide high-level development choices; they are not product documentation. Use them for selection criteria, trade-offs, and constraints that materially change a choice. Microsoft Learn is the documentation source for implementing the selected approach.

For provider matrices, package maturity, hosted tools, deployment details, or unfamiliar APIs, consult current sources before generating code. Use public docstrings or API reference pages for signatures and option details, and use Learn or maintained samples for end-to-end procedures. Do not copy those details into this skill or its references.

When the coding agent supports MCP, configure the Microsoft Learn MCP Server as a Streamable HTTP server:

https://learn.microsoft.com/api/mcp

See Microsoft Learn MCP Server setup for client configuration. The endpoint is for MCP clients and returns an error when opened directly in a browser.

  1. Search Microsoft Learn with microsoft_docs_search.
  2. Fetch the relevant page with microsoft_docs_fetch.
  3. Use microsoft_code_sample_search when a current implementation example is needed.
  4. If Learn MCP is unavailable and a trusted mslearn CLI is already installed, use the equivalent command:
MCP tool Preinstalled CLI
microsoft_docs_search(query="...") mslearn search "..."
microsoft_docs_fetch(url="...") mslearn fetch "..."
microsoft_code_sample_search(query="...", language="python") mslearn code-search "..." --language python

Do not fetch and execute an unpinned CLI package during a coding session. Use the official Microsoft Learn MCP/CLI setup to install or update it intentionally.

Canonical starting points:

04 同仓库更多 Skills

microsoft
microsoft/agent-framework

draft-release-notes

Create or rewrite Agent Framework release notes from a generated GitHub release log. Use when preparing Python or .NET release notes, filtering mixed-language changelogs, deduplicating changes, preserving inline contributor credits, or documenting breaking-change migrations from pull requests. Requires the user to provide the generated GitHub log, language, and release version before work begins.

★ 1.5w
microsoft
microsoft/agent-framework

agent-framework-builder-dotnet

Use this skill when building, modifying, reviewing, evaluating, integrating, or hosting .NET (C#) applications with Microsoft Agent Framework. Use it for Agent Framework agents, harness agents, workflows, orchestrations, declarative definitions, tools, sessions, middleware, evaluation, observability, integrations, or hosting, even when the user has not yet chosen the correct framework pattern.

Skill与智能体开发
★ 1.5w
microsoft
microsoft/agent-framework

foundry-hosted-agent-validation

Step-by-step process for validating a Python Foundry hosted agent sample (under python/samples/04-hosting/foundry-hosted-agents/) end to end — running it locally (native runtime and `azd ai agent run`) and after deploying it to an Azure AI Foundry project with `azd`. Use this when asked to validate a hosted agent sample.

Skill与智能体开发
★ 1.5w
microsoft
microsoft/agent-framework

foundry-config-setup

Resolve missing setup caused by a hardcoded Foundry project endpoint or model in a sample. Use when a sample fails because it uses a placeholder/hardcoded project_endpoint (for example "https://your-project.services.ai.azure.com") or a hardcoded model instead of reading them from the environment.

★ 1.5w
microsoft
microsoft/agent-framework

support-style

Contoso Outdoors customer-support tone and formatting guidelines.

★ 1.5w
microsoft
microsoft/agent-framework

escalation-policy

When and how to escalate Contoso Outdoors customer-support tickets.

★ 1.5w