<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>AI Agent on Code Now</title>
    <link>https://blog.0xnullpath.cc/tags/ai-agent/</link>
    <description>Recent content in AI Agent on Code Now</description>
    <generator>Hugo</generator>
    <language>zh-cn</language>
    <lastBuildDate>Tue, 27 May 2025 16:04:10 +0000</lastBuildDate>
    <atom:link href="https://blog.0xnullpath.cc/tags/ai-agent/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>从零开始LLM生活-如何编写一个Agent</title>
      <link>https://blog.0xnullpath.cc/posts/note-snippet-9-%E4%BB%8E%E9%9B%B6%E5%BC%80%E5%A7%8Bllm%E7%94%9F%E6%B4%BB-%E5%A6%82%E4%BD%95%E7%BC%96%E5%86%99%E4%B8%80%E4%B8%AAagent/</link>
      <pubDate>Tue, 27 May 2025 16:04:10 +0000</pubDate>
      <guid>https://blog.0xnullpath.cc/posts/note-snippet-9-%E4%BB%8E%E9%9B%B6%E5%BC%80%E5%A7%8Bllm%E7%94%9F%E6%B4%BB-%E5%A6%82%E4%BD%95%E7%BC%96%E5%86%99%E4%B8%80%E4%B8%AAagent/</guid>
      <description>&lt;blockquote&gt;&#xA;  &lt;p&gt;本文希望使用通俗的语言表述什么是LLM Agent 和使用python实现一个简单的Agent&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;1-agent介绍&#34;&gt;1. Agent介绍&lt;/h2&gt;&#xA;&lt;h3 id=&#34;11-什么是agent&#34;&gt;1.1 什么是Agent？&lt;/h3&gt;&#xA;&lt;p&gt;LLM Agent并没有一个明确的定义，但是有一个核心特点就是&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;An LLM serves as the main controller or &amp;ldquo;brain&amp;rdquo; that controls a flow of operations needed to complete a task or user request. &amp;mdash;《Prompt Engineering Guide》&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;LLM Agent 是一个基于大型语言模型（LLM）的系统，它不仅仅被动地响应查询，更能&lt;strong&gt;自主地制定计划、利用工具/资源与外部环境交互，并根据观察结果调整行为，以达成特定目标&lt;/strong&gt;。与简单的LLM调用相比，Agent更强调其自主性、规划能力和工具使用能力.&lt;/p&gt;&#xA;&lt;h3 id=&#34;12-llm-agent可以解决什么样的问题&#34;&gt;1.2 LLM Agent可以解决什么样的问题？&lt;/h3&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If that deterministic workflow fits all queries, by all means just code everything! This will give you a 100% reliable system with no risk of error introduced by letting unpredictable LLMs meddle in your workflow. For the sake of simplicity and robustness, it&amp;rsquo;s advised to regularize towards not using any agentic behaviour.&lt;/p&gt;</description>
    </item>
    <item>
      <title>从零开始的 LLM Agent编程生活--MCP 篇</title>
      <link>https://blog.0xnullpath.cc/posts/note-snippet-5-%E4%BB%8E%E9%9B%B6%E5%BC%80%E5%A7%8B%E7%9A%84-llm-agent%E7%BC%96%E7%A8%8B%E7%94%9F%E6%B4%BB-mcp-%E7%AF%87/</link>
      <pubDate>Mon, 21 Apr 2025 08:23:57 +0000</pubDate>
      <guid>https://blog.0xnullpath.cc/posts/note-snippet-5-%E4%BB%8E%E9%9B%B6%E5%BC%80%E5%A7%8B%E7%9A%84-llm-agent%E7%BC%96%E7%A8%8B%E7%94%9F%E6%B4%BB-mcp-%E7%AF%87/</guid>
      <description>&lt;h2 id=&#34;1-什么是mcpmodel-context-protocol&#34;&gt;1. 什么是MCP(Model Context Protocol)&lt;/h2&gt;&#xA;&lt;p&gt;MCP（Model Context Protocol，模型上下文协议）是由Anthropic公司于2024年推出并开源的一种通信协议，旨在解决大型语言模型（LLM）与外部数据源及工具之间的连接问题。定义了 Model 与外部接口/数据/Prompt 通信之间的协议。 工具/资源提供方只需要实现 MCP 协议就可以和实现 MCP 客户端的 LLM APP 链接，LLM APP在运行过程中自动根据协议中返回工具列表/Prompt/资源列表，通过JsonRpc 从 MCP 服务器中获取。&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;一个简单的例子：接入高德地图，让模型通过高德地图的 API 查询相关天气/路径/地图周围相关信息的能力。&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;没有 MCP：需要自己实现对高德 OpenAPI 的调用 Tools，自己写 Prompt 组织对 LLM 的请求。&lt;/li&gt;&#xA;&lt;li&gt;有 MCP 后：直接使用 MCP Client 写上高德 MCP Service 的 Endpoint 和 Key，LLM 会在运行期间主动通过 MCP 查询高德相关资源，并使用高德已经组织好的 Prompt 反馈给 LLM。&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;2-mcp定义了什么&#34;&gt;2. MCP定义了什么：&lt;/h2&gt;&#xA;&lt;p&gt;MCP 定义的原语：&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Tools：FunctionCall&lt;/li&gt;&#xA;&lt;li&gt;Resouce：资源&lt;/li&gt;&#xA;&lt;li&gt;Prompts：提供结构化模板&lt;/li&gt;&#xA;&lt;li&gt;Sampling：允许服务器请求客户端调用 LLM&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3 id=&#34;21-工具&#34;&gt;2.1 工具：&lt;/h3&gt;&#xA;&lt;p&gt;经常有人拿 FunctionCall 和 MCP 做对比，甚至发出既生FunctionCall 又生 MCP 的感叹，我个人认为 FunctionCall和 MCP 并不冲突，FunctionCall 其实是 MCP 的一个子集，MCP 也支持 FunctionCall，只不过 MCP 还支持 Resource/Prompt 等定义，并在协议层对其获取/调用/更新做了明确 Protocol 约束。&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
