typespec-create-agent

人工智能 / Agent Agent 与技能管理 1 文件 EN 原文

'Generate a complete TypeSpec declarative agent

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

说明语言:英文

来源githubawesome-copilot ↗ 查看原文件 ↗版权归原作者,请遵循原仓库许可
安装
npx skills add https://github.com/github/awesome-copilot --skill typespec-create-agent

需要已安装 skills CLI。也可以直接从源仓库 clone。

在星云中查看 ↗
SKILL.md 原文

name: typespec-create-agent description: 'Generate a complete TypeSpec declarative agent with instructions, capabilities, and conversation starters for Microsoft 365 Copilot' ---

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
  2. Use @agent decorator with a descriptive name and description
  3. Name should be 100 characters or less
  4. Description should be 1,000 characters or less
  1. Instructions
  2. Use @instructions decorator with clear behavioral guidelines
  3. Define the agent's role, expertise, and personality
  4. Specify what the agent should and shouldn't do
  5. Keep under 8,000 characters
  1. Conversation Starters
  2. Include 2-4 @conversationStarter decorators
  3. Each with a title and example query
  4. Make them diverse and showcase different capabilities
  1. Capabilities (based on user needs)
  2. WebSearch - for web content with optional site scoping
  3. OneDriveAndSharePoint - for document access with URL filtering
  4. TeamsMessages - for Teams channel/chat access
  5. Email - for email access with folder filtering
  6. People - for organization people search
  7. CodeInterpreter - for Python code execution
  8. GraphicArt - for image generation
  9. GraphConnectors - for Copilot connector content
  10. Dataverse - for Dataverse data access
  11. 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

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.

同类技能
add-new-opc-skillagent-architectureagent-browseragent-governanceagent-owasp-complianceagent-skill-stackagent-supply-chainagentcore
本页内容来自开源项目 github, 版权归原作者所有。
本站仅作技能索引与分享,所有 Skill 版权归其原作者所有。