Skip to content

hemasekhar-p/interactive-github-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Interactive GitHub Issue Analyzer Agent

Overview

This project implements a production-ready, interactive GitHub Issue Analyzer Agent using Java 17, Maven, and the Google Agent Development Kit (ADK) version 1.3.0. The agent is designed to triage issues, profile users, analyze comments, and triage pull requests.

Architecture

The project follows a modular architecture leveraging the Google ADK framework.

Components

  1. Main: The entry point that launches the agent with a Dev UI (AdkWebServer) and demonstrates session management.
  2. IssueAnalyzerAgent: Defines the agent's persona, instructions, and tools. It uses LlmAgent builder and registers tools as FunctionTool.
  3. tools: Contains specialized classes registered as tools for the agent, invoked based on user requests:
    • TriageTool: The initial entry point for fetching and categorizing issues.
    • UserProfilingTool: Fetches deep details for any GitHub user (Author, Commenter, Reviewer).
    • CommentAnalysisTool: Summarizes discussions on issues.
    • PullRequestTool: Fetches and analyzes Pull Request details.
    • UserRepositoriesTool: Lists public repositories of a user.
  4. GitHubClient: A helper class to interact with the GitHub REST API using OkHttp and Gson. Used by the tools to fetch data. Supports pagination for fetching repositories.

State Management

Multi-turn conversational context is maintained. Due to ADK schema generation limitations with ToolContext, a custom State class (using ThreadLocal) is used to store temporary state (e.g., temp:current_issue).

Setup and Installation

Prerequisites

  • Java 17 or higher
  • Maven 3.6 or higher

Build

Navigate to the project directory and run:

mvn clean compile

Environment Variables

Set the following environment variables to allow the agent to function correctly:

export GITHUB_OWNER=your_github_owner
export GITHUB_REPO=your_github_repo
export GITHUB_TOKEN=your_github_token
export GOOGLE_CLOUD_PROJECT=your_project_id
export GOOGLE_CLOUD_LOCATION=your_location
export GOOGLE_GENAI_USE_VERTEXAI=true

Usage Guide

Running the Agent

You can run the agent using the exec-maven-plugin:

mvn exec:java

This will start the development engine interface (web server) on port 8080.

Agent Capabilities

The agent can handle the following operations via its tools:

  1. Triage Issue: Summarizes the issue, extracts metadata, and categorizes it as a Bug or Feature Request.
  2. Profile User: Fetches details for a given GitHub username (author, commenter, reviewer, etc.).
  3. Analyze Comments: Summarizes discussions on the issue.
  4. List User Repositories: Lists the public repositories of a user (with pagination support).
  5. Triage Pull Request: Fetches details of a pull request, including author, assignees, and reviewers.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages