Skip to content

dnlrbz/feature_search_agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Feature Search Agent - Angular PR Scout

An AI-powered agent built with Google's Agent Development Kit (ADK) that automatically searches and analyzes Angular's GitHub pull requests for new features.

Overview

This agent:

  • Fetches open PRs from Angular's GitHub repository filtered by "feat"
  • Caches PR data locally to minimize GitHub API calls
  • Uses Google's Gemini 2.0 Flash model to analyze and format results

Prerequisites

  • Python 3.10 or higher
  • A Google API key for Gemini (get one at Google AI Studio)
  • Internet connection for GitHub scraping

Quick Start

1. Create a Virtual Environment

python3 -m venv .venv
source .venv/bin/activate  # On macOS/Linux

2. Install Dependencies

pip install -r requirements.txt

3. Configure Environment Variables

The .env file is already present with:

GOOGLE_GENAI_USE_VERTEXAI=FALSE
GOOGLE_API_KEY=your_api_key_here

4. Run the Agent

Using ADK WEB (Recommended)

If the Google ADK CLI is installed, you can run the agent directly:

# Run the agent interactively
adk web

Configuration

GitHub PR List URL

By default, the agent searches:

https://github.com/angular/angular/pulls?q=is%3Apr+feat+is%3Aopen

You can modify this in config.py or pass a custom URL to search_github_repository().

Cache Location

PR data is cached in pr_cache.json in the same directory as config.py. This prevents redundant GitHub requests.

Request Settings

  • User Agent: FeatureScoutAngularAgent/1.0
  • Timeout: 10 seconds
  • Headers: Standard browser-like headers

Modify these in config.py if needed.

How It Works

  1. Fetch PR List: The agent fetches the Angular GitHub PR listing page
  2. Parse PRs: Extracts all PR links with data-hovercard-type="pull_request"
  3. Filter by "feat": Only processes PRs with "feat" in the title (case-insensitive)
  4. Check Cache: Looks up each PR in the local cache
  5. Fetch Descriptions: If not cached, fetches the PR page and extracts the first comment body
  6. Update Cache: Saves new PR data to pr_cache.json
  7. AI Analysis: The agent uses Gemini to analyze and format results

About

Agent that searches for GitHub PRs and explains them

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages