Chuyển đến nội dung
Skillpedia
Agent40k · #7458

typespec-create-agent

Skill này làm gì

Công cụ này tạo một trợ lý AI (gọi là “agent”) cho Microsoft 365 Copilot. Nó xác định agent có thể làm gì, cách nó nên hành xử và cách mọi người bắt đầu trò chuyện với nó.

Khi nào nên dùng

  • ✓Khi bạn muốn tạo một trợ lý AI tùy chỉnh cho các tác vụ cụ thể.
  • ✓Khi xác định khả năng của agent, như tìm kiếm trên web hoặc tài liệu.
  • ✓Khi thiết lập cách agent nên tương tác với người dùng.

Liên kết skill

https://github.com/github/awesome-copilot/blob/main/skills/typespec-create-agent/SKILL.md

Sao 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

Hãy dùng skill này để giúp tôi: https://github.com/github/awesome-copilot/blob/main/skills/typespec-create-agent/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tạo một agent giúp trả lời các câu hỏi về sản phẩm của công ty, có quyền truy cập web và tài liệu SharePoint.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Bạn cung cấp thông tin về mục đích của agent, các khả năng (như tìm kiếm web, đọc email, v.v.) và cách nó nên hoạt động. Sau đó công cụ tạo mã cấu hình cho agent.

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.

Create TypeSpec Declarative Agent

Create a complete TypeSpec declarative agent for Microsoft 365 Copilot with the following structure:

Requirements

Generate a main.tsp file with:

  1. Agent Declaration

    • Use @agent decorator with a descriptive name and description
    • Name should be 100 characters or less
    • Description should be 1,000 characters or less
  2. Instructions

    • Use @instructions decorator with clear behavioral guidelines
    • Define the agent's role, expertise, and personality
    • Specify what the agent should and shouldn't do
    • Keep under 8,000 characters
  3. Conversation Starters

    • Include 2-4 @conversationStarter decorators
    • Each with a title and example query
    • Make them diverse and showcase different capabilities
  4. Capabilities (based on user needs)

    • WebSearch - for web content with optional site scoping
    • OneDriveAndSharePoint - for document access with URL filtering
    • TeamsMessages - for Teams channel/chat access
    • Email - for email access with folder filtering
    • People - for organization people search
    • CodeInterpreter - for Python code execution
    • GraphicArt - for image generation
    • GraphConnectors - for Copilot connector content
    • Dataverse - for Dataverse data access
    • Meetings - for meeting content access

Template Structure

import "@typespec/http";
import "@typespec/openapi3";
import "@microsoft/typespec-m365-copilot";

using TypeSpec.Http;
using TypeSpec.M365.Copilot.Agents;

@agent({
  name: "[Agent Name]",
  description: "[Agent Description]"
})
@instructions("""
  [Detailed instructions about agent behavior, role, and guidelines]
""")
@conversationStarter(#{
  title: "[Starter Title 1]",
  text: "[Example query 1]"
})
@conversationStarter(#{
  title: "[Starter Title 2]",
  text: "[Example query 2]"
})
namespace [AgentName] {
  // Add capabilities as operations here
  op capabilityName is AgentCapabilities.[CapabilityType]<[Parameters]>;
}

Best Practices

  • Use descriptive, role-based agent names (e.g., "Customer Support Assistant", "Research Helper")
  • Write instructions in second person ("You are...")
  • Be specific about the agent's expertise and limitations
  • Include diverse conversation starters that showcase different features
  • Only include capabilities the agent actually needs
  • Scope capabilities (URLs, folders, etc.) when possible for better performance
  • Use triple-quoted strings for multi-line instructions

Examples

Ask the user:

  1. What is the agent's purpose and role?
  2. What capabilities does it need?
  3. What knowledge sources should it access?
  4. What are typical user interactions?

Then generate the complete TypeSpec agent definition.

Câu hỏi thường gặp

“Agent” trong Microsoft 365 Copilot là gì?

Agent là một trợ lý AI mà bạn có thể cấu hình để thực hiện các tác vụ cụ thể trong Microsoft 365, như trả lời câu hỏi hoặc quản lý thông tin.

“Capabilities” (khả năng) là gì?

Khả năng là các công cụ agent có thể dùng, như tìm kiếm trên internet (WebSearch), truy cập tệp trong OneDrive/SharePoint, đọc email, v.v.

TypeSpec là gì?

TypeSpec là ngôn ngữ dùng để mô tả cách các agent AI hoạt động và những khả năng chúng có.

Chi tiết

Mô tả gốc của tác giả

Generate a complete TypeSpec declarative agent with instructions, capabilities, and conversation starters for Microsoft 365 Copilot

repo: github/awesome-copilot

Độ phổ biến

Sao GitHub
40k
Vị trí xếp hạng
#7458
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự