Check out the codelab: Click Here
A minimal web demo using AI Agent and Relevance AI Tool to create an interface where developers can paste or edit an unstructured Python function (or other code), and the AI will:
- Explain what the code does in plain, easy-to-understand language
- Automatically add proper documentation, such as Python docstrings or JSDoc-style comments
- Suggest a refactored version of the code that is cleaner, more readable, and better structured
- Python 3.9+
- Relevance AI account (Sign up)
- API key, Project ID, Region from Relevance AI SDK / Integrations
- A code editor (VS Code, Cursor, etc.)
git clone https://github.com/kishan79/auto-doc-agent.git
cd auto-doc-agentpython -m venv venv
source venv/bin/activatepip install -r requirements.txtUpdate .env file with your credentails:
RELEVANCE_API_KEY=your_api_key_here
RELEVANCE_REGION=your_project_region_here
RELEVANCE_PROJECT_ID=your_project_id_here
RELEVANCE_TOOL_ID=your_tool_id_hereRuns the python server
python main.py/ (auto-doc-agent)
├── .env
├── main.py # Watcher script
├── README.md
├── requirements.txt
└── src/
└── calculator.py # Example file to document