AGI Hunt· blaizedsouza·· 59 分钟前AI 评分62
Anthropic 代码模式如何将 Agent 工具上下文从 150,000 token 压至 2,000 token
Anthropic 将 Agent 工具上下文从 15 万 token 压到 2 千,省 98.7%
AI 导读
Anthropic 的 MCP「代码模式」让 Agent 通过编写代码调用工具,在不更换模型的情况下将工具上下文从 150,000 token 压缩至 2,000 token,时间和成本节省 98.7%。工具被表示为 `./servers` 目录下的 `.ts` 文件,由 Agent 按需打开,并在沙箱中完成表格过滤、Slack 轮询循环及邮箱和电话号码占位符处理。
来源:AGI Hunt · agihunt.info