A Spring Boot application using the Embabel agent framework to analyze GitHub repositories and provide comprehensive insights.
- Repository Analysis: Fetches detailed information about GitHub repositories
- AI-Powered Insights: Uses LLM to analyze repository health, activity, and trends
- Smart Recommendations: Provides actionable suggestions for improvement
- Multiple Input Formats: Supports GitHub URLs, owner/repo format, or natural language queries
- Interactive Shell: Built-in shell interface for easy testing and interaction
- Java 21 or higher
- Gradle 8.10.2 (included via wrapper)
- GitHub API access (optional token for higher rate limits)
- OpenAI or Anthropic API key for LLM functionality
-
GitHub API Token (optional but recommended):
export GITHUB_TOKEN=your_github_token_here -
LLM API Keys (at least one required):
export OPENAI_API_KEY=your_openai_key_here # OR export ANTHROPIC_API_KEY=your_anthropic_key_here
-
Build the project:
./gradlew build
-
Run the application:
./gradlew bootRun
-
Use the interactive shell:
shell:>x "Analyze microsoft/vscode" shell:>x "Give me insights on https://github.com/facebook/react" shell:>x "What can you tell me about the spring-boot repository?"
The agent can analyze repositories using various input formats:
x "Analyze https://github.com/microsoft/vscode"
x "Look at facebook/react"
x "Tell me about the TypeScript repository"
x "Give me insights on the Kubernetes project"
The agent provides comprehensive analysis including:
- Repository metadata (stars, forks, issues, language, etc.)
- Health and activity assessment
- Code quality indicators
- Community engagement metrics
- Actionable recommendations for improvement
- Security and best practices suggestions
src/
├── main/java/com/embabel/github/
│ ├── GitHubInsightsApplication.java # Main Spring Boot application
│ ├── agent/
│ │ └── GitHubInsightsAgent.java # Main agent with analysis logic
│ ├── service/
│ │ └── GitHubService.java # GitHub API integration
│ └── exception/
│ └── GitHubRepositoryException.java # Custom exception handling
└── test/java/com/embabel/github/agent/
└── GitHubInsightsAgentTest.java # Unit tests
Edit src/main/resources/application.properties to customize:
- GitHub API token
- Embabel model configurations
- Logging levels
./gradlew test./gradlew buildThe project includes:
- Comprehensive unit tests with Mockito
- SonarQube-compatible code quality checks
- Embabel agent testing framework integration
This agent integrates with:
- GitHub API: For repository data fetching
- OpenAI/Anthropic: For intelligent analysis and recommendations
- Embabel Framework: For agent orchestration and management