Skip to content

kishan79/auto-doc-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rele

Build an AI Agent to Auto-Document and Refactor Code with Python

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

Prerequisites

  • 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.)

Clone the repo

git clone https://github.com/kishan79/auto-doc-agent.git
cd auto-doc-agent

Configure the environment

python -m venv venv
source venv/bin/activate

Install

pip install -r requirements.txt

Configure .env

Update .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_here

Develop

Runs the python server

python main.py

Project Structure

/ (auto-doc-agent)
├── .env
├── main.py           # Watcher script
├── README.md
├── requirements.txt
└── src/
    └── calculator.py # Example file to document

About

Build a Python-based AI agent that monitors your files and automatically documents legacy code using Relevance AI's agentic tools.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages