如何构建一个AI智能体:一份适合所有人的简易指南

qimuai 发布于 阅读:3 一手编译

如何构建一个AI智能体:一份适合所有人的简易指南

内容来源:https://news.microsoft.com/signal/articles/how-to-build-an-ai-agent-guide/

内容总结:

AI代理构建实用指南:从零开始的五步法,无需编程经验

人工智能代理正在改变职场工作方式,与传统的聊天机器人不同,AI代理不仅能回答问题,还能主动执行任务。例如,当员工在凌晨点击钓鱼链接时,AI代理可以检测异常登录行为、禁用受攻击账户、检查恶意软件传播范围,并自动生成事件报告。

微软近日发布了一份面向普通用户的AI代理构建指南,强调“从问题出发,而非技术本身”。该指南以微软365 Copilot为工具,展示了从概念到原型的完整流程,全程无需编写代码。

第一步:明确问题
指南建议先与同事沟通,界定需要解决的痛点,明确代理应实现信息检索、任务完成还是自主决策。例如,某团队每周需耗时数小时整理状态报告,AI代理可自动读取邮件和消息,数分钟内生成初稿。

第二步:检查现有资源
在动手前,可先查看微软365 Copilot中已有的预构建代理,避免重复劳动。对于无编程经验的用户,Copilot提供引导式创建功能。

第三步:用自然语言构建
在Copilot的“代理”板块点击“新建代理”,用日常语言描述需求,系统会自动生成代理原型。随后可通过“配置”功能调整其行为、语气和任务细节。

第四步:添加知识库与定义输出
将代理连接至邮件、文档、SharePoint站点等数据源,并设定输出格式(如报告、演示文稿或电子表格)。团队可指示代理“仅查看过去七天的Teams消息和邮件”,并指定信息筛选规则,防止推断缺失数据。

第五步:测试、共享与迭代
在真实场景中测试代理,并根据反馈调整指令。例如,某团队发现报告初稿过长,可修改指令要求更简洁的要点式摘要。

该指南指出,AI代理的最终目标不是一次完美,而是持续优化,使之真正嵌入日常工作流程。目前,微软365 Copilot用户可直接在Chat界面点击“Agents”开始体验。

中文翻译:

如何构建AI智能体:一份面向所有人的简易指南
预计阅读时间:6分钟。

想象一下,一位上班族在凌晨2点13分点击了一个钓鱼链接。当IT团队还在睡梦中时,一个AI智能体检测到了异常的登录行为,并停用了被盗用的账户。接着,它检查恶意软件是否已扩散到其他设备或账户,创建一张工单,向安全团队发送警报,并起草一份事件摘要。

这就是AI智能体的美妙之处。它们能帮助各种岗位的员工完成一系列工作,比如跟踪项目截止日期、监控共享收件箱、生成夜间报告等等。它们与AI聊天应用的区别在于,聊天应用擅长回答问题,而智能体还能采取行动。

你可以把智能体看作是AI驱动世界的应用程序。入门比听起来要简单。本指南将带你走过关键步骤——从定义问题,到使用Microsoft 365 Copilot构建和分享智能体——让你无需编写任何代码,就能从想法走向可运行的雏形。

如果你有Microsoft 365 Copilot,请前往Microsoft 365 Copilot Chat,点击“智能体”,然后点击“新建智能体”,即可立即开始构建。

或者,你也可以进一步了解Copilot和AI智能体。

  1. 从问题入手
    先从任务开始,而不是技术。你想要解决什么问题?与同事沟通,明确需求,缩小范围。然后定义预期成果:智能体应该检索信息、完成一项任务,还是独立行动?一开始就明确目标,会让后续的构建过程更快——也更有用。

示例:一群办公室员工每周都要花费数小时,从各自的电子邮件、消息和文档中整理一份状态报告。这项工作重复乏味,容易遗漏细节,而且最终报告的质量因整理者不同而差异很大。一个AI智能体可以解决这个问题,它负责完成阅读团队信息源的繁重工作,并在几分钟内整理出初稿。

  1. 决定从哪里开始
    在构建之前,先检查一下已有的资源。可能某个AI模型或预构建的智能体已经能胜任这项工作。要检查,请打开Microsoft 365 Copilot,点击左侧面板中的“智能体”,打开预构建智能体的商店。如果找不到完全符合你需求的,请考虑你自己的专业水平。如果几乎没有编码经验,Microsoft 365 Copilot就是为帮助你快速上手而设计的。更高级的构建可能需要开发者工具,以实现更高的定制化和控制。

