Files
adk-python/contributing/samples/adk_triaging_agent
Josh SorefandCopybara-Service aa1233608a chore: Fix spelling
Merge https://github.com/google/adk-python/pull/2447

This PR corrects misspellings identified by the [check-spelling action](https://github.com/marketplace/actions/check-spelling)

The misspellings have been reported at https://github.com/jsoref/adk-python/actions/runs/16840838898/attempts/1#summary-47711379253

The action reports that the changes in this PR would make it happy: https://github.com/jsoref/adk-python/actions/runs/16840839269/attempts/1#summary-47711380479

Note: while I use tooling to identify errors, the tooling doesn't _actually_ provide the corrections, I'm picking them on my own. I'm a human, and I may make mistakes.

I've included a couple of changes to make CI happy. Personally, I object to CI being in a state of "random drive by person who adds a blank line in the middle of a file must fix all the preexisting bugs in the file", but that appears to be the state for this repository.

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/2447 from jsoref:spelling d85398e7fd154d124d477c6af6181481a01f34e0
PiperOrigin-RevId: 827629615
2025-11-03 13:33:53 -08:00
..
2025-11-03 13:33:53 -08:00

ADK Issue Triaging Assistant

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.

This agent can be operated in two distinct modes: an interactive mode for local use or as a fully automated GitHub Actions workflow.


Interactive Mode

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.

Features

  • Web Interface: The agent's interactive mode can be rendered in a web browser using the ADK's adk web command.
  • User Approval: In interactive mode, the agent is instructed to ask for your confirmation before applying a label to a GitHub issue.

Running in Interactive Mode

To run the agent in interactive mode, first set the required environment variables. Then, execute the following command in your terminal:

adk web

This will start a local server and provide a URL to access the agent's web interface in your browser.


GitHub Workflow Mode

For automated, hands-off issue triaging, the agent can be integrated directly into your repository's CI/CD pipeline using a GitHub Actions workflow.

Workflow Triggers

The GitHub workflow is configured to run on specific triggers:

  1. Issue Events: The workflow executes automatically whenever a new issue is opened or an existing one is reopened.

  2. Scheduled Runs: The workflow also runs on a recurring schedule (every 6 hours) to process any unlabelled issues that may have been missed.

Automated Labeling

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.

Workflow Configuration

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.


Setup and Configuration

Whether running in interactive or workflow mode, the agent requires the following setup.

Dependencies

The agent requires the following Python libraries.

pip install --upgrade pip
pip install google-adk requests

Environment Variables

The following environment variables are required for the agent to connect to the necessary services.

  • GITHUB_TOKEN: (Required) A GitHub Personal Access Token with issues:write permissions. Needed for both interactive and workflow modes.
  • GOOGLE_API_KEY: (Required) Your API key for the Gemini API. Needed for both interactive and workflow modes.
  • OWNER: The GitHub organization or username that owns the repository (e.g., google). Needed for both modes.
  • REPO: The name of the GitHub repository (e.g., adk-python). Needed for both modes.
  • 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.

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.