Saved in:
Bibliographic Details
Main Authors: Ni, Xinyi, Jian, Haonan, Wang, Qiuyang, Shah, Vedanshi Chetan, Hong, Pengyu
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2506.19998
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913911587995648
author Ni, Xinyi
Jian, Haonan
Wang, Qiuyang
Shah, Vedanshi Chetan
Hong, Pengyu
author_facet Ni, Xinyi
Jian, Haonan
Wang, Qiuyang
Shah, Vedanshi Chetan
Hong, Pengyu
contents REST APIs play important roles in enriching the action space of web agents, yet most API-based agents rely on curated and uniform toolsets that do not reflect the complexity of real-world APIs. Building tool-using agents for arbitrary domains remains a major challenge, as it requires reading unstructured API documentation, testing APIs and inferring correct parameters. We propose Doc2Agent, a scalable pipeline to build agents that can call Python-based tools generated from API documentation. Doc2Agent generates executable tools from API documentations and iteratively refines them using a code agent. We evaluate our approach on real-world APIs, WebArena APIs, and research APIs, producing validated tools. We achieved a 55\% relative performance improvement with 90\% lower cost compared to direct API calling on WebArena benchmark. A domain-specific agent built for glycomaterial science further demonstrates the pipeline's adaptability to complex, knowledge-rich tasks. Doc2Agent offers a generalizable solution for building tool agents from unstructured API documentation at scale.
format Preprint
id arxiv_https___arxiv_org_abs_2506_19998
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Doc2Agent: Scalable Generation of Tool-Using Agents from API Documentation
Ni, Xinyi
Jian, Haonan
Wang, Qiuyang
Shah, Vedanshi Chetan
Hong, Pengyu
Computation and Language
REST APIs play important roles in enriching the action space of web agents, yet most API-based agents rely on curated and uniform toolsets that do not reflect the complexity of real-world APIs. Building tool-using agents for arbitrary domains remains a major challenge, as it requires reading unstructured API documentation, testing APIs and inferring correct parameters. We propose Doc2Agent, a scalable pipeline to build agents that can call Python-based tools generated from API documentation. Doc2Agent generates executable tools from API documentations and iteratively refines them using a code agent. We evaluate our approach on real-world APIs, WebArena APIs, and research APIs, producing validated tools. We achieved a 55\% relative performance improvement with 90\% lower cost compared to direct API calling on WebArena benchmark. A domain-specific agent built for glycomaterial science further demonstrates the pipeline's adaptability to complex, knowledge-rich tasks. Doc2Agent offers a generalizable solution for building tool agents from unstructured API documentation at scale.
title Doc2Agent: Scalable Generation of Tool-Using Agents from API Documentation
topic Computation and Language
url https://arxiv.org/abs/2506.19998