A production-ready AI agent system that analyzes legacy codebases across multiple languages, creates dependency graphs, documents services, and performs impact analysis.
- Multi-Repository Analysis: Support for GitHub repositories, local files, and Git clone
- Multi-Language Support: Python, Java, JavaScript/TypeScript, and more
- Dependency Graph Generation: Service-level dependencies, API endpoints, databases
- Impact Analysis: Change propagation analysis, breaking change detection, risk scoring
- Human-in-the-Loop: Agent checkpoints for ambiguous cases requiring human input
- Documentation Generation: AI-powered service documentation using OpenAI
- Backend: FastAPI with multi-agent orchestration
- Frontend: Next.js 14+ with React Flow for visualizations
- Databases: Neo4j (graph), PostgreSQL (metadata), Qdrant (vector search), Redis (caching)
- AI: OpenAI API for documentation generation
- Docker and Docker Compose
- Python 3.10+
- Node.js 18+
- Navigate to backend directory:
cd backend- Install dependencies:
pip install -r requirements.txt- Copy environment file:
cp .env.example .env
# Edit .env with your configuration- Set required keys (or add to .env):
export GITHUB_TOKEN=<your-github-token> # optional for public repos, required for private repos
export NEXT_PUBLIC_API_KEY=dev-local-key
# Optional to override API url
export NEXT_PUBLIC_API_URL=http://localhost:8000- Start Docker services:
docker-compose up -d- Initialize database:
alembic upgrade head- Run the server:
uvicorn main:app --reload- Navigate to frontend directory:
cd frontend- Install dependencies:
npm install- Run development server:
npm run devOnce the backend is running:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
- Metrics: http://localhost:8000/metrics
codebase-analysis-agent/
├── backend/ # FastAPI backend
│ ├── agents/ # AI agents
│ ├── api/ # API routes
│ ├── core/ # Core configuration
│ ├── models/ # Database models
│ ├── parsers/ # Code parsers
│ └── services/ # Business logic
├── frontend/ # Next.js frontend
│ ├── app/ # Next.js app router
│ ├── components/ # React components
│ └── lib/ # Utilities
└── docker-compose.yml
MIT