Inspiration
Every developer knows the feeling. You've just pushed a critical fix — a SQL injection patch, a new auth flow, or a breaking API change. The code is done. But the work isn't.
Now you have to write a PR description, create GitHub issues for every TODO you spotted, send a Slack update so the team knows what landed, and log it for audit purposes. That's 20–30 minutes of repetitive documentation work every single push.
Multiply that across a team of 10 developers pushing 5 times a day — hundreds of hours of lost productivity every month. I built DevFlow Agent to eliminate all of it.
What it does
DevFlow Agent is an autonomous AI workflow orchestrator. The moment you push code to GitHub, it:
- Analyzes the diff using Gemini 2.5 Flash — understanding every commit, file change, and risk
- Detects security threats — automatically flags auth, payment, and PII-related changes as HIGH priority
- Creates GitHub Issues — structured descriptions with acceptance criteria, labels, and priority levels for every bug and TODO it finds
- Writes a PR description — professional, scoped, with risk level and suggested reviewers
- Posts a Slack digest — concise engineering update to your #engineering channel automatically
- Logs everything to Firestore — full audit trail with timestamps and action details
All of this happens in under 3 seconds. No human input required.
How we built it
Architecture:
GitHub Push Event │ ▼ Cloud Run (FastAPI) ──► Gemini 2.5 Flash │ │ │ Structured JSON │ │ ├──► GitHub Issues ├──► Slack Webhook └──► Firestore Audit Log
- AI Model: Gemini 2.5 Flash via Google GenAI SDK — with a carefully engineered system prompt that forces the agent to return strict structured JSON across all workflow steps in a single call
- Backend: FastAPI deployed on Google Cloud Run — stateless, scales to zero, fast webhook response
- Persistence: Google Firestore for cross-run audit logging
- Trigger: GitHub Webhooks with HMAC signature verification for security
- Notifications: Slack Incoming Webhooks for real-time team alerts
The agent is designed to never ask for clarification — it infers everything from the commit context and acts autonomously, which is the core principle of agentic design.
Challenges we ran into
- Model deprecation mid-build —
gemini-2.0-flashwas deprecated during development and returned 404 errors. Had to identify the issue from logs and migrate togemini-2.5-flashquickly without breaking the pipeline - JSON truncation — early runs returned truncated JSON because
max_output_tokenswas too low. The nested output schema was hitting the limit mid-response causing parse failures — fixed by increasing to 8192 tokens - Windows encoding corruption — PowerShell's default encoding corrupted special Unicode characters in the Python source file when saving, breaking the server silently on reload
- Prompt precision — getting Gemini to consistently return the exact JSON schema with no markdown fences, no extra explanation, and all required keys present even when empty required multiple prompt iterations
Accomplishments that we're proud of
- Built a fully working end-to-end agentic pipeline that handles a real developer pain point autonomously
- Gemini correctly detected security-sensitive changes (JWT auth + SQL injection fix) and flagged them as HIGH risk without any explicit rule-based code
- The agent generated a professional PR description, GitHub issue with acceptance criteria, and Slack message — all from just commit metadata — in a single Gemini call
- Successfully deployed on Google Cloud Run with Firestore logging running in production
- Zero manual steps required from push to fully documented workflow
What we learned
- Prompt engineering for agents is a discipline in itself — getting consistent structured output across varied commit types required careful system prompt design, especially around edge cases like empty diffs and multi-file security changes
- Agentic design means removing decisions from the user entirely — the agent must be confident enough to act on whatever context it receives, which changes how you structure both the prompt and error handling
- The new
google-genaiSDK is significantly cleaner than the deprecatedgoogle-generativeaipackage — theclient.models.generate_content()pattern withGenerateContentConfigis well-structured and easy to work with - Cloud Run is excellent for webhook-driven agents — scales to zero when idle, fast enough for real-time webhook latency, and source-based deployment made iteration very fast
What's next for DevFlow Agent
- Real GitHub API integration — actually create the issues and open the PRs automatically, not just generate their content
- Multi-repo support — one agent instance managing an entire GitHub organization
- PR review automation — agent reviews incoming PRs and leaves structured inline code review comments
- Jira and Linear integration — sync generated issues directly into project management tools
- Custom rule engine — teams define their own risk rules, issue templates, and notification preferences.
Built With
- agentic-ai
- api
- artificial-intelligence
- autonomous-agents
- backend
- developer-tools
- devops
- fastapi
- firestore
- gemini
- generative-ai
- github-api
- google-cloud
- google-cloud-run
- google-genai-sdk
- json
- large-language-models
- python
- python-dotenv
- rest-api
- slack-api
- uvicorn
- webhook
- workflow-automation
Log in or sign up for Devpost to join the conversation.