Project: Jenkins Domain specific LLM based on actual Jenkins usage using ci.jenkins.io data
This repository contains the development work for the Google Summer of Code 2025 project focused on building a LLM-powered assistant to diagnose Jenkins build failures.
The initial proposal centered on fine-tuning a domain-specific LLM. However, the project has since evolved to prioritize a more flexible and robust universal agentic architecture. This approach lowers the barrier to entry for users and developers, supports a wider range of models (including any future fine-tuned Jenkins LLM), and provides a more extensible foundation for future development. The core goal remains the same: to create a powerful tool that makes debugging Jenkins failures faster and more intuitive.
- Multi-Agent Root Cause Analysis: Utilizes a chain of specialized AI agents (Router, Specialist, Critic) to perform in-depth analysis of Jenkins build logs.
- Interactive Debugging: Offers a chat-based interface for step-by-step guidance and troubleshooting.
- Dual-Layer Conversation Memory: Remembers context from both the current session (short-term) and all past sessions (long-term) to provide highly relevant and personalized responses.
- Tools: Can interact with the Jenkins workspace, query a knowledge base, and even connect to a live Jenkins instance via the MCP plugin.
- Secure by Design: Features an automatic sanitization pipeline to scrub credentials, API keys, and secrets from any data before it is sent to an LLM.
- Multi-Provider Support: Fully configurable to use a wide range of LLM providers, including Google, OpenAI, Cohere, Mistral, Fireworks, and local Sentence Transformers.
The agent provides a clean and intuitive command-line interface for all its operations.
Proposed Future Graphical User Interface (GUI):