示例:对于协作处理共享收件箱中客户邮件的团队来说,智能体可以帮助分类收到的邮件,挑出最重要的邮件,为常见问题撰写回复,并将邮件路由给合适的人员。

  1. 在Microsoft 365 Copilot中构建你的AI智能体
    在Microsoft 365 Copilot的“智能体”部分,点击“新建智能体”。首先用通俗易懂的语言描述你的需求——你的Copilot会为你生成智能体的草稿。

一旦Copilot构建好你的智能体,你可以点击“配置”来测试它。然后优化指令:定义智能体的行为、语气和任务。在这个步骤中,你将塑造智能体的回应方式,确保它一致、有用,并与你的具体工作流程保持一致。

示例:负责处理共享收件箱邮件的团队,可以给智能体各种指示。团队成员可以告诉它,将常见的请求类型分类为一般性问题、紧急问题或复杂请求,并将每类消息路由给特定的团队成员。该团队还可以训练智能体,使用经批准的特定语言立即回复常规问题,并将任何敏感内容标记给人工审核员。

  1. 添加知识并定义输出
    要让智能体发挥最佳水平,你需要给它一些背景信息。

将你的智能体连接到正确的信息来源,例如电子邮件、文档、SharePoint站点或网站。决定它是只依赖你精选的数据,还是从更广泛的来源获取信息,比如公司政策的网站或PDF文件。然后定义它产出什么——报告、演示文稿、电子表格、回复或代码——这样它就能以你真正需要的格式交付工作成果。

你可以直接自己给智能体附加文档,或者使用聊天机器人。操作方法如下:在Microsoft 365 Copilot中导航到智能体构建器页面,点击智能体名称右侧的铅笔图标,打开编辑界面。在那里,你可以向下滚动以附加信息来源,或者使用左侧的聊天窗口,它会引导你完成操作。

示例:构建周报的团队可以告诉智能体“查看过去七天的Teams消息和电子邮件”,并“只关注与特定项目或团队相关的消息”,或者明确要求“识别更新、决策、障碍或即将到来的截止日期”。

完成后,团队可以告诉智能体他们希望报告采用何种结构、篇幅多长,并以清晰、专业的语气写完整份报告。该团队还可以为智能体设定界限,告诉它只使用电子邮件和Teams消息中的信息,不要推断任何缺失的细节。

  1. 测试、分享和扩展
    在真实场景中测试你的智能体,并根据需要返回设置中完善其指令。在智能体构建器页面内的编辑界面,你可以自己更改智能体的指令,或者Copilot会在左侧的聊天窗口中引导你完成修改。

示例:编制周报的团队可能会发现,智能体从团队邮件中获取到的信息不清晰或相互冲突,所以团队成员指示智能体标记这些情况——并且不要推断或猜测任何缺失的细节。

或者,团队可能意识到最初的报告字数要求太长了,所以团队成员调整智能体的指令,使其更简短、更易浏览,或以项目符号列表的形式包含要点。

一旦你的智能体运行起来,你可以扩展它的能力,或将其迁移到更高级的工具中。目标不是一蹴而就地追求完美——而是为你的工作构建一些有用的东西,并随着时间推移不断完善它。

这个故事发布于2026年8月10日。所有图片均使用MAI Playground和Microsoft 365 Copilot制作。

Samantha Kubota为Microsoft Signal报道所有关于AI和创新的内容,近期专注于AI智能体如何重塑日常工作、微软的研究突破以及新兴技术的负责任使用。加入微软之前,她在NBC新闻担任记者。你可以在LinkedIn上关注她。

英文来源:

