跳到正文
Skillpedia
智能体40k · #7458

typespec-create-agent

它能做什么

这个工具可以为 Microsoft 365 Copilot 创建一个 AI 助手(称为“智能体”,即 agent)。它会定义这个智能体能做什么、应该如何表现,以及用户该如何开始与它对话。

适用场景

  • ✓当你想为特定任务创建一个自定义 AI 助手时。
  • ✓当你需要设定智能体的能力,比如搜索网页或文档时。
  • ✓当你需要设置智能体与用户的互动方式时。

技能链接

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

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/github/awesome-copilot/blob/main/skills/typespec-create-agent/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“创建一个帮助回答公司产品相关问题的智能体,并让它可以访问网页和 SharePoint 文档。”

每周 5 个新技能,1 分钟读完。

工作原理

你需要提供智能体的用途、它的能力(比如搜索网页、阅读邮件等),以及它应该如何表现。工具随后会生成该智能体的配置代码。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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.

常见问题

Microsoft 365 Copilot 里的“智能体”是什么?

智能体是一个可以配置的 AI 助手,用来在 Microsoft 365 中完成特定任务,比如回答问题或管理信息。

“能力”是什么意思?

能力指智能体可以使用的工具,比如搜索互联网(WebSearch)、访问 OneDrive 或 SharePoint 中的文件、阅读邮件等。

什么是 TypeSpec?

TypeSpec 是一种用来描述 AI 智能体应如何运作以及具备哪些能力的语言。

详情

作者的原始描述

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

repo: github/awesome-copilot

热度

GitHub 星标
40k
排名
#7458
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能