translation/translated/documents/course/02-agent-tools-mcp/10-updating-agent-instructi...

30 lines
1.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 更新您的代理指令
接下来,让我们更新您的代理指令以包含有关 Zapier 工具的信息:
```typescript
export const personalAssistantAgent = new Agent({
name: "Personal Assistant",
instructions: `
您是一个乐于助人的个人助理,可以帮助完成各种任务,如电子邮件
和安排社交媒体帖子。
您可以访问以下工具:
1. Gmail
- 使用这些工具来阅读和分类来自 Gmail 的电子邮件
- 您可以按优先级对电子邮件进行分类,识别行动项目,并总结内容
- 您也可以使用此工具发送电子邮件
保持您的回答简洁友好。
`,
model: openai("gpt-4o"),
tools: { ...mcpTools },
memory,
});
```
更新您的代理指令对于帮助它理解何时以及如何使用可用的工具至关重要。通过在指令中明确提及 Gmail 工具,您为您的代理提供了关于这些工具的功能和使用时机的上下文。
这有助于代理在响应用户请求时更好地决定使用哪些工具,从而产生更有用和更准确的响应。