OpenSaC library improves deep research agents with programmable search

OpenSaC: A Python Library for Search as Code in Deep Research Agents

Artificial IntelligenceInformation Retrieval

Summary

Sometimes AI agents try to answer difficult questions by searching and reading bits of information step by step. The authors propose a new way where these agents write small programs that combine searching, reading, and processing information automatically. They created OpenSaC, a free Python library that helps these agents work this way, making their searches faster and often more accurate. This library also keeps track of all evidence found during the search so it can be checked or reused later.

What this means in practice

  • For software developers: Build intelligent agents that compose searches and processing steps as code to answer complex questions more efficiently.
  • For enterprise automation teams: Integrate configurable search and evidence management into automation workflows to improve information gathering reliability.

Authors

Qi Liu, Jiaxin Mao, Fengbin Zhu, Tat-Seng Chua, Ji-Rong Wen

Abstract

Deep research agents investigate complex questions through iterative search, source examination, and evidence synthesis. A conventional workflow alternates reasoning with individual search and reading actions. Search as Code introduces a new paradigm: agents write programs that compose search, source reading, reranking, model calls, and local processing, returning selected observations for further reasoning. To support this workflow in existing coding agents, we present OpenSaC, an open-source Python library with a companion Search as Code skill. Configurable capability interfaces let agents combine these operations while retaining evidence for inspection and reuse. Compared with standard Codex using its built-in web search, the OpenSaC configuration uses less execution time and fewer model tokens on BrowseComp and WideSearch, with higher accuracy on BrowseComp and slightly lower row F1 on WideSearch. We aim to lower the barrier to adopting Search as Code and provide an open foundation for community development and transparent research on deep research agents.