typespec-create-agent 是做什么的?
为 Microsoft 365 Copilot 生成一个包含指令、功能和对话启动器的完整 TypeSpec 声明式代理。
概述
此技能可帮助您快速创建符合 Microsoft 365 Copilot 要求的 TypeSpec 声明式代理。您只需提供基础配置,技能将自动生成完整的代理定义文件。
使用方法
# 通过 CLI 使用
typespec-create-agent --name "MyAgent" --description "Description of my agent"
参数
| 参数 | 描述 | 必填 |
|---|---|---|
--name | 代理名称 | 是 |
--description | 代理描述 | 是 |
--instructions | 代理指令 | 否 |
--capabilities | 代理功能列表 | 否 |
输出
生成的文件将包含以下目录结构:
myagent/
agent.yaml
instructions.md
capabilities/
capability1.yaml
capability2.yaml
示例
typespec-create-agent --name "CustomerSupportAgent" --description "Handles customer inquiries" --instructions "Be helpful and friendly"
配置
请确保您具有以下环境变量:
M365_COPILOT_ENDPOINT:Microsoft 365 Copilot API 端点M365_COPILOT_TOKEN:访问令牌
支持
如遇到问题,请参考 官方文档
许可
MIT