xpander.ai icon indicating copy to clipboard operation
xpander.ai copied to clipboard

chore: new example

Open rohitg00 opened this issue 11 months ago • 0 comments

This pull request introduces a new AI-powered GitHub PR review agent, providing automated pull request analysis, Slack integration, and optional auto-merge capabilities. The core features include summarizing PRs, scoring them, recommending actions, and integrating with Slack and GitHub APIs. The changes add all necessary code, configuration, and documentation for running the agent both locally and in Docker.

Key changes:

Core functionality and tools:

  • Added tools/pr_tools.py implementing helper functions and tools for PR summarization, scoring, action recommendations, final decision logic, Slack messaging (with retry logic), and a composite review_pr tool that fetches PR data from GitHub, analyzes it, attempts auto-merge, and sends a summary to Slack.

Agent orchestration:

  • Introduced xpander_handler.py, which loads environment variables, defines a custom MyAgent class (subclassing agno.agent.Agent), registers tools, and provides both CLI and Xpander backend integration for handling review tasks.

Environment and dependency setup:

  • Added .env.example specifying required environment variables for GitHub, Slack, Xpander, and OpenAI integration.
  • Added requirements.txt specifying Python dependencies, including python-dotenv, agno, xpander-sdk, httpx, and openai.
  • Added a Dockerfile for building a minimal Alpine-based Python container with all dependencies and entrypoint for the agent.

Documentation:

  • Added a comprehensive README.md detailing features, setup instructions, usage examples, development guide, and API reference for the agent.

rohitg00 avatar Sep 08 '25 18:09 rohitg00