Inspiration Modern software delivery moves faster than ever, but developers still lose hours every week to manual, repetitive triage. When a pipeline fails or a nightly security audit flags an open-source vulnerability, the cycle is always the same: open the job trace, dig through thousands of lines of raw logs, deduce the failure mode, write an isolated dependency or code patch, wait on CI, and manually request a review.
We wanted to challenge the status quo: What if the software lifecycle took care of itself after code was pushed?
Inspired by the GitLab Transcend Life After Code Hackathon, we conceived AutoRemediate-Ops—a fully autonomous, zero-touch DevSecOps agent operating under the Hands-off Autonomy Tier. Our goal was to create an agent that doesn't just suggest fixes in an IDE chatbox, but independently closes the feedback loop from failure detection to verified deployment.
What it does AutoRemediate-Ops acts as an autonomous digital Site Reliability and Security Engineer integrated directly into GitLab. It spans across 7 key DevSecOps lifecycle phases (Plan, Create, Verify, Package, Secure, Deploy, and Monitor):
Event Ingestion: Listens to real-time GitLab Webhooks for failed jobs, pipeline crashes, and security issue creation.
Autonomous Root Cause Analysis (RCA): Ingests raw CI/CD build traces and SAST advisories, isolates broken test suites and vulnerable dependency trees (e.g., outdated packages with known CVEs), and generates structured diagnoses.
Deterministic Remediation: Uses reasoning algorithms to synthesize precise, minimal code and dependency patches (e.g., upgrading pinned dependencies in requirements.txt to patched upstream versions).
Automated Git Flow: Autonomously creates dedicated remediation branches (fix/autonomous-patch-...), commits verified changes, opens a comprehensive Merge Request (MR), and activates merge_when_pipeline_succeeds.
Zero-Touch Closing & Deployment: Posts post-mortem analytical comments detailing the failure, verification steps, and remediation rationale, subsequently deploying containerized workloads to Google Cloud Run.
How we built it The solution is engineered as an event-driven, decoupled autonomous orchestration engine:
Core Backend: Built on Python 3.11 using FastAPI and asynchronous task workers (BackgroundTasks) to process intensive LLM reasoning pipelines without blocking GitLab webhook response deadlines ( HTTP 200 OK).
GitLab Duo & Agentic Reasoning: Integrated with GitLab APIs and reasoning logic to analyze structured error signals, test exit codes, and dependency vulnerability databases.
GitLab REST API Integration: Managed via python-gitlab for dynamic branch creation, single-commit updates, MR generation, and label orchestration.
Secure Webhook Verification: Validates incoming payloads using HMAC-based secret tokens ( X-Gitlab-Token) to prevent unauthorized triggers.
Packaging & Cloud Deployment: Fully containerized via a lightweight, multi-stage Dockerfile and configured for deployment on Google Cloud Run with high scalability and zero cold-start friction.
Challenges we ran into Webhook Event Latency & Non-Blocking Design: GitLab webhooks timeout if an endpoint does not return an acknowledgment within a few seconds. Running multi-step log parsers and Git operations synchronously caused HTTP timeouts. We resolved this by implementing an asynchronous task-queue pattern: immediately acknowledging with an idempotency ticket and executing the remediation pipeline in the background.
Deterministic Patch Generation: LLM outputs can occasionally produce hallucinated dependency versions. We constrained the patch synthesis engine using deterministic regex parsers and strict dependency specifications to ensure patches never introduce breaking breaking major-version updates.
API Scopes & Granular Permissions: Balancing principle-of-least-privilege with full CI/CD access required fine-tuning GitLab access token scopes (api, read_repository, write_repository) to ensure the agent could fetch build traces and push branches without granting root administrative overrides.
Accomplishments that we're proud of True Hands-Off Autonomy: Achieved a complete, unbroken automated loop: an injected failure or issue trigger resulted in automatic branch creation, file modification, MR opening, and issue commenting without a single keyboard stroke or human approval gate.
Sub-Minute Remediation: Reduced the typical Mean Time to Resolution (MTTR) for dependency-related build breaks to under 30 seconds:
MTTR agent ≪MTTR human (∼25s vs. 30+ mins) 7-Stage DevSecOps Lifecycle: Successfully touched every primary stage from issue planning through container packaging, SAST mitigation, and cloud deployment.
What we learned Building agents in the Hands-off tier requires significantly more resilience than copilot-style assistive tools: every edge case, missing log trace, or merge conflict must have deterministic fallback paths because there is no human in the loop to prompt again.
Deepened our mastery of GitLab's internal Webhook architecture, CI/CD pipeline states, and granular API mechanics.
Learned how to effectively interface autonomous reasoning models with strict infrastructure compliance policies.
What's next for AutoRemediate-Ops Multi-Repo Mesh: Expanding the agent to monitor microservice clusters across entire GitLab groups and namespaces.
Dynamic Rollback & Canary Evaluation: Incorporating Prometheus/OpenTelemetry real-time anomaly monitoring to trigger automated rollbacks if a deployed fix degrades p99 latency:
ΔLatency p99
ϵ⟹Trigger Autonomous Rollback Interactive Duo Agent Chat Integration: Enabling developers to converse directly with AutoRemediate-Ops inside GitLab Duo Chat for post-incident questions and custom policy tuning.
Built With
- ai-agents
- artificial-intelligence
- automation
- autonomous-agent
- cicd
- devops
- devsecops
- docker
- fastapi
- gitlab
- gitlab-ci
- gitlab-duo
- google-cloud
- google-cloud-run
- llm
- pydantic
- pytest
- python
- restful-api
- sast
- self-healing
- site-reliability-engineering
- uvicorn
- webhooks
Log in or sign up for Devpost to join the conversation.