三只貓
Rich Mindset Zone
richmindsetzone.com
← All posts

Agent 生產化嘅 Missing Pieces:100 個開源 Agent 但冇個用得落 Production

Agent 生產化嘅 Missing Pieces:100 個開源 Agent 但冇個用得落 Production

2025 年到而家,GitHub 上每個月都有十幾個新嘅 AI Agent 框架冒起——有啲自稱「AutoGPT 殺手」,有啲話自己「比 LangChain 快 10 倍」,仲有啲直接將「AGI」寫喺 README 第一行。我數過,打正旗號做「通用 AI Agent」嘅開源項目已經超過一百個。但如果你係 CTO,諗住揀一個放入你嘅 Production 環境,你會好快發現一個殘酷事實:呢一百個 Agent,冇一個真係用得落 Production。

點解?因為 Agent 嘅開發者社群仲沉迷喺「畀個 prompt 佢就會自己諗」嘅 demo 思維,而企業要嘅係「畀個 prompt 佢唔會炒咗成個 Production DB」。呢篇文章我會用五個真正解決 Production 問題嘅開源項目——AgentField、Bernstein、HybridClaw、HOL Guard 同 Sortie——嚟說明 Agent 生產化需要嘅 missing pieces,同埋點解呢啲 infra 層工具先係企業真正需要嘅。

Agent 嘅「Demo 之死」:你睇到嘅同 Reality 嘅距離

做一個識得同你傾偈、幫你查吓天氣、寫首詩嘅 Agent demo,一個周末就搞得掂。用任何一個流行框架,十幾行 code 就 call 到 LLM,再加個 tool calling 就好似好犀利。但係當你要將呢個 Agent 放入 Production,問題就全部浮面:你點樣確保佢每次 call 外部工具都係安全嘅?佢做咗乜嘢決策,你可唔可以追溯?如果佢行錯咗一步,你可唔可以 rollback 而唔係成個 session 取消?佢產生嘅 output,你可唔可以保證格式正確、唔會漏走用戶敏感資料?

呢啲問題唔係「揀個好啲嘅模型」就能解決。呢啲係 infrastructure 問題,係系統設計問題,係你點樣將 Agent 當做一個正式嘅 API service 去營運嘅問題。而呢個 gap,正正係一百個開源 Agent 框架完全忽略咗嘅。

AgentField:將 Agent 當 API 咁 Deploy

AgentField 嘅做法係直接將每個 agent function 變做 REST endpoint,每個 agent 俾個 cryptographc identity(W3C DID)。呢個諗法聽落簡單,但實際上係 fundamental 嘅 paradigm shift——你唔再係「寫一個 agent 然後希望佢 Work」,而係「定義一組可以被 routing、monitoring、versioning 嘅 API endpoint,背後由 agent logic 實現」。

佢核心嘅 infrastructure 功能先係真正值錢嘅嘢:canary deployment、A/B testing、blue-green rollout——呢啲我哋喺 microservices 世界用咗十年嘅嘢,終於有人搬過嚟 Agent 世界。仲有 human-in-the-loop 嘅 durable pause/resume 同 approval workflow,唔再係 Agent 自己做晒決定然後你要信佢。

記憶系統用 KV + vector search,四個 scope,唔使 Redis。每個 agent 嘅 output 經過 Pydantic/Zod schema enforcement,唔會畀個 agent 亂咁噏 structured data。仲有 Verifiable Credentials 做 tamper-proof audit trail——所有 agent 決策全部有人簽名,冇得改。

如果你係諗住將 Agent 放入 Production 嘅人,AgentField 俾到你嘅唔係「寫 agent 快啲」,而係「deploy agent 安全啲、可控啲」。呢個分別就係 weekend project 同 production system 嘅距離。

Bernstein:唔係日誌,係鏈式審計

Bernstein 嘅角度更加純粹:佢完全 focus 喺 audit 同 compliance。佢支援 Claude Code、Codex、Gemini CLI 同超過 40 個 agent,而佢嘅核心賣點係 HMAC-chain audit log。

乜嘢係 HMAC-chain?即係每一條 audit log entry 都用前一條嘅 hash 加上當前 event 嘅 HMAC 簽名去產生下一條嘅 hash。呢個做法確保咗 audit log 係 tamper-evident——你冇得中間插入或者刪除任何一條 entry 而唔被 detect。呢個對於金融、醫療、或者任何需要 regulatory compliance 嘅行業嚟講,唔係 nice-to-have,係 must-have。

