xpander.ai
xpander.ai copied to clipboard
chore: new example
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.pyimplementing helper functions and tools for PR summarization, scoring, action recommendations, final decision logic, Slack messaging (with retry logic), and a compositereview_prtool 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 customMyAgentclass (subclassingagno.agent.Agent), registers tools, and provides both CLI and Xpander backend integration for handling review tasks.
Environment and dependency setup:
- Added
.env.examplespecifying required environment variables for GitHub, Slack, Xpander, and OpenAI integration. - Added
requirements.txtspecifying Python dependencies, includingpython-dotenv,agno,xpander-sdk,httpx, andopenai. - Added a
Dockerfilefor building a minimal Alpine-based Python container with all dependencies and entrypoint for the agent.
Documentation:
- Added a comprehensive
README.mddetailing features, setup instructions, usage examples, development guide, and API reference for the agent.