<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Agent - 标签 - 豆浆小屋</title><link>https://soybeanmilk.netlify.app/tags/agent/</link><description>Agent - 标签 - 豆浆小屋</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><copyright>This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.</copyright><lastBuildDate>Thu, 06 Aug 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://soybeanmilk.netlify.app/tags/agent/" rel="self" type="application/rss+xml"/><item><title>Codex / Cloud Code 接 DeepSeek API：能接吗？效果差多少？</title><link>https://soybeanmilk.netlify.app/codex%E4%B8%8Ecloud-code%E6%8E%A5deepseek/</link><pubDate>Thu, 06 Aug 2026 00:00:00 +0000</pubDate><author><name>作者</name></author><guid>https://soybeanmilk.netlify.app/codex%E4%B8%8Ecloud-code%E6%8E%A5deepseek/</guid><description><![CDATA[<h2 id="简要回答" class="headerLink">
    <a href="#%e7%ae%80%e8%a6%81%e5%9b%9e%e7%ad%94" class="header-mark"></a>1 简要回答</h2><ul>
<li><strong>Codex</strong> 能接 DeepSeek，三行配置的事</li>
<li><strong>Cloud Code</strong>（Google）基本不能接，绑定自家生态</li>
<li>效果差别：外壳（工具本身）一样，<strong>上限由模型决定</strong>；GPT-5-Codex 为 coding agent 特调，DeepSeek 是通用模型，复杂任务差距明显、简单任务够用且便宜</li>
</ul>
<h2 id="我的想法--卡点" class="headerLink">
    <a href="#%e6%88%91%e7%9a%84%e6%83%b3%e6%b3%95--%e5%8d%a1%e7%82%b9" class="header-mark"></a>2 我的想法 / 卡点</h2><p>之前一直以为这些工具只能用自己的模型，聊完才知道：</p>
<ul>
<li>Codex 2026 年 6 月官方宣布支持第三方模型，从&quot;OpenAI 专用客户端&quot;变成&quot;模型中立的编码代理平台&quot;</li>
<li>我的困惑点是&quot;DeepSync 是什么&quot;——其实是语音识别把 DeepSeek 听错了</li>
<li>&ldquo;Cloud Code 源码泄露导致 React/Reason 流行&quot;这个说法也记错了：<strong>泄露的是 Claude Code（Anthropic）</strong>，不是 Google 的 Cloud Code</li>
</ul>
<h2 id="详细回答" class="headerLink">
    <a href="#%e8%af%a6%e7%bb%86%e5%9b%9e%e7%ad%94" class="header-mark"></a>3 详细回答</h2><h3 id="codex-接入-deepseek可行" class="headerLink">
    <a href="#codex-%e6%8e%a5%e5%85%a5-deepseek%e5%8f%af%e8%a1%8c" class="header-mark"></a>3.1 Codex 接入 DeepSeek（可行）</h3><p><code>~/.codex/config.toml</code> 加 provider 定义：</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">model_providers</span><span class="p">.</span><span class="nx">deepseek</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"><span class="nx">name</span> <span class="p">=</span> <span class="s2">&#34;DeepSeek&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nx">base_url</span> <span class="p">=</span> <span class="s2">&#34;https://api.deepseek.com/v1&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nx">env_key</span> <span class="p">=</span> <span class="s2">&#34;DEEPSEEK_API_KEY&#34;</span>
</span></span></code></pre></td></tr></table>
</div>
</div><p>命令行走 <code>codex --provider deepseek --model deepseek-coder</code> 切换。Kimi、GLM、Qwen、Ollama 同理。</p>
<p><strong>坑</strong>：</p>
<ul>
<li>Codex 2026 年 2 月起默认走 Responses API，第三方接口大多只有 Chat Completions，需设 <code>wire_api = &quot;chat&quot;</code>，否则报流式/格式错误</li>
<li>桌面端接 DeepSeek 需要两层本地代理（模型名映射 + Responses→Chat 转换），社区有现成方案</li>
<li>provider ID 区分大小写，模型名前缀写错会被静默忽略走 fallback</li>
</ul>
<h3 id="cloud-code-接入-deepseek基本不可行" class="headerLink">
    <a href="#cloud-code-%e6%8e%a5%e5%85%a5-deepseek%e5%9f%ba%e6%9c%ac%e4%b8%8d%e5%8f%af%e8%a1%8c" class="header-mark"></a>3.2 Cloud Code 接入 DeepSeek（基本不可行）</h3><ul>
