agent-framework-builder-python
Skill này làm gì
Skill hướng dẫn xây dựng ứng dụng Python với Microsoft Agent Framework, gồm agent, workflow, công cụ và lưu trữ. Skill dành cho lập trình viên muốn có một trợ lý AI bên trong chương trình Python.
Khi nào nên dùng
- ✓Khi bạn muốn xây dựng một agent AI trong ứng dụng Python.
- ✓Khi bạn cần một workflow điều phối các bước hoặc agent trong Python.
- ✓Khi bạn muốn rà soát một dự án agent Python có sẵn và cập nhật lên các phiên bản framework hiện tại.
Liên kết skill
https://github.com/microsoft/agent-framework/blob/main/skills/agent-framework-builder-python/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Bạn có thể giúp tôi thêm một agent AI có thể tra cứu đơn hàng vào ứng dụng Python của tôi bằng Microsoft Agent Framework không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent kiểm tra dự án và các gói của bạn, chọn mẫu đơn giản nhất phù hợp, rồi chỉ đọc hướng dẫn nó cần. Sau đó nó thực hiện thay đổi nhỏ nhất và chạy một kiểm tra tập trung.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
- Inspect the existing project, Python version, dependency manager, and installed Agent Framework packages.
- Choose the simplest matching path from the table below.
- Resolve design questions only when they materially change the implementation.
- Read only the linked reference for the selected path.
- Implement the smallest coherent change and run the narrowest validation that exercises it.
Core abstractions
- A chat client implements the model-facing
SupportsChatGetResponseprotocol. It sends messages and options to a model provider and returns chat responses or streaming updates. - An agent implements the
SupportsAgentRunprotocol. The standardAgentimplementation combines a chat client with instructions, tools, middleware, context providers, and session handling behind onerun(...)interface. - A harness agent is a regular
Agentassembled bycreate_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
SupportsAgentRunimplementations or executors.HandoffBuilderis the exception: its participants must be concreteAgentinstances.
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-uipackage 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-frameworkmeta-package. - Agent Framework does not automatically read
.envfiles. If the project uses one, callload_dotenv()explicitly or use the selected API's documentedenv_file_pathor equivalent initialization option.
Current documentation lookup
Use local guidance for stable decisions and common patterns. For provider matrices, package maturity, hosted tools,
Câu hỏi thường gặp
Skill bao phủ những phần nào của framework?
Agent, agent harness, workflow, công cụ, phiên, middleware, đánh giá, tích hợp và lưu trữ.
Nó có dùng ví dụ code hiện tại không?
Có. Skill yêu cầu agent kiểm tra API hiện tại thay vì dựa vào các ví dụ cũ.
Tôi có phải tự chọn mẫu không?
Không. Skill giúp chọn mẫu nhỏ nhất vẫn giữ được hành vi bạn cần.
Chi tiết
Mô tả gốc của tác giả
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.
Độ phổ biến
- Sao GitHub
- 14k
- Vị trí xếp hạng
- #11140
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
Skill tương tự
api-connector-builder
280kGiúp agent của bạn xây dựng kết nối API mới theo đúng mẫu đã có, dùng khi bạn cần thêm một tích hợp mà không tạo cách làm mới.
api-design
280kGiúp agent của bạn thiết kế REST API theo các thực hành tốt nhất, hữu ích để định nghĩa cách API giao tiếp, hiển thị lỗi và tổ chức dữ liệu.
backend-patterns
280kGiúp agent của bạn với các mẫu kiến trúc phía máy chủ và tối ưu cơ sở dữ liệu, hữu ích khi xây dựng hoặc rà soát code chạy trên máy chủ.