Automated, AI-driven documentation and repository analysis agent.
614
crewai-doc-agent)Automated, AI-driven documentation and repository analysis agent powered by CrewAI, LiteLLM, and a robust shared LLMClient supporting enterprise proxies, endpoint health checks, and flexible authentication models.
The crewai-doc-agent uses specialized multi-agent crews (crew.py) driven by a CLI entrypoint (cli.py). Agents utilize custom tools like the repository packaging utility (package_dir.py) to generate token-optimized context files (.package_dir.context.yml) complete with rich execution metadata before performing documentation and architectural code reviews.
┌──────────────────────────────────────────────┐
│ Repository Source Files (.py, .yml, etc.) │
└──────────────────────┬───────────────────────┘
│
▼
┌──────────────────────────────────────────────────────────────────────────────────────────┐
│ Stage 1: LLMCLIENT PRE-FLIGHT & HEALTH CHECK │
│ - Verifies connection against Ollama/vLLM endpoints (/models or /api/tags). │
│ - Automatically resolves custom CA bundle paths and handles Basic vs Bearer auth. │
└────────────────────────────────────────────┬─────────────────────────────────────────────┘
│
▼
┌──────────────────────────────────────────────────────────────────────────────────────────┐
│ Stage 2: MULTI-AGENT CREW EXECUTION │
│ - Repository Context Analyst agent packages code via tool into .package_dir.context.yml │
│ - Senior Code Reviewer agent analyzes structure and generates documentation/reports. │
└────────────────────────────────────────────┬─────────────────────────────────────────────┘
│
▼
┌──────────────────────────────────────────────────────────────────────────────────────────┐
│ Stage 3: DOCUMENTATION & REPORTING │
│ - Outputs structured Markdown documentation and architectural review reports. │
└──────────────────────────────────────────────────────────────────────────────────────────┘
crewai-doc-agent/
├── .package_dir.context.yml <-- Token-optimized packaged repository context & metadata
├── scripts/
│ ├── agents/
│ │ └── package_tool.py <-- CrewAI tool wrapper for package_dir.py
│ ├── cli.py <-- Main CLI entrypoint & LLMClient health check
│ ├── crew.py <-- Modular multi-agent crew definition (run_crew)
│ ├── package_dir.py <-- Repository tree scanner & YAML packager
│ └── utils.py <-- Shared LLMClient, configuration, and health checks
├── .crewai-config.yml <-- Agent and LLM backend configuration
└── Dockerfile
/models or /api/tags) upon startup to fail fast if unreachable.extra_headers).cli.py managing configuration/health checks and crew.py exposing a modular run_crew() function.package_dir.py to generate .package_dir.context.yml locally with embedded git commit hashes, branch info, execution PWD, and directory trees.| Command | Description | Key Flags |
|---|---|---|
run | Executes the pre-flight health check and launches the CrewAI multi-agent crew workflow. | --config, --verbose (-v) |
# 1. Create configuration file
cp .crewai-config.example.yml .crewai-config.yml
# 2. Run agent workflow inside Docker container
docker run --rm -v $(pwd):/workspace -w /workspace \
lj020326/crewai-doc-agent:latest \
crewai-doc-agent run --verbose
lj020326/crewai-doc-agent:latest
Built with:
Content type
Image
Digest
sha256:5adf041f9…
Size
987.1 MB
Last updated
about 23 hours ago
docker pull lj020326/crewai-doc-agent