Inspiration
Every software team faces the same daily grind: a developer opens a GitLab issue, reads it, writes code, writes tests (if they have time), waits for security review (days later), and finally deploys (another day). Total: 1-3 days of repetitive, automatable work per feature.
As a developer in Tanzania, I wanted to build something that makes every developer โ regardless of location โ as productive as a full team. What if one AI agent could do all six steps automatically?
What it does
AutoPilot DevFlow is a custom AI agent built on the GitLab Duo Agent Platform that autonomously handles the complete software development lifecycle in 6 steps:
- ๐ ANALYZE โ Reads the GitLab issue, extracts requirements, rates complexity
- ๐ป CODE โ Generates production-ready implementation with proper architecture
- ๐งช TEST โ Creates comprehensive test plans targeting 80%+ coverage
- ๐ SECURITY โ Scans for OWASP Top 10 vulnerabilities, gives security score
- ๐ฑ OPTIMIZE โ Suggests green/sustainable optimizations (UN SDG 13 Climate Action)
- ๐ DEPLOY โ Generates CI/CD pipeline config and creates merge requests
One issue. One prompt. Six steps. Zero tool-switching.
How I built it
- GitLab Duo Agent Platform โ Custom agent defined in YAML with the AI Catalog
- Flow Registry v1 โ Ambient environment with AgentComponent orchestration
- 25 GitLab platform tools โ get_issue, create_commit, create_merge_request, list_vulnerabilities, and more
- No external APIs โ Everything runs inside GitLab. No API keys, no .env files, no Python dependencies
- AI Model โ Claude (Anthropic) via GitLab Duo Chat
The entire agent is defined in two YAML files:
agents/autopilot-devflow.ymlโ Agent definition with system prompt and toolsflows/autopilot-devflow.ymlโ Flow definition with v1 spec
Challenges I faced
- Token limits โ The agent initially tried to generate full code for every file, hitting output limits before completing all 6 steps. I had to optimize the system prompt to use
create_commitfor code and keep steps 3-6 as concise summaries. - AI Catalog sync โ Getting the YAML schema exactly right for the
ai-catalog-syncCI component took multiple iterations. Theconsumersfield and tool names had to match the vendoredtool_mapping.jsonexactly. - Free tier limitations โ GitLab Duo custom agents require Ultimate. I activated a 30-day trial to build and test the agent.
- Prompt engineering โ Balancing between comprehensive output and staying within model limits required careful prompt design with strict constraints.
What I learned
- The GitLab Duo Agent Platform is incredibly powerful โ you can build complex multi-step automations with just YAML
- Prompt engineering for agents is fundamentally different from chatbot prompts โ you need to think about tool usage, token budgets, and sequential execution
- Green computing is not just a buzzword โ even small optimizations like connection pooling and caching can significantly reduce compute waste
What's next
- Add support for multi-issue batch processing
- Implement automatic branch creation and code review cycles
- Add cost estimation for cloud deployments
- Expand green optimization with carbon footprint tracking
Built With
- agent
- ai
- anthropic
- bcrypt
- catalog
- ci/cd
- claude
- duo
- fastapi
- flow
- gitlab
- jwt
- platform
- postgresql
- python
- registry
- sqlalchemy
- v1
- yaml
Log in or sign up for Devpost to join the conversation.