{"id":11,"date":"2026-05-31T13:37:07","date_gmt":"2026-05-31T05:37:07","guid":{"rendered":"http:\/\/www.tantan.ink\/index.php\/2026\/05\/31\/openai-codex-%e5%85%8d%e8%b4%b9-ollama-%e6%9c%ac%e5%9c%b0%e6%a8%a1%e5%9e%8b-%e9%9b%b6%e6%88%90%e6%9c%ac-ai-%e7%bc%96%e7%a8%8b-agent%ef%bd%9c%e5%ad%a6%e4%b9%a0%e4%b8%8e%e5%ae%9e%e6%88%98%e8%ae%b0\/"},"modified":"2026-05-31T14:21:28","modified_gmt":"2026-05-31T14:21:28","slug":"m4-mac-ollama-codex-cli-local-ai-agent","status":"publish","type":"post","link":"https:\/\/www.tantan.ink\/index.php\/2026\/05\/31\/m4-mac-ollama-codex-cli-local-ai-agent\/","title":{"rendered":"\u5b9e\u6218\u8bb0\u5f55\uff1a\u5728 M4 Mac mini \u4e0a\u7528 Ollama + Codex CLI \u642d\u5efa\u672c\u5730 AI \u7f16\u7a0b Agent\uff08\u9644\u8e29\u5751\u4e0e\u6027\u80fd\u6570\u636e\uff09"},"content":{"rendered":"<h2>\u8d77\u56e0\uff1a\u672c\u5730 AI \u7f16\u7a0b Agent \u7ec8\u4e8e\u80fd\u7528\u4e86<\/h2>\n<p>2026\u5e745\u6708\uff0cOpenAI Codex CLI \u5168\u9762\u514d\u8d39\uff0cOllama 0.24 \u6b63\u5f0f\u9002\u914d Codex App\u3002\u8fd9\u610f\u5473\u7740\u4f60\u672c\u5730\u8dd1\u7684\u5927\u6a21\u578b\u53ef\u4ee5\u76f4\u63a5\u53d8\u6210 AI \u7f16\u7a0b Agent\u2014\u2014\u5168\u7a0b\u79bb\u7ebf\u3001\u96f6 Token \u6d88\u8017\u3002<\/p>\n<p>\u4f5c\u4e3a\u4e00\u4e2a\u5728 M4 Mac mini 16GB \u4e0a\u8dd1\u672c\u5730\u6a21\u578b\u7684\u4eba\uff0c\u6211\u4e4b\u524d\u5c1d\u8bd5\u8fc7\u7528 Continue + Ollama \u505a\u672c\u5730\u4ee3\u7801\u8865\u5168\uff0c\u4f53\u9a8c\u8fd8\u7b97\u80fd\u7528\u3002\u4f46\u8ba9\u672c\u5730\u6a21\u578b\u505a\u5b8c\u6574\u7684 Agent \u4efb\u52a1\uff08\u5206\u6790\u9879\u76ee\u2192\u4fee\u6539\u4ee3\u7801\u2192\u81ea\u52a8\u6d4b\u8bd5\uff09\uff0c\u4e4b\u524d\u57fa\u672c\u4e0d\u73b0\u5b9e\u3002\u5de5\u5177\u8c03\u7528\u6210\u529f\u7387\u592a\u4f4e\uff0c\u591a\u8f6e\u5bf9\u8bdd\u5f88\u5feb\u5c31\u504f\u4e86\u3002<\/p>\n<p>\u8fd9\u6b21\u51b3\u5b9a\u8ba4\u771f\u6d4b\u4e00\u4e0b Codex + Ollama \u5230\u5e95\u5230\u4e86\u4ec0\u4e48\u6c34\u5e73\u3002<\/p>\n<h2>\u5148\u641e\u6e05\u695a Codex CLI \u662f\u4ec0\u4e48<\/h2>\n<p>Codex CLI \u662f OpenAI \u4eca\u5e74\u5f00\u6e90\u7684\u7ec8\u7aef AI \u7f16\u7a0b Agent\uff0c<strong>Apache 2.0 \u534f\u8bae<\/strong>\uff0cGitHub 87k+ stars\u3002\u5b83\u8ddf ChatGPT \u7f51\u9875\u7248\u91cc\u7684\u4ee3\u7801\u89e3\u91ca\u4e0d\u540c\u2014\u2014\u8fd9\u662f\u4e00\u4e2a\u771f\u6b63\u7684<strong>Agent \u6846\u67b6<\/strong>\uff1a<\/p>\n<ul>\n<li><strong>Rust \u91cd\u5199\u7684 CLI<\/strong>\uff1a\u6027\u80fd\u8fdc\u597d\u4e8e Python \u7cfb Agent \u5de5\u5177<\/li>\n<li><strong>\u539f\u751f\u6c99\u7bb1<\/strong>\uff1amacOS \u8d70 Seatbelt \u6846\u67b6\uff0cLinux \u8d70 bubblewrap\uff0cWindows \u8d70 Windows Sandbox\u3002\u4e0d\u662f Docker \u90a3\u79cd\u91cd\u91cf\u7ea7\u9694\u79bb\uff0c\u800c\u662f OS \u7ea7\u8f7b\u91cf\u6c99\u7bb1<\/li>\n<li><strong>\u4e09\u5c42\u5b89\u5168\u6a21\u5f0f<\/strong>\uff1aread-only \/ workspace-write \/ danger-full-access\uff0c\u53ef\u6309\u9879\u76ee\u914d\u7f6e<\/li>\n<li><strong>Hooks \u7cfb\u7edf<\/strong>\uff1a6 \u79cd\u4e8b\u4ef6\u94a9\u5b50\uff08SessionStart \/ PreToolUse \/ PostToolUse \/ PermissionRequest \/ SubagentStart \u7b49\uff09\uff0c\u53ef\u4ee5\u62e6\u622a\u548c\u4fee\u6539\u5de5\u5177\u8c03\u7528<\/li>\n<li><strong>Subagent \u5e76\u884c\u67b6\u6784<\/strong>\uff1a\u652f\u6301\u591a\u5b50\u4ee3\u7406\u5e76\u884c\u5904\u7406\u4efb\u52a1<\/li>\n<li><strong>\u5ba1\u6279\u7b56\u7565<\/strong>\uff1auntrusted \/ on-request \/ never \u4e09\u79cd\uff0c\u8fd8\u6709 Auto-review \u81ea\u52a8\u5ba1\u6279<\/li>\n<\/ul>\n<p>\u8ddf Claude Code\u3001Aider\u3001Cursor Agent \u76f8\u6bd4\uff0cCodex CLI \u6700\u72ec\u7279\u7684\u662f\u5b83\u7684\u6c99\u7bb1\u548c Hooks \u7cfb\u7edf\u2014\u2014\u5176\u4ed6\u5de5\u5177\u57fa\u672c\u6ca1\u6709\u8fd9\u5c42\u9632\u62a4\u3002<\/p>\n<h2>macOS \u90e8\u7f72\u5b9e\u6218<\/h2>\n<h3>1. \u5b89\u88c5 Codex CLI<\/h3>\n<pre><code># macOS \u4e09\u79cd\u65b9\u5f0f\u4efb\u9009\nbrew install codex\n# \u6216\ncurl -fsSL https:\/\/openai.com\/codex\/install.sh | sh\n# \u6216\u76f4\u63a5\u4e0b\u8f7d\u4e8c\u8fdb\u5236\n# https:\/\/openai.com\/zh-Hans-CN\/codex\/<\/code><\/pre>\n<h3>2. \u5347\u7ea7 Ollama \u5230 0.24+<\/h3>\n<p>\u8fd9\u4e00\u6b65<strong>\u5fc5\u987b\u505a<\/strong>\u3002\u53ea\u6709 0.24 \u7248\u672c\u624d\u5b8c\u5168\u9002\u914d Codex App\uff082026\u5e745\u670814\u65e5\u53d1\u5e03\uff09\u3002\u65e7\u7248\u7684 <code>ollama launch codex-app<\/code> \u4f1a\u62a5\u9519\u6216\u884c\u4e3a\u5f02\u5e38\u3002<\/p>\n<pre><code>brew upgrade ollama\n# \u786e\u8ba4\u7248\u672c\nollama --version  # \u5e94\u663e\u793a 0.24 \u6216\u66f4\u9ad8<\/code><\/pre>\n<h3>3. \u9009\u6a21\u578b<\/h3>\n<p>\u8fd9\u662f\u6700\u5173\u952e\u7684\u4e00\u6b65\u3002\u6211\u6d4b\u8bd5\u4e86\u4e09\u4e2a\u6a21\u578b\u7684\u5b9e\u9645\u8868\u73b0\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>\u6a21\u578b<\/th>\n<th>\u53c2\u6570\u91cf<\/th>\n<th>\u5de5\u5177\u8c03\u7528\u6210\u529f\u7387<\/th>\n<th>\u4ee3\u7801\u8d28\u91cf<\/th>\n<th>\u5185\u5b58\u5360\u7528<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Qwen3.6:27b-mlx<\/strong><\/td>\n<td>27B<\/td>\n<td>\u2b50\u2b50\u2b50\u2b50<\/td>\n<td>\u2b50\u2b50\u2b50\u2b50<\/td>\n<td>~16GB<\/td>\n<\/tr>\n<tr>\n<td><strong>Gemma4:26b-mlx<\/strong><\/td>\n<td>26B (3.8B\u6d3b\u8dc3MoE)<\/td>\n<td>\u2b50\u2b50\u2b50\u2b50<\/td>\n<td>\u2b50\u2b50\u2b50\u2b50\u2b50<\/td>\n<td>~12GB<\/td>\n<\/tr>\n<tr>\n<td><strong>gpt-oss:20b<\/strong><\/td>\n<td>20B<\/td>\n<td>\u2b50\u2b50\u2b50<\/td>\n<td>\u2b50\u2b50\u2b50<\/td>\n<td>~14GB<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6211\u6700\u7ec8\u9009\u62e9\u4e86 <strong>Gemma4:26b-mlx<\/strong>\u3002\u7406\u7531\uff1a<\/p>\n<ul>\n<li>LiveCodeBench v6 \u5f97\u5206 <strong>77.1<\/strong>\uff08Qwen3.6 27B \u65e0\u516c\u5f00\u53ef\u6bd4\u6570\u636e\uff0c\u4f46\u5b9e\u9645\u4f53\u611f Gemma 4 \u5728\u4ee3\u7801\u8865\u5168\u4e00\u81f4\u6027\u4e0a\u7565\u597d\uff09<\/li>\n<li>Codeforces ELO <strong>1718<\/strong>\uff0c\u5df2\u7ecf\u8fbe\u5230\u4eba\u7c7b\u7ade\u8d5b\u9009\u624b\u6c34\u5e73<\/li>\n<li><strong>MoE \u67b6\u6784<\/strong>\uff1a26B \u603b\u53c2\u6570\u4f46\u6bcf\u6b21\u63a8\u7406\u53ea\u6fc0\u6d3b 3.8B\uff0c<strong>12GB \u5c31\u80fd\u8dd1<\/strong>\uff0cM4 16GB \u7ef0\u7ef0\u6709\u4f59<\/li>\n<li>\u539f\u751f function-calling \u652f\u6301\uff0c\u5bf9 Agent \u573a\u666f\u4f18\u5316\u8fc7<\/li>\n<\/ul>\n<p>macOS Apple Silicon \u7528\u6237\u8bb0\u5f97\u9009 <code>-mlx<\/code> \u540e\u7f00\u7248\u672c\uff0cMLX \u52a0\u901f\u5728 M4 \u4e0a\u7684 token \u751f\u6210\u901f\u5ea6\u6bd4 llama.cpp \u540e\u7aef\u5feb 30-50%\u3002<\/p>\n<h3>4. \u542f\u52a8<\/h3>\n<pre><code>ollama launch codex-app --model gemma4:26b-mlx<\/code><\/pre>\n<p>\u7136\u540e Codex App \u684c\u9762\u7a97\u53e3\u5c31\u51fa\u6765\u4e86\u3002\u6ce8\u610f <code>--restore<\/code> \u53c2\u6570\u53ef\u4ee5\u6062\u590d\u4e4b\u524d\u7528\u8fc7\u7684\u6a21\u578b\u914d\u7f6e\uff0c\u4e0d\u9700\u8981\u6bcf\u6b21\u90fd\u91cd\u65b0\u6307\u5b9a\u3002<\/p>\n<h2>\u5b9e\u6d4b\uff1a\u4e09\u4e2a\u4efb\u52a1\u770b\u771f\u5b9e\u80fd\u529b<\/h2>\n<h3>\u4efb\u52a1\u4e00\uff1a\u8ba9\u5b83\u8bfb\u4e00\u4e2a\u964c\u751f\u7684\u5f00\u6e90\u9879\u76ee<\/h3>\n<p>\u6211\u7ed9\u5b83\u4e00\u4e2a\u6211\u4e4b\u524d\u6ca1\u770b\u8fc7\u4ee3\u7801\u7684 Rust CLI \u5de5\u5177\uff08~3000 \u884c\u4ee3\u7801\uff09\uff0c\u8ba9\u5b83\uff1a<\/p>\n<ol>\n<li>\u5206\u6790\u9879\u76ee\u7ed3\u6784<\/li>\n<li>\u627e\u51fa\u6240\u6709 CLI \u5b50\u547d\u4ee4\u548c\u53c2\u6570<\/li>\n<li>\u753b\u8c03\u7528\u6d41\u7a0b\u56fe<\/li>\n<li>\u627e\u51fa\u53ef\u80fd\u7684\u6027\u80fd\u74f6\u9888<\/li>\n<\/ol>\n<p><strong>\u7ed3\u679c<\/strong>\uff1a\u524d3\u6b65\u5b8c\u6210\u5f97\u5f88\u597d\u2014\u2014\u9879\u76ee\u7ed3\u6784\u5206\u6790\u51c6\u786e\uff0c\u5b50\u547d\u4ee4\u8bc6\u522b\u5b8c\u6574\uff0cMermaid \u6d41\u7a0b\u56fe\u53ef\u4ee5\u76f4\u63a5\u7528\u3002\u7b2c4\u6b65\u6bd4\u8f83\u6c34\uff0c\u7ed9\u4e86\u51e0\u4e2a\u6cdb\u6cdb\u7684\u5efa\u8bae\uff08&#8221;\u8003\u8651\u7528 async IO&#8221; \u4e4b\u7c7b\uff09\uff0c\u6ca1\u6709\u771f\u6b63\u5b9a\u4f4d\u5230\u5177\u4f53\u4ee3\u7801\u884c\u3002\u8fd9\u66b4\u9732\u4e86\u672c\u5730\u6a21\u578b\u7684\u5178\u578b\u5c40\u9650\uff1a<strong>\u5206\u6790\u6027\u4efb\u52a1\u8fd8\u884c\uff0c\u6df1\u5ea6\u4f18\u5316\u5efa\u8bae\u4ecd\u9700\u5927\u6a21\u578b<\/strong>\u3002<\/p>\n<h3>\u4efb\u52a1\u4e8c\uff1a\u4ece\u96f6\u5199\u4e00\u4e2a p5.js \u4ea4\u4e92\u53ef\u89c6\u5316<\/h3>\n<p>\u8ba9\u5b83\u5199\u4e00\u4e2a\u5e26\u7c92\u5b50\u6548\u679c\u7684\u97f3\u4e50\u53ef\u89c6\u5316\u9875\u9762\u3002Agent \u81ea\u52a8\u521b\u5efa\u4e86 HTML + JS\uff0c\u80fd\u8dd1\u3002\u7c92\u5b50\u8fd0\u52a8\u8f68\u8ff9\u6b63\u786e\uff0c\u989c\u8272\u6e10\u53d8\u4e5f\u5bf9\u3002<\/p>\n<p>\u4f46\u5904\u7406\u97f3\u9891\u8f93\u5165\u65f6\u76f4\u63a5\u7528\u4e86 Web Audio API \u7684\u9ed8\u8ba4 FFT \u8bbe\u7f6e\uff0c\u6ca1\u6709\u505a\u9891\u7387\u52a0\u6743\u2014\u2014\u5982\u679c\u4f60\u7ed9\u4e13\u4e1a\u97f3\u9891\u5de5\u7a0b\u5e08\u770b\uff0c\u4f1a\u89c9\u5f97\u592a\u7b80\u964b\u3002\u8fd9\u5c31\u662f\u672c\u5730 Agent \u548c Claude \u8fd9\u79cd\u5927\u6a21\u578b\u7684\u8d28\u91cf\u5dee\u8ddd\uff1a<strong>\u529f\u80fd\u80fd\u8dd1\uff0c\u4f46\u7ec6\u8282\u6253\u78e8\u4e0d\u591f<\/strong>\u3002<\/p>\n<h3>\u4efb\u52a1\u4e09\uff1a\u7ed9\u8fd9\u4e2a\u535a\u5ba2\u5199\u4e00\u4e2a Python \u811a\u672c\uff0c\u81ea\u52a8\u5907\u4efd WordPress \u5230\u672c\u5730<\/h3>\n<p>\u8fd9\u662f\u6211\u6545\u610f\u8bbe\u7684\u9677\u9631\u9898\u2014\u2014\u5b83\u9700\u8981\uff1a\u7406\u89e3 WordPress \u6587\u4ef6\u7ed3\u6784\u3001\u5199 mysqldump \u547d\u4ee4\u3001\u5904\u7406\u5bc6\u7801\u5b89\u5168\u3001\u52a0\u9519\u8bef\u5904\u7406\u3002<\/p>\n<p>Agent \u5199\u4e86 80 \u884c Python\uff0c\u903b\u8f91\u6b63\u786e\uff0cmysqldump \u547d\u4ee4\u4e5f\u5bf9\u3002\u4f46\u5b83\u628a\u6570\u636e\u5e93\u5bc6\u7801\u786c\u7f16\u7801\u5728\u811a\u672c\u91cc\u4e86\uff08\u6211\u6545\u610f\u6ca1\u5728 prompt \u91cc\u63d0\u9192\u5b89\u5168\u95ee\u9898\uff09\u3002\u8fd9\u518d\u6b21\u8bf4\u660e\uff1a<strong>\u8ba9\u672c\u5730 Agent \u5199\u751f\u4ea7\u7ea7\u4ee3\u7801\uff0c\u5b89\u5168\u5ba1\u67e5\u4e0d\u80fd\u7701\u7565<\/strong>\u3002<\/p>\n<h2>\u8e29\u8fc7\u7684\u5751<\/h2>\n<p>\u5728\u7528 Ollama + Codex \u7684\u8fc7\u7a0b\u4e2d\uff0c\u9047\u5230\u4e86\u51e0\u4e2a\u503c\u5f97\u4e00\u63d0\u7684\u95ee\u9898\uff1a<\/p>\n<ul>\n<li><strong>\u6a21\u578b metadata \u7f3a\u5931<\/strong>\uff1aGemma4:26b-mlx \u7684\u6a21\u578b\u5143\u6570\u636e\u4e0d\u5b8c\u6574\uff0cCodex \u6709\u65f6\u4f1a\u964d\u7ea7\u5230 fallback metadata\uff0c\u5bfc\u81f4\u5de5\u5177\u8c03\u7528\u683c\u5f0f\u4e0d\u5339\u914d\u3002\u91cd\u542f Ollama \u670d\u52a1\u53ef\u4ee5\u4e34\u65f6\u7f13\u89e3<\/li>\n<li><strong>\u4e0a\u4e0b\u6587\u7a97\u53e3\u81a8\u80c0<\/strong>\uff1a\u957f\u4f1a\u8bdd\u4e2d Agent \u4f1a\u5ffd\u7565 <code>num_ctx<\/code> \u8bbe\u7f6e\uff0c\u751f\u6210\u8fc7\u5927\u7684 context_window\uff0c\u5bfc\u81f4 M4 16GB \u5185\u5b58\u538b\u529b\u7206\u589e\u3002\u5efa\u8bae\u957f\u4efb\u52a1\u5206\u591a\u6b21\u4f1a\u8bdd<\/li>\n<li><strong>MCP \u5de5\u5177\u4e0d\u517c\u5bb9<\/strong>\uff1aCodex \u5305\u88c5 MCP tools \u4e3a namespace \u683c\u5f0f\uff0c\u672c\u5730\u6a21\u578b\u540e\u7aef\u7ecf\u5e38\u89e3\u6790\u4e0d\u4e86\u3002\u76ee\u524d MCP + Ollama \u7684\u7ec4\u5408\u8fd8<strong>\u4e0d\u7a33\u5b9a<\/strong><\/li>\n<li><strong>\u65e0\u9650\u5faa\u73af<\/strong>\uff1a\u9047\u5230\u8fc7 1 \u6b21 Agent \u9677\u5165\u4fee\u8865\u2192\u62a5\u9519\u2192\u4fee\u8865\u7684\u6b7b\u5faa\u73af\u3002\u6309 Esc \u4e2d\u65ad\u540e\u624b\u52a8\u5f15\u5bfc\u53ef\u4ee5\u6062\u590d<\/li>\n<\/ul>\n<p>\u5efa\u8bae\u5173\u6ce8 <a href=\"https:\/\/github.com\/openai\/codex\/issues\">openai\/codex issues<\/a> \u548c <a href=\"https:\/\/github.com\/ollama\/ollama\/issues\">ollama\/ollama issues<\/a> \u8ddf\u8e2a\u6700\u65b0\u517c\u5bb9\u6027\u72b6\u6001\u3002\u8fd9\u4e2a\u751f\u6001\u8fd8\u5728\u5feb\u901f\u8fed\u4ee3\u4e2d\u3002<\/p>\n<h2>\u672c\u5730 Agent \u7684\u80fd\u529b\u8fb9\u754c<\/h2>\n<p>\u6839\u636e\u6211\u8fd9\u51e0\u5929\u7684\u6d4b\u8bd5\u548c GitHub issues \u7684\u53cd\u9988\uff0c\u53ef\u4ee5\u603b\u7ed3\u51fa\u5f53\u524d\u7684<strong>\u80fd\u529b\u8fb9\u754c<\/strong>\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>\u4efb\u52a1\u7c7b\u578b<\/th>\n<th>\u672c\u5730 20-30B \u6a21\u578b<\/th>\n<th>\u4e91\u7aef GPT-5\/Claude<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u7b80\u5355 CRUD \u4ee3\u7801\u751f\u6210<\/td>\n<td>\u2705 \u591f\u7528<\/td>\n<td>\u2705 \u5b8c\u7f8e<\/td>\n<\/tr>\n<tr>\n<td>\u9879\u76ee\u7ed3\u6784\u5206\u6790<\/td>\n<td>\u2705 \u9760\u8c31<\/td>\n<td>\u2705 \u9760\u8c31<\/td>\n<\/tr>\n<tr>\n<td>Bug \u5b9a\u4f4d\uff08\u6709\u660e\u786e\u62a5\u9519\uff09<\/td>\n<td>\u2705 \u57fa\u672c\u591f\u7528<\/td>\n<td>\u2705 \u66f4\u51c6\u786e<\/td>\n<\/tr>\n<tr>\n<td>\u67b6\u6784\u8bbe\u8ba1\u5efa\u8bae<\/td>\n<td>\u26a0\ufe0f \u6cdb\u6cdb\u800c\u8c08<\/td>\n<td>\u2705 \u6709\u6df1\u5ea6<\/td>\n<\/tr>\n<tr>\n<td>\u5b89\u5168\u5ba1\u8ba1<\/td>\n<td>\u274c \u4e0d\u53ef\u9760<\/td>\n<td>\u26a0\ufe0f \u9700\u4eba\u5ba1<\/td>\n<\/tr>\n<tr>\n<td>\u590d\u6742\u591a\u6587\u4ef6\u91cd\u6784<\/td>\n<td>\u274c \u5bb9\u6613\u504f<\/td>\n<td>\u2705 \u76f8\u5bf9\u7a33\u5b9a<\/td>\n<\/tr>\n<tr>\n<td>\u4ece\u96f6\u5efa\u9879\u76ee<\/td>\n<td>\u26a0\ufe0f \u80fd\u8dd1\u4f46\u4e0d\u7cbe\u81f4<\/td>\n<td>\u2705 \u8d28\u91cf\u9ad8<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u7b80\u5355\u8bf4\uff1a<strong>20B \u7ea7\u522b\u7684\u672c\u5730\u6a21\u578b\uff0c\u80fd\u505a 70% \u7684\u65e5\u5e38\u7f16\u7a0b\u8f85\u52a9\u4efb\u52a1\uff0c\u4f46\u5269\u4e0b 30% \u7684\u590d\u6742\u573a\u666f\u8fd8\u662f\u9700\u8981\u4e91\u7aef\u5927\u6a21\u578b<\/strong>\u3002\u8fd9\u4e0d\u662f\u8d2c\u4f4e\u672c\u5730 AI\u2014\u2014\u6070\u6070\u76f8\u53cd\uff0c\u80fd\u9760\u4e00\u53f0 M4 Mac mini \u5b8c\u6210 70% \u7684\u4efb\u52a1\uff0c\u800c\u4e14\u96f6\u6210\u672c\u3001\u65ad\u7f51\u53ef\u7528\uff0c\u8fd9\u5df2\u7ecf\u5f88\u60ca\u4eba\u4e86\u3002<\/p>\n<h2>Ollama \u6b63\u5728\u6210\u4e3a\u672c\u5730 AI Agent \u7684\u64cd\u4f5c\u7cfb\u7edf<\/h2>\n<p>Ollama 0.24 \u7684\u4e00\u4e2a\u5173\u952e\u53d8\u5316\u662f <code>ollama launch<\/code> \u547d\u4ee4\u7684\u6269\u5c55\u3002\u4ee5\u524d\u5b83\u53ea\u662f\u4e00\u4e2a\u6a21\u578b\u52a0\u8f7d\u5668\uff0c\u73b0\u5728\u5b83\u6b63\u5728\u53d8\u6210<strong>\u672c\u5730 Agent \u7684\u7edf\u4e00\u5165\u53e3<\/strong>\uff1a<\/p>\n<pre><code># \u76ee\u524d\u652f\u6301\u7684 Agent \u5de5\u5177\nollama launch codex-app    # OpenAI Codex \u684c\u9762\u7248\nollama launch claude       # Claude Code \u5bf9\u63a5\nollama launch codex        # Codex CLI\nollama launch opencode     # OpenCode\nollama launch openclaw     # OpenClaw\nollama launch hermes       # Hermes Agent<\/code><\/pre>\n<p>\u8fd9\u610f\u5473\u7740\u6a21\u578b\u548c Agent \u5de5\u5177\u7684\u7ed1\u5b9a\u5173\u7cfb\u6b63\u5728\u88ab\u89e3\u8026\u2014\u2014\u4f60\u53ef\u4ee5\u5728\u540c\u4e00\u4e2a\u6a21\u578b\u4e0a\u5207\u6362\u4e0d\u540c\u7684 Agent \u524d\u7aef\uff0c\u4e5f\u53ef\u4ee5\u5728\u4e0d\u540c\u6a21\u578b\u4e4b\u95f4\u5207\u6362\u540c\u4e00\u4e2a Agent\u30025\u670828\u65e5\u521a\u53d1\u5e03\u7684 <a href=\"https:\/\/github.com\/stanford-futuredata\/openjarvis\">OpenJarvis v1.0<\/a>\uff08Stanford \u51fa\u54c1\uff09\u4e5f\u662f\u8fd9\u4e2a\u8d8b\u52bf\u7684\u4ee3\u8868\uff1alocal-first \u7684\u4e2a\u4eba AI Agent \u6846\u67b6\uff0c\u76f4\u63a5\u5185\u7f6e Ollama \u652f\u6301\u3002<\/p>\n<h2>\u603b\u7ed3<\/h2>\n<p>\u5982\u679c\u628a AI \u7f16\u7a0b\u5de5\u5177\u7684\u53d1\u5c55\u5206\u6210\u4e09\u4e2a\u9636\u6bb5\uff1a<\/p>\n<ol>\n<li><strong>\u4ee3\u7801\u8865\u5168<\/strong>\uff08Copilot \u65f6\u4ee3\uff09\u2014\u2014 AI \u5e2e\u4f60\u5199\u4e0b\u4e00\u884c<\/li>\n<li><strong>\u5bf9\u8bdd\u5f0f\u7f16\u7a0b<\/strong>\uff08ChatGPT\/Claude \u65f6\u4ee3\uff09\u2014\u2014 AI \u56de\u7b54\u4f60\u7684\u95ee\u9898<\/li>\n<li><strong>Agent \u6267\u884c<\/strong>\uff08\u73b0\u5728\uff09\u2014\u2014 AI \u771f\u6b63\u5f00\u59cb\u5e72\u6d3b<\/li>\n<\/ol>\n<p>\u6211\u4eec\u73b0\u5728\u6b63\u5904\u5728 2\u21923 \u7684\u8fc7\u6e21\u671f\u3002Ollama + Codex \u7684\u7ec4\u5408\u8ba9\u8fd9\u4e2a\u8fc7\u6e21\u53ef\u4ee5\u5728<strong>\u672c\u5730<\/strong>\u3001<strong>\u514d\u8d39<\/strong>\u3001<strong>\u79bb\u7ebf<\/strong>\u5730\u53d1\u751f\u3002\u867d\u7136\u8fd8\u6709\u5f88\u591a\u7c97\u7cd9\u7684\u5730\u65b9\uff0c\u4f46\u8fd9\u5df2\u7ecf\u662f\u666e\u901a\u4eba\u7528\u4e00\u53f0\u666e\u901a\u7535\u8111\u5c31\u80fd\u8dd1\u8d77\u6765\u7684 AI Agent \u4e86\u3002<\/p>\n<p>\u4e0b\u4e00\u6b65\u6211\u4f1a\u6301\u7eed\u6d4b\u8bd5\uff1allama.cpp \u76f4\u63a5\u5bf9\u63a5 Codex\uff08\u7ed5\u8fc7 Ollama\uff09\u3001\u8d8a\u72f1\u7248\u6a21\u578b\u5728 Agent \u573a\u666f\u7684\u8868\u73b0\u3001\u4ee5\u53ca\u80fd\u4e0d\u80fd\u628a Codex Agent \u63a5\u5165\u6211\u7684\u535a\u5ba2\u81ea\u52a8\u53d1\u5e03\u6d41\u7a0b\u3002\u5982\u679c\u6709\u4ec0\u4e48\u65b0\u53d1\u73b0\uff0c\u4f1a\u7ee7\u7eed\u8bb0\u5f55\u5728\u8fd9\u91cc\u3002<\/p>\n<h2>\u53c2\u8003<\/h2>\n<ul>\n<li><a href=\"https:\/\/openai.com\/zh-Hans-CN\/codex\/\">OpenAI Codex \u5b98\u7f51<\/a><\/li>\n<li><a href=\"https:\/\/ollama.com\/\">Ollama \u5b98\u7f51<\/a><\/li>\n<li><a href=\"https:\/\/developers.openai.com\/codex\/concepts\/sandboxing\">Codex \u6c99\u7bb1\u6587\u6863<\/a><\/li>\n<li><a href=\"https:\/\/developers.openai.com\/codex\/hooks\">Codex Hooks \u6587\u6863<\/a><\/li>\n<li><a href=\"https:\/\/ollama.com\/library\/qwen3.6\">Qwen3.6 on Ollama<\/a><\/li>\n<li><a href=\"https:\/\/ollama.com\/library\/gemma4\">Gemma 4 on Ollama<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openai\/codex\">Codex CLI GitHub (87k+ stars)<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/stanford-futuredata\/openjarvis\">OpenJarvis &#8211; Stanford \u672c\u5730 Agent \u6846\u67b6<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u8d77\u56e0\uff1a\u672c\u5730 AI \u7f16\u7a0b Agent \u7ec8\u4e8e\u80fd\u7528\u4e86 2026\u5e745\u6708\uff0cOpenAI Codex CLI \u5168\u9762\u514d\u8d39\uff0cO &#8230; <a title=\"\u5b9e\u6218\u8bb0\u5f55\uff1a\u5728 M4 Mac mini \u4e0a\u7528 Ollama + Codex CLI \u642d\u5efa\u672c\u5730 AI \u7f16\u7a0b Agent\uff08\u9644\u8e29\u5751\u4e0e\u6027\u80fd\u6570\u636e\uff09\" class=\"read-more\" href=\"https:\/\/www.tantan.ink\/index.php\/2026\/05\/31\/m4-mac-ollama-codex-cli-local-ai-agent\/\" aria-label=\"\u9605\u8bfb \u5b9e\u6218\u8bb0\u5f55\uff1a\u5728 M4 Mac mini \u4e0a\u7528 Ollama + Codex CLI \u642d\u5efa\u672c\u5730 AI \u7f16\u7a0b Agent\uff08\u9644\u8e29\u5751\u4e0e\u6027\u80fd\u6570\u636e\uff09\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[6,3,8,4,7,5],"class_list":["post-11","post","type-post","status-publish","format-standard","hentry","category-ai","tag-ai-agent","tag-codex","tag-gemma4","tag-ollama","tag-qwen3-6","tag-ai"],"_links":{"self":[{"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/posts\/11","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/comments?post=11"}],"version-history":[{"count":0,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/posts\/11\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/media?parent=11"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/categories?post=11"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/tags?post=11"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}