Doc2Agent

Transforming unstructured REST API documentation into agent-ready Python tools.

🏭 What Is Doc2Agent?

The Reality: Real-world APIs are messy. Documentation is often incomplete, outdated, or poorly structured—making direct integration with LLM agents a nightmare.

Doc2Agent offers a scalable, fully automated solution to bridge the gap between real-world APIs and AI agents.

📦 Generate

Python-based API tools from natural language docs.

🧪 Diagnose

Fix tool errors through automated validation loops.

🔁 Refine

Inferred parameters—no domain knowledge required.

🚀 Deploy

Use tools directly via MCP or OpenAPI standards.

✨ Core Features

🔧
Automated Tool Gen

Convert docs into functions for LangGraph, LlamaIndex, and AutoGen.

🧠
Self-Diagnosis

Iteratively fix bugs using a code agent that infers missing values.

📚
Knowledge Base Matching

Reuse known parameter values to fill gaps in documentation.

🌐
MCP & OpenAPI

Deploy as a server (MCP) or export as standard OpenAPI specs.

🚀 Getting Started

1. Clone & Install
git clone https://github.com/coolkillercat/Doc2Agent.git
cd Doc2Agent
pip install -r requirements.txt
2. Setup Credentials

Update your .env file:

OPENAI_API_KEY=your_api_key