Bernstein 仲有 signed agent cards 同 per-artefact lineage tracking,即係每一個 agent 產生嘅 output artifact,你都可以追溯到係邊個 agent、喺邊個 session、用邊個 model、輸入咗啲乜嘢先產生出嚟。佢仲支援 air-gap deploy,即係你 offline 嘅環境都可以行到。

呢個層次嘅 audit 能力,係目前絕大多數 Agent 框架完全冇考慮過嘅。但諗深一層,如果你嘅 Agent 會 access 客戶資料、會做 financial decision、會寫 code 然後 deploy,你點可能冇呢啲嘢?

HybridClaw:Sandbox 唔係 Bonus,係 Baseline

HybridClaw 嘅定位係 enterprise self-hosted AI assistant runtime。佢支援 Discord、Slack、Signal、WhatsApp、Telegram、Teams、Email、Web — 成個通訊渠道 matrix 幾乎 cover 晒。但真正值錢嘅係佢嘅安全架構。

Sandboxed execution — 每個 agent 嘅 tool action 喺一個 isolation 嘅 sandbox 入面行,唔會影響 host system。Encrypted secrets — credential 唔係 plaintext 放喺 config file,而係 encrypted at rest 同 in transit。Output guardrails — agent 唔可以隨便 output 任何嘢,要過 filter。Audit trails — 所有嘢有紀錄。Admin surface — 你可以睇到系統入面發生緊乜嘢事。

呢啲功能每一樣都好「唔靚仔」,唔會令你整到個好靚嘅 demo video 上 Twitter。但每一樣都係企業話「OK 我信得過你個 system」之前一定要有嘅嘢。特別係 sandbox 呢樣嘢 — 你嘅 Agent 要 call 外部 API、要 read/write files、要執行 command,如果冇 sandbox,每一個 action 都係一次 security incident waiting to happen。

HybridClaw 仲支援 A2A protocol(Agent-to-Agent),即係唔同 agent 之間可以安全通訊,唔使經過一個 central orchestrator 做 bottleneck。呢個對於多 agent 系統嘅 scalability 同 resilience 好重要。

HOL Guard 同 Sortie:從 Guardrails 到 Pipeline

HOL Guard 嘅定位特別有意思:佢係「AI agent 嘅防毒軟件」。佢喺每個 tool action 執行之前 intercept,然後決定 allow 定 block,有四級保護:Gentle、Balanced、Strict、Paranoid。仲有個 local approval center dashboard,你可以睇到晒所有被 block 嘅 action 同 decision 嘅理由。

呢個 approach 嘅智慧在於:你唔需要信個 agent 係 benevolent。你只需要喺佢同外界之間放一個 guard,所有嘢過咗 guard 先准行。HMAC + receipt 記錄所有決策,你有完整嘅 audit trail。

Sortie 就係另一個方向嘅 missing piece:pipeline automation。佢將 GitHub/Jira ticket 自動變成 autonomous agent session,有 parallel scheduling、retry logic、自動 ticket-to-session pipeline。呢個係解決「Agent 點樣融入現有開發 workflow」嘅問題 — 唔係叫你轉晒成個流程,而係喺你而家嘅 ticket system 同 agent 之間做個 bridge。

俾你嘅 Actionable Advice

如果你而家諗緊點樣將 Agent 放入 Production,我嘅建議係:

第一,唔好由 Agent 框架入手。由 infra 入手。先諗清楚你需要邊啲 missing pieces:audit?sandbox?canary deployment?guardrails?揀好 infra 層嘅工具(AgentField / Bernstein / HybridClaw / HOL Guard 呢類),然後先諗上面行乜嘢 agent logic。

第二,audit 係 minimum requirement。如果你嘅 Agent 會 access 任何敏感 data 或者做任何有 side effect 嘅 action,唔好諗 — Bernstein 嘅 HMAC-chain audit 係你第一樣要加嘅嘢。

第三,sandbox 唔係選項,係必要條件。 HybridClaw 或者 HOL Guard 揀一個,確保你嘅 agent 唔會行啲唔應該行嘅 command。你信得過個 LLM,但你信唔過 prompt injection。

第四,Production Agent 嘅 deploy strategy 應該同 microservice 一樣。AgentField 嘅 canary/blue-green rollout 俾到你呢個能力。唔好直接將 agent 掉上 production,跟返你 deploy API 嘅流程。

最後,唔好追求通用 Agent。追求 specific agent 行 specific workflow,有晒 audit、guardrail、rollback 嘅。呢個先係 Production-ready Agent 嘅真正定義。