<li>Cloud Code（IDE 插件）绑定 Google 生态，不开放自定义模型</li>
<li>Gemini CLI（已开源）原生只认 Gemini；需&quot;魔改版&quot;或 LiteLLM 代理才能接 DeepSeek</li>
<li>且 Gemini CLI 免费版 <strong>2026-06-18 已停用</strong>，个人用户迁移到 Antigravity CLI</li>
</ul>
<h3 id="效果差别外壳一样上限由模型决定" class="headerLink">
    <a href="#%e6%95%88%e6%9e%9c%e5%b7%ae%e5%88%ab%e5%a4%96%e5%a3%b3%e4%b8%80%e6%a0%b7%e4%b8%8a%e9%99%90%e7%94%b1%e6%a8%a1%e5%9e%8b%e5%86%b3%e5%ae%9a" class="header-mark"></a>3.3 效果差别：外壳一样，上限由模型决定</h3><table>
  <thead>
      <tr>
          <th>场景</th>
          <th>效果</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>简单任务、补全、小修改</td>
          <td>DeepSeek 够用，价格低一个量级，性价比最高</td>
      </tr>
      <tr>
          <td>复杂重构、多文件修改</td>
          <td>GPT-5-Codex 工具调用准确率高，DeepSeek 出错率明显上升</td>
      </tr>
      <tr>
          <td>多步 Agent 长任务</td>
          <td>专用模型规划更稳，DeepSeek 容易跑偏</td>
      </tr>
  </tbody>
</table>
<p><strong>结论</strong>：日常小活用 DeepSeek 省钱，大活切回专用模型。Codex 支持多 provider 随时切，opencode 本身 75+ 模型随便换。</p>
<h3 id="彩蛋源码泄露事件的真相" class="headerLink">
    <a href="#%e5%bd%a9%e8%9b%8b%e6%ba%90%e7%a0%81%e6%b3%84%e9%9c%b2%e4%ba%8b%e4%bb%b6%e7%9a%84%e7%9c%9f%e7%9b%b8" class="header-mark"></a>3.4 彩蛋：源码泄露事件的真相</h3><ul>
<li>2026-03-31，Anthropic 的 Claude Code 因 npm 包遗留 59MB source map（<code>cli.js.map</code>），51.2 万行 TypeScript 全曝光（第二次同原因泄露）</li>
<li>大家因此看到：终端 UI 用 React+Ink、Bun 运行时、40+ 工具模块、权限分层</li>
<li><strong>React（2013 年）/ ReAct（2022 年论文）不是泄露&quot;导致&quot;的</strong>，泄露只是让大家看到了顶级 Agent 的工程实现，引发讨论和借鉴</li>
</ul>
<h2 id="知识扩展" class="headerLink">
    <a href="#%e7%9f%a5%e8%af%86%e6%89%a9%e5%b1%95" class="header-mark"></a>4 知识扩展</h2><ul>
<li>DeepSeek API 完全兼容 OpenAI 协议，官方文档有 coding agents 接入指南</li>
<li>Codex config.toml 三级配置：用户级（<code>~/.codex/config.toml</code>）→ 项目级（<code>.codex/config.toml</code>）→ 命令行参数，优先级递增</li>
<li>环境变量方式（<code>OPENAI_BASE_URL</code>）只能配一个 provider，config.toml 支持多 provider 并存切换</li>
</ul>
]]></description></item><item><title>什么是 AI Agent？给小朋友的趣味科普</title><link>https://soybeanmilk.netlify.app/ai-agent%E6%98%AF%E4%BB%80%E4%B9%88/</link><pubDate>Fri, 17 Jul 2026 00:00:00 +0000</pubDate><author><name>作者</name></author><guid>https://soybeanmilk.netlify.app/ai-agent%E6%98%AF%E4%BB%80%E4%B9%88/</guid><description><![CDATA[<blockquote>
<p>读完这篇文章，你就能明白：AI 是怎么从&quot;只会聊天&quot;变成&quot;能帮你做事&quot;的！</p></blockquote>
<h2 id="-一先认识-llm大语言模型" class="headerLink">
    <a href="#-%e4%b8%80%e5%85%88%e8%ae%a4%e8%af%86-llm%e5%a4%a7%e8%af%ad%e8%a8%80%e6%a8%a1%e5%9e%8b" class="header-mark"></a>1 🧠 一、先认识 LLM（大语言模型）</h2><p><strong>LLM</strong> 就像一个<strong>读了超级多书的学霸</strong>。</p>