How to build an AI agent: A simple guide for anyone
The estimated reading time is 6 min.
Imagine an office worker clicking on a phishing link at 2:13 a.m. As the IT team sleeps, an AI agent detects unusual login behavior and disables the compromised account. Then, it checks to see if malware spread to any other devices or accounts, opens a ticket, sends an alert to the security team and drafts an incident summary.
This is the beauty of AI agents. They can help workers in all kinds of roles do a range of things, like track project deadlines, monitor shared inboxes, create nightly reports and more. What sets them apart from AI chat apps is that while chat apps excel at answering questions, agents can also take action.
You can think of agents as apps for an AI-powered world. Getting started is easier than it sounds. This guide walks through the key steps — from defining the problem to building and sharing an agent using Microsoft 365 Copilot — so you can go from idea to working prototype without writing any code.
If you have Microsoft 365 Copilot, go to Microsoft 365 Copilot Chat, click “Agents” and then “New Agent” to start building immediately.
Or you can learn more about Copilot and AI agents.

  1. Start with the problem
    Begin with the job, not the technology. What problem are you trying to solve? Talk with colleagues to clarify the need and narrow the scope. Then define the outcome: Should the agent retrieve information, complete a task or act independently? A clear goal upfront makes the rest of the build process faster — and far more useful.
    Example: A group of office workers spends hours each week pulling together a status report from their emails, messages and documents. It’s repetitive and easy to miss details, and the final report varies widely depending on who puts it together. An AI agent could solve that by doing the legwork of reading the team’s internet strata and putting together the first draft in minutes.
  2. Decide where to begin
    Before building, check what already exists. An AI model or prebuilt agent may already do the job. To check, open Microsoft 365 Copilot and click on “Agents” in the left panel to open a store of prebuilt agents. If you can’t find exactly what you’re looking for, consider your level of expertise. With little or no coding experience, Microsoft 365 Copilot is designed to help you get started quickly. More advanced builds may require developer tools for greater customization and control.
    Example: For a team that works together to respond to client emails from a shared inbox, an agent could help sort incoming messages, pick out which are most important, write replies for common questions and route messages to the right person.
  3. Build your AI agent in Microsoft 365 Copilot
    From the Agents section in Microsoft 365 Copilot, click “New Agent.” Start by describing what you want in plain language — your copilot will generate a draft of your agent for you.
    Once Copilot has built your agent, you can test it by clicking “configure.” Then refine the instructions: Define the agent’s behavior, tone and tasks. This step is where you shape how the agent responds, ensuring it’s consistent, useful and aligned with your specific workflow.
    Example: The team responding to emails in a shared inbox could give its agent all kinds of direction. A team member could tell it to categorize common request types as general questions, urgent issues or complex requests, and to route each type of message to a specific team member. The team could train the agent to use certain approved language to respond to routine questions right away and to flag anything sensitive to a human reviewer.
  4. Add knowledge and define outputs
    Getting your agent to do its best work requires you to give it a little context.
    Connect your agent to the right information sources, such as emails, documents, SharePoint sites or websites. Decide whether it should rely only on your curated data or pull from broader sources, like a website or a PDF of your company’s policies. Then define what it produces — reports, presentations, spreadsheets, responses or code — so it delivers work in the format you actually need.
    You can simply attach documents to your agent yourself or use the chatbot. To do this, navigate to the Agent Builder page in your Microsoft 365 Copilot, and click the pencil icon to the right of your agent’s name to open the edit screen. From there, you can scroll down to attach information sources or use the chat window on the left to walk you through it.
    Example: The team building a weekly report could tell the agent to “review Teams messages and emails from the past seven days” and to “focus only on messages related to a specific project or team,” or to specifically “identify updates, decisions, blockers or upcoming deadlines.”
    Once that’s done, the team can tell the agent exactly how it wants the report to be structured and how long it should be, and to write the whole thing in a clear, professional tone. The team can also set boundaries with the agent and tell it to only use information from emails and Teams messages — and not to infer any missing details.
  5. Test, share and scale
    Test your agent in real scenarios and refine its instructions by hopping back into the settings as needed. From the edit screen within the Agent Builder page, you can change the agent’s instructions yourself, or Copilot can walk you through changes on the left in a chat window.
    Example: The team with the weekly report may realize its agent is getting unclear or conflicting updates from the team’s emails, so a team member instructs the agent to flag these — and not to infer or guess any missing details.
    Or the team might realize its initial word count for the report was too long, so a team member adjusts the agent’s directions to make it shorter and more skimmable, or to include key points in a bulleted list.
    Once your agent is up and running, you can expand its capabilities or move it into more advanced tools. The goal isn’t perfection right away — it’s building something useful for your work and continuing to refine it over time.
    This story was published on Aug. 10, 2026. All images made with MAI Playground and Microsoft 365 Copilot.
    Samantha Kubota reports on everything AI and innovation for Microsoft Signal, with a recent focus on how AI agents are reshaping everyday work, Microsoft’s research breakthroughs and the responsible use of emerging technologies. Prior to Microsoft, she was a journalist at NBC News. Follow her on LinkedIn.

微软AI最新进展

文章目录


    扫描二维码,在手机上阅读