Primary sourceAravind Srinivas
View sourceEvent ·Multi-source
Perplexity Agent API 推出 Code Mode:用 JavaScript 脚本替代逐轮工具调用
Perplexity 在其 Agent API 中新增 Code Mode(programmatic_tool_calling)功能,由 CEO Arav Srinivas 在 X 上发布。新模式改变了智能体调用工具的方式:模型不再每轮以一条 JSON 指令调用一个工具,而是编写一段 JavaScript 脚本,一次性并行执行多个工具。 工作机制上,脚本运行后可以处理工具输出的中间结果,只把模型真正需要的部分返回到上下文窗口,从而减少逐轮 JSON 调用造成的上下文膨胀。这对需要串联多个工具、处理大量返回数据的智能体工作流尤其有效。 Perplexity 的 Agent API 此前主要面向搜索类智能体开发者,这次更新属于开发者工具层面的能力增强,与 Anthropic、OpenAI 等厂商在智能体工具调用效率上的探索方向一致。开发者若在构建多工具编排场景,可以关注这一新接口。
Current read
做智能体的朋友可以看看这个:Perplexity 给 Agent API 加了 Code Mode,模型直接写一段 JS 并行跑工具,只把有用的结果塞回上下文,省 token 也省轮次。比起一轮一个 JSON 调用,多工具编排会顺很多,适合正在搭多工具工作流的开发者。
11 sources44° AI heatLast updated 2026/12/3 20:10:02
Evidence
11 sourcesRelated source 1Perplexity
View sourceRelated source 2Claude Code: GitHub Releases
View sourceRelated source 3IT之家
View sourceRelated source 4shao__meng
View sourceRelated source 5TestingCatalog
View sourceRelated source 6Detik Inet
View sourceRelated source 7The Information
View sourceRelated source 8NVIDIA
View sourceRelated source 9宝玉
View sourceRelated source 10阿里云 Alibaba Cloud
View sourceConflict check
Dedup data only shows that these sources discuss the same event, not that they agree. There is no structured supporting or refuting evidence yet, so no conflict is inferred automatically.