<p>你问它什么，它都能回答。比如你问：&ldquo;恐龙是怎么灭绝的？&ldquo;它能给你讲得头头是道。</p>
<p>但它有一个大问题：<strong>只会说，不会做</strong>。</p>
<ul>
<li>你让它&quot;帮我订个外卖&rdquo;，它只能告诉你&quot;你可以打开外卖 App 来订&hellip;&quot;——它没法真的帮你下单。</li>
<li>你让它&quot;帮我把作业发到老师邮箱&rdquo;，它也只能告诉你怎么做——它没法真的帮你发。</li>
</ul>
<p>就像一个<strong>有嘴没手的人</strong>，讲得头头是道，但你让它动手做事，它就没办法了。</p>
<h2 id="-二agent-是什么给-llm-装上手和脚" class="headerLink">
    <a href="#-%e4%ba%8cagent-%e6%98%af%e4%bb%80%e4%b9%88%e7%bb%99-llm-%e8%a3%85%e4%b8%8a%e6%89%8b%e5%92%8c%e8%84%9a" class="header-mark"></a>2 🦸 二、Agent 是什么？——给 LLM 装上&quot;手和脚&quot;</h2><p><strong>Agent</strong>（智能体）就是解决了这个问题！</p>
<p>Agent = LLM（大脑）+ 工具（手和脚）+ 记忆 + 规划能力</p>
<h3 id="用一个小故事来理解" class="headerLink">
    <a href="#%e7%94%a8%e4%b8%80%e4%b8%aa%e5%b0%8f%e6%95%85%e4%ba%8b%e6%9d%a5%e7%90%86%e8%a7%a3" class="header-mark"></a>2.1 用一个小故事来理解</h3><ul>
<li><strong>LLM</strong>：像一个只会给你提建议的顾问。你问&quot;怎么收拾房间？&ldquo;他说&quot;先把书放好，再把玩具收起来&hellip;&quot;——但他绝不会动手帮你。</li>
<li><strong>Agent</strong>：像一个能帮你干活的小管家。你说&quot;帮我收拾房间&rdquo;，他会自己去拿扫把、整理书架、把玩具放进箱子，直到房间干干净净！</li>
</ul>
<h3 id="agent-能做什么" class="headerLink">
    <a href="#agent-%e8%83%bd%e5%81%9a%e4%bb%80%e4%b9%88" class="header-mark"></a>2.2 Agent 能做什么？</h3><table>
  <thead>
      <tr>
          <th>LLM 的问题</th>
          <th>Agent 怎么解决</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>只会说不会做</td>
          <td>给 Agent <strong>工具</strong>——能搜索、能发邮件、能操作 App</td>
      </tr>
      <tr>
          <td>没有记忆</td>
          <td>给 Agent <strong>记忆</strong>——能记住你们聊过什么</td>
      </tr>
      <tr>
          <td>不会用工具</td>
          <td>用<strong>标准协议</strong>连接各种工具（比如 MCP）</td>
      </tr>
      <tr>
          <td>不会自己规划</td>
          <td>给 Agent <strong>规划能力</strong>——能把大任务拆成小步骤</td>
      </tr>
  </tbody>
</table>
<h2 id="-三workflow-和-agent-的区别" class="headerLink">
    <a href="#-%e4%b8%89workflow-%e5%92%8c-agent-%e7%9a%84%e5%8c%ba%e5%88%ab" class="header-mark"></a>3 🏭 三、Workflow 和 Agent 的区别</h2><ul>
