Generate comprehensive documentation, Dockerfiles, and Docker Compose configs from any GitHub repository using AI agents.
- ๐ค AI Agentic Loop - Uses LangChain tools to explore repositories and generate context-aware documentation
- ๐ Smart Exploration - Automatically finds key files (README, configs, requirements, source code)
- ๐ก Real-time Progress - SSE streaming shows live progress as documentation is generated
- ๐ณ Multi-type Generation - Supports documentation, Dockerfiles, and Docker Compose files
- ๐พ Generation History - All generations are stored and accessible
- ๐ Free Models - Runs on OpenRouter's free tier models
| Layer | Technology |
|---|---|
| Frontend | React 18, Vite, Tailwind CSS |
| Backend | FastAPI, LangChain, SSE |
| LLM | OpenRouter (tencent/hy3-preview:free) |
| Database | SQLite |
| Deployment | Docker, Docker Compose |
# Clone the repo
git clone https://github.com/Jai0401/docAgent.git
cd docAgent
# Set your API key
export OPENROUTER_API_KEY=your_key_here
# Start everything
docker-compose upFrontend: http://localhost:5173
Backend API: http://localhost:8000
Backend:
cd backend
pip install -r requirements.txt
export OPENROUTER_API_KEY=your_key_here
uvicorn main:app --reload --port 8000Frontend:
cd frontend
npm install
npm run dev| Method | Endpoint | Description |
|---|---|---|
GET |
/ping |
Health check |
POST |
/generate |
Start generation |
GET |
/stream/{id} |
SSE progress stream |
GET |
/result/{id} |
Get generated content |
POST |
/regenerate/{id} |
Regenerate |
GET |
/history |
List all generations |
# Generate documentation
curl -X POST http://localhost:8000/generate \
-H "Content-Type: application/json" \
-d '{"url": "https://github.com/facebook/react", "generation_type": "docs"}'
# Stream progress
curl http://localhost:8000/stream/1
# Get result
curl http://localhost:8000/result/1| Variable | Required | Description |
|---|---|---|
OPENROUTER_API_KEY |
Yes | Your OpenRouter API key. Get one free at openrouter.ai/keys |
docAgent/
โโโ backend/
โ โโโ main.py # FastAPI app + endpoints
โ โโโ db.py # SQLite operations
โ โโโ agent/
โ โ โโโ loop.py # Main agent loop
โ โ โโโ tools.py # LangChain tools
โ โ โโโ prompts.py # System prompts
โ โโโ services/
โ โโโ openrouter_service.py # LLM client
โ โโโ git_service.py # Git operations
โโโ frontend/ # React app
โ โโโ src/App.jsx # Main component
โ โโโ ...
โโโ Dockerfile
โโโ docker-compose.yml
โโโ README.md
- Clone - Repository is cloned to
/tmp/docsmith_repos/{id}/ - Explore - Agent uses
glob,read_file,greptools to analyze project structure - Generate - LLM generates docs based on actual file contents
- Save - Output saved as
OUTPUT.mdin the cloned repo directory
MIT ยฉ Jaimin Godhani