DocAgent  by facebookresearch

Automated Python docstring generation system

Created 10 months ago
420 stars

Top 70.1% on SourcePulse

GitHubView on GitHub
Project Summary

DocAgent is a system designed to automate the generation of high-quality, context-aware docstrings for Python codebases. It targets developers and researchers seeking to improve code maintainability and understanding, particularly in large projects, by addressing the limitations of current LLM-based documentation tools.

How It Works

DocAgent employs a multi-agent system comprising Reader, Searcher, Writer, and Verifier agents, coordinated by an Orchestrator. This architecture allows for specialized tasks like context gathering and verification. It also utilizes a hierarchical traversal strategy, processing code components based on their dependencies, starting with less dependent files. This approach aims to build a documented foundation, enabling better contextual understanding for more complex code.

Quick Start & Requirements

  • Install via pip: pip install -e .
  • Requires Python 3.x.
  • Optional extras for development tools or web UI: pip install -e ".[dev,web]"
  • Configuration requires creating and editing config/agent_config.yaml with LLM endpoints and API keys.
  • CLI usage: python generate_docstrings.py --repo-path <path_to_repo>
  • Web UI: python run_web_ui.py (access at http://localhost:5000)
  • Evaluation UI: python src/web_eval/app.py (access at http://localhost:5001)
  • Supports local LLMs via an OpenAI-compatible API endpoint (e.g., using vllm).

Highlighted Details

  • Multi-agent system for specialized documentation tasks.
  • Hierarchical code processing based on dependencies.
  • Iterative docstring generation and verification.
  • Includes a web UI for configuration and monitoring.
  • Separate web-based evaluation system for docstring quality.

Maintenance & Community

The project is from Meta AI (facebookresearch). Further community or roadmap information is not detailed in the README.

Licensing & Compatibility

Licensed under the MIT License, permitting commercial use and integration with closed-source projects.

Limitations & Caveats

The README mentions that evaluation is run separately and provides instructions for its own README. Configuration requires manual setup of LLM endpoints and API keys.

Health Check
Last Commit

10 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
6 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Yaowei Zheng Yaowei Zheng(Author of LLaMA-Factory), and
5 more.

trae-agent by bytedance

0.2%
11k
LLM-powered CLI for software engineering tasks
Created 8 months ago
Updated 2 weeks ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Kent Dodds Kent Dodds(Cofounder of Remix), and
10 more.

agentic by transitive-bullshit

0.0%
18k
AI agent stdlib for LLM-based TypeScript tooling
Created 3 years ago
Updated 2 weeks ago
Feedback? Help us improve.