The entire system is built on four fundamental principles that ensure it is powerful, flexible, and secure.
The agent's behavior is not hardcoded. Every critical aspect from the available LLM providers to the specific tools an agent can use is defined in a central config/config.yaml file. This allows for easy extension and modification without changing the core code.
The project features a strict separation of concerns, making it highly maintainable and easy to expand:
- Models (
/models): Each LLM provider is a self-contained class with a consistent interface, loaded dynamically by a factory. - Tools (
/tools): The agent's capabilities are encapsulated in modular tools. - Agents (
agents.py): A centralAgentFactoryassembles agents on demand, combining models and tools based on the configuration. - Pipelines (
/pipelines): High-level, multi-step workflows are defined independently, allowing for complex behaviors like critique-and-refinement loops.
The agent operates with a security-first mindset. All user-provided data, such as build logs and workspace files, is passed through a robust sanitization pipeline.
- Sanitization: The
ContentSanitizerautomatically scrubs credentials, API keys, and other secrets. - Mapping & Rehydration: Secrets are replaced with safe placeholders (e.g.,
[AWS_KEY_1]). These are only converted back to their original values in the final report shown to the user, ensuring the LLM never has access to sensitive information.
The agent features a dedicated, two-layered memory system to maintain context across conversations.
- Short-Term Memory: Remembers the last few turns of the current session for immediate context.
- Long-Term Memory: All conversations are vectorized and stored in a dedicated FAISS index and SQLite database. This allows the agent to retrieve semantically relevant memories from any past session to inform its current reasoning.
This diagram illustrates the key classes and modules and how they are wired together within the application.
This sequence diagram shows the step-by-step flow of data for a single user query in an interactive session, from input to memory retrieval, LLM generation, and final storage.
The project is organized to promote modularity and a clear separation of concerns.
π jenkins-domain-LLM/
βββ π .env.example
βββ π .gitignore
βββ π README.md # The main project README file.
βββ π requirements.txt # A list of all the python dependencies for the project.
βββ π Jen_agent # The main application source code.
β βββ π .env
β βββ π agents.py # Core agent logic and the AgentFactory.
β βββ π cli.py # Main application entrypoint using Typer.
β βββ π data_models.py # Pydantic models for all structured data (reports, settings, etc.).
β βββ π engine.py
β βββ π gui.py
β βββ π log_manager.py
β βββ π memory.py # Implements the dual-layer conversation memory system (SQLite + FAISS).
β βββ π pipeline.py # Factory for creating the correct pipeline based on the selected mode.
β βββ π prompt_examples.py
β βββ π sanitizer.py
β βββ π settings.py # Pydantic models for loading and validating config.yaml.
β βββ π tests.py
β βββ π Benchmark # Scripts for running and analyzing agent performance benchmarks.
β β βββ π BENCHMARK_REPORT.md
β β βββ π analyze_benchmark.py
β β βββ π curate_benchmark_files.py
β β βββ π generate_questions.py
β β βββ π run_benchmark.py
β β βββ π benchmark_data
β β βββ ... # Contains raw data, questions, and results for performance benchmarking.
β βββ π RAG_scripts # Utility scripts, e.g., for ingesting documents into the knowledge base.
β β βββ π ingest_docs.py
β βββ π commands # Logic for interactive slash commands (e.g., /help, /view).
β β βββ π __init__.py
β β βββ π base.py
β β βββ π handlers.py
β βββ π config # Centralized configuration for the entire application.
β β βββ π config.yaml
β βββ π docs
β β βββ π Jenkins-agent.md
β β βββ π agent_interactions.png
β β βββ π agent_interactions.puml
β βββ π models # LLM provider integrations and the factory for creating them.
β β βββ π __init__.py
β β βββ π base.py
β β βββ π utils.py
β β βββ ... (and all provider client folders)
β βββ π pipelines # Defines high-level, multi-step agentic workflows (Operating Modes).
β β βββ π __init__.py
β β βββ π base.py
β β βββ ... (and all pipeline files)
β βββ π prompts # All system and tool prompts, organized by agent/pipeline.
β β βββ ... (and all prompt folders)
β βββ π test
β β βββ ... # Contains sample log files and test artifacts for local development.
β βββ π tools # Agent capabilities (e.g., file access, knowledge base query).
β β βββ π __init__.py
β β βββ ... (and all tool files)
β βββ π ui # (Future) Code for the graphical user interface.
β βββ π tkinter_display.py
βββ π Prototype
β βββ ... # Contains early-stage prototype code and test files.
βββ π Prototype_CLI
β βββ ... # Contains an early command-line interface prototype.
βββ π Reports
βββ ... # Contains all generated diagrams, assets, and architectural documents.Follow these steps to set up and run the Jenkins AI Agent on your local machine.
- Python 3.10 or higher
- Git
git clone https://github.com/chiruu12/jenkins-domain-LLM
cd jenkins-domain-LLM/jen_agentpython -m venv venv
# Activate it
# On macOS/Linux:
source venv/bin/activate
# On Windows:
.\venv\Scripts\activatepip install -r requirements.txtThe agent's configuration is managed through config/config.yaml and environment variables.
-
Review
config.yaml: The default settings are pre-configured to use the localsentence-transformerprovider for memory. You can customize providers, models, and other settings here. -
Set API Keys: Create a
.envfile in the project root to store your API keys. Copy the format from the example below:# .env.example GOOGLE_API_KEY="your-google-api-key" OPENAI_API_KEY="your-openai-api-key" COHERE_API_KEY="your-cohere-api-key" MISTRAL_API_KEY="your-mistral-api-key" FIREWORKS_API_KEY="your-fireworks-api-key"
Before running the application for the first time, you need to initialize the vector store for the Agentic RAG.
Run this script in the root of the project to create and populate the vector store:
./scripts/vector_store.shpython cli.pypython gui.pyWhen you launch the application, you will be guided through a series of prompts to:
- Choose whether to use default settings or customize the session (e.g., select a different LLM provider).
- Select an operating mode (e.g.,
Standard Diagnosis,Interactive Debugging).
Once in an interactive mode, you can type /help at any time to see a list of available slash commands for managing your session.
This project is licensed under the MIT License. See the LICENSE file for details.



