AI Agent 的 Cache 不只一層:從 Claude Code 的 18 種快取到 ReAct Agent 的多層設計
拆解 Claude Code 的 18+ 種快取機制後發現:provider-level prompt cache 你做不了,但 embedding cache、tool result cache、entity cache 你不但做得了,效果還更好。附完整的 AgentCache 介面設計與 per-tool TTL 策略。
拆解 Claude Code 的 18+ 種快取機制後發現:provider-level prompt cache 你做不了,但 embedding cache、tool result cache、entity cache 你不但做得了,效果還更好。附完整的 AgentCache 介面設計與 per-tool TTL 策略。
Claude Code 的 45 個 tool 中,每個 prompt() 都會根據用戶類型、feature flags、系統能力動態調整。將這個模式套用到 ReAct Agent,根據 orchestrator 模型能力、locale、可用 tools 三個維度動態生成 tool description,小模型自動補 few-shot,大模型省 token。