You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* modified list issues to only return unlabelled open issues
* added github workflow to run on schedule and issue open/reopen
* interactive/workflow modes
* readme document
PiperOrigin-RevId: 771152306
The ADK Issue Triaging Assistant is a Python-based agent designed to help manage and triage GitHub issues for the `google/adk-python` repository. It uses a large language model to analyze new and unlabelled issues, recommend appropriate labels based on a predefined set of rules, and apply them.
4
+
5
+
This agent can be operated in two distinct modes: an interactive mode for local use or as a fully automated GitHub Actions workflow.
6
+
7
+
---
8
+
9
+
## Interactive Mode
10
+
11
+
This mode allows you to run the agent locally to review its recommendations in real-time before any changes are made to your repository's issues.
12
+
13
+
### Features
14
+
***Web Interface**: The agent's interactive mode can be rendered in a web browser using the ADK's `adk web` command.
15
+
***User Approval**: In interactive mode, the agent is instructed to ask for your confirmation before applying a label to a GitHub issue.
16
+
17
+
### Running in Interactive Mode
18
+
To run the agent in interactive mode, first set the required environment variables. Then, execute the following command in your terminal:
19
+
20
+
```bash
21
+
adk web
22
+
```
23
+
This will start a local server and provide a URL to access the agent's web interface in your browser.
24
+
25
+
---
26
+
27
+
## GitHub Workflow Mode
28
+
29
+
For automated, hands-off issue triaging, the agent can be integrated directly into your repository's CI/CD pipeline using a GitHub Actions workflow.
30
+
31
+
### Workflow Triggers
32
+
The GitHub workflow is configured to run on specific triggers:
33
+
34
+
1.**Issue Events**: The workflow executes automatically whenever a new issue is `opened` or an existing one is `reopened`.
35
+
36
+
2.**Scheduled Runs**: The workflow also runs on a recurring schedule (every 6 hours) to process any unlabelled issues that may have been missed.
37
+
38
+
### Automated Labeling
39
+
When running as part of the GitHub workflow, the agent operates non-interactively. It identifies the best label and applies it directly without requiring user approval. This behavior is configured by setting the `INTERACTIVE` environment variable to `0` in the workflow file.
40
+
41
+
### Workflow Configuration
42
+
The workflow is defined in a YAML file (`.github/workflows/triage.yml`). This file contains the steps to check out the code, set up the Python environment, install dependencies, and run the triaging script with the necessary environment variables and secrets.
43
+
44
+
---
45
+
46
+
## Setup and Configuration
47
+
48
+
Whether running in interactive or workflow mode, the agent requires the following setup.
49
+
50
+
### Dependencies
51
+
The agent requires the following Python libraries.
52
+
53
+
```bash
54
+
pip install --upgrade pip
55
+
pip install google-adk requests
56
+
```
57
+
58
+
### Environment Variables
59
+
The following environment variables are required for the agent to connect to the necessary services.
60
+
61
+
*`GITHUB_TOKEN`: **(Required)** A GitHub Personal Access Token with `issues:write` permissions. Needed for both interactive and workflow modes.
62
+
*`GOOGLE_API_KEY`: **(Required)** Your API key for the Gemini API. Needed for both interactive and workflow modes.
63
+
*`OWNER`: The GitHub organization or username that owns the repository (e.g., `google`). Needed for both modes.
64
+
*`REPO`: The name of the GitHub repository (e.g., `adk-python`). Needed for both modes.
65
+
*`INTERACTIVE`: Controls the agent's interaction mode. For the automated workflow, this is set to `0`. For interactive mode, it should be set to `1` or left unset.
66
+
67
+
For local execution in interactive mode, you can place these variables in a `.env` file in the project's root directory. For the GitHub workflow, they should be configured as repository secrets.
0 commit comments