💡 Introduction

Hey folks, welcome to the world of Agentic Tools and DevOps. Today, we’re diving into CI/CD pipelines and exploring how we can debug them efficiently and almost instantly using AI. In this project, we’ll build an AI-powered CI/CD Copilot where AWS Lambda serves as the core logic layer. This Lambda function will interact with the Google Gemini API to analyze pipeline failures and help us debug them intelligently. The goal of this project is not just to integrate AI into a CI/CD workflow, but to help you understand how to build your own AI agent from scratch — one that can assist in real-world DevOps scenarios. So, without further ado, let’s get started. Before we begin, make sure you have the following requirements in place: Docker & Docker Hub account

We will run parts of this project inside Docker containers. Later, we’ll push our custom image to Docker Hub, so make sure you have both Docker installed and a Docker Hub account ready.

Jenkins (Our CI/CD Tool)

We’ll use Jenkins for demonstration purposes. You can either: Run Jenkins as a Docker container, or Install it directly from the official website. Terraform

We will provision our infrastructure — including the Gemini API key (stored securely) and the AWS Lambda function — using Terraform. Make sure: Terraform CLI is installed Your AWS credentials are configured The IAM user has permissions for AWS Lambda and AWS Secrets Manager

If you’re new to Terraform setup, you can follow this guide:

👉 https://blog.praveshsudha.com/getting-started-with-terraform-a-beginners-guide#heading-step-1-install-the-aws-cli The complete source code for this project is available in this GitHub repository:

👉 https://github.com/Pravesh-Sudha/ai-devops-agent Navigate to the cicd-copilot directory to follow along. If you’ve been following my work, you might recognize this project. I originally used this same Node.js Book Reader application to demonstrate how Docker works with Node.js. For this AI-pow