<li><strong>Workflow</strong>：就像<strong>工厂流水线</strong>——每一步做什么都是提前规定好的，按顺序来。</li>
<li><strong>Agent</strong>：就像<strong>一个聪明的小帮手</strong>——你只告诉它目标，它自己决定怎么做。</li>
</ul>
<p><strong>举个例子：处理退换货</strong></p>
<ul>
<li>Workflow 的做法：每一步都写死在程序里（先查订单→再判断能不能退→然后退款→最后发邮件）</li>
<li>Agent 的做法：收到退货申请后，自己去查订单、看退货政策、判断要不要退款、发邮件——每一步都是它自己决定的！</li>
</ul>
<blockquote>
<p>💡 简单记：<strong>Workflow 是&quot;我告诉你每一步怎么做&quot;，Agent 是&quot;我告诉你目标，你自己想办法&quot;</strong></p></blockquote>
<h2 id="-四agent-的四种工作模式" class="headerLink">
    <a href="#-%e5%9b%9bagent-%e7%9a%84%e5%9b%9b%e7%a7%8d%e5%b7%a5%e4%bd%9c%e6%a8%a1%e5%bc%8f" class="header-mark"></a>4 🎮 四、Agent 的四种工作模式</h2><p>就像小朋友写作业有不同的方式，Agent 也有不同的&quot;干活方式&quot;：</p>
<h3 id="1--react边想边做" class="headerLink">
    <a href="#1--react%e8%be%b9%e6%83%b3%e8%be%b9%e5%81%9a" class="header-mark"></a>4.1 1. 🏃 ReAct（边想边做）</h3><p>学到哪做到哪。先想一步→做一步→看看结果→再想下一步。像玩迷宫游戏，走一步看一步。</p>
<h3 id="2--plan-and-execute先列计划再做" class="headerLink">
    <a href="#2--plan-and-execute%e5%85%88%e5%88%97%e8%ae%a1%e5%88%92%e5%86%8d%e5%81%9a" class="header-mark"></a>4.2 2. 📝 Plan-and-Execute（先列计划再做）</h3><p>先把整个计划写下来，然后一步一步执行。像写作文前先列提纲，再按提纲来写。</p>
<h3 id="3--reflection做完再检查" class="headerLink">
    <a href="#3--reflection%e5%81%9a%e5%ae%8c%e5%86%8d%e6%a3%80%e6%9f%a5" class="header-mark"></a>4.3 3. 🔍 Reflection（做完再检查）</h3><p>做完之后自己再检查一遍，发现问题就改。像考试做完卷子再检查一遍。</p>
<h3 id="4--multi-agent团队合作" class="headerLink">
    <a href="#4--multi-agent%e5%9b%a2%e9%98%9f%e5%90%88%e4%bd%9c" class="header-mark"></a>4.4 4. 👥 Multi-Agent（团队合作）</h3><p>让好几个 Agent 分工合作，各做各擅长的。就像一个小组作业，有人查资料、有人写报告、有人做 PPT。</p>
<h2 id="-五function-callagent-的超能力" class="headerLink">
    <a href="#-%e4%ba%94function-callagent-%e7%9a%84%e8%b6%85%e8%83%bd%e5%8a%9b" class="header-mark"></a>5 🔧 五、Function Call——Agent 的&quot;超能力&quot;</h2><p><strong>Function Call</strong> 就是让 AI 能&quot;打电话&quot;的能力。</p>
<ul>
<li>以前：你问 AI &ldquo;今天天气怎么样？&ldquo;它只能猜。</li>
<li>现在：AI 会&quot;打电话&quot;给天气 App，查到真实数据后再告诉你！</li>
</ul>
<p>就像你问妈妈一个问题，妈妈不知道，但她会打电话问别人，然后再告诉你答案。</p>
<h2 id="-六mcpai-世界的usb-c-接口" class="headerLink">
    <a href="#-%e5%85%admcpai-%e4%b8%96%e7%95%8c%e7%9a%84usb-c-%e6%8e%a5%e5%8f%a3" class="header-mark"></a>6 🔌 六、MCP——AI 世界的&quot;USB-C 接口&rdquo;</h2><p><strong>MCP</strong> 是一个<strong>统一标准</strong>，让 AI 能用同一种方式连接各种工具。</p>
<p>想象一下：</p>
<ul>
<li>以前：每个设备充电都要用自己的充电线（iPhone 用 Lightning、安卓用 Micro-USB&hellip;）——太乱了！</li>
<li>现在：大家都用 USB-C，一根线搞定所有设备。</li>
</ul>
<p>MCP 就是 AI 世界的 USB-C——<strong>一种通用的连接方式</strong>，让 AI 能轻松接入任何工具（搜索、邮件、数据库&hellip;）。</p>
<h2 id="-七skillsai-的菜谱" class="headerLink">
    <a href="#-%e4%b8%83skillsai-%e7%9a%84%e8%8f%9c%e8%b0%b1" class="header-mark"></a>7 📖 七、Skills——AI 的&quot;菜谱&rdquo;</h2><p><strong>Skills</strong> 是教 AI &ldquo;怎么做事&quot;的说明书。</p>
<p>打个比方：</p>
<ul>
<li><strong>MCP</strong> = 厨房里有锅、有刀、有烤箱（工具）</li>
<li><strong>Skills</strong> = 菜谱，告诉你怎么做红烧肉（方法）</li>
</ul>
<p>光有工具不够，还得知道怎么用！Skills 就是在教 Agent：&ldquo;遇到这种情况，你应该这样做&hellip;&rdquo;</p>
<h2 id="-八a2aagent-之间的电话" class="headerLink">
    <a href="#-%e5%85%aba2aagent-%e4%b9%8b%e9%97%b4%e7%9a%84%e7%94%b5%e8%af%9d" class="header-mark"></a>8 🗣️ 八、A2A——Agent 之间的&quot;电话&rdquo;</h2><p><strong>A2A</strong> 是让不同的 Agent 之间能互相聊天、协作的协议。</p>
<p>比如：一个公司里，有 HR Agent（管人事）、IT Agent（管电脑）、财务 Agent（管工资）。新员工入职时，这三个 Agent 需要一起配合。</p>
<p>A2A 就是让它们能互相&quot;打电话&quot;、分配任务的标准方式！</p>
<h2 id="-总结一张图搞定所有概念" class="headerLink">
    <a href="#-%e6%80%bb%e7%bb%93%e4%b8%80%e5%bc%a0%e5%9b%be%e6%90%9e%e5%ae%9a%e6%89%80%e6%9c%89%e6%a6%82%e5%bf%b5" class="header-mark"></a>9 🎯 总结：一张图搞定所有概念</h2><div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span><span class="lnt">18
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">┌──────────────────────────────────────────────┐
</span></span><span class="line"><span class="cl">│                  Agent（智能体）               │
</span></span><span class="line"><span class="cl">│  ┌─────────┐  ┌──────────┐  ┌────────────┐  │
</span></span><span class="line"><span class="cl">│  │ 🧠 大脑  │  │ 📝 规划  │  │ 💾 记忆    │  │
</span></span><span class="line"><span class="cl">│  │  (LLM)  │  │          │  │            │  │
</span></span><span class="line"><span class="cl">│  └─────────┘  └──────────┘  └────────────┘  │
</span></span><span class="line"><span class="cl">│                   ┌──────────────┐           │
</span></span><span class="line"><span class="cl">│                   │ 🔧 工具模块   │           │
</span></span><span class="line"><span class="cl">│                   │ Function Call │           │
</span></span><span class="line"><span class="cl">│                   │ MCP 协议      │           │
</span></span><span class="line"><span class="cl">│                   │ Skills 技能   │           │
</span></span><span class="line"><span class="cl">│                   └──────────────┘           │
</span></span><span class="line"><span class="cl">└──────────────────────────────────────────────┘
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Function Call → 让 AI 能&#34;打电话&#34;（最基础的能力）
</span></span><span class="line"><span class="cl">MCP          → 统一的连接标准（AI 的 USB-C）
</span></span><span class="line"><span class="cl">Skills       → 教 AI 怎么做事（AI 的菜谱）
</span></span><span class="line"><span class="cl">A2A          → Agent 之间的沟通协议（Agent 的电话）
</span></span></code></pre></td></tr></table>
</div>
</div><h2 id="-记住这三句话就够了" class="headerLink">
    <a href="#-%e8%ae%b0%e4%bd%8f%e8%bf%99%e4%b8%89%e5%8f%a5%e8%af%9d%e5%b0%b1%e5%a4%9f%e4%ba%86" class="header-mark"></a>10 🌟 记住这三句话就够了</h2><ol>
<li><strong>LLM 是大脑</strong>：会想会说，但不会做</li>
<li><strong>Agent 是完整的人</strong>：有大脑（LLM）+ 手和脚（工具）+ 记忆 + 计划</li>
<li><strong>Function Call / MCP / Skills / A2A</strong>：都是让 Agent 变得更强的方法</li>
</ol>
]]></description></item></channel></rss>